From 0a6b055039770900f688fe8e081b2ace211ed7c5 Mon Sep 17 00:00:00 2001 From: Mesagoppinmypants Date: Sat, 9 Nov 2013 22:47:59 -0500 Subject: [PATCH 01/19] Started Avoid Damage Ability (Spy) --- scripts/expertise/expertise_sp_avoid_damage_1.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/expertise/expertise_sp_avoid_damage_1.py b/scripts/expertise/expertise_sp_avoid_damage_1.py index 8e706bc7..1d31c0e0 100644 --- a/scripts/expertise/expertise_sp_avoid_damage_1.py +++ b/scripts/expertise/expertise_sp_avoid_damage_1.py @@ -1,5 +1,6 @@ -import sys - + buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_fs_avoid_damage'))) +core.skillModService.addSkillMod(actor, 'dodge', 50) +core.skillModService.addSkillMod(actor, 'avoid_area_effects', 75) def addExpertisePoint(core, actor): player = actor.getSlottedObject('ghost') From a9ac0c425d1daa5233af537fa1b29e37abcae3d3 Mon Sep 17 00:00:00 2001 From: Mesagoppinmypants Date: Wed, 4 Dec 2013 21:11:22 -0500 Subject: [PATCH 02/19] Rucksack of the Tusken King I have added the stats to the item. --- .../backpack/backpack_krayt_skull.py | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py b/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py index ccad8904..2fc6cabe 100644 --- a/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py +++ b/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py @@ -1,4 +1,26 @@ import sys def setup(core, object): - return \ No newline at end of file + return + +def equip(core, actor, target): + core.skillModService.addSkillMod(actor, 'agility_modified', 25) + core.skillModService.addSkillMod(actor, 'constitution_modified', 30) + core.skillModService.addSkillMod(actor, 'luck_modified', 25) + core.skillModService.addSkillMod(actor, 'precision_modified', 35) + core.skillModService.addSkillMod(actor, 'stamina_modified', 30) + core.skillModService.addSkillMod(actor, 'strength_modified', 35) + + + return + +def unequip(core, actor, target): + core.skillModService.deductSkillMod(actor, 'agility_modified', 25) + core.skillModService.deductSkillMod(actor, 'constitution_modified', 30) + core.skillModService.deductSkillMod(actor, 'luck_modified', 25) + core.skillModService.deductSkillMod(actor, 'precision_modified', 35) + core.skillModService.deductSkillMod(actor, 'stamina_modified', 30) + core.skillModService.deductSkillMod(actor, 'strength_modified', 35) + + return + \ No newline at end of file From 0247306d4a61123b6902b394524abba5149b3303 Mon Sep 17 00:00:00 2001 From: Levarrishawk Date: Thu, 5 Jun 2014 02:17:07 -0400 Subject: [PATCH 03/19] Changed Quaternion Value for CellObject Spawning Was set 1 to the oX value when it needed to be set 1 to the oY value. --- scripts/static_spawns/kaas/kaas.py | 23 ++++++++++++----------- src/services/StaticService.java | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/static_spawns/kaas/kaas.py b/scripts/static_spawns/kaas/kaas.py index 9ef279d2..9b82905c 100644 --- a/scripts/static_spawns/kaas/kaas.py +++ b/scripts/static_spawns/kaas/kaas.py @@ -5,7 +5,7 @@ import sys # Do not make ANY changes to this script without direct approval from Levarris! from resources.datatables import Options -from resources.datatables import StateStatus +from resources.datatables import State def addPlanetSpawns(core, planet): @@ -13,15 +13,17 @@ def addPlanetSpawns(core, planet): stcSvc = core.staticService objSvc = core.objectService #Dark Temple Area - #Structures - stcSvc.spawnObject('object/building/military/shared_military_base_police_station_imperial_lok_otto.iff', 'kaas', long(0), float(-5117.8), float(80.0), float(-2314.1), float(0), float(0)) - stcSvc.spawnObject('object/building/player/shared_player_house_corellia_medium_style_01.iff', 'kaas', long(0), float(-5078.6), float(80.0), float(-2302.5), float(0), float(0)) - stcSvc.spawnObject('object/building/general/shared_bunker_imperial_weapons_research_facility_01.iff', 'kaas', long(0), float(-5159.5), float(80.0), float(-2298.7), float(0), float(0)) - stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5163.9), float(79.0), float(-2369.6), float(0.71), float(0.71)) - stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5163.9), float(79.0), float(-2351.6), float(0.71), float(0.71)) - stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5072.1), float(79.0), float(-2369.6), float(-0.71), float(0.71)) - stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5072.1), float(79.0), float(-2351.6), float(-0.71), float(0.71)) - stcSvc.spawnObject('object/building/military/shared_outpost_cloning_facility_s02.iff', 'kaas', long(0), float(-5072.1), float(80.0), float(-2279.5), float(0.71), float(0), float(-0.71), float(0)) + #Structures #TODO: Ascertain why the core is not spawning the child cells. + + #building = stcSvc.spawnObject('object/building/military/shared_military_base_police_station_imperial_lok_otto.iff', 'kaas', long(0), float(-5117.8), float(80.0), float(-2314.1), float(0), float(0)) + #print building.getCells().size() + #stcSvc.spawnObject('object/building/player/shared_player_house_corellia_medium_style_01.iff', 'kaas', long(0), float(-5078.6), float(80.0), float(-2302.5), float(0), float(0)) + #stcSvc.spawnObject('object/building/general/shared_bunker_imperial_weapons_research_facility_01.iff', 'kaas', long(0), float(-5159.5), float(80.0), float(-2298.7), float(0), float(0)) + #stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5163.9), float(79.0), float(-2369.6), float(0.71), float(0.71)) + #stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5163.9), float(79.0), float(-2351.6), float(0.71), float(0.71)) + #stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5072.1), float(79.0), float(-2369.6), float(-0.71), float(0.71)) + #stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5072.1), float(79.0), float(-2351.6), float(-0.71), float(0.71)) + #stcSvc.spawnObject('object/building/military/shared_outpost_cloning_facility_s02.iff', 'kaas', long(0), float(-5072.1), float(80.0), float(-2279.5), float(0.71), float(0), float(-0.71), float(0)) #Terminals stcSvc.spawnObject('object/tangible/terminal/shared_terminal_bank.iff', 'kaas', long(0), float(-5080.8), float(80.0), float(-2275.7), float(-0.71), float(0.71)) @@ -54,7 +56,6 @@ def addPlanetSpawns(core, planet): #Dark Temple Interior - stcSvc.spawnObject('object/static/structure/content/shared_exar_kun_torch_01.iff', 'kaas', long(468319), float(0.0), float(-1.3), float(20.8), float(0), float(0)) #Village of the Descendants Area diff --git a/src/services/StaticService.java b/src/services/StaticService.java index bd8679d7..d0c93c5a 100644 --- a/src/services/StaticService.java +++ b/src/services/StaticService.java @@ -188,7 +188,7 @@ public class StaticService implements INetworkDispatch { for (int i = 1; i <= portal.cellCount; i++) { long cellObjectId = core.objectService.getDOId(planetName, "object/cell/shared_cell.iff", 0, object.getObjectID(), i, x, y, z); - CellObject childCell = (CellObject) core.objectService.createObject("object/cell/shared_cell.iff", cellObjectId, core.terrainService.getPlanetByName(planetName), new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), null, true, true); + CellObject childCell = (CellObject) core.objectService.createObject("object/cell/shared_cell.iff", cellObjectId, core.terrainService.getPlanetByName(planetName), new Point3D(0, 0, 0), new Quaternion(0, 0, 1, 0), null, true, true); childCell.setCellNumber(i); building.add(childCell); } From cbd1b83d7bb9a51aa4081db9cea5f209df6f8423 Mon Sep 17 00:00:00 2001 From: Levarrishawk Date: Thu, 5 Jun 2014 06:00:46 -0400 Subject: [PATCH 04/19] Added Missing Mos Eisley NPCs --- .../static_spawns/tatooine/jabbas_palace.py | 13 ++- scripts/static_spawns/tatooine/mos_eisley.py | 95 +++++++++++-------- 2 files changed, 64 insertions(+), 44 deletions(-) diff --git a/scripts/static_spawns/tatooine/jabbas_palace.py b/scripts/static_spawns/tatooine/jabbas_palace.py index ea2ca745..bff5a8aa 100644 --- a/scripts/static_spawns/tatooine/jabbas_palace.py +++ b/scripts/static_spawns/tatooine/jabbas_palace.py @@ -15,13 +15,12 @@ def addPlanetSpawns(core, planet): building = core.objectService.getObject(long(-466404040703346823)) - # TODO Check all NPCs for personalized scripting, change format. - - # TODO Verify proper cell IDs once Jabba's Palace is spawning properly again. - #reelo baruk stcSvc.spawnObject('object/mobile/shared_reelo_baruk.iff', 'tatooine', building.getCellByCellNumber(1), float(-3.5), float(0.2), float(113.5), float(0), float(0), float(0), float(0)) + #Entry Ambient Sounds #TODO: Fix object/soundobject spawning + #stcSvc.spawnObject('object/soundobject/shared_soundobject_jabba_palace_entrance.iff', 'tatooine', building.getCellByCellNumber(1), float(-3.5), float(0.2), float(113.5), float(0), float(0), float(0), float(0)) + #ree yees stcSvc.spawnObject('object/mobile/shared_dressed_gran_thug_male_01.iff', 'tatooine', building.getCellByCellNumber(1), float(5.8), float(0.2), float(115.7), float(-0.71), float(0), float(0.7), float(0)) @@ -43,6 +42,9 @@ def addPlanetSpawns(core, planet): #oola stcSvc.spawnObject('object/mobile/shared_oola.iff', 'tatooine', building.getCellByCellNumber(22), float(-10.3), float(2.0), float(43.9), float(-0.71), float(0), float(0.70), float(0)) + #Ambient Sound + #stcSvc.spawnObject('object/soundobject/shared_soundobject_jabba_audience_chamber.iff', 'tatooine', building.getCellByCellNumber(22), float(-10.3), float(2.0), float(43.9), float(-0.9), float(0), float(0.42), float(0)) + #Boba Fett stcSvc.spawnObject('object/mobile/shared_boba_fett.iff', 'tatooine', building.getCellByCellNumber(22), float(-1.0), float(3.0), float(33.1), float(0), float(0), float(0), float(0)) @@ -58,6 +60,9 @@ def addPlanetSpawns(core, planet): #Max Rebo stcSvc.spawnObject('object/mobile/shared_max_rebo.iff', 'tatooine', building.getCellByCellNumber(22), float(-1.4), float(3.0), float(26.9), float(-0.9), float(0), float(0.42), float(0)) + #Music + #stcSvc.spawnObject('object/soundobject/shared_soundobject_jabba_max_rebo_band.iff', 'tatooine', building.getCellByCellNumber(22), float(-1.4), float(3.0), float(26.9), float(-0.9), float(0), float(0.42), float(0)) + #Droopy Mccool stcSvc.spawnObject('object/mobile/shared_droopy_mccool.iff', 'tatooine', building.getCellByCellNumber(22), float(-3.9), float(3.0), float(26.1), float(-0.9), float(0), float(0.42), float(0)) diff --git a/scripts/static_spawns/tatooine/mos_eisley.py b/scripts/static_spawns/tatooine/mos_eisley.py index b737c6c8..90c02333 100644 --- a/scripts/static_spawns/tatooine/mos_eisley.py +++ b/scripts/static_spawns/tatooine/mos_eisley.py @@ -6,6 +6,7 @@ import sys from resources.datatables import Options from resources.datatables import State +from resources.datatables import StateStatus def addPlanetSpawns(core, planet): @@ -13,7 +14,7 @@ def addPlanetSpawns(core, planet): stcSvc = core.staticService objSvc = core.objectService - # TODO Check all NPCs for personalized scripting, change format. + # TODO: Add NPCs sitting at Cantina tables with SittingOnChair bitmask. #Cantina Interior building = core.objectService.getObject(long(1082874)) @@ -105,7 +106,7 @@ def addPlanetSpawns(core, planet): anetiaKahryn.setCustomName('Anetia Kah\'ryn') anetiaKahryn.setOptionsBitmask(256) - figrinDan = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', building.getCellByCellNumber(6), float(3.7), float(-0.9), float(-14.4), float(0), float(0.42), float(0), float(0.91)) + figrinDan = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_figrin_dan.iff', 'tatooine', building.getCellByCellNumber(6), float(3.7), float(-0.9), float(-14.4), float(0), float(0.42), float(0), float(0.91)) figrinDan.setCustomName('Figrin D\'an') figrinDan.setOptionsBitmask(256) @@ -142,6 +143,10 @@ def addPlanetSpawns(core, planet): building = core.objectService.getObject(long(-466404040703447347)) stcSvc.spawnObject('object/mobile/shared_han_solo.iff', 'tatooine', building.getCellByCellNumber(9), float(32.3), float(7.0), float(1.6), float(0), float(0), float(0), float(0)) + valarian = stcSvc.spawnObject('object/mobile/shared_lady_valarian.iff', 'tatooine', building.getCellByCellNumber(4), float(-21.5), float(9.0), float(0.5), float(0), float(0.70), float(0), float(-0.71)) + valarian.setCustomName('Lady Valarian') + valarian.setOptionsBitmask(256) + #Medical Center Interior #Theater Interior @@ -150,155 +155,165 @@ def addPlanetSpawns(core, planet): #Outside businessman2 = stcSvc.spawnObject('object/mobile/shared_dressed_businessman_human_male_01.iff', 'tatooine', long(0), float(3663.3), float(4.0), float(-4738.6), float(0), float(0)) - businessman2.setCustomName2('a Businessman') + businessman2.setCustomName('a Businessman') businessman2.setOptionsBitmask(256) noble2 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_01.iff', 'tatooine', long(0), float(3542.3), float(5.0), float(-4826.0), float(0.42), float(0.91)) - noble2.setCustomName2('a Noble') + noble2.setCustomName('a Noble') noble2.setOptionsBitmask(256) commoner11 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_06.iff', 'tatooine', long(0), float(3529.1), float(5.0), float(-4900.4), float(0.42), float(0.91)) - commoner11.setCustomName2('a Commoner') + commoner11.setCustomName('a Commoner') commoner11.setOptionsBitmask(256) businessman3 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_trandoshan_male_02.iff', 'tatooine', long(0), float(3595.7), float(5.0), float(-4740.1), float(0), float(0)) - businessman3.setCustomName2('a Businessman') + businessman3.setCustomName('a Businessman') businessman3.setOptionsBitmask(256) jawa1 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3663.3), float(5.0), float(-4858.6), float(0), float(0)) - jawa1.setCustomName2('a Jawa') + jawa1.setCustomName('a Jawa') jawa1.setOptionsBitmask(256) commoner12 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_moncal_male_01.iff', 'tatooine', long(0), float(3490.3), float(5.0), float(-4799.4), float(0), float(0)) - commoner12.setCustomName2('a Scientist') + commoner12.setCustomName('a Scientist') commoner12.setOptionsBitmask(256) commoner13 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_zabrak_female_02.iff', 'tatooine', long(0), float(3559.7), float(5.0), float(-4725.9), float(0), float(0)) - commoner13.setCustomName2('a Commoner') + commoner13.setCustomName('a Commoner') commoner13.setOptionsBitmask(256) commoner14 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_devaronian_male_01.iff', 'tatooine', long(0), float(3527.7), float(5.0), float(-4721.1), float(0.71), float(0.71)) - commoner14.setCustomName2('a Commoner') + commoner14.setCustomName('a Commoner') commoner14.setOptionsBitmask(256) commoner15 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_aqualish_female_01.iff', 'tatooine', long(0), float(3514.9), float(5.0), float(-4737.8), float(0), float(0)) - commoner15.setCustomName2('a Commoner') + commoner15.setCustomName('a Commoner') commoner15.setOptionsBitmask(256) jawa2 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3485.2), float(4.9), float(-4859.2), float(0), float(0)) - jawa2.setCustomName2('a Jawa') + jawa2.setCustomName('a Jawa') jawa2.setOptionsBitmask(256) jawa3 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3465.3), float(5.0), float(-4860.1), float(0.71), float(-0.71)) - jawa3.setCustomName2('a Jawa') + jawa3.setCustomName('a Jawa') jawa3.setOptionsBitmask(256) jawa4 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3486.8), float(5.0), float(-4884.7), float(0.43051), float(-0.9025)) - jawa4.setCustomName2('a Jawa') + jawa4.setCustomName('a Jawa') jawa4.setOptionsBitmask(256) jawa5 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3487.1), float(5.0), float(-4886.0), float(0.95105), float(0.3090)) - jawa5.setCustomName2('a Jawa') + jawa5.setCustomName('a Jawa') jawa5.setOptionsBitmask(256) jawa6 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3488.8), float(5.0), float(-4884.4), float(0.3255), float(-0.9455)) - jawa6.setCustomName2('a Jawa') + jawa6.setCustomName('a Jawa') jawa6.setOptionsBitmask(256) jawa7 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3472.2), float(5.0), float(-4918.4), float(0), float(0)) - jawa7.setCustomName2('a Jawa') + jawa7.setCustomName('a Jawa') jawa7.setOptionsBitmask(256) jawa8 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3471.4), float(5.0), float(-4919.5), float(0), float(0)) - jawa8.setCustomName2('a Jawa') + jawa8.setCustomName('a Jawa') jawa8.setOptionsBitmask(256) jawa9 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3470.3), float(5.0), float(-4918.7), float(0), float(0)) - jawa9.setCustomName2('a Jawa') + jawa9.setCustomName('a Jawa') jawa9.setOptionsBitmask(256) bib = stcSvc.spawnObject('object/mobile/shared_bib_fortuna.iff', 'tatooine', long(0), float(3552.4), float(5.0), float(-4933.2), float(0.31730), float(-0.9483)) - bib.setCustomName2('Bib Fortuna') + bib.setCustomName('Bib Fortuna') bib.setOptionsBitmask(256) commoner16 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_06.iff', 'tatooine', long(0), float(3398.2), float(4.0), float(-4654.2), float(0.42), float(0.91)) - commoner16.setCustomName2('a Commoner') + commoner16.setCustomName('a Commoner') commoner16.setOptionsBitmask(256) noble3 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_01.iff', 'tatooine', long(0), float(3396.3), float(4.0), float(-4774.1), float(0.42), float(0.91)) - noble3.setCustomName2('a Noble') + noble3.setCustomName('a Noble') noble3.setOptionsBitmask(256) entertainer1 = stcSvc.spawnObject('object/mobile/shared_dressed_entertainer_trainer_twk_female_01.iff', 'tatooine', long(0), float(3305.7), float(5.6), float(-4771.7), float(0), float(0)) - entertainer1.setCustomName2('an Entertainer') + entertainer1.setCustomName('an Entertainer') entertainer1.setOptionsBitmask(256) r3m6 = stcSvc.spawnObject('object/mobile/shared_r3.iff', 'tatooine', long(0), float(3460.1), float(4.0), float(-4898.2), float(0.38), float(-0.92)) - r3m6.setCustomName2('R3-M6') + r3m6.setCustomName('R3-M6') r3m6.setOptionsBitmask(256) eg1 = stcSvc.spawnObject('object/mobile/shared_eg6_power_droid.iff', 'tatooine', long(0), float(3463.8), float(4.0), float(-4882.6), float(-0.38), float(0.92)) - eg1.setCustomName2('an EG-6 Power Droid') + eg1.setCustomName('an EG-6 Power Droid') eg1.setOptionsBitmask(256) commoner17 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_zabrak_female_02.iff', 'tatooine', long(0), float(3452.6), float(4.0), float(-4937.1), float(0), float(0)) - commoner17.setCustomName2('a Commoner') + commoner17.setCustomName('a Commoner') commoner17.setOptionsBitmask(256) lifter1 = stcSvc.spawnObject('object/mobile/shared_cll8_binary_load_lifter.iff', 'tatooine', long(0), float(3547), float(5.0), float(-4768.9), float(0), float(0)) - lifter1.setCustomName2('a CLL-8 Binary Load Lifter') + lifter1.setCustomName('a CLL-8 Binary Load Lifter') lifter1.setOptionsBitmask(256) r3j7 = stcSvc.spawnObject('object/mobile/shared_r3.iff', 'tatooine', long(0), float(3311.1), float(4.0), float(-4820.2), float(0.38), float(-0.92)) - r3j7.setCustomName2('R3-J7') + r3j7.setCustomName('R3-J7') r3j7.setOptionsBitmask(256) noble4 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_03.iff', 'tatooine', long(0), float(3255.3), float(4.0), float(-4848.1), float(0.42), float(0.91)) - noble4.setCustomName2('a Noble') + noble4.setCustomName('a Noble') noble4.setOptionsBitmask(256) byxlePedette = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_byxle.iff', 'tatooine', long(0), float(3365), float(5), float(-4639), float(0.99), float(0.12)) byxlePedette.setOptionsBitmask(264) errikDarksider = stcSvc.spawnObject('object/mobile/shared_dressed_herald_tatooine_01.iff', 'tatooine', long(0), float(3381), float(4.6), float(-4498), float(0.91), float(0.40)) - errikDarksider.setCustomName2('Errik Darksider') + errikDarksider.setCustomName('Errik Darksider') errikDarksider.setOptionsBitmask(256) gendra = stcSvc.spawnObject('object/mobile/shared_dressed_gendra.iff', 'tatooine', long(0), float(3308), float(5.6), float(-4785), float(0.84), float(0.53)) gendra.setOptionsBitmask(264) lurval = stcSvc.spawnObject('object/mobile/shared_lurval.iff', 'tatooine', long(0), float(3387), float(5), float(-4791), float(-0.4), float(0.91)) - lurval.setCustomName2('Lurval') + lurval.setCustomName('Lurval') lurval.setOptionsBitmask(256) matildaCarson = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_02.iff', 'tatooine', long(0), float(3490.2), float(5), float(-4778), float(0.87), float(0.48)) - matildaCarson.setCustomName2('Matilda Carson') + matildaCarson.setCustomName('Matilda Carson') matildaCarson.setOptionsBitmask(256) vanvi = stcSvc.spawnObject('object/mobile/shared_dressed_bestine_artist01.iff', 'tatooine', long(0), float(3312), float(5), float(-4655), float(0.95), float(-0.28)) - vanvi.setCustomName2('Vanvi Hotn') + vanvi.setCustomName('Vanvi Hotn') vanvi.setOptionsBitmask(256) + harburik = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_lt_harburik.iff', 'tatooine', long(0), float(3486), float(5), float(-4740), float(0), float(-0.71), float(0), float(0.71)) + harburik.setCustomName('Lt. Harburik') + harburik.setOptionsBitmask(256) + + trehla = stcSvc.spawnObject('object/mobile/shared_dressed_tutorial_mentor.iff', 'tatooine', long(0), float(3484), float(5), float(-4808), float(0), float(0.92), float(0), float(-0.38)) + trehla.setCustomName('Trehla Keelo') + trehla.setOptionsBitmask(256) + #Eisley Legacy Quest NPCs vourk = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_santos.iff', 'tatooine', long(0), float(3520.0), float(5.0), float(-4821.0), float(0.42), float(0.91)) - vourk.setCustomName2('Vourk Ver\'Zremp') + vourk.setCustomName('Vourk Ver\'Zremp') vourk.setOptionsBitmask(256) - mayor = stcSvc.spawnObject('object/mobile/shared_dressed_mayor_mikdanyell_guhrantt.iff', 'tatooine', long(1279960), float(1.2), float(2.5), float(5.4), float(0), float(0)) + building = core.objectService.getObject(long(1279956)) + mayor = stcSvc.spawnObject('object/mobile/shared_dressed_mayor_mikdanyell_guhrantt.iff', 'tatooine', building.getCellByCellNumber(4), float(1.2), float(2.5), float(5.4), float(0), float(0), float(0), float(0)) #mayor.setOptionsBitmask(264) enthaKandela = stcSvc.spawnObject('object/mobile/shared_dressed_entha_kandela.iff', 'tatooine', long(0), float(3511), float(5.0), float(-4785), float(0.70), float(0.71)) - enthaKandela.setCustomName2('Entha Kandela') + enthaKandela.setCustomName('Entha Kandela') enthaKandela.setOptionsBitmask(256) purvis = stcSvc.spawnObject('object/mobile/shared_dressed_purvis_arrison.iff', 'tatooine', long(0), float(3512.4), float(5.0), float(-4764.9), float(0.38), float(-0.92)) - purvis.setCustomName2('Purvis Arrison') + purvis.setCustomName('Purvis Arrison') purvis.setOptionsBitmask(256) - peawpRdawc = stcSvc.spawnObject('object/mobile/shared_peawp_bodyguard_trainer.iff', 'tatooine', long(1189639), float(-11.8), float(1.1), float(-10.1), float(0), float(0)) - #peawpRdawc.setCustomName2('Peawp R\'dawc') - #peawpRdawc.setOptionsBitmask(256) + building = core.objectService.getObject(long(1189630)) + peawpRdawc = stcSvc.spawnObject('object/mobile/shared_peawp_bodyguard_trainer.iff', 'tatooine', building.getCellByCellNumber(9), float(-11.8), float(1.1), float(-10.1), float(0), float(0), float(0), float(0)) + peawpRdawc.setCustomName('Peawp R\'dawc') + peawpRdawc.setOptionsBitmask(256) nikoBrehe = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_niko.iff', 'tatooine', long(0), float(3506.7), float(5.0), float(-4795.8), float(0.70), float(0.71)) nikoBrehe.setOptionsBitmask(264) From 4ae300aa556eaa205de826bd073b76e20e4da48c Mon Sep 17 00:00:00 2001 From: Iosnowore Kun Date: Thu, 5 Jun 2014 08:41:56 -0400 Subject: [PATCH 05/19] Revert "Rucksack of the Tusken King" This reverts commit a9ac0c425d1daa5233af537fa1b29e37abcae3d3. --- .../backpack/backpack_krayt_skull.py | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py b/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py index 2fc6cabe..ccad8904 100644 --- a/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py +++ b/scripts/object/tangible/wearables/backpack/backpack_krayt_skull.py @@ -1,26 +1,4 @@ import sys def setup(core, object): - return - -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'agility_modified', 25) - core.skillModService.addSkillMod(actor, 'constitution_modified', 30) - core.skillModService.addSkillMod(actor, 'luck_modified', 25) - core.skillModService.addSkillMod(actor, 'precision_modified', 35) - core.skillModService.addSkillMod(actor, 'stamina_modified', 30) - core.skillModService.addSkillMod(actor, 'strength_modified', 35) - - - return - -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'agility_modified', 25) - core.skillModService.deductSkillMod(actor, 'constitution_modified', 30) - core.skillModService.deductSkillMod(actor, 'luck_modified', 25) - core.skillModService.deductSkillMod(actor, 'precision_modified', 35) - core.skillModService.deductSkillMod(actor, 'stamina_modified', 30) - core.skillModService.deductSkillMod(actor, 'strength_modified', 35) - - return - \ No newline at end of file + return \ No newline at end of file From 908e9745859efa824895766c165fbaa15b54c173 Mon Sep 17 00:00:00 2001 From: Iosnowore Kun Date: Thu, 5 Jun 2014 08:42:24 -0400 Subject: [PATCH 06/19] Revert "Started Avoid Damage Ability (Spy)" This reverts commit 0a6b055039770900f688fe8e081b2ace211ed7c5. --- scripts/expertise/expertise_sp_avoid_damage_1.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/expertise/expertise_sp_avoid_damage_1.py b/scripts/expertise/expertise_sp_avoid_damage_1.py index 1d31c0e0..8e706bc7 100644 --- a/scripts/expertise/expertise_sp_avoid_damage_1.py +++ b/scripts/expertise/expertise_sp_avoid_damage_1.py @@ -1,6 +1,5 @@ - buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_fs_avoid_damage'))) -core.skillModService.addSkillMod(actor, 'dodge', 50) -core.skillModService.addSkillMod(actor, 'avoid_area_effects', 75) +import sys + def addExpertisePoint(core, actor): player = actor.getSlottedObject('ghost') From a4302bc25ef32ff768e14cf382cf978e7827bae6 Mon Sep 17 00:00:00 2001 From: Bronco69 Date: Thu, 5 Jun 2014 15:07:09 +0200 Subject: [PATCH 07/19] RLS audio + visual implemented --- src/services/LootService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/LootService.java b/src/services/LootService.java index 6b1a89c2..93d543dd 100644 --- a/src/services/LootService.java +++ b/src/services/LootService.java @@ -223,7 +223,9 @@ public class LootService implements INetworkDispatch { // RLS chest effect if (droppedItem.getAttachment("LootItemName").toString().contains("Loot Chest")){ - requester.playEffectObject("appearance/pt_loot_chest.prt", ""); + requester.playEffectObject("appearance/pt_rare_chest.prt", ""); + + requester.playMusic("sound/rare_loot_chest.snd"); if (requester.getClient().isGM()) { requester.sendSystemMessage("GM Message: Played rlc effect due to RLC dropping.", DisplayType.Broadcast); } From 9e1d19d5255f838a9ac9e916e6ecd34f1a6ca1c8 Mon Sep 17 00:00:00 2001 From: CharonInferar Date: Thu, 5 Jun 2014 15:20:28 +0200 Subject: [PATCH 08/19] custom attributes added to loot scripts loot scripts can now have custom attribute arrays for better customization of drops --- src/main/NGECore.java | 10 +++- src/services/DevService.java | 2 +- src/services/LootService.java | 91 +++++++++++++++++--------------- src/services/TerrainService.java | 28 +++++----- 4 files changed, 75 insertions(+), 56 deletions(-) diff --git a/src/main/NGECore.java b/src/main/NGECore.java index 95a4ecb7..92dde2db 100644 --- a/src/main/NGECore.java +++ b/src/main/NGECore.java @@ -260,7 +260,7 @@ public class NGECore { options.setFilePath("options.cfg"); boolean optionsConfigLoaded = options.loadConfigFile(); - if (optionsConfigLoaded && options.getInt("CLEAN.ODB.FOLDERS") > 0) { + if (optionsConfigLoaded && options.getInt("CLEAN.ODB.FOLDERS") > 0 || getExcludedDevelopers().contains(System.getProperty("user.name"))){ File baseFolder = new File("./odb"); if (baseFolder.isDirectory()) { @@ -790,5 +790,13 @@ public class NGECore { public void setMotd(String motd) { this.motd = motd; } + + public Vector getExcludedDevelopers(){ + Vector excludedDevelopers = new Vector(); + excludedDevelopers.add("Charon"); + // Feel free to add your OS user account name here to exclude yourself from loading buildouts and snapshots + // without having to change options.cfg all the time + return excludedDevelopers; + } } diff --git a/src/services/DevService.java b/src/services/DevService.java index 18a090fa..c7a7381f 100644 --- a/src/services/DevService.java +++ b/src/services/DevService.java @@ -1049,7 +1049,7 @@ public class DevService implements INetworkDispatch { colorCrystal.getAttributes().put("@obj_attr_n:condition", "100/100"); colorCrystal.getAttributes().put("@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF "); colorCrystal.setAttachment("radial_filename", "item/tunable"); - core.lootService.setCustomization(colorCrystal, "colorcrystal"); + core.lootService.setCustomization(colorCrystal, "colorcrystal",null,null); inventory.add(colorCrystal); TangibleObject lavaCrystal = (TangibleObject) core.objectService.createObject("object/tangible/component/weapon/lightsaber/shared_lightsaber_module_lava_crystal.iff", planet); diff --git a/src/services/LootService.java b/src/services/LootService.java index 93d543dd..4f4dd549 100644 --- a/src/services/LootService.java +++ b/src/services/LootService.java @@ -39,7 +39,9 @@ import java.util.Map; import java.util.Random; import java.util.Vector; import java.util.concurrent.atomic.AtomicInteger; + import protocol.swg.PlayClientEffectObjectTransformMessage; +import protocol.swg.StopClientEffectObjectByLabel; import resources.objects.craft.DraftSchematic; import resources.common.OutOfBand; import resources.datatables.DisplayType; @@ -214,7 +216,7 @@ public class LootService implements INetworkDispatch { // For autoloot //SWGObject requesterInventory = requester.getSlottedObject("inventory"); - System.out.println("lootRollSession.getDroppedItems() " + (lootRollSession.getDroppedItems())); + //System.out.println("lootRollSession.getDroppedItems() " + (lootRollSession.getDroppedItems())); for (TangibleObject droppedItem : lootRollSession.getDroppedItems()){ //droppedItem.setAttachment("radial_filename", "lootitem"); @@ -223,12 +225,9 @@ public class LootService implements INetworkDispatch { // RLS chest effect if (droppedItem.getAttachment("LootItemName").toString().contains("Loot Chest")){ + requester.playEffectObject("appearance/pt_rare_chest.prt", ""); - - requester.playMusic("sound/rare_loot_chest.snd"); - if (requester.getClient().isGM()) { - requester.sendSystemMessage("GM Message: Played rlc effect due to RLC dropping.", DisplayType.Broadcast); - } + requester.playMusic("sound/rare_loot_chest.snd"); } } @@ -511,7 +510,7 @@ public class LootService implements INetworkDispatch { else remainder += span; if (randomItemFromGroup <= remainder){ - System.out.println("this loot pool will drop something"); // e.g. kraytpearl_range + //System.out.println("this loot pool will drop something"); // e.g. kraytpearl_range handleLootPool(lootPoolNames[i],lootRollSession); // This loot pool will drop something test = true; break; @@ -522,7 +521,7 @@ public class LootService implements INetworkDispatch { } private void handleLootPool(String poolName,LootRollSession lootRollSession){ - System.err.println("poolName.toLowerCase() " + poolName.toLowerCase()); + //System.err.println("poolName.toLowerCase() " + poolName.toLowerCase()); // Fetch the loot pool data from the poolName.py script String path = "scripts/loot/lootPools/"+poolName.toLowerCase(); Vector itemNames = (Vector)core.scriptService.fetchStringVector(path,"itemNames"); @@ -729,7 +728,7 @@ public class LootService implements INetworkDispatch { // if (customizationValues!=null) // setCustomization(droppedItem, itemName); - setCustomization(droppedItem, itemName); // for now + setCustomization(droppedItem, itemName, customizationAttributes, customizationValues); // for now handleSpecialItems(droppedItem, itemName); @@ -992,6 +991,7 @@ public class LootService implements INetworkDispatch { remainder += span; if (randomItemFromPool<=remainder){ fillChest4(itemNames.get(i), owner, chest); + //fillChest4("colorcrystal", owner, chest); //break; return; } @@ -1050,6 +1050,7 @@ public class LootService implements INetworkDispatch { Vector itemStats = null; Vector itemSkillMods = null; Vector STFparams = null; + Vector addToCollections = null; if(core.scriptService.getMethod(itemPath,"","itemTemplate")==null){ String errorMessage = "Loot item '" + itemName + "' has no template function assigned in its script. Please contact Charon about this issue."; @@ -1115,6 +1116,9 @@ public class LootService implements INetworkDispatch { if(core.scriptService.getMethod(itemPath,"","STFparams")!=null) STFparams = (Vector)core.scriptService.fetchStringVector(itemPath,"STFparams"); + if(core.scriptService.getMethod(itemPath,"","AddToCollections")!=null) + addToCollections = (Vector)core.scriptService.fetchStringVector(itemPath,"AddToCollections"); + System.out.println("itemTemplate " + itemTemplate); @@ -1166,7 +1170,7 @@ public class LootService implements INetworkDispatch { setSTFParams(droppedItem, STFparams); } - setCustomization(droppedItem, itemName); // for now + setCustomization(droppedItem, itemName, customizationAttributes, customizationValues); // for now handleSpecialItems(droppedItem, itemName); @@ -1197,7 +1201,7 @@ public class LootService implements INetworkDispatch { droppedItem.getAttributes().put("@obj_attr_n:rare_loot_category", "\\#D1F56F Rare Item \\#FFFFFF "); SWGObject inventory = owner.getSlottedObject("inventory"); inventory.add(droppedItem); - System.out.println("ACTUAL DROP " + droppedItem.getTemplate()); + // System.out.println("ACTUAL DROP " + droppedItem.getTemplate()); } else { DraftSchematic droppedSchematic = createDroppedSchematic(itemTemplate,owner.getPlanet()); @@ -1205,7 +1209,7 @@ public class LootService implements INetworkDispatch { droppedSchematic.getAttributes().put("@obj_attr_n:rare_loot_category", "\\#D1F56F Rare Item \\#FFFFFF "); SWGObject inventory = owner.getSlottedObject("inventory"); inventory.add(droppedSchematic); - System.out.println("ACTUAL DROP " + droppedSchematic.getTemplate()); + //System.out.println("ACTUAL DROP " + droppedSchematic.getTemplate()); } } @@ -1215,20 +1219,28 @@ public class LootService implements INetworkDispatch { } - public void setCustomization(TangibleObject droppedItem,String itemName) { + public void setCustomization(TangibleObject droppedItem,String itemName, Vector customizationAttributes, Vector customizationValues) { // Example color crystal if (itemName.contains("colorcrystal")) { System.out.println("colorcrystal"); - int crystalColor = new Random().nextInt(11); - - droppedItem.setCustomizationVariable("/private/index_color_1", (byte) crystalColor); - droppedItem.getAttributes().put("@obj_attr_n:condition", "100/100"); - droppedItem.getAttributes().put("@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF "); - droppedItem.getAttributes().put("@obj_attr_n:color", resources.datatables.LightsaberColors.get(crystalColor)); - droppedItem.setAttachment("radial_filename", "item/tunable"); - //droppedItem.getAttributes().put("@obj_attr_n:color", "@jedi_spam:saber_color_" + crystalColor); // Commented out for now + if (customizationAttributes==null){ + int crystalColor = new Random().nextInt(11); + + droppedItem.setCustomizationVariable("/private/index_color_1", (byte) crystalColor); + droppedItem.getAttributes().put("@obj_attr_n:condition", "100/100"); + droppedItem.getAttributes().put("@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF "); + droppedItem.getAttributes().put("@obj_attr_n:color", resources.datatables.LightsaberColors.get(crystalColor)); + droppedItem.setAttachment("radial_filename", "item/tunable"); + //droppedItem.getAttributes().put("@obj_attr_n:color", "@jedi_spam:saber_color_" + crystalColor); // Commented out for now + } else { + for (int i=0; i customizationPaths = (Vector)core.scriptService.fetchStringVector(path,"itemCustomizationPaths"); -// Vector customizationValues = (Vector)core.scriptService.fetchIntegerVector(path,"itemCustomizationValues"); -// for (int i=0;i 0) { - try { - core.objectService.loadSnapshotObjects(planet); - } catch (Exception e) { - e.printStackTrace(); + if (!core.getExcludedDevelopers().contains(System.getProperty("user.name"))){ + try { + core.objectService.loadSnapshotObjects(planet); + } catch (Exception e) { + e.printStackTrace(); + } } } if (loaded && config.getInt("LOAD.BUILDOUT_OBJECTS") > 0) { - if (! config.keyExists("LOAD.BUILDOUT_ONLY_FOR")){ - try { - core.objectService.loadBuildoutObjects(planet); - } catch (InstantiationException | IllegalAccessException e) { - e.printStackTrace(); - } - } else { - if (planet.getName().equals(config.getString("LOAD.BUILDOUT_ONLY_FOR"))){ + if (!core.getExcludedDevelopers().contains(System.getProperty("user.name"))){ + if (! config.keyExists("LOAD.BUILDOUT_ONLY_FOR")){ try { core.objectService.loadBuildoutObjects(planet); } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); } + } else { + if (planet.getName().equals(config.getString("LOAD.BUILDOUT_ONLY_FOR"))){ + try { + core.objectService.loadBuildoutObjects(planet); + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } } } } From d8d0336c7091749fed5d81bdcc848c98db900ff3 Mon Sep 17 00:00:00 2001 From: Seefo Date: Thu, 5 Jun 2014 09:54:21 -0400 Subject: [PATCH 09/19] Fixed several RLS items and draft schematics --- .../lootItems/rarelootchest/animal_hide_rack_style_1.py | 2 +- .../lootItems/rarelootchest/animal_hide_rack_style_2.py | 2 +- .../lootItems/rarelootchest/animal_hide_rack_style_3.py | 2 +- .../lootItems/rarelootchest/animal_hide_rack_style_4.py | 2 +- scripts/loot/lootItems/rarelootchest/bar_corner_piece_1.py | 2 +- scripts/loot/lootItems/rarelootchest/bar_corner_piece_2.py | 2 +- scripts/loot/lootItems/rarelootchest/bar_corner_piece_3.py | 2 +- scripts/loot/lootItems/rarelootchest/bar_counter_large.py | 2 +- .../loot/lootItems/rarelootchest/jedi_statue_schematic.py | 2 +- .../loot/lootItems/rarelootchest/jubilee_wheel_schematic.py | 2 +- .../lootItems/rarelootchest/large_fruit_stand_schematic.py | 2 +- .../loot/lootItems/rarelootchest/miniature_wroshyr_tree.py | 2 +- .../loot/lootItems/rarelootchest/target_dummy_black_sun.py | 6 +++++- scripts/loot/lootItems/rarelootchest/target_dummy_rebel.py | 6 +++++- .../lootItems/rarelootchest/target_dummy_stormtrooper.py | 6 +++++- scripts/loot/lootItems/rarelootchest/war_terminal.py | 2 +- 16 files changed, 28 insertions(+), 16 deletions(-) diff --git a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_1.py b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_1.py index 26f9ce06..efca3ae3 100644 --- a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_1.py +++ b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_1.py @@ -3,5 +3,5 @@ def itemTemplate(): # Doesn't work because of https://github.com/projectswg/engine/blob/master/src/engine/resources/objects/Baseline.java#L446 #return ['object/draft_schematic/furniture/shared_furniture_hide_rack_s01.iff'] # just returning a dummy template for now - return ['object/tangible/bug_jar/shared_craftable_bug_habitat.iff'] + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] diff --git a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_2.py b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_2.py index 7e5d20d4..beac7982 100644 --- a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_2.py +++ b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_2.py @@ -3,5 +3,5 @@ def itemTemplate(): # Doesn't work because of https://github.com/projectswg/engine/blob/master/src/engine/resources/objects/Baseline.java#L446 #return ['object/draft_schematic/furniture/shared_furniture_hide_rack_s02.iff'] # just returning a dummy template for now - return ['object/tangible/bug_jar/shared_craftable_bug_habitat.iff'] + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] diff --git a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_3.py b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_3.py index 31df3dc8..7c098745 100644 --- a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_3.py +++ b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_3.py @@ -3,5 +3,5 @@ def itemTemplate(): # Doesn't work because of https://github.com/projectswg/engine/blob/master/src/engine/resources/objects/Baseline.java#L446 #return ['object/draft_schematic/furniture/shared_furniture_hide_rack_s03.iff'] # just returning a dummy template for now - return ['object/tangible/bug_jar/shared_craftable_bug_habitat.iff'] + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] diff --git a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_4.py b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_4.py index d2a90a57..3f169c40 100644 --- a/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_4.py +++ b/scripts/loot/lootItems/rarelootchest/animal_hide_rack_style_4.py @@ -3,5 +3,5 @@ def itemTemplate(): # Doesn't work because of https://github.com/projectswg/engine/blob/master/src/engine/resources/objects/Baseline.java#L446 #return ['object/draft_schematic/furniture/shared_furniture_hide_rack_s04.iff'] # just returning a dummy template for now - return ['object/tangible/bug_jar/shared_craftable_bug_habitat.iff'] + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] diff --git a/scripts/loot/lootItems/rarelootchest/bar_corner_piece_1.py b/scripts/loot/lootItems/rarelootchest/bar_corner_piece_1.py index 2a8d9aca..bee43764 100644 --- a/scripts/loot/lootItems/rarelootchest/bar_corner_piece_1.py +++ b/scripts/loot/lootItems/rarelootchest/bar_corner_piece_1.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/draft_schematic/furniture/shared_furniture_diner_counter_corner.iff'] # needs verification + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] # needs verification diff --git a/scripts/loot/lootItems/rarelootchest/bar_corner_piece_2.py b/scripts/loot/lootItems/rarelootchest/bar_corner_piece_2.py index 2a8d9aca..bee43764 100644 --- a/scripts/loot/lootItems/rarelootchest/bar_corner_piece_2.py +++ b/scripts/loot/lootItems/rarelootchest/bar_corner_piece_2.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/draft_schematic/furniture/shared_furniture_diner_counter_corner.iff'] # needs verification + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] # needs verification diff --git a/scripts/loot/lootItems/rarelootchest/bar_corner_piece_3.py b/scripts/loot/lootItems/rarelootchest/bar_corner_piece_3.py index 2a8d9aca..bee43764 100644 --- a/scripts/loot/lootItems/rarelootchest/bar_corner_piece_3.py +++ b/scripts/loot/lootItems/rarelootchest/bar_corner_piece_3.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/draft_schematic/furniture/shared_furniture_diner_counter_corner.iff'] # needs verification + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] # needs verification diff --git a/scripts/loot/lootItems/rarelootchest/bar_counter_large.py b/scripts/loot/lootItems/rarelootchest/bar_counter_large.py index 2a8d9aca..bee43764 100644 --- a/scripts/loot/lootItems/rarelootchest/bar_counter_large.py +++ b/scripts/loot/lootItems/rarelootchest/bar_counter_large.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/draft_schematic/furniture/shared_furniture_diner_counter_corner.iff'] # needs verification + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] # needs verification diff --git a/scripts/loot/lootItems/rarelootchest/jedi_statue_schematic.py b/scripts/loot/lootItems/rarelootchest/jedi_statue_schematic.py index 0e8ba392..bee43764 100644 --- a/scripts/loot/lootItems/rarelootchest/jedi_statue_schematic.py +++ b/scripts/loot/lootItems/rarelootchest/jedi_statue_schematic.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/draft_schematic/furniture/shared_must_furniture_jedi_statue.iff'] # needs verification + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] # needs verification diff --git a/scripts/loot/lootItems/rarelootchest/jubilee_wheel_schematic.py b/scripts/loot/lootItems/rarelootchest/jubilee_wheel_schematic.py index 596fcbdd..752c4814 100644 --- a/scripts/loot/lootItems/rarelootchest/jubilee_wheel_schematic.py +++ b/scripts/loot/lootItems/rarelootchest/jubilee_wheel_schematic.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/tangible/furniture/decorative/object/shared_hoverlifter_speeder_crafted.iff'] # needs correct iff still + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] # needs correct iff still diff --git a/scripts/loot/lootItems/rarelootchest/large_fruit_stand_schematic.py b/scripts/loot/lootItems/rarelootchest/large_fruit_stand_schematic.py index 9f57dba9..752c4814 100644 --- a/scripts/loot/lootItems/rarelootchest/large_fruit_stand_schematic.py +++ b/scripts/loot/lootItems/rarelootchest/large_fruit_stand_schematic.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/tangible/event_perk/shared_fruit_stand.iff'] # needs correct iff still + return ['object/tangible/loot/loot_schematic/shared_generic_limited_use.iff'] # needs correct iff still diff --git a/scripts/loot/lootItems/rarelootchest/miniature_wroshyr_tree.py b/scripts/loot/lootItems/rarelootchest/miniature_wroshyr_tree.py index 85a71191..48d653bb 100644 --- a/scripts/loot/lootItems/rarelootchest/miniature_wroshyr_tree.py +++ b/scripts/loot/lootItems/rarelootchest/miniature_wroshyr_tree.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/tangible/item/ep3/shared_poi_kash_mystic_tree_healthy.iff'] # needs correct iff still + return ['object/tangible/furniture/lifeday/shared_lifeday_mini_tree.iff'] # needs correct iff still diff --git a/scripts/loot/lootItems/rarelootchest/target_dummy_black_sun.py b/scripts/loot/lootItems/rarelootchest/target_dummy_black_sun.py index 7d85ed97..2e2f402a 100644 --- a/scripts/loot/lootItems/rarelootchest/target_dummy_black_sun.py +++ b/scripts/loot/lootItems/rarelootchest/target_dummy_black_sun.py @@ -1,4 +1,8 @@ def itemTemplate(): - return ['object/mobile/shared_target_dummy_blacksun.iff'] + return ['object/tangible/tcg/series3/shared_target_dummy_deed.iff'] + +def customItemName(): + + return "Blacksun Target Dummy Terminal" \ No newline at end of file diff --git a/scripts/loot/lootItems/rarelootchest/target_dummy_rebel.py b/scripts/loot/lootItems/rarelootchest/target_dummy_rebel.py index 0417d75b..fde94b77 100644 --- a/scripts/loot/lootItems/rarelootchest/target_dummy_rebel.py +++ b/scripts/loot/lootItems/rarelootchest/target_dummy_rebel.py @@ -1,4 +1,8 @@ def itemTemplate(): - return ['object/mobile/shared_target_dummy_rebel_trooper.iff'] + return ['object/tangible/tcg/series3/shared_target_dummy_deed.iff'] + +def customItemName(): + + return "Rebel Target Dummy Terminal" \ No newline at end of file diff --git a/scripts/loot/lootItems/rarelootchest/target_dummy_stormtrooper.py b/scripts/loot/lootItems/rarelootchest/target_dummy_stormtrooper.py index 4ce37ad7..de7df292 100644 --- a/scripts/loot/lootItems/rarelootchest/target_dummy_stormtrooper.py +++ b/scripts/loot/lootItems/rarelootchest/target_dummy_stormtrooper.py @@ -1,4 +1,8 @@ def itemTemplate(): - return ['object/mobile/shared_target_dummy_stormtrooper.iff'] + return ['object/tangible/tcg/series3/shared_target_dummy_deed.iff'] + +def customItemName(): + + return "Stormtrooper Target Dummy Terminal" \ No newline at end of file diff --git a/scripts/loot/lootItems/rarelootchest/war_terminal.py b/scripts/loot/lootItems/rarelootchest/war_terminal.py index fcb691ca..06e6dbb7 100644 --- a/scripts/loot/lootItems/rarelootchest/war_terminal.py +++ b/scripts/loot/lootItems/rarelootchest/war_terminal.py @@ -1,4 +1,4 @@ def itemTemplate(): - return ['object/tangible/furniture/decorative/object/tangible/beta/shared_beta_terminal_warp.iff'] # needs correct iff still + return ['object/tangible/terminal/shared_terminal_gcw_publish_gift.iff'] # needs correct iff still From 8965383f2d02b8d5fcbe683693d3cfdfa91d8058 Mon Sep 17 00:00:00 2001 From: Seefo Date: Thu, 5 Jun 2014 09:55:48 -0400 Subject: [PATCH 10/19] Part of RLS item fix --- src/services/LootService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/LootService.java b/src/services/LootService.java index 4f4dd549..37cfd7e0 100644 --- a/src/services/LootService.java +++ b/src/services/LootService.java @@ -782,8 +782,8 @@ public class LootService implements INetworkDispatch { return droppedItem; } - private DraftSchematic createDroppedSchematic(String template,Planet planet){ - DraftSchematic droppedItem = (DraftSchematic) core.objectService.createObject(template, planet); + private TangibleObject createDroppedSchematic(String template,Planet planet){ + TangibleObject droppedItem = (TangibleObject) core.objectService.createObject(template, planet); //System.out.println("droppedItem " + droppedItem); return droppedItem; } @@ -1204,7 +1204,7 @@ public class LootService implements INetworkDispatch { // System.out.println("ACTUAL DROP " + droppedItem.getTemplate()); } else { - DraftSchematic droppedSchematic = createDroppedSchematic(itemTemplate,owner.getPlanet()); + TangibleObject droppedSchematic = createDroppedSchematic(itemTemplate,owner.getPlanet()); if (droppedSchematic!=null){ droppedSchematic.getAttributes().put("@obj_attr_n:rare_loot_category", "\\#D1F56F Rare Item \\#FFFFFF "); SWGObject inventory = owner.getSlottedObject("inventory"); From e2676ecc05688cef9de282348ad2d190ef945d56 Mon Sep 17 00:00:00 2001 From: Treeku Date: Thu, 5 Jun 2014 18:33:11 +0100 Subject: [PATCH 11/19] Fixed #774 --- src/services/gcw/PvPZone.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/gcw/PvPZone.java b/src/services/gcw/PvPZone.java index ab49ce30..17b5dfda 100644 --- a/src/services/gcw/PvPZone.java +++ b/src/services/gcw/PvPZone.java @@ -65,6 +65,7 @@ public class PvPZone { if (core.mountService.isMounted(actor)) { actor = (CreatureObject) actor.getContainer(); } + area.getCollisionList().remove(actor); core.simulationService.teleport(actor, (Point3D) actor.getAttachment("lastValidPosition"), actor.getOrientation(), actor.getParentId()); } From 2f2d5017d2a19708490f05b083156ff77cfe9f26 Mon Sep 17 00:00:00 2001 From: Light2 Date: Thu, 5 Jun 2014 20:01:32 +0200 Subject: [PATCH 12/19] Added maintenance task for buildings --- .../objects/building/BuildingObject.java | 3 +- src/services/bazaar/BazaarService.java | 55 ++++++++++++++++++- src/services/housing/HousingService.java | 54 +++++++++++++++++- src/services/object/ObjectService.java | 2 + 4 files changed, 108 insertions(+), 6 deletions(-) diff --git a/src/resources/objects/building/BuildingObject.java b/src/resources/objects/building/BuildingObject.java index f3dc4d31..2247591e 100644 --- a/src/resources/objects/building/BuildingObject.java +++ b/src/resources/objects/building/BuildingObject.java @@ -210,9 +210,8 @@ public class BuildingObject extends TangibleObject implements IPersistent, Seria return getCustomName(); } - public void setBuildingName(String buildingName, CreatureObject owner) { + public void setBuildingName(String buildingName) { setCustomName(buildingName); - ((CreatureObject) owner).sendSystemMessage("Structure renamed.", DisplayType.Broadcast); SWGObject sign = (SWGObject) getAttachment("sign"); if(sign != null) sign.setCustomName(buildingName); diff --git a/src/services/bazaar/BazaarService.java b/src/services/bazaar/BazaarService.java index 0dce7454..5932bb25 100644 --- a/src/services/bazaar/BazaarService.java +++ b/src/services/bazaar/BazaarService.java @@ -23,6 +23,7 @@ package services.bazaar; import java.nio.ByteOrder; import java.util.ArrayList; +import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -35,6 +36,10 @@ import java.util.concurrent.TimeUnit; + + + + import main.NGECore; import engine.clients.Client; import engine.resources.common.CRC; @@ -46,12 +51,15 @@ import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; import resources.common.Opcodes; import resources.common.OutOfBand; +import resources.common.ProsePackage; import resources.datatables.DisplayType; import resources.objects.building.BuildingObject; import resources.objects.creature.CreatureObject; import resources.objects.intangible.IntangibleObject; import resources.objects.manufacture.ManufactureSchematicObject; import resources.objects.tangible.TangibleObject; +import services.chat.Mail; +import services.chat.WaypointAttachment; import protocol.swg.auctionManagerClientListener.AuctionQueryHeadersMessage; import protocol.swg.auctionManagerClientListener.AuctionQueryHeadersResponseMessage; import protocol.swg.auctionManagerClientListener.BidAuctionMessage; @@ -422,17 +430,60 @@ public class BazaarService implements INetworkDispatch { else retrieveExpire = timeUntilExpire + VENDOR_EXPIRE; + CreatureObject seller = (CreatureObject) core.objectService.getObject(item.getOwnerId()); + item.setStatus(AuctionItem.SOLD); item.setBuyerId(player.getObjectID()); item.setExpireTime(retrieveExpire); item.setBidderName(player.getCustomName()); player.setBankCredits(player.getBankCredits() - item.getPrice()); player.getClient().getSession().write(new BidAuctionResponseMessage(item.getObjectId(), BidAuctionResponseMessage.SUCCESS).serialize()); + + WaypointAttachment waypoint = new WaypointAttachment(); + waypoint.positionX = vendor.getWorldPosition().x; + waypoint.positionZ = vendor.getWorldPosition().z; + waypoint.planetCRC = CRC.StringtoCRC(vendor.getPlanet().getName()); + waypoint.name = vendor.getCustomName() == null ? vendor.getObjectName().getStfValue() : vendor.getCustomName(); - // TODO send mail with WP + Mail sellerMail = new Mail(); + Mail buyerMail = new Mail(); - CreatureObject seller = (CreatureObject) core.objectService.getObject(item.getOwnerId()); + sellerMail.setMailId(NGECore.getInstance().chatService.generateMailId()); + sellerMail.setMessage(""); + sellerMail.setRecieverId(item.getOwnerId()); + sellerMail.setStatus(Mail.NEW); + sellerMail.setTimeStamp((int) (new Date().getTime() / 1000)); + sellerMail.setSenderName("SWG." + core.getGalaxyName() + ".auctioner"); + if(item.isOnBazaar()) { + sellerMail.setSubject("@auction:subject_instant_seller"); + sellerMail.addProseAttachment(new ProsePackage("@auction:seller_success", "TO", item.getObjectId(), item.getItemName(), "TT", player.getObjectID(), item.getBidderName(), "DI", item.getPrice())); + } else { + sellerMail.setSubject("@auction:subject_vendor_seller"); + sellerMail.addProseAttachment(new ProsePackage("@auction:seller_success_vendor", "TO", item.getObjectId(), item.getItemName(), "TT", player.getObjectID(), item.getBidderName(), "DI", item.getPrice())); + } + sellerMail.addProseAttachment(new ProsePackage("@auction:seller_success_location", "TO", 0, "@planet_n:" + vendor.getPlanet().getName(), "TT", 0, core.mapService.getClosestCityName(vendor))); + sellerMail.addWaypointAttachment(waypoint); + + buyerMail.setMailId(NGECore.getInstance().chatService.generateMailId()); + buyerMail.setMessage(""); + buyerMail.setRecieverId(player.getObjectID()); + buyerMail.setStatus(Mail.NEW); + buyerMail.setTimeStamp((int) (new Date().getTime() / 1000)); + buyerMail.setSenderName("SWG." + core.getGalaxyName() + ".auctioner"); + if(item.isOnBazaar()) + buyerMail.setSubject("@auction:subject_instant_buyer"); + else + buyerMail.setSubject("@auction:subject_vendor_buyer"); + buyerMail.addProseAttachment(new ProsePackage("@auction:buyer_success", "TO", item.getObjectId(), item.getItemName(), "TT", item.getOwnerId(), item.getOwnerName(), "DI", item.getPrice())); + buyerMail.addProseAttachment(new ProsePackage("@auction:buyer_success_location", "TO", 0, "@planet_n:" + vendor.getPlanet().getName(), "TT", 0, core.mapService.getClosestCityName(vendor))); + buyerMail.addWaypointAttachment(waypoint); + core.chatService.storePersistentMessage(buyerMail); + core.chatService.storePersistentMessage(sellerMail); + core.chatService.sendPersistentMessageHeader(player.getClient(), buyerMail); + if(seller != null && seller.getClient() != null) + core.chatService.sendPersistentMessageHeader(seller.getClient(), sellerMail); + if(seller == null) { seller = core.objectService.getCreatureFromDB(item.getOwnerId()); seller.setBankCredits(seller.getBankCredits() + item.getPrice()); diff --git a/src/services/housing/HousingService.java b/src/services/housing/HousingService.java index 49ab652d..4e2f099b 100644 --- a/src/services/housing/HousingService.java +++ b/src/services/housing/HousingService.java @@ -34,8 +34,15 @@ import java.util.Map; import java.util.Random; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; + import main.NGECore; import protocol.swg.EnterStructurePlacementModeMessage; +import resources.datatables.DisplayType; import resources.objects.building.BuildingObject; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; @@ -55,6 +62,7 @@ public class HousingService implements INetworkDispatch { private NGECore core; private Map housingTemplates = new ConcurrentHashMap(); private Map houseToDeed = new ConcurrentHashMap(); + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); public HousingService(NGECore core) { this.core = core; @@ -139,8 +147,11 @@ public class HousingService implements INetworkDispatch { admins.add(actor.getObjectID()); building.setAttachment("sign", sign); // meh workaround + building.setAttachment("nextMaintenance", System.currentTimeMillis() + 3600000); building.setAttachment("structureOwner", actor.getObjectID()); building.setAttachment("structureAdmins", admins); + building.setAttachment("isCondemned", false); + building.setAttachment("outstandingMaint", 0); building.setDeedTemplate(deed.getTemplate()); building.setMaintenanceAmount(houseTemplate.getBaseMaintenanceRate()); building.setConditionDamage(100); // Ouch @@ -169,6 +180,43 @@ public class HousingService implements INetworkDispatch { } core.objectService.persistObject(building.getObjectID(), building, core.getSWGObjectODB()); + + } + + public void startMaintenanceTask(BuildingObject building) { + + AtomicReference> ref = new AtomicReference>(); + ref.set(scheduler.scheduleAtFixedRate(() -> { + + int amount = building.getBMR(); + boolean needSave = false; + CreatureObject owner = (CreatureObject) core.objectService.getObject((long) building.getAttachment("structureOwner")); + if(owner == null) { + needSave = true; + owner = core.objectService.getCreatureFromDB((long) building.getAttachment("structureOwner")); + } + if(building.getMaintenanceAmount() >= amount) { + building.setMaintenanceAmount(building.getMaintenanceAmount() - amount); + } else { + if(owner == null) + ref.get().cancel(true); + if(owner.getBankCredits() >= amount) { + owner.setBankCredits(owner.getBankCredits() - amount); + } else if(owner.getCashCredits() >= amount) { + owner.setCashCredits(owner.getCashCredits() - amount); + } else { + if(building.getAttachment("isCondemned") != null && !((boolean) building.getAttachment("isCondemned"))) { + building.setAttachment("isCondemned", true); + building.setBuildingName(building.getBuildingName() + " \\#FF0000(CONDEMNED)\\#FFFFFF"); + } + building.setAttachment("outstandingMaint", (int) building.getAttachment("outstandingMaint") + amount); + // TODO: lock down building, add option to pay outstanding maintenance and uncondemn building + } + } + if(needSave && owner != null) + core.objectService.persistObject(owner.getObjectID(), owner, core.getSWGObjectODB()); + + }, (long) building.getAttachment("nextMaintenance") - System.currentTimeMillis(), 3600000, TimeUnit.MILLISECONDS)); } @@ -292,6 +340,8 @@ public class HousingService implements INetworkDispatch { deed.setIntAttribute("@obj_attr_n:examine_maintenance", (int) building.getMaintenanceAmount()); core.objectService.destroyObject(building.getObjectID()); + if(building.getAttachment("sign") != null) + core.objectService.destroyObject((SWGObject) building.getAttachment("sign")); SWGObject ownerInventory = owner.getSlottedObject("inventory"); ownerInventory.add(deed); @@ -394,8 +444,8 @@ public class HousingService implements INetworkDispatch { } public void handleSetName(CreatureObject owner, TangibleObject target,String name) { - - ((BuildingObject) target).setBuildingName(name,owner); + ((BuildingObject) target).setBuildingName(name); + owner.sendSystemMessage("Structure renamed.", DisplayType.Broadcast); } public void createStatusSUIPage(SWGObject owner, TangibleObject target) { diff --git a/src/services/object/ObjectService.java b/src/services/object/ObjectService.java index c2aa8e82..ace233d5 100644 --- a/src/services/object/ObjectService.java +++ b/src/services/object/ObjectService.java @@ -205,6 +205,8 @@ public class ObjectService implements INetworkDispatch { sign.initAfterDBLoad(); objectList.put(sign.getObjectID(), sign); } + if(building.getAttachment("structureOwner") != null && ((BuildingObject) building).getMaintenanceAmount() > 0) + core.housingService.startMaintenanceTask((BuildingObject) building); } cursor.close(); From 0fe051021e1c8714effbff1f0a02bbe303629d8c Mon Sep 17 00:00:00 2001 From: Seefo Date: Thu, 5 Jun 2014 14:17:50 -0400 Subject: [PATCH 13/19] RLS light beam now shows on the corpse instead of yourself like it did on Live --- scripts/commands/setgodmode.py | 4 ++++ src/services/LootService.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/commands/setgodmode.py b/scripts/commands/setgodmode.py index 1f419588..84cab742 100644 --- a/scripts/commands/setgodmode.py +++ b/scripts/commands/setgodmode.py @@ -128,6 +128,10 @@ def run(core, actor, target, commandString): if inventory: inventory.add(object) + + elif command == 'spawnobj': + pos = actor.getPosition() + core.staticService.spawnObject(arg1, actor.getPlanet().getName(), 0, pos.x, pos.y, pos.z, 0, 0) elif command == 'unknownAbilityPacket' and arg1: packet = UnknownAbilityPacket(arg1) diff --git a/src/services/LootService.java b/src/services/LootService.java index 37cfd7e0..97f0a83f 100644 --- a/src/services/LootService.java +++ b/src/services/LootService.java @@ -226,7 +226,7 @@ public class LootService implements INetworkDispatch { // RLS chest effect if (droppedItem.getAttachment("LootItemName").toString().contains("Loot Chest")){ - requester.playEffectObject("appearance/pt_rare_chest.prt", ""); + lootedObject.playEffectObject("appearance/pt_rare_chest.prt", ""); requester.playMusic("sound/rare_loot_chest.snd"); } } From 3735b216a87a4bb01191d7d1997d6f7c2265a82c Mon Sep 17 00:00:00 2001 From: Light2 Date: Thu, 5 Jun 2014 21:34:42 +0200 Subject: [PATCH 14/19] fixed compile error --- src/resources/common/collidables/AbstractCollidable.java | 4 ++++ src/services/housing/HousingService.java | 5 ++++- src/services/sui/SUIService.java | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/resources/common/collidables/AbstractCollidable.java b/src/resources/common/collidables/AbstractCollidable.java index b7f9a157..7a819f41 100644 --- a/src/resources/common/collidables/AbstractCollidable.java +++ b/src/resources/common/collidables/AbstractCollidable.java @@ -108,5 +108,9 @@ public abstract class AbstractCollidable { public abstract Point3D getRandomPosition(Point3D origin, float minDistance, float maxDistance); public abstract Point3D getRandomPosition(); + public Vector getCollisionList() { + return collidedObjects; + } + } diff --git a/src/services/housing/HousingService.java b/src/services/housing/HousingService.java index 4e2f099b..6ef59c27 100644 --- a/src/services/housing/HousingService.java +++ b/src/services/housing/HousingService.java @@ -165,7 +165,7 @@ public class HousingService implements INetworkDispatch { // Check for city founders joining a new city PlayerCity cityActorIsIn = core.playerCityService.getCityObjectIsIn(actor); - if (cityActorIsIn!=null){ + if (cityActorIsIn!=null) { actor.setAttachment("Has24HZoningFor",cityActorIsIn.getCityID()); // for testing int cityActorHasZoning = (int)actor.getAttachment("Has24HZoningFor"); @@ -188,6 +188,9 @@ public class HousingService implements INetworkDispatch { AtomicReference> ref = new AtomicReference>(); ref.set(scheduler.scheduleAtFixedRate(() -> { + if(core.objectService.getObject(building.getObjectID()) == null) + ref.get().cancel(true); + int amount = building.getBMR(); boolean needSave = false; CreatureObject owner = (CreatureObject) core.objectService.getObject((long) building.getAttachment("structureOwner")); diff --git a/src/services/sui/SUIService.java b/src/services/sui/SUIService.java index 662ec843..1fcee751 100644 --- a/src/services/sui/SUIService.java +++ b/src/services/sui/SUIService.java @@ -184,6 +184,13 @@ public class SUIService implements INetworkDispatch { core.scriptService.callScript("scripts/radial/", "terminal/vendor", "handleSelection", core, owner, target, objMenuSelect.getSelection()); return; } + + if(target.getGrandparent() != null && target.getGrandparent().getAttachment("structureAdmins") != null) { + if(core.housingService.getPermissions(owner, target.getContainer()) && !getRadialFilename(target).equals("structure/structure_management_terminal")) { + core.scriptService.callScript("scripts/radial/", "structure/moveable", "handleSelection", core, owner, target, objMenuSelect.getSelection()); + return; + } + } core.scriptService.callScript("scripts/radial/", getRadialFilename(target), "handleSelection", core, owner, target, objMenuSelect.getSelection()); From e651b9fe101037b7899a2b28eeeaca4cb0eac6ed Mon Sep 17 00:00:00 2001 From: tacef Date: Thu, 5 Jun 2014 22:08:28 +0200 Subject: [PATCH 15/19] Populated White Thranta Bunker Updated White Thranta NPC's --- .../mobiles/tatooine/white_thranta_manager.py | 4 +- .../white_thranta_security_captain.py | 2 +- .../tatooine/white_thranta_security_elite.py | 2 +- .../white_thranta_security_officer.py | 2 +- .../tatooine/white_thranta_specialist.py | 2 +- .../tatooine/white_thranta_technican.py | 5 +- .../tatooine/mos_eisley_wt_bunker.py | 86 +++++++++++++++++++ 7 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 scripts/static_spawns/tatooine/mos_eisley_wt_bunker.py diff --git a/scripts/mobiles/tatooine/white_thranta_manager.py b/scripts/mobiles/tatooine/white_thranta_manager.py index f57bf0ca..75692222 100644 --- a/scripts/mobiles/tatooine/white_thranta_manager.py +++ b/scripts/mobiles/tatooine/white_thranta_manager.py @@ -19,10 +19,12 @@ def addTemplate(core): mobileTemplate.setSocialGroup("whitethranta") mobileTemplate.setAssistRange(3) mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(192) templates = Vector() - templates.add('object/mobile/shared_dressed_tatooine_opening_wh_guard.iff') + templates.add('object/mobile/shared_moncal_male.iff') + templates.add('object/mobile/shared_moncal_female.iff') mobileTemplate.setTemplates(templates) weaponTemplates = Vector() diff --git a/scripts/mobiles/tatooine/white_thranta_security_captain.py b/scripts/mobiles/tatooine/white_thranta_security_captain.py index 4d419c61..1f2616bc 100644 --- a/scripts/mobiles/tatooine/white_thranta_security_captain.py +++ b/scripts/mobiles/tatooine/white_thranta_security_captain.py @@ -19,7 +19,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("whitethranta") mobileTemplate.setAssistRange(5) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(192) templates = Vector() templates.add('object/mobile/shared_dressed_tatooine_opening_wh_guard.iff') diff --git a/scripts/mobiles/tatooine/white_thranta_security_elite.py b/scripts/mobiles/tatooine/white_thranta_security_elite.py index db035c10..28a97b35 100644 --- a/scripts/mobiles/tatooine/white_thranta_security_elite.py +++ b/scripts/mobiles/tatooine/white_thranta_security_elite.py @@ -19,7 +19,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("whitethranta") mobileTemplate.setAssistRange(5) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(192) templates = Vector() templates.add('object/mobile/shared_dressed_tatooine_opening_wh_guard.iff') diff --git a/scripts/mobiles/tatooine/white_thranta_security_officer.py b/scripts/mobiles/tatooine/white_thranta_security_officer.py index ce9f6a30..badbbe88 100644 --- a/scripts/mobiles/tatooine/white_thranta_security_officer.py +++ b/scripts/mobiles/tatooine/white_thranta_security_officer.py @@ -19,7 +19,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("whitethranta") mobileTemplate.setAssistRange(0) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(192) templates = Vector() templates.add('object/mobile/shared_dressed_tatooine_opening_wh_guard.iff') diff --git a/scripts/mobiles/tatooine/white_thranta_specialist.py b/scripts/mobiles/tatooine/white_thranta_specialist.py index 8754ae56..6da4e111 100644 --- a/scripts/mobiles/tatooine/white_thranta_specialist.py +++ b/scripts/mobiles/tatooine/white_thranta_specialist.py @@ -19,7 +19,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("whitethranta") mobileTemplate.setAssistRange(3) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(192) templates = Vector() templates.add('object/mobile/shared_dressed_tatooine_opening_wh_guard.iff') diff --git a/scripts/mobiles/tatooine/white_thranta_technican.py b/scripts/mobiles/tatooine/white_thranta_technican.py index c8542f36..455e1b4f 100644 --- a/scripts/mobiles/tatooine/white_thranta_technican.py +++ b/scripts/mobiles/tatooine/white_thranta_technican.py @@ -19,10 +19,11 @@ def addTemplate(core): mobileTemplate.setSocialGroup("whitethranta") mobileTemplate.setAssistRange(0) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(192) templates = Vector() - templates.add('object/mobile/shared_dressed_tatooine_opening_wh_guard.iff') + templates.add('object/mobile/shared_warren_scientist_s01.iff') + templates.add('object/mobile/shared_warren_scientist_s01.iff') mobileTemplate.setTemplates(templates) weaponTemplates = Vector() diff --git a/scripts/static_spawns/tatooine/mos_eisley_wt_bunker.py b/scripts/static_spawns/tatooine/mos_eisley_wt_bunker.py new file mode 100644 index 00000000..5be559d8 --- /dev/null +++ b/scripts/static_spawns/tatooine/mos_eisley_wt_bunker.py @@ -0,0 +1,86 @@ +import sys +# Project SWG: WT Bunker: Static Spawns +# (C)2014 ProjectSWG + + + +from resources.datatables import Options +from resources.datatables import State + +def addPlanetSpawns(core, planet): + + + stcSvc = core.staticService + objSvc = core.objectService + + + #Outside + wt_guard = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3749.7), float(16.8), float(-4200.5), float(0), float(0), float(0), float(0), 45) + wt_guard1 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3761.2), float(16.1), float(-4188.3), float(0), float(0), float(0), float(0), 45) + wt_guard2 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3740.9), float(15.6), float(-4188.3), float(0), float(0), float(0), float(0), 45) + wt_guard3 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3731.1), float(16.0), float(-4184.3), float(0), float(0), float(0), float(0), 45) + wt_guard4 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3724.7), float(16.2), float(-4184.3), float(0), float(0), float(0), float(0), 45) + wt_guard5 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3709.9), float(17.1), float(-4192.1), float(0), float(0), float(0), float(0), 45) + wt_guard6 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3718.3), float(16.2), float(-4193.1), float(0), float(0), float(0), float(0), 45) + wt_guard7 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', long(0), float(3707), float(17.7), float(-4187.6), float(0), float(0), float(0), float(0), 45) + + + #inside + wt_bunker = core.objectService.getObject(long(-466404036409557111)) + + #1st room + wt_reciptionist = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_wh_receptionist.iff', 'tatooine', wt_bunker.getCellByCellNumber(5), float(-0.3), float(-12), float(34.4), float(0), float(0), float(0), float(0)) + wt_reciptionist.setOptionsBitmask(256) + wt_reciptionist.setCustomName('White Thranta Reciptionist') + + wt_guard8 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', wt_bunker.getCellByCellNumber(5), float(8.9), float(-12), float(50.8), float(0), float(0), float(0), float(0), 45) + wt_guard9 = stcSvc.spawnObject('white_thranta_security_guard', 'tatooine', wt_bunker.getCellByCellNumber(5), float(-1.7), float(-12), float(51.1), float(0), float(0), float(0), float(0), 45) + + wt_technican = stcSvc.spawnObject('white_thranta_technican', 'tatooine', wt_bunker.getCellByCellNumber(5), float(6.9), float(-12), float(39.5), float(0), float(0), float(0), float(0), 45) + wt_technican.setOptionsBitmask(128) + + wt_technican1 = stcSvc.spawnObject('white_thranta_technican', 'tatooine', wt_bunker.getCellByCellNumber(10), float(8.5), float(-16), float(133.7), float(0), float(0), float(0), float(0), 45) + wt_technican2 = stcSvc.spawnObject('white_thranta_technican', 'tatooine', wt_bunker.getCellByCellNumber(10), float(-2.0), float(-16), float(133.7), float(0), float(0), float(0), float(0), 45) + wt_technican3 = stcSvc.spawnObject('white_thranta_technican', 'tatooine', wt_bunker.getCellByCellNumber(10), float(6.6), float(-16), float(100.5), float(0), float(0), float(0), float(0), 45) + wt_technican4 = stcSvc.spawnObject('white_thranta_technican', 'tatooine', wt_bunker.getCellByCellNumber(26), float(-74.9), float(-28), float(56.9), float(0), float(0), float(0), float(0), 45) + + wt_officer = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(7), float(11), float(-16), float(79), float(0), float(0), float(0), float(0), 45) + wt_officer1 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(18), float(-7.8), float(-12), float(91.3), float(0), float(0), float(0), float(0), 45) + wt_officer2 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(20), float(-34.5), float(-12), float(93.1), float(0), float(0), float(0), float(0), 45) + wt_officer3 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(20), float(-33.1), float(-12), float(114.2), float(0), float(0), float(0), float(0), 45) + wt_officer4 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(20), float(-36.7), float(-12), float(119.7), float(0), float(0), float(0), float(0), 45) + wt_officer5 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(10), float(25.1), float(-16), float(119.8), float(0), float(0), float(0), float(0), 45) + wt_officer6 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(10), float(11.9), float(-16), float(121.8), float(0), float(0), float(0), float(0), 45) + wt_officer7 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(29), float(-139.4), float(-44), float(79.4), float(0), float(0), float(0), float(0), 45) + wt_officer8 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(29), float(-153), float(-44), float(90.6), float(0), float(0), float(0), float(0), 45) + wt_officer9 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(26), float(-76.2), float(-28), float(74), float(0), float(0), float(0), float(0), 45) + wt_officer10 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(26), float(-75.7), float(-28), float(69.4), float(0), float(0), float(0), float(0), 45) + wt_officer11 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(32), float(-90.5), float(-44), float(-20.4), float(0), float(0), float(0), float(0), 45) + wt_officer12 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(32), float(-59.9), float(-44), float(4.2), float(0), float(0), float(0), float(0), 45) + wt_officer13 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(32), float(-86.2), float(-44), float(-9.3), float(0), float(0), float(0), float(0), 45) + wt_officer14 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(17), float(-77), float(-28), float(95.6), float(0), float(0), float(0), float(0), 45) + wt_officer15 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(17), float(-78.2), float(-28), float(126.4), float(0), float(0), float(0), float(0), 45) + wt_officer16 = stcSvc.spawnObject('white_thranta_security_officer', 'tatooine', wt_bunker.getCellByCellNumber(17), float(-96.6), float(-28), float(110.6), float(0), float(0), float(0), float(0), 45) + + wt_specialist = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(7), float(23.7), float(-16), float(79), float(0), float(0), float(0), float(0), 45) + wt_specialist1 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(18), float(-14.3), float(-12), float(86.8), float(0), float(0), float(0), float(0), 45) + wt_specialist2 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(18), float(-16.4), float(-12), float(96.6), float(0), float(0), float(0), float(0), 45) + wt_specialist3 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(10), float(-9.7), float(-16), float(115.5), float(0), float(0), float(0), float(0), 45) + wt_specialist4 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(10), float(-11), float(-16), float(126.5), float(0), float(0), float(0), float(0), 45) + wt_specialist5 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(10), float(-2.2), float(-16), float(104.8), float(0), float(0), float(0), float(0), 45) + wt_specialist6 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(26), float(-76.1), float(-28), float(55.2), float(0), float(0), float(0), float(0), 45) + wt_specialist7 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(32), float(-93.4), float(-44), float(-8.8), float(0), float(0), float(0), float(0), 45) + wt_specialist8 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(12), float(-23.3), float(-12), float(162.9), float(0), float(0), float(0), float(0), 45) + wt_specialist9 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(12), float(-33.2), float(-12), float(167.9), float(0), float(0), float(0), float(0), 45) + wt_specialist10 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(12), float(-31.4), float(-12), float(171.2), float(0), float(0), float(0), float(0), 45) + wt_specialist11 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(12), float(-27), float(-12), float(144), float(0), float(0), float(0), float(0), 45) + wt_specialist12 = stcSvc.spawnObject('white_thranta_specialist', 'tatooine', wt_bunker.getCellByCellNumber(12), float(-33.3), float(-12), float(151.1), float(0), float(0), float(0), float(0), 45) + + wt_manager = stcSvc.spawnObject('white_thranta_manager', 'tatooine', wt_bunker.getCellByCellNumber(20), float(-40.2), float(-12), float(87.5), float(0), float(0), float(0), float(0), 45) + + wt_elite = stcSvc.spawnObject('white_thranta_security_elite', 'tatooine', wt_bunker.getCellByCellNumber(29), float(-137.8), float(-44), float(74.1), float(0), float(0), float(0), float(0), 45) + wt_elite1 = stcSvc.spawnObject('white_thranta_security_elite', 'tatooine', wt_bunker.getCellByCellNumber(29), float(-159.3), float(-44), float(85.1), float(0), float(0), float(0), float(0), 45) + + + return + \ No newline at end of file From 40f8216230a8341dcbdb31106bf81bfe1ebe247d Mon Sep 17 00:00:00 2001 From: Iosnowore Kun Date: Thu, 5 Jun 2014 17:11:15 -0400 Subject: [PATCH 16/19] Scripted the Medic Roadmap Armor Rewards --- .../tantel/armor_medic_roadmap_bicep_l_02_01.py | 17 +++++++++++++++++ .../tantel/armor_medic_roadmap_bicep_r_02_01.py | 17 +++++++++++++++++ .../tantel/armor_medic_roadmap_boots_02_01.py | 17 +++++++++++++++++ .../armor_medic_roadmap_bracer_l_02_01.py | 17 +++++++++++++++++ .../armor_medic_roadmap_bracer_r_02_01.py | 17 +++++++++++++++++ .../tantel/armor_medic_roadmap_chest_02_01.py | 17 +++++++++++++++++ .../tantel/armor_medic_roadmap_gloves_02_01.py | 17 +++++++++++++++++ .../tantel/armor_medic_roadmap_helmet_02_01.py | 17 +++++++++++++++++ .../armor_medic_roadmap_leggings_02_01.py | 17 +++++++++++++++++ 9 files changed, 153 insertions(+) create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_l_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_r_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_boots_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_l_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_r_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_chest_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_gloves_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_helmet_02_01.py create mode 100644 scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_leggings_02_01.py diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_l_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_l_02_01.py new file mode 100644 index 00000000..8435f5b3 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_l_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_bicep_l_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_bicep_l_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_r_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_r_02_01.py new file mode 100644 index 00000000..350143fd --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bicep_r_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_bicep_r_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_bicep_r_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_boots_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_boots_02_01.py new file mode 100644 index 00000000..9b50eaef --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_boots_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_boots_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_boots_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_l_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_l_02_01.py new file mode 100644 index 00000000..d402a0d4 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_l_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_bracer_l_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_bracer_l_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_r_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_r_02_01.py new file mode 100644 index 00000000..5ed35fb2 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_bracer_r_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_bracer_r_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_bicep_r_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_chest_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_chest_02_01.py new file mode 100644 index 00000000..41b987cf --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_chest_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_chest_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_chest_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_gloves_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_gloves_02_01.py new file mode 100644 index 00000000..e487a13a --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_gloves_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_gloves_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_gloves_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_helmet_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_helmet_02_01.py new file mode 100644 index 00000000..6004a079 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_helmet_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_helmet_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_helmet_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_leggings_02_01.py b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_leggings_02_01.py new file mode 100644 index 00000000..31942e3b --- /dev/null +++ b/scripts/object/tangible/wearables/armor/tantel/armor_medic_roadmap_leggings_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_medic_roadmap_leggings_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_medic_roadmap_leggings_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Medic') + object.setStringAttribute('armor_category', 'Reconnaissance') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 640) + object.setIntAttribute('cat_armor_standard_protection.energy', 2640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return \ No newline at end of file From 3b2544b692fedf57a2cfbb59d2c9921bbf89ddad Mon Sep 17 00:00:00 2001 From: CharonInferar Date: Thu, 5 Jun 2014 23:28:05 +0200 Subject: [PATCH 17/19] SWGMessage byte changed --- src/protocol/swg/StopClientEffectObjectByLabel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol/swg/StopClientEffectObjectByLabel.java b/src/protocol/swg/StopClientEffectObjectByLabel.java index b39d04d6..e1a99339 100644 --- a/src/protocol/swg/StopClientEffectObjectByLabel.java +++ b/src/protocol/swg/StopClientEffectObjectByLabel.java @@ -48,7 +48,7 @@ public class StopClientEffectObjectByLabel extends SWGMessage { result.putInt(0xAD6F6B26); result.putLong(objectId); result.put(getAsciiString(commandString)); - result.put((byte) 1); + result.put((byte) 0); return result.flip(); From 9e70fef33e928d1af069745dfe26026e55a01a5e Mon Sep 17 00:00:00 2001 From: Iosnowore Kun Date: Thu, 5 Jun 2014 17:49:30 -0400 Subject: [PATCH 18/19] Scripted More Roadmap Rewards --- ..._spy_clicky_01_02.p => item_spy_clicky_01_02.py} | 0 .../zam/item_roadmap_belt_entertainer_01_02.py | 13 +++++++++++++ .../armor/zam/item_roadmap_belt_medic_01_02.py | 13 +++++++++++++ .../armor/zam/item_roadmap_belt_officer_01_02.py | 13 +++++++++++++ .../armor/zam/item_roadmap_belt_smuggler_01_02.py | 13 +++++++++++++ .../armor/zam/item_roadmap_belt_trader_01_02.py | 2 +- .../necklace/item_entertainer_pendant_01_02.py | 11 +++++++++++ .../wearables/necklace/item_medic_pendant_01_02.py | 11 +++++++++++ .../necklace/item_officer_pendant_01_02.py | 11 +++++++++++ .../necklace/item_smuggler_pendant_01_02.py | 11 +++++++++++ .../wearables/necklace/item_trader_pendant_01_02.py | 2 +- .../wearables/ring/item_entertainer_ring_01_02.py | 13 +++++++++++++ .../wearables/ring/item_medic_ring_01_02.py | 13 +++++++++++++ .../wearables/ring/item_officer_ring_01_02.py | 13 +++++++++++++ .../wearables/ring/item_smuggler_ring_01_02.py | 13 +++++++++++++ .../wearables/ring/item_trader_ring_01_02.py | 13 +++++++++++++ 16 files changed, 163 insertions(+), 2 deletions(-) rename scripts/object/tangible/loot/generic_usable/{item_spy_clicky_01_02.p => item_spy_clicky_01_02.py} (100%) create mode 100644 scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_entertainer_01_02.py create mode 100644 scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_medic_01_02.py create mode 100644 scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_officer_01_02.py create mode 100644 scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_smuggler_01_02.py create mode 100644 scripts/object/tangible/wearables/necklace/item_entertainer_pendant_01_02.py create mode 100644 scripts/object/tangible/wearables/necklace/item_medic_pendant_01_02.py create mode 100644 scripts/object/tangible/wearables/necklace/item_officer_pendant_01_02.py create mode 100644 scripts/object/tangible/wearables/necklace/item_smuggler_pendant_01_02.py create mode 100644 scripts/object/tangible/wearables/ring/item_entertainer_ring_01_02.py create mode 100644 scripts/object/tangible/wearables/ring/item_medic_ring_01_02.py create mode 100644 scripts/object/tangible/wearables/ring/item_officer_ring_01_02.py create mode 100644 scripts/object/tangible/wearables/ring/item_smuggler_ring_01_02.py create mode 100644 scripts/object/tangible/wearables/ring/item_trader_ring_01_02.py diff --git a/scripts/object/tangible/loot/generic_usable/item_spy_clicky_01_02.p b/scripts/object/tangible/loot/generic_usable/item_spy_clicky_01_02.py similarity index 100% rename from scripts/object/tangible/loot/generic_usable/item_spy_clicky_01_02.p rename to scripts/object/tangible/loot/generic_usable/item_spy_clicky_01_02.py diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_entertainer_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_entertainer_01_02.py new file mode 100644 index 00000000..b5195564 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_entertainer_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_roadmap_belt_entertainer_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_roadmap_belt_entertainer_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 15) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 20) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 15) + object.setStringAttribute('class_required', 'Entertainer') + object.setIntAttribute('required_combat_level', 90) + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_medic_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_medic_01_02.py new file mode 100644 index 00000000..9f5b8eb7 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_medic_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_roadmap_belt_medic_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_roadmap_belt_medic_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 15) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 20) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 15) + object.setStringAttribute('class_required', 'Medic') + object.setIntAttribute('required_combat_level', 90) + return diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_officer_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_officer_01_02.py new file mode 100644 index 00000000..3534213e --- /dev/null +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_officer_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_roadmap_belt_officer_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_roadmap_belt_officer_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 15) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 20) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 15) + object.setStringAttribute('class_required', 'Officer') + object.setIntAttribute('required_combat_level', 90) + return diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_smuggler_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_smuggler_01_02.py new file mode 100644 index 00000000..0f3db47c --- /dev/null +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_smuggler_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_roadmap_belt_smuggler_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_roadmap_belt_smuggler_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 15) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 20) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 15) + object.setStringAttribute('class_required', 'Smuggler') + object.setIntAttribute('required_combat_level', 90) + return diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_trader_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_trader_01_02.py index 353407c0..3716a5a6 100644 --- a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_trader_01_02.py +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_trader_01_02.py @@ -10,4 +10,4 @@ def setup(core, object): object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 15) object.setStringAttribute('class_required', 'Trader') object.setIntAttribute('required_combat_level', 90) - return \ No newline at end of file + return diff --git a/scripts/object/tangible/wearables/necklace/item_entertainer_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_entertainer_pendant_01_02.py new file mode 100644 index 00000000..892b22d1 --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_entertainer_pendant_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_entertainer_pendant_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_entertainer_pendant_01_02') + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:dance_prop_assembly', 5) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:stamina_modified', 3) + object.setStringAttribute('class_required', 'Entertainer') + return diff --git a/scripts/object/tangible/wearables/necklace/item_medic_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_medic_pendant_01_02.py new file mode 100644 index 00000000..a6fefff8 --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_medic_pendant_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_medic_pendant_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_medic_pendant_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 12) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 12) + object.setStringAttribute('class_required', 'Medic') + return diff --git a/scripts/object/tangible/wearables/necklace/item_officer_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_officer_pendant_01_02.py new file mode 100644 index 00000000..f3b7d3e3 --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_officer_pendant_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_officer_pendant_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_officer_pendant_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 12) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 12) + object.setStringAttribute('class_required', 'Officer') + return diff --git a/scripts/object/tangible/wearables/necklace/item_smuggler_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_smuggler_pendant_01_02.py new file mode 100644 index 00000000..a63039a2 --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_smuggler_pendant_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_smuggler_pendant_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_smuggler_pendant_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 12) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 12) + object.setStringAttribute('class_required', 'Smuggler') + return diff --git a/scripts/object/tangible/wearables/necklace/item_trader_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_trader_pendant_01_02.py index 48f0b1b9..f8f53731 100644 --- a/scripts/object/tangible/wearables/necklace/item_trader_pendant_01_02.py +++ b/scripts/object/tangible/wearables/necklace/item_trader_pendant_01_02.py @@ -6,6 +6,6 @@ def setup(core, object): object.setDetailFilename('static_item_d') object.setDetailName('item_trader_pendant_01_02') object.setIntAttribute('cat_stat_mod_bonus.@stat_n:general_assembly', 5) - object.setIntAttribute('cat_stat_mod_bonus.@stat_n:hiring', 3) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:hiring', 2) object.setStringAttribute('class_required', 'Trader') return diff --git a/scripts/object/tangible/wearables/ring/item_entertainer_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_entertainer_ring_01_02.py new file mode 100644 index 00000000..59c9222b --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_entertainer_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_entertainer_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_entertainer_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 6) + object.setStringAttribute('class_required', 'Entertainer') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_medic_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_medic_ring_01_02.py new file mode 100644 index 00000000..be5e6507 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_medic_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_medic_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_medic_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 6) + object.setStringAttribute('class_required', 'Medic') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_officer_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_officer_ring_01_02.py new file mode 100644 index 00000000..3f031dc6 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_officer_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_officer_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_officer_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 6) + object.setStringAttribute('class_required', 'Officer') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_smuggler_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_smuggler_ring_01_02.py new file mode 100644 index 00000000..e2f686bf --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_smuggler_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_smuggler_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_smuggler_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 6) + object.setStringAttribute('class_required', 'Smuggler') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_trader_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_trader_ring_01_02.py new file mode 100644 index 00000000..6c468b41 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_trader_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_trader_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_trader_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:artisian_assembly', 6) + object.setStringAttribute('class_required', 'Trader') + object.setAttachment('radial_filename', 'ring/unity') + return From 2d8836e1b69cfb58a6bf94bcc1f32375de3f6672 Mon Sep 17 00:00:00 2001 From: CharonInferar Date: Fri, 6 Jun 2014 00:28:49 +0200 Subject: [PATCH 19/19] Loot icon disappears now after all items have been looted --- scripts/commands/transferitemmisc.py | 5 +++++ src/protocol/swg/StopClientEffectObjectByLabel.java | 10 +++++++++- src/services/LootService.java | 6 ++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/commands/transferitemmisc.py b/scripts/commands/transferitemmisc.py index 2df5ab93..9680da3e 100644 --- a/scripts/commands/transferitemmisc.py +++ b/scripts/commands/transferitemmisc.py @@ -23,12 +23,17 @@ def run(core, actor, target, commandString): if target.getTemplate() == 'object/tangible/item/shared_loot_cash.iff': core.lootService.handleCreditPickUp(actor,target) + if target.getGrandparent().getInventoryItemCount()==1: + core.lootService.setLooted(actor,target.getGrandparent()) core.objectService.destroyObject(target) return if target.isLootItem(): target.setLootItem(0) actor.sendSystemMessage('You looted ' + target.getObjectName().getStfValue() + ' from corpse.', 0) + #actor.sendSystemMessage('container.getInventoryItemCount() %s' % target.getGrandparent().getInventoryItemCount(), 0) + if target.getGrandparent().getInventoryItemCount()==1: + core.lootService.setLooted(actor,target.getGrandparent()) if actorContainer != None and (container.getTemplate() == "object/cell/shared_cell.iff") & core.housingService.getPermissions(actor, actorContainer): target.getContainer().transferTo(actor, container, target) diff --git a/src/protocol/swg/StopClientEffectObjectByLabel.java b/src/protocol/swg/StopClientEffectObjectByLabel.java index e1a99339..043035c1 100644 --- a/src/protocol/swg/StopClientEffectObjectByLabel.java +++ b/src/protocol/swg/StopClientEffectObjectByLabel.java @@ -33,10 +33,18 @@ public class StopClientEffectObjectByLabel extends SWGMessage { private long objectId; private String effectFile; private String commandString; + private byte unknownFlag; public StopClientEffectObjectByLabel(long objectId, String commandString) { this.objectId = objectId; this.commandString = commandString; + this.unknownFlag = 1; + } + + public StopClientEffectObjectByLabel(long objectId, String commandString, byte unknownFlag) { + this.objectId = objectId; + this.commandString = commandString; + this.unknownFlag = unknownFlag; } @Override @@ -48,7 +56,7 @@ public class StopClientEffectObjectByLabel extends SWGMessage { result.putInt(0xAD6F6B26); result.putLong(objectId); result.put(getAsciiString(commandString)); - result.put((byte) 0); + result.put(unknownFlag); return result.flip(); diff --git a/src/services/LootService.java b/src/services/LootService.java index 97f0a83f..a9e57e0b 100644 --- a/src/services/LootService.java +++ b/src/services/LootService.java @@ -102,7 +102,7 @@ public class LootService implements INetworkDispatch { } SWGObject lootedObjectInventory = lootedObject.getSlottedObject("inventory"); core.simulationService.openContainer(requester, lootedObjectInventory); - setLooted(requester,lootedObject); + //setLooted(requester,lootedObject); } } @@ -1870,7 +1870,7 @@ public class LootService implements INetworkDispatch { public void setLooted(CreatureObject requester,TangibleObject lootedObject){ lootedObject.setLooted(true); - StopClientEffectObjectByLabel stopmsg = new StopClientEffectObjectByLabel(lootedObject.getObjectID(),"lootMe"); + StopClientEffectObjectByLabel stopmsg = new StopClientEffectObjectByLabel(lootedObject.getObjectID(),"lootMe", (byte) 0); requester.getClient().getSession().write(stopmsg.serialize()); } @@ -2553,6 +2553,8 @@ public class LootService implements INetworkDispatch { TangibleObject item11 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_armor_repair_device_generic.iff", player.getPlanet()); item11.setCustomName("Armor Repair Device"); playerInventory.add(item11); + + }