diff --git a/scripts/commands/requestwaypointatposition.py b/scripts/commands/requestwaypointatposition.py index 2acdedc3..dbe22502 100644 --- a/scripts/commands/requestwaypointatposition.py +++ b/scripts/commands/requestwaypointatposition.py @@ -1,12 +1,20 @@ import sys def setup(): - return - + return + def run(core, actor, target, commandString): - commandArgs = commandString.split("(^-,=+_)color_13548(,+-=_^)=1") - newString = commandArgs[0] + commandArgs = commandString.split(' ') + newString = None + # removes the strange varying color arguments the client sends to server + for arg in commandArgs: + if 'color' not in arg: + if newString is None: + newString = arg + else: + newString = newString + ' ' + arg - core.commandService.callCommand(actor, 'waypoint', None, newString) - return \ No newline at end of file + + core.commandService.callCommand(actor, 'waypoint', None, newString) + return \ No newline at end of file diff --git a/scripts/conversation/medical_cloning_droid.py b/scripts/conversation/medical_cloning_droid.py index 8089c5f5..bc988f5f 100644 --- a/scripts/conversation/medical_cloning_droid.py +++ b/scripts/conversation/medical_cloning_droid.py @@ -31,19 +31,10 @@ def startConversation(core, actor, npc): cloningFee = 5000 convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/clone_droid:s_6", int(cloningFee))) - prose1 = ProsePackage('conversation/clone_droid', 's_8') - outOfBand2 = OutOfBand() - outOfBand2.addProsePackage(prose1) - prose2 = ProsePackage('conversation/clone_droid', 's_12') - outOfBand3 = OutOfBand() - outOfBand3.addProsePackage(prose2) - option1 = ConversationOption(outOfBand2, 0) - option2 = ConversationOption(outOfBand3, 1) - options = Vector() - options.add(option1) - options.add(option2) + options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/clone_droid:s_8'), 0)) + options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/clone_droid:s_12'), 1)) convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen) return @@ -56,18 +47,11 @@ def handleFirstScreen(core, actor, npc, selection): convSvc = core.conversationService if selection == 0: - prose = ProsePackage('conversation/clone_droid', 's_10') - outOfBand = OutOfBand() - outOfBand.addProsePackage(prose) - convSvc.sendConversationMessage(actor, npc, outOfBand) - prose2 = ProsePackage('conversation/clone_droid', 's_12') - outOfBand2 = OutOfBand() - outOfBand2.addProsePackage(prose2) - option1 = ConversationOption(outOfBand2, 0) - + convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/clone_droid:s_10')) + options = Vector() - options.add(option1) + options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/clone_droid:s_12'), 1)) convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen) diff --git a/scripts/mobiles/generic/faction/imperial/imperial_recruiter.py b/scripts/mobiles/generic/faction/imperial/imperial_recruiter.py new file mode 100644 index 00000000..e9186241 --- /dev/null +++ b/scripts/mobiles/generic/faction/imperial/imperial_recruiter.py @@ -0,0 +1,43 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from resources.datatables import FactionStatus +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('imperial_recruiter') + mobileTemplate.setLevel(1) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setOptionsBitmask(Options.INVULNERABLE | Options.CONVERSABLE) + mobileTemplate.setConversationFileName('imp_recruiter') + + templates = Vector() + templates.add('object/mobile/shared_dressed_imperial_officer_f.iff') + templates.add('object/mobile/shared_dressed_imperial_officer_m.iff') + templates.add('object/mobile/shared_dressed_imperial_officer_m_2.iff') + templates.add('object/mobile/shared_dressed_imperial_officer_m_3.iff') + templates.add('object/mobile/shared_dressed_imperial_officer_m_4.iff') + templates.add('object/mobile/shared_dressed_imperial_officer_m_5.iff') + templates.add('object/mobile/shared_dressed_imperial_officer_m_6.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', WeaponType.UNARMED, 1.0, 0, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleeHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('imperial_recruiter', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/generic/faction/rebel/rebel_recruiter.py b/scripts/mobiles/generic/faction/rebel/rebel_recruiter.py new file mode 100644 index 00000000..b7e37139 --- /dev/null +++ b/scripts/mobiles/generic/faction/rebel/rebel_recruiter.py @@ -0,0 +1,40 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from resources.datatables import FactionStatus +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('rebel_recruiter') + mobileTemplate.setLevel(1) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setOptionsBitmask(Options.INVULNERABLE | Options.CONVERSABLE) + mobileTemplate.setConversationFileName('reb_recruiter') + + templates = Vector() + templates.add('object/mobile/shared_dressed_rebel_recruiter_human_female_01.iff') + templates.add('object/mobile/shared_dressed_rebel_recruiter_human_female_02.iff') + templates.add('object/mobile/shared_dressed_rebel_recruiter_moncal_male_01.iff') + templates.add('object/mobile/shared_dressed_rebel_recruiter_twilek_female_01.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', WeaponType.UNARMED, 1.0, 0, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleeHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('rebel_recruiter', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/arkahn_greystar.py b/scripts/mobiles/tatooine/arkahn_greystar.py new file mode 100644 index 00000000..ff297a4f --- /dev/null +++ b/scripts/mobiles/tatooine/arkahn_greystar.py @@ -0,0 +1,39 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('jabbas_palace_arkahn_greystar') + mobileTemplate.setLevel(18) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("jabba") + mobileTemplate.setAssistRange(6) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.ATTACKABLE) + + templates = Vector() + + templates.add('object/mobile/shared_arkahn_greystar.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('jabbas_palace_arkahn_greystar', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/careem.py b/scripts/mobiles/tatooine/careem.py new file mode 100644 index 00000000..8dfa96ba --- /dev/null +++ b/scripts/mobiles/tatooine/careem.py @@ -0,0 +1,39 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('jabbas_palace_careem') + mobileTemplate.setLevel(18) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("jabba") + mobileTemplate.setAssistRange(6) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.ATTACKABLE) + + templates = Vector() + + templates.add('object/mobile/shared_careem.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('jabbas_palace_careem', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/delrice_depresse.py b/scripts/mobiles/tatooine/delrice_depresse.py new file mode 100644 index 00000000..e98b2618 --- /dev/null +++ b/scripts/mobiles/tatooine/delrice_depresse.py @@ -0,0 +1,38 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('jabbas_palace_delrice_capreese') + mobileTemplate.setLevel(17) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("jabba") + mobileTemplate.setAssistRange(6) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.ATTACKABLE) + + templates = Vector() + templates.add('object/mobile/shared_ithorian_male.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', WeaponType.UNARMED, 1.0, 6, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('jabbas_palace_delrice_capreese', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/dewall_paez.py b/scripts/mobiles/tatooine/dewall_paez.py index 3d5ce97b..643013ba 100644 --- a/scripts/mobiles/tatooine/dewall_paez.py +++ b/scripts/mobiles/tatooine/dewall_paez.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("wayfar spy") mobileTemplate.setAssistRange(3) mobileTemplate.setStalker(False) - #mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() diff --git a/scripts/mobiles/tatooine/dwarf_bantha.py b/scripts/mobiles/tatooine/dwarf_bantha.py index 998034c8..bafc6757 100644 --- a/scripts/mobiles/tatooine/dwarf_bantha.py +++ b/scripts/mobiles/tatooine/dwarf_bantha.py @@ -11,7 +11,7 @@ def addTemplate(core): mobileTemplate = MobileTemplate() mobileTemplate.setCreatureName('dwarf_bantha') - mobileTemplate.setLevel(10) + mobileTemplate.setLevel(18) mobileTemplate.setDifficulty(Difficulty.NORMAL) mobileTemplate.setMinSpawnDistance(4) diff --git a/scripts/mobiles/tatooine/emanon.py b/scripts/mobiles/tatooine/emanon.py new file mode 100644 index 00000000..839302dc --- /dev/null +++ b/scripts/mobiles/tatooine/emanon.py @@ -0,0 +1,39 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('jabbas_palace_emanon') + mobileTemplate.setLevel(18) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("jabba") + mobileTemplate.setAssistRange(6) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.ATTACKABLE) + + templates = Vector() + + templates.add('object/mobile/shared_emanon.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('jabbas_palace_emanon', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/fighting_romo_vax.py b/scripts/mobiles/tatooine/fighting_romo_vax.py index 9dec4cbf..5b5798df 100644 --- a/scripts/mobiles/tatooine/fighting_romo_vax.py +++ b/scripts/mobiles/tatooine/fighting_romo_vax.py @@ -21,9 +21,11 @@ def addTemplate(core): mobileTemplate.setSocialGroup("sennex") mobileTemplate.setAssistRange(10) mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + templates = Vector() - templates.add('object/mobile/shared_dressed_trader_thug_male_human_01.iff') + templates.add('object/mobile/shared_dressed_trader_thug_male_human_01.iff') #need to find correct template mobileTemplate.setTemplates(templates) weaponTemplates = Vector() diff --git a/scripts/mobiles/tatooine/fnast_drexler.py b/scripts/mobiles/tatooine/fnast_drexler.py new file mode 100644 index 00000000..29dd3b89 --- /dev/null +++ b/scripts/mobiles/tatooine/fnast_drexler.py @@ -0,0 +1,39 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('jabbas_palace_fnast_drexler') + mobileTemplate.setLevel(18) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("jabba") + mobileTemplate.setAssistRange(6) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.ATTACKABLE) + + templates = Vector() + + templates.add('object/mobile/shared_fnast_drexler.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', WeaponType.UNARMED, 1.0, 6, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('jabbas_palace_fnast_drexler', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/iris_sinclair.py b/scripts/mobiles/tatooine/iris_sinclair.py new file mode 100644 index 00000000..a6e956a8 --- /dev/null +++ b/scripts/mobiles/tatooine/iris_sinclair.py @@ -0,0 +1,39 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('jabbas_palace_iris_sinclair') + mobileTemplate.setLevel(18) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("jabba") + mobileTemplate.setAssistRange(6) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.ATTACKABLE) + + templates = Vector() + + templates.add('object/mobile/shared_iris_sinclair.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('jabbas_palace_iris_sinclair', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/romovax_henchman.py b/scripts/mobiles/tatooine/romovax_henchman.py new file mode 100644 index 00000000..c41d0541 --- /dev/null +++ b/scripts/mobiles/tatooine/romovax_henchman.py @@ -0,0 +1,46 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('tatooine_romo_vax_henchman') + mobileTemplate.setLevel(20) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setDeathblow(True) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("sennex") + mobileTemplate.setAssistRange(10) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + + templates = Vector() #need to find correct template + templates.add('object/mobile/shared_dressed_trader_thug_female_human_01.iff') + templates.add('object/mobile/shared_dressed_trader_thug_female_human_02.iff') + templates.add('object/mobile/shared_dressed_trader_thug_female_human_03.iff') + templates.add('object/mobile/shared_dressed_trader_thug_female_twk_01.iff') + templates.add('object/mobile/shared_dressed_trader_thug_female_twk_02.iff') + templates.add('object/mobile/shared_dressed_trader_thug_male_human_02.iff') + templates.add('object/mobile/shared_dressed_trader_thug_male_human_03.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/carbine/shared_carbine_e5.iff', WeaponType.CARBINE, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShot') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('romovax_henchman', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/tusken_avenger.py b/scripts/mobiles/tatooine/tusken_avenger.py index 4fc6b1f1..7fe32055 100644 --- a/scripts/mobiles/tatooine/tusken_avenger.py +++ b/scripts/mobiles/tatooine/tusken_avenger.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_berserker.py b/scripts/mobiles/tatooine/tusken_berserker.py index 155894e4..6788d3af 100644 --- a/scripts/mobiles/tatooine/tusken_berserker.py +++ b/scripts/mobiles/tatooine/tusken_berserker.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_blood_champion.py b/scripts/mobiles/tatooine/tusken_blood_champion.py index 200b5d1a..753ecb6a 100644 --- a/scripts/mobiles/tatooine/tusken_blood_champion.py +++ b/scripts/mobiles/tatooine/tusken_blood_champion.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_brute.py b/scripts/mobiles/tatooine/tusken_brute.py index 122842f4..52c0f393 100644 --- a/scripts/mobiles/tatooine/tusken_brute.py +++ b/scripts/mobiles/tatooine/tusken_brute.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_captain.py b/scripts/mobiles/tatooine/tusken_captain.py index 263c6450..8bdf5d08 100644 --- a/scripts/mobiles/tatooine/tusken_captain.py +++ b/scripts/mobiles/tatooine/tusken_captain.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_carnage_champion.py b/scripts/mobiles/tatooine/tusken_carnage_champion.py index 519ec5d2..f04077f4 100644 --- a/scripts/mobiles/tatooine/tusken_carnage_champion.py +++ b/scripts/mobiles/tatooine/tusken_carnage_champion.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_chief.py b/scripts/mobiles/tatooine/tusken_chief.py index fe3de6a0..bce3c6e5 100644 --- a/scripts/mobiles/tatooine/tusken_chief.py +++ b/scripts/mobiles/tatooine/tusken_chief.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_commoner.py b/scripts/mobiles/tatooine/tusken_commoner.py index e4321e4b..cb9647ab 100644 --- a/scripts/mobiles/tatooine/tusken_commoner.py +++ b/scripts/mobiles/tatooine/tusken_commoner.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_death_hunter.py b/scripts/mobiles/tatooine/tusken_death_hunter.py index 19530e9e..57b3a0e0 100644 --- a/scripts/mobiles/tatooine/tusken_death_hunter.py +++ b/scripts/mobiles/tatooine/tusken_death_hunter.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_elite_guard.py b/scripts/mobiles/tatooine/tusken_elite_guard.py index ba6224ae..419509a7 100644 --- a/scripts/mobiles/tatooine/tusken_elite_guard.py +++ b/scripts/mobiles/tatooine/tusken_elite_guard.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_executioner.py b/scripts/mobiles/tatooine/tusken_executioner.py index bf830ddd..d4bfe1af 100644 --- a/scripts/mobiles/tatooine/tusken_executioner.py +++ b/scripts/mobiles/tatooine/tusken_executioner.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_fighter.py b/scripts/mobiles/tatooine/tusken_fighter.py index 77d5542e..e0d863dc 100644 --- a/scripts/mobiles/tatooine/tusken_fighter.py +++ b/scripts/mobiles/tatooine/tusken_fighter.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_flesh_hunter.py b/scripts/mobiles/tatooine/tusken_flesh_hunter.py index 5aaad428..1b4e40f6 100644 --- a/scripts/mobiles/tatooine/tusken_flesh_hunter.py +++ b/scripts/mobiles/tatooine/tusken_flesh_hunter.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_follower.py b/scripts/mobiles/tatooine/tusken_follower.py index 7423b710..47df0730 100644 --- a/scripts/mobiles/tatooine/tusken_follower.py +++ b/scripts/mobiles/tatooine/tusken_follower.py @@ -23,7 +23,6 @@ def addTemplate(core): mobileTemplate.setStalker(False) mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) - templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') mobileTemplate.setTemplates(templates) diff --git a/scripts/mobiles/tatooine/tusken_gore_chief.py b/scripts/mobiles/tatooine/tusken_gore_chief.py index 19634da7..1cb0ba29 100644 --- a/scripts/mobiles/tatooine/tusken_gore_chief.py +++ b/scripts/mobiles/tatooine/tusken_gore_chief.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_guard.py b/scripts/mobiles/tatooine/tusken_guard.py index 1f210d30..b9b97fdd 100644 --- a/scripts/mobiles/tatooine/tusken_guard.py +++ b/scripts/mobiles/tatooine/tusken_guard.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_king.py b/scripts/mobiles/tatooine/tusken_king.py index 28ba34c7..f62e99c8 100644 --- a/scripts/mobiles/tatooine/tusken_king.py +++ b/scripts/mobiles/tatooine/tusken_king.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_observer.py b/scripts/mobiles/tatooine/tusken_observer.py index 39e63478..10086829 100644 --- a/scripts/mobiles/tatooine/tusken_observer.py +++ b/scripts/mobiles/tatooine/tusken_observer.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_priest.py b/scripts/mobiles/tatooine/tusken_priest.py index 00142d69..caf3f003 100644 --- a/scripts/mobiles/tatooine/tusken_priest.py +++ b/scripts/mobiles/tatooine/tusken_priest.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_raid_champion.py b/scripts/mobiles/tatooine/tusken_raid_champion.py index b506caea..4bf1cc70 100644 --- a/scripts/mobiles/tatooine/tusken_raid_champion.py +++ b/scripts/mobiles/tatooine/tusken_raid_champion.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_raid_hunter.py b/scripts/mobiles/tatooine/tusken_raid_hunter.py index ae5b888e..84292b83 100644 --- a/scripts/mobiles/tatooine/tusken_raid_hunter.py +++ b/scripts/mobiles/tatooine/tusken_raid_hunter.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_raid_leader.py b/scripts/mobiles/tatooine/tusken_raid_leader.py index c1c88077..32d80946 100644 --- a/scripts/mobiles/tatooine/tusken_raid_leader.py +++ b/scripts/mobiles/tatooine/tusken_raid_leader.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_raider.py b/scripts/mobiles/tatooine/tusken_raider.py index 61881ab5..3d400f25 100644 --- a/scripts/mobiles/tatooine/tusken_raider.py +++ b/scripts/mobiles/tatooine/tusken_raider.py @@ -21,6 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(4) mobileTemplate.setStalker(True) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_raider_soldier.py b/scripts/mobiles/tatooine/tusken_raider_soldier.py index c46931ee..2fcf2dfe 100644 --- a/scripts/mobiles/tatooine/tusken_raider_soldier.py +++ b/scripts/mobiles/tatooine/tusken_raider_soldier.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(4) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_raider_warrior.py b/scripts/mobiles/tatooine/tusken_raider_warrior.py index 9816ddaa..8fafdcb1 100644 --- a/scripts/mobiles/tatooine/tusken_raider_warrior.py +++ b/scripts/mobiles/tatooine/tusken_raider_warrior.py @@ -21,6 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(4) mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_savage.py b/scripts/mobiles/tatooine/tusken_savage.py index 89b60213..bf85fea1 100644 --- a/scripts/mobiles/tatooine/tusken_savage.py +++ b/scripts/mobiles/tatooine/tusken_savage.py @@ -21,6 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(4) mobileTemplate.setStalker(True) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_sniper.py b/scripts/mobiles/tatooine/tusken_sniper.py index 65230a00..ecc0720a 100644 --- a/scripts/mobiles/tatooine/tusken_sniper.py +++ b/scripts/mobiles/tatooine/tusken_sniper.py @@ -21,6 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(4) mobileTemplate.setStalker(True) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_torture_lord.py b/scripts/mobiles/tatooine/tusken_torture_lord.py index ad36a6f9..116059bc 100644 --- a/scripts/mobiles/tatooine/tusken_torture_lord.py +++ b/scripts/mobiles/tatooine/tusken_torture_lord.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_warlord.py b/scripts/mobiles/tatooine/tusken_warlord.py index f780a730..cd9712ee 100644 --- a/scripts/mobiles/tatooine/tusken_warlord.py +++ b/scripts/mobiles/tatooine/tusken_warlord.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_warmaster.py b/scripts/mobiles/tatooine/tusken_warmaster.py index de051ce9..8efae6bb 100644 --- a/scripts/mobiles/tatooine/tusken_warmaster.py +++ b/scripts/mobiles/tatooine/tusken_warmaster.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_warrior.py b/scripts/mobiles/tatooine/tusken_warrior.py index 01ee2bcc..6d903ae6 100644 --- a/scripts/mobiles/tatooine/tusken_warrior.py +++ b/scripts/mobiles/tatooine/tusken_warrior.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_witch_doctor.py b/scripts/mobiles/tatooine/tusken_witch_doctor.py index 22a97db8..45f7cdb5 100644 --- a/scripts/mobiles/tatooine/tusken_witch_doctor.py +++ b/scripts/mobiles/tatooine/tusken_witch_doctor.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(6) mobileTemplate.setStalker(True) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tusken_zealot.py b/scripts/mobiles/tatooine/tusken_zealot.py index 1127c2e4..77b4fa82 100644 --- a/scripts/mobiles/tatooine/tusken_zealot.py +++ b/scripts/mobiles/tatooine/tusken_zealot.py @@ -21,7 +21,7 @@ def addTemplate(core): mobileTemplate.setSocialGroup("tusken raider") mobileTemplate.setAssistRange(4) mobileTemplate.setStalker(False) - + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() templates.add('object/mobile/shared_tusken_raider.iff') diff --git a/scripts/mobiles/tatooine/tyrok.py b/scripts/mobiles/tatooine/tyrok.py new file mode 100644 index 00000000..df6972a5 --- /dev/null +++ b/scripts/mobiles/tatooine/tyrok.py @@ -0,0 +1,39 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('jabbas_palace_tyrok') + mobileTemplate.setLevel(17) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("jabba") + mobileTemplate.setAssistRange(6) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.ATTACKABLE) + + templates = Vector() + + templates.add('object/mobile/shared_trandoshan_male.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('jabbas_palace_tyrok', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/valarian_blood_vandal.py b/scripts/mobiles/tatooine/valarian_blood_vandal.py new file mode 100644 index 00000000..cb5d0659 --- /dev/null +++ b/scripts/mobiles/tatooine/valarian_blood_vandal.py @@ -0,0 +1,56 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('tatooine_valarian_vandal') + mobileTemplate.setLevel(15) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setDeathblow(True) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("valarian") + mobileTemplate.setAssistRange(4) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + + + templates = Vector() + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_female_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_male_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_bothan_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_bothan_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_female_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_male_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_rodian_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_rodian_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_trandoshan_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_trandoshan_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_zabrak_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_zabrak_male_01.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('tatooine_valarian_vandal', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/valarian_command_enforcer.py b/scripts/mobiles/tatooine/valarian_command_enforcer.py new file mode 100644 index 00000000..d90c9397 --- /dev/null +++ b/scripts/mobiles/tatooine/valarian_command_enforcer.py @@ -0,0 +1,41 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('tatooine_valarian_enforcer') + mobileTemplate.setLevel(15) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setDeathblow(True) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("valarian") + mobileTemplate.setAssistRange(4) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + + + templates = Vector() + templates.add('object/mobile/shared_dressed_criminal_thug_trandoshan_male_01.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('tatooine_valarian_enforcer', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/valarian_executioner.py b/scripts/mobiles/tatooine/valarian_executioner.py new file mode 100644 index 00000000..87a464a0 --- /dev/null +++ b/scripts/mobiles/tatooine/valarian_executioner.py @@ -0,0 +1,42 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('tatooine_valarian_executioner') + mobileTemplate.setLevel(15) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setDeathblow(True) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("valarian") + mobileTemplate.setAssistRange(4) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + + + templates = Vector() + templates.add('object/mobile/shared_dressed_noble_naboo_twilek_female_01.iff') + templates.add('object/mobile/shared_dressed_noble_naboo_twilek_female_02.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('tatooine_valarian_executioner', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/valarian_hacker.py b/scripts/mobiles/tatooine/valarian_hacker.py new file mode 100644 index 00000000..171a644f --- /dev/null +++ b/scripts/mobiles/tatooine/valarian_hacker.py @@ -0,0 +1,56 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('tatooine_valarian_hacker') + mobileTemplate.setLevel(19) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setDeathblow(False) + mobileTemplate.setScale(1) + mobileTemplate.setSocialGroup("valarian_hacker") + mobileTemplate.setAssistRange(4) + mobileTemplate.setStalker(False) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + + + templates = Vector() + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_female_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_male_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_bothan_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_bothan_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_female_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_male_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_rodian_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_rodian_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_trandoshan_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_trandoshan_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_zabrak_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_zabrak_male_01.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_cdef.iff', WeaponType.PISTOL, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShotpistol') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('valarian_hacker', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/wayfar_spy.py b/scripts/mobiles/tatooine/wayfar_spy.py index 1d980f3f..7041c75f 100644 --- a/scripts/mobiles/tatooine/wayfar_spy.py +++ b/scripts/mobiles/tatooine/wayfar_spy.py @@ -21,20 +21,26 @@ def addTemplate(core): mobileTemplate.setSocialGroup("wayfar spy") mobileTemplate.setAssistRange(3) mobileTemplate.setStalker(False) - #mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) + mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() - templates.add('object/mobile/shared_moncal_male.iff') - templates.add('object/mobile/shared_moncal_female.iff') - templates.add('object/mobile/shared_rodian_male.iff') - templates.add('object/mobile/shared_rofian_female.iff') - templates.add('object/mobile/shared_zabrak_male.iff') - templates.add('object/mobile/shared_zabrak_female.iff') - templates.add('object/mobile/shared_human_male.iff') - templates.add('object/mobile/shared_human_female.iff') - templates.add('object/mobile/shared_sullustan_male.iff') - templates.add('object/mobile/shared_sullustan_female.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_female_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_aqualish_male_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_bothan_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_bothan_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_female_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_human_male_02.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_rodian_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_rodian_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_trandoshan_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_trandoshan_male_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_zabrak_female_01.iff') + templates.add('object/mobile/shared_dressed_criminal_thug_zabrak_male_01.iff') mobileTemplate.setTemplates(templates) weaponTemplates = Vector() diff --git a/scripts/object/building/corellia/cloning_corellia.py b/scripts/object/building/corellia/cloning_corellia.py index 4c77f4ab..3bb04721 100644 --- a/scripts/object/building/corellia/cloning_corellia.py +++ b/scripts/object/building/corellia/cloning_corellia.py @@ -6,6 +6,8 @@ def setup(core, object): objSvc = core.objectService objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(1), float(-0.05), float(2.5), float(0), float(1), 2) objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(1), float(-0.05), float(-1.35), float(1), float(0), 2) + + objSvc.createChildObject(object, 'object/mobile/shared_21b_surgical_droid.iff', float(-3.2), float(0.1), float(0.6), float(0), float(0), 2) spawnPoints = Vector() spawnPoints.add(SpawnPoint(-16.6514, -4.29167, -10.4976, 0.709453, 0.704753, 4)) diff --git a/scripts/object/building/naboo/cloning_facility_naboo.py b/scripts/object/building/naboo/cloning_facility_naboo.py index b9aa25eb..de092b09 100644 --- a/scripts/object/building/naboo/cloning_facility_naboo.py +++ b/scripts/object/building/naboo/cloning_facility_naboo.py @@ -7,6 +7,8 @@ def setup(core, object): objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(1), float(-0.05), float(2.5), float(0), float(1), 2) objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(1), float(-0.05), float(-1.35), float(1), float(0), 2) + objSvc.createChildObject(object, 'object/mobile/shared_21b_surgical_droid.iff', float(-3.2), float(0.1), float(0.6), float(0), float(0), 2) + spawnPoints = Vector() spawnPoints.add(SpawnPoint(-16.66, -4.29, -10.50, 0.71, 0.70, 4)) spawnPoints.add(SpawnPoint(-16.60, -4.29, -14.17, 0.72, 0.69, 4)) diff --git a/scripts/object/building/tatooine/cloning_facility_tatooine.py b/scripts/object/building/tatooine/cloning_facility_tatooine.py index bc7b58d6..fdeedd33 100644 --- a/scripts/object/building/tatooine/cloning_facility_tatooine.py +++ b/scripts/object/building/tatooine/cloning_facility_tatooine.py @@ -7,6 +7,8 @@ def setup(core, object): objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(1), float(-0.05), float(2.5), float(0), float(1), 2) objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(1), float(-0.05), float(-1.35), float(1), float(0), 2) + objSvc.createChildObject(object, 'object/mobile/shared_21b_surgical_droid.iff', float(-3.2), float(0.1), float(0.6), float(0), float(0), 2) + spawnPoints = Vector() spawnPoints.add(SpawnPoint(-16.6514, -4.29167, -10.4976, 0.709453, 0.704753, 4)) spawnPoints.add(SpawnPoint(-16.5965, -4.29167, -14.1652, 0.721346, 0.692575, 4)) diff --git a/scripts/object/building/tatooine/cloning_facility_tatooine_small.py b/scripts/object/building/tatooine/cloning_facility_tatooine_small.py index cc21eca6..2d78944e 100644 --- a/scripts/object/building/tatooine/cloning_facility_tatooine_small.py +++ b/scripts/object/building/tatooine/cloning_facility_tatooine_small.py @@ -6,6 +6,8 @@ def setup(core, object): objSvc = core.objectService objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(-0.42), float(-0.38), float(-0.4), float(1), float(0), 10) + objSvc.createChildObject(object, 'object/mobile/shared_21b_surgical_droid.iff', float(3.8), float(0.3), float(5.1), float(0), float(0), 1) + spawnPoints = Vector() spawnPoints.add(SpawnPoint(0.445015, 0.271775, 1.39199, 0.707038, 0.707176, 9)) diff --git a/scripts/object/mobile/21b_surgical_droid.py b/scripts/object/mobile/21b_surgical_droid.py index bdc8a620..3f8f06f6 100644 --- a/scripts/object/mobile/21b_surgical_droid.py +++ b/scripts/object/mobile/21b_surgical_droid.py @@ -6,6 +6,6 @@ def setup(core, object): object.setAttachment('conversationFile','medical_cloning_droid') object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) object.setStfFilename('mob/creature_names') - object.setStfName('surgical_droid') + object.setStfName('surgical_droid_21b') return diff --git a/scripts/object/mobile/dressed_imperial_officer_f.py b/scripts/object/mobile/dressed_imperial_officer_f.py index 52476091..d0a55c83 100644 --- a/scripts/object/mobile/dressed_imperial_officer_f.py +++ b/scripts/object/mobile/dressed_imperial_officer_f.py @@ -1,12 +1,6 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','imp_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('imperial_recruiter') - - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) - return + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) + return + diff --git a/scripts/object/mobile/dressed_imperial_officer_m.py b/scripts/object/mobile/dressed_imperial_officer_m.py index ccad8904..372a06ca 100644 --- a/scripts/object/mobile/dressed_imperial_officer_m.py +++ b/scripts/object/mobile/dressed_imperial_officer_m.py @@ -1,4 +1,5 @@ import sys def setup(core, object): - return \ No newline at end of file + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) + return diff --git a/scripts/object/mobile/dressed_imperial_officer_m_2.py b/scripts/object/mobile/dressed_imperial_officer_m_2.py index 52476091..372a06ca 100644 --- a/scripts/object/mobile/dressed_imperial_officer_m_2.py +++ b/scripts/object/mobile/dressed_imperial_officer_m_2.py @@ -1,12 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','imp_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('imperial_recruiter') - - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) - return + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) + return diff --git a/scripts/object/mobile/dressed_imperial_officer_m_3.py b/scripts/object/mobile/dressed_imperial_officer_m_3.py index 52476091..372a06ca 100644 --- a/scripts/object/mobile/dressed_imperial_officer_m_3.py +++ b/scripts/object/mobile/dressed_imperial_officer_m_3.py @@ -1,12 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','imp_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('imperial_recruiter') - - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) - return + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) + return diff --git a/scripts/object/mobile/dressed_imperial_officer_m_4.py b/scripts/object/mobile/dressed_imperial_officer_m_4.py index 52476091..372a06ca 100644 --- a/scripts/object/mobile/dressed_imperial_officer_m_4.py +++ b/scripts/object/mobile/dressed_imperial_officer_m_4.py @@ -1,12 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','imp_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('imperial_recruiter') - - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) - return + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) + return diff --git a/scripts/object/mobile/dressed_imperial_officer_m_5.py b/scripts/object/mobile/dressed_imperial_officer_m_5.py index 52476091..372a06ca 100644 --- a/scripts/object/mobile/dressed_imperial_officer_m_5.py +++ b/scripts/object/mobile/dressed_imperial_officer_m_5.py @@ -1,12 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','imp_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('imperial_recruiter') - - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) - return + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) + return diff --git a/scripts/object/mobile/dressed_imperial_officer_m_6.py b/scripts/object/mobile/dressed_imperial_officer_m_6.py index 220d9fd8..372a06ca 100644 --- a/scripts/object/mobile/dressed_imperial_officer_m_6.py +++ b/scripts/object/mobile/dressed_imperial_officer_m_6.py @@ -1,12 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','imp_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('imperial_recruiter') - - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) - return + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:imperial', object.getPosition().x, object.getPosition().z, 46, 48, 0) + return diff --git a/scripts/object/mobile/dressed_rebel_recruiter_human_female_01.py b/scripts/object/mobile/dressed_rebel_recruiter_human_female_01.py index d4d1de24..0b842600 100644 --- a/scripts/object/mobile/dressed_rebel_recruiter_human_female_01.py +++ b/scripts/object/mobile/dressed_rebel_recruiter_human_female_01.py @@ -1,12 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','reb_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('rebel_recruiter') - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:rebel', object.getPosition().x, object.getPosition().z, 45, 47, 0) return diff --git a/scripts/object/mobile/dressed_rebel_recruiter_human_female_02.py b/scripts/object/mobile/dressed_rebel_recruiter_human_female_02.py index 4f948254..0b842600 100644 --- a/scripts/object/mobile/dressed_rebel_recruiter_human_female_02.py +++ b/scripts/object/mobile/dressed_rebel_recruiter_human_female_02.py @@ -1,13 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','reb_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('rebel_recruiter') - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:rebel', object.getPosition().x, object.getPosition().z, 45, 47, 0) - return diff --git a/scripts/object/mobile/dressed_rebel_recruiter_moncal_male_01.py b/scripts/object/mobile/dressed_rebel_recruiter_moncal_male_01.py index efad85db..0b842600 100644 --- a/scripts/object/mobile/dressed_rebel_recruiter_moncal_male_01.py +++ b/scripts/object/mobile/dressed_rebel_recruiter_moncal_male_01.py @@ -1,13 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','reb_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('rebel_recruiter') - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:rebel', object.getPosition().x, object.getPosition().z, 45, 47, 0) - return diff --git a/scripts/object/mobile/dressed_rebel_recruiter_twilek_female_01.py b/scripts/object/mobile/dressed_rebel_recruiter_twilek_female_01.py index 25c143c9..0b842600 100644 --- a/scripts/object/mobile/dressed_rebel_recruiter_twilek_female_01.py +++ b/scripts/object/mobile/dressed_rebel_recruiter_twilek_female_01.py @@ -1,13 +1,5 @@ import sys -from resources.datatables import Options def setup(core, object): - object.setAttachment('radial_filename', 'object/conversation'); - object.setAttachment('conversationFile','reb_recruiter') - object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) - object.setStfFilename('mob/creature_names') - object.setStfName('rebel_recruiter') - core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:rebel', object.getPosition().x, object.getPosition().z, 45, 47, 0) - return diff --git a/scripts/object/tangible/component/weapon/lightsaber/lightsaber_module_lava_crystal.py b/scripts/object/tangible/component/weapon/lightsaber/lightsaber_module_lava_crystal.py index ee964907..030c0316 100644 --- a/scripts/object/tangible/component/weapon/lightsaber/lightsaber_module_lava_crystal.py +++ b/scripts/object/tangible/component/weapon/lightsaber/lightsaber_module_lava_crystal.py @@ -4,6 +4,6 @@ def setup(core, object): object.setStringAttribute('condition', '100/100') object.setStringAttribute('@obj_attr_n:color', 'Lava') object.setAttachment('radial_filename', 'item/tunable') - object.setStringAttribute('@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF ') + object.setStringAttribute('@obj_attr_n:crystal_owner', '\\#D1F56F UNTUNED \\#FFFFFF ') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/padded/armor_spy_roadmap_chest_plate_02_01.py b/scripts/object/tangible/wearables/armor/padded/armor_spy_roadmap_chest_02_01.py similarity index 99% rename from scripts/object/tangible/wearables/armor/padded/armor_spy_roadmap_chest_plate_02_01.py rename to scripts/object/tangible/wearables/armor/padded/armor_spy_roadmap_chest_02_01.py index c4475504..dd1bd6fb 100644 --- a/scripts/object/tangible/wearables/armor/padded/armor_spy_roadmap_chest_plate_02_01.py +++ b/scripts/object/tangible/wearables/armor/padded/armor_spy_roadmap_chest_02_01.py @@ -14,4 +14,4 @@ def setup(core, object): 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 + return diff --git a/scripts/static_spawns/tatooine/factional_recruiters.py b/scripts/static_spawns/tatooine/factional_recruiters.py index 6f9b4137..17f613c1 100644 --- a/scripts/static_spawns/tatooine/factional_recruiters.py +++ b/scripts/static_spawns/tatooine/factional_recruiters.py @@ -11,20 +11,23 @@ def addPlanetSpawns(core, planet): stcSvc = core.staticService objSvc = core.objectService + +#Imperial Recruiters + #Imp recruiter Eisley smallImpHouse = core.objectService.getObject(long(1280129)) - stcSvc.spawnObject('object/mobile/shared_dressed_imperial_officer_f.iff', 'tatooine', smallImpHouse.getCellByCellNumber(3), float(-6), float(1), float(9.2), float(0.71), float(0), float(0.70), float(0)) + stcSvc.spawnObject('imperial_recruiter', 'tatooine', smallImpHouse.getCellByCellNumber(3), float(-6), float(1), float(9.2), float(0.71), float(0), float(0.70), float(0)) #Imp recruiter Bestine #Hill - stcSvc.spawnObject('object/mobile/shared_dressed_imperial_officer_m_5.iff', 'tatooine', long(0), float(-1138), float(98), float(-3897), float(0.71), float(0), float(0.70), float(0)) + stcSvc.spawnObject('imperial_recruiter', 'tatooine', long(0), float(-1138), float(98), float(-3897), float(0.71), float(0), float(0.70), float(0)) #outside SP - stcSvc.spawnObject('object/mobile/shared_dressed_imperial_officer_m_3.iff', 'tatooine', long(0), float(-1275), float(12), float(-3594), float(0), float(0), float(0), float(0)) + stcSvc.spawnObject('imperial_recruiter', 'tatooine', long(0), float(-1275), float(12), float(-3594), float(0), float(0), float(0), float(0)) - # Reb Recruiter +#Rebel Recruiters #Anchorhead cantina anchCantina = core.objectService.getObject(long(1213343)) - stcSvc.spawnObject('object/mobile/shared_dressed_rebel_recruiter_human_female_01.iff', 'tatooine', anchCantina.getCellByCellNumber(2), float(-2.2), float(0.4), float(-5.4), float(0), float(0), float(0), float(0)) - + stcSvc.spawnObject('rebel_recruiter', 'tatooine', anchCantina.getCellByCellNumber(6), float(-6.1), float(-1.8), float(-6.2), float(0), float(0), float(0), float(-90)) + return \ No newline at end of file diff --git a/scripts/static_spawns/tatooine/great_sarlacc.py b/scripts/static_spawns/tatooine/great_sarlacc.py new file mode 100644 index 00000000..a8b1325c --- /dev/null +++ b/scripts/static_spawns/tatooine/great_sarlacc.py @@ -0,0 +1,30 @@ +import sys +# Project SWG: Great Sarlacc: 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 + + # TODO Check all NPCs for personalized scripting, change format. + + + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6098), float(25.2), float(-3337), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6087.4), float(22.3), float(-3327), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6105), float(22.6), float(-3329.2), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6116.1), float(22.1), float(-3313.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6088.1), float(21.1), float(-3301.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6059), float(22.3), float(-3300.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6057.7), float(25.4), float(-3285.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6094.6), float(24.6), float(-3282.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jundland_eopie', 'tatooine', long(0), float(-6122.7), float(24.6), float(-3299.3), float(0), float(0), float(0), float(0), 45) + return + + diff --git a/scripts/static_spawns/tatooine/jabba_tp_romo_vax_bunker.py b/scripts/static_spawns/tatooine/jabba_tp_romo_vax_bunker.py new file mode 100644 index 00000000..21750ee8 --- /dev/null +++ b/scripts/static_spawns/tatooine/jabba_tp_romo_vax_bunker.py @@ -0,0 +1,48 @@ +import sys +# Project SWG: Jabba TP Romo Vax 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 + + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5079.1), float(47.9), float(-6970.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5063.5), float(49.2), float(-6998.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5051.8), float(45.7), float(-6989.7), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5030.7), float(46.5), float(-6972.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5019), float(48.3), float(-6946.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5045.8), float(42.6), float(-6936), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5053.7), float(43.6), float(-6961.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', long(0), float(-5057.5), float(43.9), float(-6961.5), float(0), float(0), float(0), float(0), 45) + + # TODO Check all NPCs for personalized scripting, change format. + bunker = core.objectService.getObject(long(-466404037494797872)) + + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(2), float(-3.8), float(0.3), float(2.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(3), float(3.6), float(0.3), float(-3.7), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(5), float(29.8), float(-12), float(25.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(5), float(32.7), float(-12), float(35), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(5), float(22.9), float(-12), float(30.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(4), float(3.9), float(-12), float(21), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(4), float(3.9), float(-12), float(38.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(6), float(3.5), float(-16), float(53), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(8), float(58.8), float(-16), float(61), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(8), float(74.4), float(-16), float(66.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(8), float(68.3), float(-16), float(79.2), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(8), float(44.6), float(-16), float(82.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(7), float(26), float(-16), float(79), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(7), float(6.9), float(-16), float(78.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(7), float(-5.2), float(-16), float(77.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(7), float(-19.9), float(-16), float(78.8), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(9), float(32.4), float(-14), float(78.7), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('fighting_romo_vax', 'tatooine', bunker.getCellByCellNumber(9), float(-42.7), float(-14), float(-79.1), float(0), float(0), float(0), float(0), 45) + return + diff --git a/scripts/static_spawns/tatooine/jabba_tp_spice_dealer_camp.py b/scripts/static_spawns/tatooine/jabba_tp_spice_dealer_camp.py new file mode 100644 index 00000000..fd625d02 --- /dev/null +++ b/scripts/static_spawns/tatooine/jabba_tp_spice_dealer_camp.py @@ -0,0 +1,21 @@ +import sys +# Project SWG: Jabba TP spicedealer Camp: 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 + + # TODO Check all NPCs for personalized scripting, change format. + + stcSvc.spawnObject('jabbas_palace_delrice_capreese', 'tatooine', long(0), float(-4330.8), float(23), float(-5024.4), float(0), float(0), float(0), float(0), 45) + + return + diff --git a/scripts/static_spawns/tatooine/jabba_tp_valarian_brute_camp.py b/scripts/static_spawns/tatooine/jabba_tp_valarian_brute_camp.py new file mode 100644 index 00000000..e2bd7040 --- /dev/null +++ b/scripts/static_spawns/tatooine/jabba_tp_valarian_brute_camp.py @@ -0,0 +1,27 @@ +import sys +# Project SWG: Jabba TP spicedealer Camp: 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 + + # TODO Check all NPCs for personalized scripting, change format. + + stcSvc.spawnObject('jabbas_palace_tyrok', 'tatooine', long(0), float(-4933.3), float(31.2), float(-5541.8), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('mountain_squill', 'tatooine', long(0), float(-4939.9), float(30.6), float(-5547.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('mountain_squill', 'tatooine', long(0), float(-4946.3), float(30.1), float(-5555.7), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('mountain_squill', 'tatooine', long(0), float(-4938.6), float(29.7), float(-5554.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('mountain_squill', 'tatooine', long(0), float(-4933.1), float(29.5), float(-5554.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('mountain_squill', 'tatooine', long(0), float(-4929.2), float(29.2), float(-5561.3), float(0), float(0), float(0), float(0), 45) + + return + diff --git a/scripts/static_spawns/tatooine/jabba_tp_valarian_hacker_bunker.py b/scripts/static_spawns/tatooine/jabba_tp_valarian_hacker_bunker.py new file mode 100644 index 00000000..39a972fb --- /dev/null +++ b/scripts/static_spawns/tatooine/jabba_tp_valarian_hacker_bunker.py @@ -0,0 +1,38 @@ +import sys +# Project SWG: Jabba TP Valarian Hacker 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 + + # TODO Check all NPCs for personalized scripting, change format. + + + stcSvc.spawnObject('valarian_hacker', 'tatooine', long(0), float(-5371.3), float(64.1), float(-6897.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', long(0), float(-5372.5), float(64.3), float(-6902.4), float(0), float(0), float(0), float(0), 45) + + bunker = core.objectService.getObject(long(-466404036467088174)) + + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(2), float(-3.7), float(0.3), float(3.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(3), float(3.8), float(-0.3), float(-4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(4), float(3.4), float(-3.3), float(4.8), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(5), float(-2), float(-6.8), float(-8.7), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(5), float(-7.4), float(-6.8), float(-1.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(6), float(-7), float(-6.8), float(-14.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(6), float(6.7), float(-6.8), float(-14.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(7), float(5), float(-6.8), float(-1.8), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(8), float(-2), float(-13.8), float(8.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(9), float(1.5), float(-13.8), float(-3.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(9), float(-6.7), float(-13.8), float(-15.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('valarian_hacker', 'tatooine', bunker.getCellByCellNumber(9), float(2.7), float(-13.8), float(-11.9), float(0), float(0), float(0), float(0), 45) + + return + diff --git a/scripts/static_spawns/tatooine/jabba_tp_valarian_security_bunker.py b/scripts/static_spawns/tatooine/jabba_tp_valarian_security_bunker.py new file mode 100644 index 00000000..bbef7a16 --- /dev/null +++ b/scripts/static_spawns/tatooine/jabba_tp_valarian_security_bunker.py @@ -0,0 +1,70 @@ +import sys +# Project SWG: Jabba TP Valarian Security 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 + + # TODO Check all NPCs for personalized scripting, change format. + + stcSvc.spawnObject('tatooine_valarian_enforcer', 'tatooine', long(0), float(-3941.2), float(4.9), float(-3994), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', long(0), float(-3935.9), float(6.5), float(-4012.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', long(0), float(-3937.7), float(5.4), float(-3983.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_enforcer', 'tatooine', long(0), float(-3952.5), float(6.8), float(-4015.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', long(0), float(-3954.1), float(6.7), float(-4019.8), float(0), float(0), float(0), float(0), 45) + + + bunker = core.objectService.getObject(long(-466404037065936405)) + + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(5), float(3.1), float(-12), float(31.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(5), float(24.9), float(-12), float(46.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(5), float(4), float(-12), float(54.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(5), float(-15.4), float(-12), float(47.1), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(7), float(-50.4), float(-20), float(38.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_enforcer', 'tatooine', bunker.getCellByCellNumber(7), float(-57), float(-20), float(36.8), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(7), float(-59.6), float(-20), float(44.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_enforcer', 'tatooine', bunker.getCellByCellNumber(7), float(-50.7), float(-20), float(66.6), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_executioner', 'tatooine', bunker.getCellByCellNumber(8), float(-70.5), float(-20), float(14.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jabbas_palace_iris_sinclair', 'tatooine', bunker.getCellByCellNumber(8), float(-49.8), float(-20), float(13.1), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_executioner', 'tatooine', bunker.getCellByCellNumber(9), float(-70.3), float(-20), float(77.5), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jabbas_palace_fnast_drexler', 'tatooine', bunker.getCellByCellNumber(9), float(-49), float(-20), float(82.5), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(10), float(35.7), float(-12), float(34.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(10), float(36.2), float(-12), float(77.1), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_executioner', 'tatooine', bunker.getCellByCellNumber(12), float(72.5), float(-12), float(58.6), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_executioner', 'tatooine', bunker.getCellByCellNumber(11), float(49.8), float(-12), float(83), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jabbas_palace_arkahn_greystar', 'tatooine', bunker.getCellByCellNumber(11), float(71.6), float(-12), float(83.2), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_executioner', 'tatooine', bunker.getCellByCellNumber(13), float(36.4), float(-20), float(123.2), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_executioner', 'tatooine', bunker.getCellByCellNumber(13), float(19), float(-20), float(122.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jabbas_palace_emanon', 'tatooine', bunker.getCellByCellNumber(13), float(22.1), float(-20), float(139.4), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(21), float(-8.2), float(-20), float(66.2), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(21), float(-2.3), float(-20), float(77), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_executioner', 'tatooine', bunker.getCellByCellNumber(19), float(-23), float(-20), float(100.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('jabbas_palace_careem', 'tatooine', bunker.getCellByCellNumber(19), float(-22.4), float(-20), float(117.5), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(18), float(-30.7), float(-20), float(49.5), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(16), float(-15.5), float(-20), float(2.9), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(14), float(21.1), float(-12), float(-1.2), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(14), float(51.6), float(-12), float(24.6), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(14), float(58.7), float(-12), float(20.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tatooine_valarian_vandal', 'tatooine', bunker.getCellByCellNumber(14), float(55.2), float(-12), float(16.9), float(0), float(0), float(0), float(0), 45) + return + diff --git a/scripts/static_spawns/tatooine/jabba_tp_wayfar_camp.py b/scripts/static_spawns/tatooine/jabba_tp_wayfar_camp.py index 6c8873a7..7aa31c06 100644 --- a/scripts/static_spawns/tatooine/jabba_tp_wayfar_camp.py +++ b/scripts/static_spawns/tatooine/jabba_tp_wayfar_camp.py @@ -22,4 +22,25 @@ def addPlanetSpawns(core, planet): stcSvc.spawnObject('object/static/item/shared_lair_wooden_tent.iff', 'tatooine', long(0), float(-5491.42), float(45.0825), float(-6608.95), float(0.499163), float(-0.143837), float(0.853988), float(-0.0291871)) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5467.4), float(46.7), float(-6601.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5468.5), float(46), float(-6583.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5488.4), float(46), float(-6590.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5503.4), float(46.7), float(-6589.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5524.5), float(46.4), float(-6586.2), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5539.6), float(40.1), float(-6602.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5553.3), float(38.5), float(-6613.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5553.4), float(42), float(-6634.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5556.7), float(47.5), float(-6650.8), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5538.1), float(47.9), float(-6661.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5525.2), float(45.2), float(-6642.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5508.7), float(41.9), float(-6627.1), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5478.3), float(47.2), float(-6624.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5486.8), float(48.2), float(-6645.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5503.6), float(46.5), float(-6660.3), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5517.6), float(48), float(-6654.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5487.3), float(45), float(-6618.9), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('wayfar_spy', 'tatooine', long(0), float(-5464.6), float(48.7), float(-6621.8), float(0), float(0), float(0), float(0), 45) + + stcSvc.spawnObject('dewall_paez', 'tatooine', long(0), float(-5516.1), float(40.1), float(-6615.1), float(0), float(0), float(0), float(0), 45) + return diff --git a/scripts/static_spawns/tatooine/jabbas_palace.py b/scripts/static_spawns/tatooine/jabbas_palace.py index 8bee3e8b..15bbc579 100644 --- a/scripts/static_spawns/tatooine/jabbas_palace.py +++ b/scripts/static_spawns/tatooine/jabbas_palace.py @@ -49,7 +49,7 @@ def addPlanetSpawns(core, planet): 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)) #EV9D9 - stcSvc.spawnObject('object/mobile/shared_ev_9d9.iff', 'tatooine', building.getCellByCellNumber(14), float(18.8), float(0.2), float(78.7), float(0), float(0), float(1.0), float(0)) + stcSvc.spawnObject('object/mobile/shared_ev_9d9.iff', 'tatooine', building.getCellByCellNumber(14), float(23.1), float(0.2), float(87.8), float(0), float(0), float(1.0), float(0)) #malakili stcSvc.spawnObject('object/mobile/shared_malakili.iff', 'tatooine', building.getCellByCellNumber(37), float(17.3), float(-11.0), float(43.8), float(0), float(0), float(0), float(0)) diff --git a/scripts/static_spawns/tatooine/mos_eisley.py b/scripts/static_spawns/tatooine/mos_eisley.py index 7b0d9042..13f969de 100644 --- a/scripts/static_spawns/tatooine/mos_eisley.py +++ b/scripts/static_spawns/tatooine/mos_eisley.py @@ -320,7 +320,7 @@ def addPlanetSpawns(core, planet): #Profession Counselor - stcSvc.spawnObject('object/mobile/shared_respec_seller_f_1.iff', 'tatooine', long(0), float(3533.14), float(5), float(-4788.86), float(-0.3327), float(0.9288)) + #stcSvc.spawnObject('object/mobile/shared_respec_seller_f_1.iff', 'tatooine', long(0), float(3533.14), float(5), float(-4788.86), float(-0.3327), float(0.9288)) #Junk Dealers stcSvc.spawnObject('object/mobile/shared_junk_dealer_m_01.iff', 'tatooine', long(0), float(3355), float(5), float(-4823), float(0.71), float(0.71)) diff --git a/scripts/static_spawns/tatooine/mos_eisley_medical_center.py b/scripts/static_spawns/tatooine/mos_eisley_medical_center.py new file mode 100644 index 00000000..86623045 --- /dev/null +++ b/scripts/static_spawns/tatooine/mos_eisley_medical_center.py @@ -0,0 +1,24 @@ +import sys +# Project SWG: Medical center: 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 + + # TODO Check all NPCs for personalized scripting, change format. + cloner2 = core.objectService.getObject(long(9655494)) + + stcSvc.spawnObject('object/mobile/shared_21b_surgical_droid.iff', 'tatooine', cloner2.getCellByCellNumber(2), float(-0.4), float(0.2), float(-2.5), float(0), float(0), float(0), float(0)) + + + return + + diff --git a/scripts/static_spawns/tatooine/tatooine_ben_kenobis_house.py b/scripts/static_spawns/tatooine/tatooine_ben_kenobis_house.py new file mode 100644 index 00000000..a4748aff --- /dev/null +++ b/scripts/static_spawns/tatooine/tatooine_ben_kenobis_house.py @@ -0,0 +1,26 @@ +import sys +# Project SWG: Jabba TP Alkharan Camp: 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 + + # TODO Check all NPCs for personalized scripting, change format. + + stcSvc.spawnObject('tusken_follower', 'tatooine', long(0), float(-4505.5), float(35), float(-2270.4), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tusken_follower', 'tatooine', long(0), float(-4511), float(35), float(-2261.7), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tusken_follower', 'tatooine', long(0), float(-4522.7), float(35), float(-2262.8), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tusken_follower', 'tatooine', long(0), float(-4519.7), float(35), float(-2253.8), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('tusken_follower', 'tatooine', long(0), float(-4529.8), float(35), float(-2253.7), float(0), float(0), float(0), float(0), 45) + stcSvc.spawnObject('dwarf_bantha', 'tatooine', long(0), float(-4524.3), float(35), float(-2257.7), float(0), float(0), float(0), float(0), 45) + + return + diff --git a/src/protocol/swg/ErrorMessage.java b/src/protocol/swg/ErrorMessage.java index 507561b9..02c4ad00 100644 --- a/src/protocol/swg/ErrorMessage.java +++ b/src/protocol/swg/ErrorMessage.java @@ -49,6 +49,6 @@ public class ErrorMessage extends SWGMessage { result.put(getAsciiString(errorMessage)); result.put((byte)0); - return result; + return result.flip(); } } diff --git a/src/protocol/swg/objectControllerObjects/ObjectMenuDirty.java b/src/protocol/swg/objectControllerObjects/ObjectMenuDirty.java index 79a0c9c4..94ca5670 100644 --- a/src/protocol/swg/objectControllerObjects/ObjectMenuDirty.java +++ b/src/protocol/swg/objectControllerObjects/ObjectMenuDirty.java @@ -25,10 +25,6 @@ import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; -import protocol.swg.ObjControllerMessage; - - - public class ObjectMenuDirty extends ObjControllerObject { private long characterId; @@ -37,13 +33,11 @@ public class ObjectMenuDirty extends ObjControllerObject { this.characterId = characterId; } - - @Override public void deserialize(IoBuffer buffer) { } - + @Override public IoBuffer serialize() { IoBuffer result = IoBuffer.allocate(45).order(ByteOrder.LITTLE_ENDIAN); @@ -58,6 +52,4 @@ public class ObjectMenuDirty extends ObjControllerObject { // 0000: 05 00 46 5E CE 80 1B 00 00 00 2B 02 00 00 7C 0E ..F^......+...|. // 0010: 31 D6 41 00 00 00 00 00 00 00 1.A....... - - } diff --git a/src/resources/common/Forager.java b/src/resources/common/Forager.java index bbeb532d..48a26ca5 100644 --- a/src/resources/common/Forager.java +++ b/src/resources/common/Forager.java @@ -37,8 +37,6 @@ import resources.objects.creature.CreatureObject; import resources.objects.group.GroupObject; import resources.objects.tangible.TangibleObject; import services.ai.AIActor; -import services.ai.states.FollowState; -import tools.DevLog; /** * @author Charon @@ -127,6 +125,7 @@ public class Forager { } + @SuppressWarnings("unused") public boolean handleForageResults(CreatureObject forager){ // determine foraged object SWGObject foragerInventory = forager.getSlottedObject("inventory"); @@ -547,7 +546,7 @@ public class Forager { public void configureTreasureLoot(TangibleObject treasureContainer, CreatureObject owner, short spawnLevel){ - List lootgroups = new ArrayList(); + @SuppressWarnings("unused") List lootgroups = new ArrayList(); String levelRange = "61"; diff --git a/src/resources/objects/SWGList.java b/src/resources/objects/SWGList.java index ffa34897..3b13e6cc 100644 --- a/src/resources/objects/SWGList.java +++ b/src/resources/objects/SWGList.java @@ -23,7 +23,6 @@ package resources.objects; import java.io.Serializable; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; @@ -39,7 +38,6 @@ import java.util.stream.Stream; import org.apache.mina.core.buffer.IoBuffer; import org.python.google.common.collect.Lists; -import engine.resources.common.StringUtilities; import engine.resources.objects.Baseline; import engine.resources.objects.Delta; import engine.resources.objects.IDelta; diff --git a/src/resources/objects/SWGMap.java b/src/resources/objects/SWGMap.java index 9b055425..20ff287e 100644 --- a/src/resources/objects/SWGMap.java +++ b/src/resources/objects/SWGMap.java @@ -34,8 +34,6 @@ import java.util.function.Function; import org.apache.mina.core.buffer.IoBuffer; -import com.sleepycat.persist.model.Persistent; - import engine.resources.objects.Baseline; import engine.resources.objects.Delta; import engine.resources.objects.IDelta; @@ -43,7 +41,6 @@ import engine.resources.objects.SWGObject; /* A SWGMap element should extend Delta or implement IDelta */ -@Persistent public class SWGMap implements Map, Serializable { private static final long serialVersionUID = 1L; diff --git a/src/resources/objects/creature/CreatureObject.java b/src/resources/objects/creature/CreatureObject.java index e65109d7..332d1731 100644 --- a/src/resources/objects/creature/CreatureObject.java +++ b/src/resources/objects/creature/CreatureObject.java @@ -884,8 +884,8 @@ public class CreatureObject extends TangibleObject implements Serializable { synchronized(objectMutex) { this.moodAnimation = moodAnimation; } - IoBuffer moodAnimationDelta = messageBuilder.buildMoodAnimationDelta(moodAnimation); - notifyObservers(moodAnimationDelta, true); + //IoBuffer moodAnimationDelta = messageBuilder.buildMoodAnimationDelta(moodAnimation); + //notifyObservers(moodAnimationDelta, true); } public long getWeaponId() { diff --git a/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java b/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java index 4085f8e7..5f33749c 100644 --- a/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java +++ b/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java @@ -93,7 +93,7 @@ public class FactoryCrateMessageBuilder extends TangibleMessageBuilder{ } public IoBuffer buildBaseline6() { - FactoryCrateObject factoryCrateObject = (FactoryCrateObject) object; + @SuppressWarnings("unused") FactoryCrateObject factoryCrateObject = (FactoryCrateObject) object; IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); buffer.setAutoExpand(true); diff --git a/src/resources/objects/mission/MissionObject.java b/src/resources/objects/mission/MissionObject.java index 010d9654..1cab747d 100644 --- a/src/resources/objects/mission/MissionObject.java +++ b/src/resources/objects/mission/MissionObject.java @@ -27,7 +27,6 @@ import main.NGECore; import org.apache.mina.core.buffer.IoBuffer; -import resources.objectives.DefaultMissionObjective; import resources.objects.intangible.IntangibleObject; import resources.objects.waypoint.WaypointObject; import services.mission.MissionLocation; diff --git a/src/resources/objects/resource/GalacticResource.java b/src/resources/objects/resource/GalacticResource.java index eff19d01..cff11776 100644 --- a/src/resources/objects/resource/GalacticResource.java +++ b/src/resources/objects/resource/GalacticResource.java @@ -99,8 +99,11 @@ public class GalacticResource extends SWGObject implements Serializable { private byte poolNumber; + @SuppressWarnings("unused") private String stfName; + @SuppressWarnings("unused") private String iffName; + @SuppressWarnings("unused") private int type; private byte generalType; private byte containerType; diff --git a/src/resources/objects/tangible/TangibleObject.java b/src/resources/objects/tangible/TangibleObject.java index 7ee29c12..328a23cb 100644 --- a/src/resources/objects/tangible/TangibleObject.java +++ b/src/resources/objects/tangible/TangibleObject.java @@ -48,7 +48,6 @@ import resources.objects.ObjectMessageBuilder; import resources.objects.SWGList; import resources.objects.SWGSet; import resources.objects.creature.CreatureObject; -import tools.DevLog; import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.IDManagerVisitor; import engine.clients.Client; diff --git a/src/resources/objects/weapon/WeaponObject.java b/src/resources/objects/weapon/WeaponObject.java index 4fca13d7..a06010ec 100644 --- a/src/resources/objects/weapon/WeaponObject.java +++ b/src/resources/objects/weapon/WeaponObject.java @@ -127,6 +127,11 @@ public class WeaponObject extends TangibleObject implements Serializable { } public int getWeaponType() { + if (getStringAttribute("cat_wpn_damage.wpn_category") == null) { + System.err.println("Error: Weapon Type not defined for " + getTemplate()); + return 6; + } + return Integer.parseInt(getStringAttribute("cat_wpn_damage.wpn_category").replace("@obj_attr_n:wpn_category_", "")); } diff --git a/src/services/BrowserService.java b/src/services/BrowserService.java index 1d649bde..2b401038 100644 --- a/src/services/BrowserService.java +++ b/src/services/BrowserService.java @@ -22,6 +22,7 @@ package services; import java.util.Map; + import protocol.swg.LaunchBrowserMessage; import resources.objects.creature.CreatureObject; import main.NGECore; @@ -30,6 +31,7 @@ import engine.resources.service.INetworkRemoteEvent; public class BrowserService implements INetworkDispatch { + @SuppressWarnings("unused") private NGECore core; public BrowserService(NGECore core) { diff --git a/src/services/DevService.java b/src/services/DevService.java index 169da3c6..a06265b2 100644 --- a/src/services/DevService.java +++ b/src/services/DevService.java @@ -222,8 +222,10 @@ public class DevService implements INetworkDispatch { // Character case 10: // Set combat level to 90 - core.playerService.grantLevel(player, 90); // Commented out until fixed - //core.playerService.giveExperience(player, 999999999); + if (player.getAttachment("hasLeveled") == null) { + player.setAttachment("hasLeveled", true); + core.playerService.grantLevel(player, 90); + } return; case 11: // Give 100,000 credits player.setCashCredits(player.getCashCredits() + 100000); diff --git a/src/services/EntertainmentService.java b/src/services/EntertainmentService.java index 03545e38..e41dceb6 100644 --- a/src/services/EntertainmentService.java +++ b/src/services/EntertainmentService.java @@ -683,7 +683,7 @@ public class EntertainmentService implements INetworkDispatch { spectator.setPerformanceWatchee(performer); performer.addSpectator(spectator); - spectator.setMoodAnimation("entertained"); + //spectator.setMoodAnimation("entertained"); final ScheduledFuture spectatorTask = scheduler.scheduleAtFixedRate(() -> { try { @@ -699,10 +699,13 @@ public class EntertainmentService implements INetworkDispatch { spectator.sendSystemMessage("You stop listening to " + performer.getCustomName() + " because " + performer.getCustomName() + " is out of range.", (byte) 0); } - spectator.setMoodAnimation("neutral"); + //spectator.setMoodAnimation("neutral"); performer.removeSpectator(spectator); - if (spectator.getInspirationTick().cancel(true)) + if (spectator.getInspirationTick() != null) + spectator.getInspirationTick().cancel(true); + + if (spectator.getSpectatorTask() != null) spectator.getSpectatorTask().cancel(true); } diff --git a/src/services/GuildService.java b/src/services/GuildService.java index 3676e36a..19fc82c3 100644 --- a/src/services/GuildService.java +++ b/src/services/GuildService.java @@ -207,7 +207,7 @@ public class GuildService implements INetworkDispatch { if (name == "" || name == " ") return; - SWGObject transferTarget = core.chatService.getObjectByFirstName(name); + SWGObject transferTarget = core.objectService.getObjectByFirstName(name); //chatService.getObjectByFirstName(name); if (transferTarget == null) { actor.sendSystemMessage("@guild:ml_not_loaded", DisplayType.Broadcast); diff --git a/src/services/LoginService.java b/src/services/LoginService.java index eb843410..2f815fdb 100644 --- a/src/services/LoginService.java +++ b/src/services/LoginService.java @@ -92,6 +92,11 @@ public class LoginService implements INetworkDispatch{ public void handlePacket(IoSession session, IoBuffer data) throws Exception { + if (session == null) { + System.out.println("Login attempted with NULL session!"); + return; + } + data = data.order(ByteOrder.LITTLE_ENDIAN); LoginClientId clientID = new LoginClientId(); data.position(0); @@ -116,16 +121,19 @@ public class LoginService implements INetworkDispatch{ err = "user is banned"; break; } - ErrorMessage errMsg = new ErrorMessage("Invalid Login", err); + + // No matter what, this will always show that the login server is unavailable at this time. Removing the error message will just keep the connecting message up. + ErrorMessage errMsg = new ErrorMessage("Wrong Password", "The username or password you entered was incorrect."); session.write(errMsg.serialize()); + Disconnect disconnect = new Disconnect((Integer)session.getAttribute("connectionId"), 6); session.write(disconnect); - session.close(false); + + // Closing the session for some reason will not show any error messages, even if write messages are queued.. + //As result, the infinite "Connection to the login server is now open..." loop., also it randomly denies any logins from that client for some reason return; } - System.out.println(user + " successfully logged in."); - Client client = new Client(session.getRemoteAddress()); client.setAccountName(user); client.setPassword(pass); @@ -137,6 +145,16 @@ public class LoginService implements INetworkDispatch{ core.addClient(session, client); + if (!core.getActiveConnectionsMap().containsKey(session)) { + Disconnect disconnect = new Disconnect((Integer)session.getAttribute("connectionId"), 6); + session.write(disconnect); + ErrorMessage errMsg = new ErrorMessage("Error Logging In", "Your client could not be added to the connections at this time."); + session.write(errMsg.serialize()); + session.close(false); + + System.out.println(client.getAccountName() + " was not added to active connections map."); + return; + } /*if(!checkIfAccountExistInGameDB(id)) { createAccountForGameDB(id, user, email, encryptPass); }*/ @@ -153,9 +171,7 @@ public class LoginService implements INetworkDispatch{ ServerNowEpochTime time = new ServerNowEpochTime((int) (System.currentTimeMillis() / 1000)); if (client.getSession().containsAttribute("tradeSession") == true) { - System.out.println("Has attribute: " + session.getAttribute("tradeSession").toString()); client.getSession().removeAttribute("tradeSession"); - System.out.println("Removed tradeSession Attribute @ LoginService.java"); } session.write(time.serialize()); @@ -165,6 +181,8 @@ public class LoginService implements INetworkDispatch{ session.write(serverStatus.serialize()); session.write(jediSlot.serialize()); session.write(characters.serialize()); + + System.out.println(user + " successfully logged in."); } }); diff --git a/src/services/PlayerService.java b/src/services/PlayerService.java index 8cb1d8ff..e65d989c 100644 --- a/src/services/PlayerService.java +++ b/src/services/PlayerService.java @@ -197,12 +197,16 @@ public class PlayerService implements INetworkDispatch { }, 0, 1000, TimeUnit.MILLISECONDS)); scheduleList.add(scheduler.scheduleAtFixedRate(() -> { - long[] ids = creature.getAwareObjects().stream().mapToLong(SWGObject::getObjectID).toArray(); - for(int i = 0; i < ids.length; i++) { - for(int j = 0; j < ids.length; j++) { - if(ids[i] == ids[j] && i != j) - System.err.println("Detected duplicate ids, Template " + core.objectService.getObject(ids[i]).getTemplate()); + try { + long[] ids = creature.getAwareObjects().stream().mapToLong(SWGObject::getObjectID).toArray(); + for(int i = 0; i < ids.length; i++) { + for(int j = 0; j < ids.length; j++) { + if(ids[i] == ids[j] && i != j) + System.err.println("Detected duplicate ids, Template " + core.objectService.getObject(ids[i]).getTemplate()); + } } + } catch (Exception e) { + e.printStackTrace(); } }, 0, 5000, TimeUnit.MILLISECONDS)); @@ -374,6 +378,11 @@ public class PlayerService implements INetworkDispatch { CreatureObject targetPlayer = (CreatureObject) core.objectService.getObject(request.getCharacterId()); + if (targetPlayer == null) { + System.err.println("PlayerService::GuildRequestMessage: Target is null: " + request.getCharacterId()); + return; + } + if (targetPlayer.getGuildId() != 0) { Guild targetGuild = core.guildService.getGuildById(targetPlayer.getGuildId()); GuildResponseMessage response = new GuildResponseMessage(request.getCharacterId(), targetGuild.getName()); diff --git a/src/services/StaticService.java b/src/services/StaticService.java index e40a8619..97be0a13 100644 --- a/src/services/StaticService.java +++ b/src/services/StaticService.java @@ -115,6 +115,7 @@ public class StaticService implements INetworkDispatch { return spawnObject(template, planetName, ((cell == null) ? 0L : cell.getObjectID()), x, y, z, qW, qX, qY, qZ, respawnTime); } + @SuppressWarnings("unused") public SWGObject spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, int respawnTime) { Planet planet = core.terrainService.getPlanetByName(planetName); diff --git a/src/services/SurveyService.java b/src/services/SurveyService.java index ff01a6fb..030a85ff 100644 --- a/src/services/SurveyService.java +++ b/src/services/SurveyService.java @@ -64,6 +64,7 @@ public class SurveyService implements INetworkDispatch { } + @SuppressWarnings("unused") public void scheduleSurveyService(){ final ScheduledFuture task = scheduler.scheduleAtFixedRate(new Runnable() { @@ -130,6 +131,7 @@ public class SurveyService implements INetworkDispatch { } } + @SuppressWarnings("unused") public void handleSamplingStages(SurveyTool surveyTool){ if (surveyTool.isExceptionalState()) diff --git a/src/services/TreasureService.java b/src/services/TreasureService.java index d567871c..7c79540d 100644 --- a/src/services/TreasureService.java +++ b/src/services/TreasureService.java @@ -28,6 +28,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; + import main.NGECore; import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; @@ -35,6 +36,7 @@ import engine.resources.service.INetworkRemoteEvent; public class TreasureService implements INetworkDispatch { + @SuppressWarnings("unused") private NGECore core; private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); @@ -51,6 +53,7 @@ public class TreasureService implements INetworkDispatch { } + @SuppressWarnings("unused") public void scheduleTreasureService(){ final ScheduledFuture task = scheduler.scheduleAtFixedRate(new Runnable() { diff --git a/src/services/ai/AIActor.java b/src/services/ai/AIActor.java index 477dcd67..f17a7741 100644 --- a/src/services/ai/AIActor.java +++ b/src/services/ai/AIActor.java @@ -83,9 +83,9 @@ public class AIActor { private long waitStartTime = 0L; private AIState intendedPrimaryAIState; private Point3D lastPositionBeforeStateChange; - private ScheduledFuture movementFuture; - private ScheduledFuture recoveryFuture; - private ScheduledFuture despawnFuture; + private ScheduledFuture movementFuture; + private ScheduledFuture recoveryFuture; + private ScheduledFuture despawnFuture; public AIActor(CreatureObject creature, Point3D spawnPosition, ScheduledExecutorService scheduler) { this.creature = creature; diff --git a/src/services/ai/AIService.java b/src/services/ai/AIService.java index b492da20..45ad9279 100644 --- a/src/services/ai/AIService.java +++ b/src/services/ai/AIService.java @@ -43,7 +43,7 @@ import main.NGECore; public class AIService { - private Vector aiActors = new Vector(); + @SuppressWarnings("unused") private Vector aiActors = new Vector(); private NGECore core; public AIService(NGECore core) { diff --git a/src/services/ai/LairActor.java b/src/services/ai/LairActor.java index 87e5940b..56fa0ac5 100644 --- a/src/services/ai/LairActor.java +++ b/src/services/ai/LairActor.java @@ -157,6 +157,7 @@ public class LairActor { } + @SuppressWarnings("unused") private void healLair() { if(lairObject.getConditionDamage() == 0 || creatures.isEmpty()) diff --git a/src/services/ai/states/AIState.java b/src/services/ai/states/AIState.java index 15d68dd5..ac25ae37 100644 --- a/src/services/ai/states/AIState.java +++ b/src/services/ai/states/AIState.java @@ -195,7 +195,7 @@ public abstract class AIState { float maxDistance = stopDistance; boolean finished = false; float dx, dz, newX = 0, newY = 0, newZ = 0; - Vector movementPoints = actor.getMovementPoints(); + @SuppressWarnings("unused") Vector movementPoints = actor.getMovementPoints(); CellObject cell = null; targetPosition = actor.getLoiterDestination(); @@ -654,6 +654,7 @@ public abstract class AIState { } + @SuppressWarnings("unused") public void doFollow(AIActor actor) { //NGECore.getInstance().aiService.logAI("AI STATE doPatrol"); NGECore core = NGECore.getInstance(); diff --git a/src/services/bazaar/BazaarService.java b/src/services/bazaar/BazaarService.java index 0956c417..e998ba7f 100644 --- a/src/services/bazaar/BazaarService.java +++ b/src/services/bazaar/BazaarService.java @@ -40,6 +40,9 @@ import java.util.concurrent.TimeUnit; + + + import main.NGECore; import engine.clients.Client; import engine.resources.common.CRC; @@ -112,6 +115,7 @@ public class BazaarService implements INetworkDispatch { cursor.close(); } + @SuppressWarnings("unused") @Override public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { @@ -765,7 +769,7 @@ public class BazaarService implements INetworkDispatch { return; } - AuctionItem auctionItem = createAuctionItem(player, vendor, item, price, description, duration, auction, premium); + @SuppressWarnings("unused") AuctionItem auctionItem = createAuctionItem(player, vendor, item, price, description, duration, auction, premium); core.objectService.destroyObject(item); diff --git a/src/services/chat/ChatService.java b/src/services/chat/ChatService.java index ae7d1615..f45ef334 100644 --- a/src/services/chat/ChatService.java +++ b/src/services/chat/ChatService.java @@ -50,7 +50,6 @@ import resources.common.*; import resources.datatables.DisplayType; import resources.guild.Guild; import resources.objects.creature.CreatureObject; -import resources.objects.group.GroupObject; import resources.objects.player.PlayerObject; import protocol.swg.AddIgnoreMessage; import protocol.swg.ObjControllerMessage; diff --git a/src/services/combat/CombatRecorder.java b/src/services/combat/CombatRecorder.java new file mode 100644 index 00000000..05a4909a --- /dev/null +++ b/src/services/combat/CombatRecorder.java @@ -0,0 +1,54 @@ +package services.combat; + +public class CombatRecorder { + private long deathCount = 0; + private long killCount = 0; + private long assistCount = 0; + private long damageDealt = 0; + private long damageReceived = 0; + private long healingDone = 0; + private long healingReceived = 0; + + public long getDeathCount() { + return deathCount; + } + public void setDeathCount(long deathCount) { + this.deathCount = deathCount; + } + public long getKillCount() { + return killCount; + } + public void setKillCount(long killCount) { + this.killCount = killCount; + } + public long getAssistCount() { + return assistCount; + } + public void setAssistCount(long assistCount) { + this.assistCount = assistCount; + } + public long getDamageDealt() { + return damageDealt; + } + public void setDamageDealt(long damageDealt) { + this.damageDealt = damageDealt; + } + public long getDamageReceived() { + return damageReceived; + } + public void setDamageReceived(long damageReceived) { + this.damageReceived = damageReceived; + } + public long getHealingDone() { + return healingDone; + } + public void setHealingDone(long healingDone) { + this.healingDone = healingDone; + } + public long getHealingReceived() { + return healingReceived; + } + public void setHealingReceived(long healingReceived) { + this.healingReceived = healingReceived; + } +} diff --git a/src/services/equipment/EquipmentService.java b/src/services/equipment/EquipmentService.java index c6d93c85..f5220c53 100644 --- a/src/services/equipment/EquipmentService.java +++ b/src/services/equipment/EquipmentService.java @@ -386,13 +386,15 @@ public class EquipmentService implements INetworkDispatch { // Get our lightsaber weapon object if(item.getContainer().getTemplate().startsWith("object/tangible/inventory/shared_lightsaber_inventory")) lightsaber = (WeaponObject) item.getGrandparent(); else if(targetContainer.getTemplate().startsWith("object/tangible/inventory/shared_lightsaber_inventory")) lightsaber = (WeaponObject) targetContainer.getContainer(); + + if(lightsaber == null) return; + lightsaberInventory = (TangibleObject) lightsaber.getSlottedObject("saber_inv"); if(lightsaber.getAttachment("weaponBaseDamageMin") == null) lightsaber.setAttachment("weaponBaseDamageMin", lightsaber.getMinDamage()); if(lightsaber.getAttachment("weaponBaseDamageMax") == null) lightsaber.setAttachment("weaponBaseDamageMax", lightsaber.getMaxDamage()); // Check if item is a lightsaber component - if(lightsaber == null) return; if(lightsaberInventory == null) return; if(lightsaber.getContainer() instanceof CreatureObject) { @@ -435,7 +437,7 @@ public class EquipmentService implements INetworkDispatch { lightsaberInventory.viewChildren(lightsaberInventory, false, false, new Traverser() { WeaponObject saber; - TangibleObject saberInv; + @SuppressWarnings("unused") TangibleObject saberInv; int minDamageBonus = 0; int maxDamageBonus = 0; diff --git a/src/services/housing/HousingService.java b/src/services/housing/HousingService.java index 85856af7..00070c47 100644 --- a/src/services/housing/HousingService.java +++ b/src/services/housing/HousingService.java @@ -46,7 +46,6 @@ import resources.common.OutOfBand; import resources.datatables.Citizenship; import resources.datatables.DisplayType; import resources.objects.building.BuildingObject; -import resources.objects.cell.CellObject; import resources.objects.creature.CreatureObject; import resources.objects.harvester.HarvesterObject; import resources.objects.installation.InstallationObject; @@ -117,7 +116,7 @@ public class HousingService implements INetworkDispatch { //PlayerCity city = core.playerCityService.getCityPositionIsIn(new Point3D(positionX, 0, positionZ)); // This function is not implemented, so it had to be commented out, because it resulted in an error // Whoever wrote this, should still add the method to playerCityService, then it can be uncommented here. - PlayerCity city = null; + @SuppressWarnings("unused") PlayerCity city = null; if (!houseTemplate.canBePlacedOn(actor.getPlanet().getName())) { actor.sendSystemMessage("You may not place this structure on this planet.", (byte) 0); // should probably load this from an stf return null; @@ -128,10 +127,12 @@ public class HousingService implements INetworkDispatch { return null; } + /* This will always be null, so has no use... if(city != null && !city.hasZoningRights(actor)) { actor.sendSystemMessage("@player_structure:no_rights", (byte) 0); return null; } + */ // Lot stuff if (!actor.getPlayerObject().deductLots(structureLotCost)) { @@ -180,9 +181,11 @@ public class HousingService implements INetworkDispatch { building.setMaintenanceAmount(houseTemplate.getBaseMaintenanceRate()); building.setDestructionFee(houseTemplate.getDestructionFee()); + /* This will always be null, so has no use... if(city != null) { city.addNewStructure(building.getObjectID()); } + */ /* // Check for city founders joining a new city @@ -272,6 +275,7 @@ public class HousingService implements INetworkDispatch { } + @SuppressWarnings("unchecked") public void saveBuildings() { core.objectService.getObjectList() .values().stream() @@ -669,6 +673,7 @@ public class HousingService implements INetworkDispatch { } } + @SuppressWarnings("unused") public void handleListAllItems(SWGObject owner, TangibleObject target) { final BuildingObject building = (BuildingObject) target.getGrandparent(); //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); diff --git a/src/services/mission/MissionService.java b/src/services/mission/MissionService.java index f5fcfa09..ac6c45f8 100644 --- a/src/services/mission/MissionService.java +++ b/src/services/mission/MissionService.java @@ -44,7 +44,6 @@ import protocol.swg.objectControllerObjects.MissionAcceptRequest; import protocol.swg.objectControllerObjects.MissionAcceptResponse; import protocol.swg.objectControllerObjects.MissionListRequest; import resources.common.BountyListItem; -import resources.common.SpawnPoint; import resources.common.ObjControllerOpcodes; import services.mission.CommonerSpawn; import resources.objectives.BountyMissionObjective; @@ -54,8 +53,6 @@ import resources.objectives.SurveyMissionObjective; import resources.objects.creature.CreatureObject; import resources.objects.mission.MissionObject; import resources.objects.player.PlayerObject; -import resources.objects.resource.GalacticResource; -import resources.objects.resource.ResourceRoot; import resources.objects.tangible.TangibleObject; import engine.clientdata.StfTable; import engine.clients.Client; diff --git a/src/services/object/ObjectList.java b/src/services/object/ObjectList.java new file mode 100644 index 00000000..8092ee6e --- /dev/null +++ b/src/services/object/ObjectList.java @@ -0,0 +1,101 @@ +package services.object; + +import java.io.Serializable; +import java.util.Collection; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +import engine.resources.objects.SWGObject; + +public class ObjectList implements Map, Serializable { + + private static final long serialVersionUID = 1L; + + private Map objectList = new ConcurrentHashMap(); + private Map history = new ConcurrentHashMap(); + + public ObjectList() { + + } + + public void clear() { + System.err.println("ObjectList was wiped!"); + try { + throw new Exception(); + } catch (Exception e) { + e.printStackTrace(); + } + objectList.clear(); + } + + public boolean containsKey(Object k) { + return objectList.containsKey(k); + } + + public boolean containsValue(Object v) { + return objectList.containsValue(v); + } + + public Set> entrySet() { + return objectList.entrySet(); + } + + public V get(Object key) { + return objectList.get(key); + } + + public boolean isEmpty() { + return objectList.isEmpty(); + } + + public Set keySet() { + return objectList.keySet(); + } + + public V put(K key, V value) { + if ((objectList.containsKey((Long) key) && !((SWGObject) objectList.get(key)).getTemplate().equals(((SWGObject) value).getTemplate())) || + (history.containsKey((Long) key) && !history.get(key).equals(((SWGObject) value).getTemplate()))) { + System.err.println("Attempted to register duplicate Id. Old template: " + ((SWGObject) objectList.get(key)).getTemplate() + " New template: " + ((SWGObject) value).getTemplate()); + + try { + throw new Exception(); + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + + objectList.put(key, value); + + return value; + } + + public void putAll(Map objects) { + objectList.putAll(objects); + } + + @SuppressWarnings("unchecked") + public V remove(Object object) { + /*if (object instanceof SWGObject) System.err.println("Object was removed! " + ((SWGObject) objectList.get(object)).getTemplate()); + try { + throw new Exception(); + } catch (Exception e) { + e.printStackTrace(); + }*/ + if (objectList.containsKey(object)) { + history.put((K) object, ((SWGObject) objectList.get(object)).getTemplate()); + } + return objectList.remove(object); + } + + public int size() { + return objectList.size(); + } + + public Collection values() { + return objectList.values(); + } + +} diff --git a/src/services/object/ObjectService.java b/src/services/object/ObjectService.java index a823a1ca..6037d7d7 100644 --- a/src/services/object/ObjectService.java +++ b/src/services/object/ObjectService.java @@ -66,6 +66,7 @@ import com.sleepycat.persist.model.PrimaryKey; import protocol.swg.CmdSceneReady; import protocol.swg.CmdStartScene; +import protocol.swg.ErrorMessage; import protocol.swg.HeartBeatMessage; import protocol.swg.ObjControllerMessage; import protocol.swg.ParametersMessage; @@ -137,7 +138,8 @@ import services.sui.SUIWindow.Trigger; @SuppressWarnings("unused") public class ObjectService implements INetworkDispatch { - private Map objectList = new ConcurrentHashMap(); + //private Map objectList = new ConcurrentHashMap(); + private Map objectList = new ObjectList(); private NGECore core; private DatabaseConnection databaseConnection; private AtomicLong highestId = new AtomicLong(); @@ -263,7 +265,7 @@ public class ObjectService implements INetworkDispatch { e.printStackTrace(); } - planet = core.terrainService.getPlanetByID(0); + planet = core.terrainService.getPlanetByID(1); } if(Template.startsWith("object/creature")) { @@ -426,7 +428,13 @@ public class ObjectService implements INetworkDispatch { loadServerTemplateTasks.add(() -> loadServerTemplate(pointer)); } - objectList.put(objectID, object); + SWGObject ret = objectList.put(objectID, object); + + //if (ret != null && !ret.getTemplate().equals(object.getTemplate())) { + if (ret == null) { + //System.err.println("ObjectService: Detected duplicate Id. Assigning new one.") + object = createObject(Template, objectID, planet, position, orientation, customServerTemplate, overrideSnapshot, loadServerTemplate); + } return object; } @@ -635,32 +643,27 @@ public class ObjectService implements INetworkDispatch { return null; } - synchronized(objectList) { - for(SWGObject obj : objectList.values()) { - if(obj == null) - continue; - if(obj.getCustomName() == null) - continue; - if(obj.getCustomName().startsWith(customName) || obj.getCustomName().toUpperCase().startsWith(WordUtils.capitalize(customName))) - return obj; - } - - } + if (customName.contains(" ")) + customName = customName.split(" ")[0]; - ODBCursor cursor = core.getSWGObjectODB().getCursor(); - - while (cursor.hasNext()) { - SWGObject object = (SWGObject) cursor.next(); - - if (object == null) { - continue; - } - - if (object.getCustomName() != null && customName.length() > 0 && (object.getCustomName().startsWith(customName) || object.getCustomName().toUpperCase().startsWith(WordUtils.capitalize(customName)))) { + try { + PreparedStatement ps = core.getDatabase1().preparedStatement("SELECT * FROM characters WHERE \"firstName\"=?"); + ps.setString(1, customName); + ResultSet resultSet = ps.executeQuery(); + + while (resultSet.next()) { + long objectId = resultSet.getLong("id"); + SWGObject object = getObject(objectId); + + if (object == null) + object = getCreatureFromDB(objectId); + return object; } + } catch (SQLException e) { + e.printStackTrace(); } - cursor.close(); + return null; } @@ -983,6 +986,11 @@ public class ObjectService implements INetworkDispatch { creature = getCreatureFromDB(objectId); if(creature == null) { System.out.println("Cant get creature from db"); + } else { + if (creature.getCustomName() == null || creature.getCustomName() == "") { + System.out.println("Player with ObjID of " + creature.getObjectID() + " tried logging in but has a null/empty name!"); + return; + } } } else { @@ -994,7 +1002,6 @@ public class ObjectService implements INetworkDispatch { if(creature.getAttachment("disconnectTask") != null && creature.getClient() != null && !creature.getClient().getSession().isClosing()) return; - } if(creature.getAttachment("disconnectTask") != null) { ((ScheduledFuture) creature.getAttachment("disconnectTask")).cancel(true); @@ -1096,7 +1103,7 @@ public class ObjectService implements INetworkDispatch { // Find out what friends are online/offline for (String friend : ghost.getFriendList()) { - SWGObject friendObject = core.chatService.getObjectByFirstName(friend); + SWGObject friendObject = core.objectService.getObjectByFirstName(friend); if(friendObject != null && friendObject.isInQuadtree()) { ChatFriendsListUpdate onlineNotifyStatus = new ChatFriendsListUpdate(friend, (byte) 1); diff --git a/src/services/pet/MountService.java b/src/services/pet/MountService.java index 082b6541..0223e132 100644 --- a/src/services/pet/MountService.java +++ b/src/services/pet/MountService.java @@ -39,13 +39,11 @@ import resources.datatables.State; import resources.objects.building.BuildingObject; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; -import services.ai.AIActor; import tools.DevLog; import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.DatatableVisitor; import engine.resources.container.Traverser; import engine.resources.objects.SWGObject; -import engine.resources.scene.Planet; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; diff --git a/src/services/pet/PetService.java b/src/services/pet/PetService.java index 249be17f..f2845bc4 100644 --- a/src/services/pet/PetService.java +++ b/src/services/pet/PetService.java @@ -37,8 +37,6 @@ import resources.datatables.DisplayType; import resources.datatables.Options; import resources.datatables.Posture; import resources.datatables.State; -import resources.objects.SWGList; -import resources.objects.SWGSet; import resources.objects.building.BuildingObject; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; @@ -230,6 +228,7 @@ public class PetService implements INetworkDispatch { // } } + @SuppressWarnings("unused") private void callVehicle(CreatureObject actor, SWGObject pcd, PlayerObject player, CreatureObject mount) { if ((mount.getLevel() - actor.getLevel()) > 5) { actor.sendSystemMessage(OutOfBand.ProsePackage("@pet/pet_menu:cant_call_level"), DisplayType.Broadcast); @@ -299,6 +298,7 @@ public class PetService implements INetworkDispatch { player.setCallingCompanion(false); } + @SuppressWarnings("unused") private void callMount(CreatureObject actor, SWGObject pcd, PlayerObject player, CreatureObject mount) { return; // NOT IMPLEMENTED } diff --git a/src/services/resources/HarvesterService.java b/src/services/resources/HarvesterService.java index 237674c3..96b68aad 100644 --- a/src/services/resources/HarvesterService.java +++ b/src/services/resources/HarvesterService.java @@ -131,6 +131,7 @@ public class HarvesterService implements INetworkDispatch { objControllerOpcodes.put(ObjControllerOpcodes.RESOURCE_EMPTY_HOPPER, new INetworkRemoteEvent() { + @SuppressWarnings("unused") @Override public void handlePacket(IoSession session, IoBuffer data) throws Exception { data.order(ByteOrder.LITTLE_ENDIAN); @@ -905,6 +906,7 @@ public class HarvesterService implements INetworkDispatch { owner.getClient().getSession().write(messenger.buildHINO7ExperimentalDelta2((HarvesterObject)target)); } + @SuppressWarnings("unused") public void updateHarvester(HarvesterObject harvester){ CreatureObject owner = (CreatureObject)core.objectService.getObject(harvester.getOwner()); diff --git a/src/services/resources/ResourceService.java b/src/services/resources/ResourceService.java index ca70558e..00ca528e 100644 --- a/src/services/resources/ResourceService.java +++ b/src/services/resources/ResourceService.java @@ -56,6 +56,7 @@ import services.ai.AIActor; * @author Charon */ +@SuppressWarnings("unused") public class ResourceService implements INetworkDispatch { private NGECore core; diff --git a/src/services/reverseengineering/ReverseEngineeringService.java b/src/services/reverseengineering/ReverseEngineeringService.java index ad9e44b8..c6cb2e2e 100644 --- a/src/services/reverseengineering/ReverseEngineeringService.java +++ b/src/services/reverseengineering/ReverseEngineeringService.java @@ -3228,7 +3228,7 @@ public class ReverseEngineeringService implements INetworkDispatch { } } - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "unused" }) public void createSEA(CreatureObject engineer, TangibleObject retool){ PlayerObject player = (PlayerObject) engineer.getSlottedObject("ghost"); String profession = player.getProfession(); @@ -3463,7 +3463,7 @@ public class ReverseEngineeringService implements INetworkDispatch { } public void applyPowerUp(TangibleObject powerUpObject, long objectID){ - TangibleObject object = (TangibleObject)core.objectService.getObject(objectID); + @SuppressWarnings("unused") TangibleObject object = (TangibleObject)core.objectService.getObject(objectID); } diff --git a/src/services/spawn/SpawnService.java b/src/services/spawn/SpawnService.java index b4b60c52..1a612118 100644 --- a/src/services/spawn/SpawnService.java +++ b/src/services/spawn/SpawnService.java @@ -107,8 +107,6 @@ public class SpawnService { creature.setLootGroups(mobileTemplate.getLootGroups()); creature.setOptionsBitmask(mobileTemplate.getOptionsBitmask()); - if (mobileTemplate.getConversationFileName().length()>0) - creature.setAttachment("conversationFile",mobileTemplate.getConversationFileName()); creature.setFaction(mobileTemplate.getFaction()); creature.setFactionStatus(mobileTemplate.getFactionStatus()); @@ -211,7 +209,11 @@ public class SpawnService { AIActor actor = new AIActor(creature, creature.getPosition(), scheduler); creature.setAttachment("AI", actor); - creature.setAttachment("radial_filename", "npc/mobile"); + if (mobileTemplate.getConversationFileName().length()>0){ + creature.setAttachment("radial_filename", "object/conversation"); + creature.setAttachment("conversationFile", mobileTemplate.getConversationFileName()); + } + else creature.setAttachment("radial_filename", "npc/mobile"); actor.setMobileTemplate(mobileTemplate); diff --git a/src/services/sui/SUIService.java b/src/services/sui/SUIService.java index 5d6118d5..6b7a6fce 100644 --- a/src/services/sui/SUIService.java +++ b/src/services/sui/SUIService.java @@ -82,7 +82,7 @@ public class SUIService implements INetworkDispatch { SWGObject target = core.objectService.getObject(request.getTargetId()); SWGObject owner = core.objectService.getObject(request.getCharacterId()); - if(target == null || owner == null) + if(target == null || owner == null || owner.getClient() == null) return; // if (getRadialFilename(target).equals("noradialoptions")) diff --git a/src/services/travel/TravelPoint.java b/src/services/travel/TravelPoint.java index fb188f36..ca074d35 100644 --- a/src/services/travel/TravelPoint.java +++ b/src/services/travel/TravelPoint.java @@ -39,7 +39,7 @@ public class TravelPoint { private CreatureObject shuttle; private boolean shuttleAvailable; private boolean shuttleLanding; - private int secondsRemaining; + @SuppressWarnings("unused") private int secondsRemaining; private boolean shuttleDeparting; private ExecutorService scheduler = Executors.newFixedThreadPool(1); private long departureTimestamp; diff --git a/src/services/travel/TravelService.java b/src/services/travel/TravelService.java index a3339eef..14fe66b7 100644 --- a/src/services/travel/TravelService.java +++ b/src/services/travel/TravelService.java @@ -28,8 +28,6 @@ import java.util.Map; 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 org.apache.commons.lang3.text.WordUtils; diff --git a/src/tools/CharonPacketUtils.java b/src/tools/CharonPacketUtils.java index 08adea22..65925d78 100644 --- a/src/tools/CharonPacketUtils.java +++ b/src/tools/CharonPacketUtils.java @@ -21,6 +21,7 @@ import org.apache.mina.core.buffer.IoBuffer; * @author Charon */ +@SuppressWarnings("unused") public class CharonPacketUtils { private static int loggingSessionID=0; diff --git a/src/tools/DevLog.java b/src/tools/DevLog.java index 5a5c1a64..c12a3aa5 100644 --- a/src/tools/DevLog.java +++ b/src/tools/DevLog.java @@ -39,6 +39,7 @@ import java.util.Map; * @author Charon */ +@SuppressWarnings("unused") public class DevLog { private static int loggingSessionID=0;