From 5f72a08f922a2c4101ea673a66f4d31c5f384bda Mon Sep 17 00:00:00 2001 From: Iosnowore Kun Date: Thu, 7 Aug 2014 22:06:57 -0400 Subject: [PATCH 1/7] Removed Level Restriction From GCW Scout Trooper Boots and Gloves And Added Armor Restriction Like They Were On Live --- .../armor/scout_trooper/armor_scout_trooper_boots_gcw.py | 2 +- .../armor/scout_trooper/armor_scout_trooper_gloves_gcw.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py index fa511268..26cd7460 100644 --- a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py +++ b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py @@ -1,6 +1,6 @@ import sys def setup(core, object): - object.setIntAttribute('required_combat_level', 22) object.setStringAttribute('required_faction', 'Imperial') + object.setStringAttribute('armor_category', '@obj_attr_n:armor_reconnaissance') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py index fa511268..26cd7460 100644 --- a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py +++ b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py @@ -1,6 +1,6 @@ import sys def setup(core, object): - object.setIntAttribute('required_combat_level', 22) object.setStringAttribute('required_faction', 'Imperial') + object.setStringAttribute('armor_category', '@obj_attr_n:armor_reconnaissance') return \ No newline at end of file From d6d78dcbb71a9bc5e64ee10aa4cff92877e69f36 Mon Sep 17 00:00:00 2001 From: Iosnowore Kun Date: Thu, 7 Aug 2014 22:14:26 -0400 Subject: [PATCH 2/7] Fixed Officer Pistol Roadmap Reward --- scripts/roadmap/officer_1a.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/roadmap/officer_1a.py b/scripts/roadmap/officer_1a.py index 3a139591..9c89974f 100644 --- a/scripts/roadmap/officer_1a.py +++ b/scripts/roadmap/officer_1a.py @@ -101,7 +101,7 @@ def getRewards(name): if name == 'armor_ithorian_roadmap_gloves_02_03': return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff" - if name == 'weapon_pistol_sp_roadmap_01_02': + if name == 'weapon_pistol_of_roadmap_01_02': return "object/weapon/ranged/pistol/shared_pistol_dl44.iff" if name == 'item_officer_ring_01_02': From 3ee4733c41cfe49d9e8c22b584ff03d410c4877d Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 8 Aug 2014 04:32:44 +0200 Subject: [PATCH 3/7] Revert "Removed Level Restriction From GCW Scout Trooper Boots and Gloves And Added Armor Restriction Like They Were On Live" --- .../armor/scout_trooper/armor_scout_trooper_boots_gcw.py | 2 +- .../armor/scout_trooper/armor_scout_trooper_gloves_gcw.py | 2 +- scripts/roadmap/officer_1a.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py index 26cd7460..fa511268 100644 --- a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py +++ b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_boots_gcw.py @@ -1,6 +1,6 @@ import sys def setup(core, object): + object.setIntAttribute('required_combat_level', 22) object.setStringAttribute('required_faction', 'Imperial') - object.setStringAttribute('armor_category', '@obj_attr_n:armor_reconnaissance') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py index 26cd7460..fa511268 100644 --- a/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py +++ b/scripts/object/tangible/wearables/armor/scout_trooper/armor_scout_trooper_gloves_gcw.py @@ -1,6 +1,6 @@ import sys def setup(core, object): + object.setIntAttribute('required_combat_level', 22) object.setStringAttribute('required_faction', 'Imperial') - object.setStringAttribute('armor_category', '@obj_attr_n:armor_reconnaissance') return \ No newline at end of file diff --git a/scripts/roadmap/officer_1a.py b/scripts/roadmap/officer_1a.py index 9c89974f..3a139591 100644 --- a/scripts/roadmap/officer_1a.py +++ b/scripts/roadmap/officer_1a.py @@ -101,7 +101,7 @@ def getRewards(name): if name == 'armor_ithorian_roadmap_gloves_02_03': return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff" - if name == 'weapon_pistol_of_roadmap_01_02': + if name == 'weapon_pistol_sp_roadmap_01_02': return "object/weapon/ranged/pistol/shared_pistol_dl44.iff" if name == 'item_officer_ring_01_02': From 8ae66375da0201ff0a5e7663fdce75557fe4fff9 Mon Sep 17 00:00:00 2001 From: Viaron Date: Thu, 7 Aug 2014 23:27:21 -0400 Subject: [PATCH 4/7] Added Transfer of Several Admin Commands by Zing --- scripts/commands/adjustLotCount.py | 15 +++++++++++ scripts/commands/broadcastGalaxy.py | 12 +++++++++ scripts/commands/broadcastPlanet.py | 11 ++++++++ scripts/commands/credits.py | 20 ++++++++++++++ scripts/commands/invulnerable.py | 33 +++++++++++++++++++++++ scripts/commands/setRank.py | 41 +++++++++++++++++++++++++++++ 6 files changed, 132 insertions(+) create mode 100644 scripts/commands/adjustLotCount.py create mode 100644 scripts/commands/broadcastGalaxy.py create mode 100644 scripts/commands/broadcastPlanet.py create mode 100644 scripts/commands/credits.py create mode 100644 scripts/commands/invulnerable.py create mode 100644 scripts/commands/setRank.py diff --git a/scripts/commands/adjustLotCount.py b/scripts/commands/adjustLotCount.py new file mode 100644 index 00000000..4d20f4c7 --- /dev/null +++ b/scripts/commands/adjustLotCount.py @@ -0,0 +1,15 @@ +import sys + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + arg1 = commandArgs[0] + + if target is None: + target = actor + + if target: + playerObject = target.getSlottedObject('ghost') + playerObject.setLotsRemaining(playerObject.getLotsRemaining() + int(arg1)) + print(playerObject.getLotsRemaining()) + actor.sendSystemMessage('GM: Adjust Lot Count: Completed Successfully for ' + target.getFirstName(), 0) + return \ No newline at end of file diff --git a/scripts/commands/broadcastGalaxy.py b/scripts/commands/broadcastGalaxy.py new file mode 100644 index 00000000..04a1ae09 --- /dev/null +++ b/scripts/commands/broadcastGalaxy.py @@ -0,0 +1,12 @@ + +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.chatService.broadcastGalaxy(commandString) + return \ No newline at end of file diff --git a/scripts/commands/broadcastPlanet.py b/scripts/commands/broadcastPlanet.py new file mode 100644 index 00000000..cb2956d2 --- /dev/null +++ b/scripts/commands/broadcastPlanet.py @@ -0,0 +1,11 @@ +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.chatService.broadcastPlanet(commandString, actor.getPlanet()) + return \ No newline at end of file diff --git a/scripts/commands/credits.py b/scripts/commands/credits.py new file mode 100644 index 00000000..11d28a36 --- /dev/null +++ b/scripts/commands/credits.py @@ -0,0 +1,20 @@ +import sys + + + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + arg1 = commandArgs[0] + playerObject = actor.getSlottedObject('ghost') + + if actor: + actor.setCashCredits(actor.getCashCredits() + int(arg1)) + actor.sendSystemMessage(actor.getFirstName() + ' has removed ' + arg1 + ' credits from Project SWG\'s bank.', 0) + + if actor and target: + target.setCashCredits(target.getCashCredits() + int(arg1)) + target.sendSystemMessage('You have recieved ' + arg1 + ' credits from ' + actor.getFirstName(), 0) + actor.sendSystemMessage('You have transferred ' + arg1 + ' credits to ' + target.getFirstName(), 0) + + + return \ No newline at end of file diff --git a/scripts/commands/invulnerable.py b/scripts/commands/invulnerable.py new file mode 100644 index 00000000..90aab004 --- /dev/null +++ b/scripts/commands/invulnerable.py @@ -0,0 +1,33 @@ +import sys +from resources.datatables import Options + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + command = commandArgs[0] + + + if command == 'invisible': + if (actor.isInStealth()): + actor.setInStealth(False) + actor.setRadarVisible(True) + actor.sendSystemMessage('GM Command Successfull: You are no longer Invisible.', 0) + + else: + actor.setInStealth(True) + actor.setRadarVisible(False) + actor.sendSystemMessage('GM Command Successfull: You are now Invisible.', 0) + + if actor.getOptionsBitmask() == 128: + actor.setOptionsBitmask(Options.NONE) + actor.sendSystemMessage('GM Command Successfull: You are now Invulnerable.', 0) + + + elif actor.getOptionsBitmask() == 0: + actor.setOptionsBitmask(Options.ATTACKABLE) + print(actor.getOptionsBitmask()) + + actor.sendSystemMessage('GM Command Successfull: You are no longer Invulnerable.', 0) + + return + + \ No newline at end of file diff --git a/scripts/commands/setRank.py b/scripts/commands/setRank.py new file mode 100644 index 00000000..afdc5b16 --- /dev/null +++ b/scripts/commands/setRank.py @@ -0,0 +1,41 @@ +import sys +from resources.datatables import GcwRank +from services.gcw import GCWService + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + arg1 = commandArgs[0] + if len(commandArgs) > 1: + arg2 = commandArgs[1] + + if target is None: + target = actor + + if target.getFaction() == 'rebel' or 'imperial' and arg1 == 'up': + playerObject = target.getSlottedObject('ghost') + playerObject.setCurrentRank(int(arg2)) + newrank = playerObject.getCurrentRank() + core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankUp", core, target, newrank) + actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) + if target.getFaction() == 'rebel' or 'imperial' and arg1 == 'down': + playerObject = target.getSlottedObject('ghost') + playerObject.setCurrentRank(int(arg2)) + newrank = playerObject.getCurrentRank() + core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankDown", target, newrank) + actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) + +# if target.getFaction() == 'imperial' and arg1 == 'up': +# if arg1 == 'up': +# playerObject = actor.getSlottedObject('ghost') +# playerObject.setCurrentRank(int(arg2)) +# newrank = playerObject.getCurrentRank() +# core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankUp", core, target, newrank) +# actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) +# if target.getFaction() == 'imperial' and arg1 == 'down': +# playerObject = actor.getSlottedObject('ghost') +# playerObject.setCurrentRank(int(arg2)) +# newrank = playerObject.getCurrentRank() +# core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankDown", target, newrank) +# actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) + + return \ No newline at end of file From bae95657d8efb8f5ce8ebfc41ed6695d48aa13d8 Mon Sep 17 00:00:00 2001 From: Zing Date: Thu, 7 Aug 2014 21:15:05 -0700 Subject: [PATCH 5/7] Fixed GCW rank commands not being rewarded, Fixed GCW rank armor stats. --- scripts/collections/gcwrank_imperial.py | 20 +++++++++---------- scripts/collections/gcwrank_rebel.py | 20 +++++++++---------- .../armor_rebel_spec_ops_belt.py | 6 ------ .../armor_rebel_spec_ops_boots.py | 6 ------ .../armor_rebel_spec_ops_gloves.py | 6 ------ ..._pvp_spec_ops_imperial_black_belt_05_01.py | 6 ------ ...pvp_spec_ops_imperial_black_boots_05_01.py | 6 ------ ...vp_spec_ops_imperial_black_gloves_05_01.py | 6 ------ 8 files changed, 20 insertions(+), 56 deletions(-) diff --git a/scripts/collections/gcwrank_imperial.py b/scripts/collections/gcwrank_imperial.py index 19e67fe5..584d18a6 100644 --- a/scripts/collections/gcwrank_imperial.py +++ b/scripts/collections/gcwrank_imperial.py @@ -3,23 +3,23 @@ from resources.datatables import GcwRank def handleRankUp(core, actor, newrank): if newrank >= GcwRank.LIEUTENANT: - actor.addAbility('pvp_retaliation_ability') + actor.addAbility('command_pvp_retaliation_ability') core.collectionService.addCollection(actor, 'pvp_imperial_lieutenant') if newrank >= GcwRank.CAPTAIN: - actor.addAbility('pvp_adrenaline_ability') + actor.addAbility('command_pvp_adrenaline_ability') core.collectionService.addCollection(actor, 'pvp_imperial_captain') if newrank >= GcwRank.MAJOR: - actor.addAbility('pvp_unstoppable_ability') + actor.addAbility('command_pvp_unstoppable_ability') core.collectionService.addCollection(actor, 'pvp_imperial_major') if newrank >= GcwRank.LTCOLONEL: - actor.addAbility('pvp_last_man_ability') + actor.addAbility('command_pvp_last_man_ability') core.collectionService.addCollection(actor, 'pvp_imperial_lt_colonel') if newrank >= GcwRank.COLONEL: - actor.addAbility('pvp_aura_buff_self_ability') + actor.addAbility('pvp_aura_buff_imperial_self') core.collectionService.addCollection(actor, 'pvp_imperial_colonel') if newrank >= GcwRank.GENERAL: @@ -30,19 +30,19 @@ def handleRankUp(core, actor, newrank): def handleRankDown(actor, newrank): if newrank < GcwRank.LIEUTENANT: - actor.removeAbility('pvp_retaliation_ability') + actor.removeAbility('command_pvp_retaliation_ability') if newrank < GcwRank.CAPTAIN: - actor.removeAbility('pvp_adrenaline_ability') + actor.removeAbility('command_pvp_adrenaline_ability') if newrank < GcwRank.MAJOR: - actor.removeAbility('pvp_unstoppable_ability') + actor.removeAbility('command_pvp_unstoppable_ability') if newrank < GcwRank.LTCOLONEL: - actor.removeAbility('pvp_last_man_ability') + actor.removeAbility('command_pvp_last_man_ability') if newrank < GcwRank.COLONEL: - actor.removeAbility('pvp_aura_buff_self_ability') + actor.removeAbility('pvp_aura_buff_imperial_self') if newrank < GcwRank.GENERAL: actor.removeAbility('pvp_airstrike_ability') diff --git a/scripts/collections/gcwrank_rebel.py b/scripts/collections/gcwrank_rebel.py index 7cd757fc..3ba4222b 100644 --- a/scripts/collections/gcwrank_rebel.py +++ b/scripts/collections/gcwrank_rebel.py @@ -3,23 +3,23 @@ from resources.datatables import GcwRank def handleRankUp(core, actor, newrank): if newrank >= GcwRank.LIEUTENANT: - actor.addAbility('pvp_retaliation_rebel_ability') + actor.addAbility('command_pvp_retaliation_rebel_ability') core.collectionService.addCollection(actor, 'pvp_rebel_lieutenant') if newrank >= GcwRank.CAPTAIN: - actor.addAbility('pvp_adrenaline_rebel_ability') + actor.addAbility('command_pvp_adrenaline_rebel_ability') core.collectionService.addCollection(actor, 'pvp_rebel_captain') if newrank >= GcwRank.MAJOR: - actor.addAbility('pvp_unstoppable_rebel_ability') + actor.addAbility('command_pvp_unstoppable_rebel_ability') core.collectionService.addCollection(actor, 'pvp_rebel_major') if newrank >= GcwRank.COMMANDER: - actor.addAbility('pvp_last_man_rebel_ability') + actor.addAbility('command_pvp_last_man_rebel_ability') core.collectionService.addCollection(actor, 'pvp_rebel_commander') if newrank >= GcwRank.COLONEL: - actor.addAbility('pvp_aura_buff_self_rebel_ability') + actor.addAbility('pvp_aura_buff_rebel_self') core.collectionService.addCollection(actor, 'pvp_rebel_colonel') if newrank >= GcwRank.GENERAL: @@ -30,19 +30,19 @@ def handleRankUp(core, actor, newrank): def handleRankDown(actor, newrank): if newrank < GcwRank.LIEUTENANT: - actor.removeAbility('pvp_retaliation_rebel_ability') + actor.removeAbility('command_pvp_retaliation_rebel_ability') if newrank < GcwRank.CAPTAIN: - actor.removeAbility('pvp_adrenaline_rebel_ability') + actor.removeAbility('command_pvp_adrenaline_rebel_ability') if newrank < GcwRank.MAJOR: - actor.removeAbility('pvp_unstoppable_rebel_ability') + actor.removeAbility('command_pvp_unstoppable_rebel_ability') if newrank < GcwRank.COMMANDER: - actor.removeAbility('pvp_last_man_rebel_ability') + actor.removeAbility('command_pvp_last_man_rebel_ability') if newrank < GcwRank.COLONEL: - actor.removeAbility('pvp_aura_buff_self_rebel_ability') + actor.removeAbility('pvp_aura_buff_rebel_self') if newrank < GcwRank.GENERAL: actor.removeAbility('pvp_airstrike_rebel_ability') diff --git a/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_belt.py b/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_belt.py index 1be134b6..b589b6e8 100644 --- a/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_belt.py +++ b/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_belt.py @@ -10,10 +10,4 @@ def setup(core, object): object.setIntAttribute('no_trade', 1) object.setStringAttribute('faction_restriction', 'Rebel') object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault') - object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608) - object.setIntAttribute('cat_armor_standard_protection.energy', 4608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608) return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_boots.py b/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_boots.py index f7d17219..c79a2747 100644 --- a/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_boots.py +++ b/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_boots.py @@ -10,10 +10,4 @@ def setup(core, object): object.setIntAttribute('no_trade', 1) object.setStringAttribute('faction_restriction', 'Rebel') object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault') - object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608) - object.setIntAttribute('cat_armor_standard_protection.energy', 4608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608) return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_gloves.py b/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_gloves.py index 2e0a2417..ff30b43a 100644 --- a/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_gloves.py +++ b/scripts/object/tangible/wearables/armor/rebel_assault/armor_rebel_spec_ops_gloves.py @@ -10,10 +10,4 @@ def setup(core, object): object.setIntAttribute('no_trade', 1) object.setStringAttribute('faction_restriction', 'Rebel') object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault') - object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608) - object.setIntAttribute('cat_armor_standard_protection.energy', 4608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608) return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_belt_05_01.py b/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_belt_05_01.py index 3c98941f..3ebc0dbf 100644 --- a/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_belt_05_01.py +++ b/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_belt_05_01.py @@ -11,10 +11,4 @@ def setup(core, object): object.setIntAttribute('no_trade', 1) object.setStringAttribute('faction_restriction', 'Imperial') object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault') - object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608) - object.setIntAttribute('cat_armor_standard_protection.energy', 4608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608) return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_boots_05_01.py b/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_boots_05_01.py index 5e993cf8..ffcc1157 100644 --- a/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_boots_05_01.py +++ b/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_boots_05_01.py @@ -11,10 +11,4 @@ def setup(core, object): object.setIntAttribute('no_trade', 1) object.setStringAttribute('faction_restriction', 'Imperial') object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault') - object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608) - object.setIntAttribute('cat_armor_standard_protection.energy', 4608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608) return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_gloves_05_01.py b/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_gloves_05_01.py index bfcbba83..8781ee28 100644 --- a/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_gloves_05_01.py +++ b/scripts/object/tangible/wearables/armor/stormtrooper/armor_pvp_spec_ops_imperial_black_gloves_05_01.py @@ -11,10 +11,4 @@ def setup(core, object): object.setIntAttribute('no_trade', 1) object.setStringAttribute('faction_restriction', 'Imperial') object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault') - object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608) - object.setIntAttribute('cat_armor_standard_protection.energy', 4608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608) - object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608) return \ No newline at end of file From 04f41a0f41fdc8190c7518a5b2634dcde08b0a57 Mon Sep 17 00:00:00 2001 From: Zing Date: Thu, 7 Aug 2014 21:47:43 -0700 Subject: [PATCH 6/7] Revert "Removed printAnalysis for CREO3 baseline, Added SWGList for Skills" This reverts commit d9ca531c5d002d5ae394f15aa526ca54658e6976. --- .../creature/CreatureMessageBuilder.java | 6 ++- .../objects/creature/CreatureObject.java | 39 ++----------------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/src/resources/objects/creature/CreatureMessageBuilder.java b/src/resources/objects/creature/CreatureMessageBuilder.java index 80bd3f58..33367160 100644 --- a/src/resources/objects/creature/CreatureMessageBuilder.java +++ b/src/resources/objects/creature/CreatureMessageBuilder.java @@ -138,10 +138,10 @@ public class CreatureMessageBuilder extends TangibleMessageBuilder { buffer.putLong(creature.getOwnerId()); - //float height = creature.getHeight(); + float height = creature.getHeight(); //if (height < 0.7 || height > 1.5) // height = 1; - buffer.putFloat(creature.getHeight()); + buffer.putFloat(height); buffer.putInt(0); // battle fatigue buffer.putLong(creature.getStateBitmask()); int size = buffer.position(); @@ -150,6 +150,8 @@ public class CreatureMessageBuilder extends TangibleMessageBuilder { buffer.flip(); buffer = createBaseline("CREO", (byte) 3, buffer, size); + tools.CharonPacketUtils.printAnalysis(buffer, "CREO 3"); + return buffer; } diff --git a/src/resources/objects/creature/CreatureObject.java b/src/resources/objects/creature/CreatureObject.java index f0cb1bdc..332d1731 100644 --- a/src/resources/objects/creature/CreatureObject.java +++ b/src/resources/objects/creature/CreatureObject.java @@ -24,7 +24,6 @@ package resources.objects.creature; import java.io.Serializable; import java.lang.System; import java.util.ArrayList; -import java.util.BitSet; import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -56,7 +55,6 @@ import resources.objects.ObjectMessageBuilder; import resources.objects.SWGList; import resources.objects.SWGMap; import engine.resources.common.CRC; -import engine.resources.objects.Baseline; import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; @@ -74,7 +72,7 @@ public class CreatureObject extends TangibleObject implements Serializable { // CREO 1 private int bankCredits = 0; private int cashCredits = 0; - private SWGList skills; + private List skills; @NotPersistent private transient int skillsUpdateCounter = 0; @@ -194,7 +192,7 @@ public class CreatureObject extends TangibleObject implements Serializable { super(objectID, planet, position, orientation, Template); messageBuilder = new CreatureMessageBuilder(this); loadTemplateData(); - skills = new SWGList(); + skills = new ArrayList(); skillMods = new SWGMap(this, 4, 3, true); abilities = new SWGMap(this, 4, 14, true); missionCriticalObjects = new SWGMap(this, 4, 13, false); @@ -237,38 +235,7 @@ public class CreatureObject extends TangibleObject implements Serializable { setTurnRadius((float) getTemplateData().getAttribute("turnRate"));*/ } - - /*@Override - public Baseline getBaseline1() { - Baseline baseline = super.getBaseline1(); - baseline.put("bankCredits", 0); - baseline.put("cashCredits", 0); - - // HAM base list stuff - baseline.put("baseHAM", 6); // list size - baseline.put("unk1", 0); // udpate count? - baseline.put("health", 1000); - baseline.put("spacer1", 0); - baseline.put("action", 300); - baseline.put("spacer2", 0); - baseline.put("unk2", 0x2C01); - baseline.put("unk3", 0); - - baseline.put("skills", new SWGList()); - return baseline; - } - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("posture", (byte) 0); - baseline.put("creo3unk1", (byte) 0); - baseline.put("ownerId", (long) 0); - baseline.put("height", (float) 1.3); - baseline.put("battleFatigue", 0); - baseline.put("stateBitmask", new BitSet()); - return baseline; - }*/ public int getBankCredits() { synchronized(objectMutex) { return bankCredits; @@ -332,7 +299,7 @@ public class CreatureObject extends TangibleObject implements Serializable { } } - public SWGList getSkills() { + public List getSkills() { return skills; } From dff394c077c5dcc78d665a3dda5a606a313c5bc3 Mon Sep 17 00:00:00 2001 From: Zing Date: Thu, 7 Aug 2014 23:49:20 -0700 Subject: [PATCH 7/7] Configured /server admin command for server related needs. Added initiateStop to NGECore. --- scripts/commands/server.py | 14 +++++++++----- src/main/NGECore.java | 20 +++++++++++++++++++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/scripts/commands/server.py b/scripts/commands/server.py index 09765edc..fc7b1f5c 100644 --- a/scripts/commands/server.py +++ b/scripts/commands/server.py @@ -28,14 +28,18 @@ def run(core, actor, target, commandString): if command == 'lockServer': core.setGalaxyStatus(GalaxyStatus.Locked) + actor.sendSystemMessage('GM: Command completed successfully, Server is now in Locked Status', 0) if command == 'unlockServer': core.setGalaxyStatus(GalaxyStatus.Online) - if command == 'info': - actor.sendSystemMessage(str(core.getActiveZoneClients()) + ' online characters.', 0) + actor.sendSystemMessage('GM: Command completed successfully, Server is now in Online Status', 0) + #if command == 'restart': //This command currently causes an error at NGEcore.java like 593 whole attempting to close databaseConnection2 + #core.restart() + #actor.sendSystemMessage('GM: Command completed successfully, Server restart initiated', 0) if command == 'shutdown': core.initiateShutdown() - if command == 'getheight': - actor.sendSystemMessage(str(core.terrainService.getHeight(actor.getPlanetId(), actor.getWorldPosition().x, actor.getWorldPosition().z)), 0) - + actor.sendSystemMessage('GM: Command completed successfully, Server shutdown initiated', 0) + if command == 'stop': + core.initiateStop() + actor.sendSystemMessage('GM: Command completed successfully, Emergency server shutdown initiated', 0) return diff --git a/src/main/NGECore.java b/src/main/NGECore.java index 2bd40112..8e47a007 100644 --- a/src/main/NGECore.java +++ b/src/main/NGECore.java @@ -796,8 +796,26 @@ public class NGECore { } catch (InterruptedException e) { e.printStackTrace(); } + } - + public void initiateStop() { + if(isShuttingDown) + return; + try { + chatService.broadcastGalaxy("You will now be disconnected so the server can perform a final save before shutting down."); + Thread.sleep(10000); + synchronized(getActiveConnectionsMap()) { + for(Client client : getActiveConnectionsMap().values()) { + client.getSession().close(true); + connectionService.disconnect(client); + } + } + + System.exit(0); + + } catch (InterruptedException e) { + e.printStackTrace(); + } }