From e363a316a2f75a700a6752fd5ca734157f9669af Mon Sep 17 00:00:00 2001 From: CharonInferar Date: Sat, 28 Jun 2014 04:08:33 +0200 Subject: [PATCH] Nightsister Stronghold NPCs added Patrols done NS Quest NPCs added Mobile template alternate naming option considered Tool functions for easier static spawn creation written Client POI nobuild error fixed Client POI custom radius datatable added --- options.cfg | 2 +- scripts/commands/setgodmode.py | 33 ++++ scripts/mobiles/dathomir/baritha.py | 38 +++++ scripts/mobiles/dathomir/diax.py | 38 +++++ scripts/mobiles/dathomir/fath_hray.py | 37 +++++ scripts/mobiles/dathomir/gate_guardian.py | 38 +++++ scripts/mobiles/dathomir/gate_keeper.py | 38 +++++ scripts/mobiles/dathomir/gethzerion.py | 38 +++++ scripts/mobiles/dathomir/kais.py | 38 +++++ scripts/mobiles/dathomir/leandra.py | 38 +++++ .../mobiles/dathomir/nightsister_protector.py | 2 +- scripts/mobiles/dathomir/ns_pirate.py | 35 +++++ scripts/mobiles/dathomir/ns_vendor.py | 38 +++++ scripts/mobiles/dathomir/satra.py | 38 +++++ .../dathomir/singing_mtn_clan_outcast.py | 2 +- scripts/mobiles/dathomir/st_rancor_tamer.py | 38 +++++ .../generic/faction/imperial/bek_rabor.py | 3 +- .../faction/imperial/eow_scout_trooper.py | 41 +++++ .../generic/faction/imperial/juntah_herm.py | 3 +- .../dantooine/imperial_outpost.py | 135 +++++++++------- .../static_spawns/dathomir/ns_stronghold.py | 109 +++++++++++++ src/main/NGECore.java | 2 +- src/resources/datatables/ClientPOIRadius.java | 148 ++++++++++++++++++ src/services/DevService.java | 5 + src/services/TerrainService.java | 18 ++- src/services/ai/states/AIState.java | 33 +++- src/services/spawn/MobileTemplate.java | 18 +++ src/services/spawn/SpawnService.java | 10 +- 28 files changed, 941 insertions(+), 75 deletions(-) create mode 100644 scripts/mobiles/dathomir/baritha.py create mode 100644 scripts/mobiles/dathomir/diax.py create mode 100644 scripts/mobiles/dathomir/fath_hray.py create mode 100644 scripts/mobiles/dathomir/gate_guardian.py create mode 100644 scripts/mobiles/dathomir/gate_keeper.py create mode 100644 scripts/mobiles/dathomir/gethzerion.py create mode 100644 scripts/mobiles/dathomir/kais.py create mode 100644 scripts/mobiles/dathomir/leandra.py create mode 100644 scripts/mobiles/dathomir/ns_pirate.py create mode 100644 scripts/mobiles/dathomir/ns_vendor.py create mode 100644 scripts/mobiles/dathomir/satra.py create mode 100644 scripts/mobiles/dathomir/st_rancor_tamer.py create mode 100644 scripts/mobiles/generic/faction/imperial/eow_scout_trooper.py create mode 100644 scripts/static_spawns/dathomir/ns_stronghold.py create mode 100644 src/resources/datatables/ClientPOIRadius.java diff --git a/options.cfg b/options.cfg index 892ff452..64b699db 100644 --- a/options.cfg +++ b/options.cfg @@ -1,6 +1,6 @@ LOAD.SNAPSHOT_OBJECTS=1 LOAD.BUILDOUT_OBJECTS=1 -LOAD.BUILDOUT_ONLY_FOR="dantooine" +LOAD.BUILDOUT_ONLY_FOR="dathomir" LOAD.RESOURCE.SYSTEM=1 # Misc diff --git a/scripts/commands/setgodmode.py b/scripts/commands/setgodmode.py index 84cab742..a7da7dbc 100644 --- a/scripts/commands/setgodmode.py +++ b/scripts/commands/setgodmode.py @@ -3,6 +3,10 @@ from engine.resources.scene import Point3D from protocol.swg import ObjControllerMessage from protocol.swg import UnknownAbilityPacket from engine.resources.objects import SWGObject +from java.awt.datatransfer import StringSelection +from java.awt.datatransfer import Clipboard +from java.awt import Toolkit +#from decimal import Decimal def setup(): return @@ -132,6 +136,35 @@ def run(core, actor, target, commandString): elif command == 'spawnobj': pos = actor.getPosition() core.staticService.spawnObject(arg1, actor.getPlanet().getName(), 0, pos.x, pos.y, pos.z, 0, 0) + + elif command == 'showpos': + pos = actor.getPosition() + ori = actor.getOrientation() + cellid = 0 + planetName = actor.getPlanet().getName() + + actor.sendSystemMessage('Position.x : %s' % pos.x, 0) + actor.sendSystemMessage('Position.y : %s' % pos.y, 0) + actor.sendSystemMessage('Position.z : %s' % pos.z, 0) + actor.sendSystemMessage('Orientation.y : %s' % ori.y, 0) + actor.sendSystemMessage('Orientation.w : %s' % ori.w, 0) + if (actor.getContainer()): + cid = actor.getContainer().getObjectID() + cellid = cid + actor.sendSystemMessage('Cell ID : %s' % cid, 0) + + str = " = stcSvc.spawnObject('', '" + planetName + "', long(%s" % cellid + "), float(%.4f" % pos.x + "), float(%.4f" % pos.y + "), float(%.4f" % pos.z + "), float(%.4f" % ori.y + "), float(%.4f" % ori.w + "))" + toolkit = Toolkit.getDefaultToolkit() + clipboard = toolkit.getSystemClipboard() + clipboard.setContents(StringSelection(str), None) + + elif command == 'patrolpoint': + pos = actor.getPosition() + str = "patrolpoints.add(Point3D(float(%.2f" % pos.x + "), float(%.2f" % pos.y + "), float(%.2f" % pos.z + ")))" + toolkit = Toolkit.getDefaultToolkit() + clipboard = toolkit.getSystemClipboard() + clipboard.setContents(StringSelection(str), None) + actor.sendSystemMessage('Patrolpoint copied to clipboard', 0) elif command == 'unknownAbilityPacket' and arg1: packet = UnknownAbilityPacket(arg1) diff --git a/scripts/mobiles/dathomir/baritha.py b/scripts/mobiles/dathomir/baritha.py new file mode 100644 index 00000000..8f6b9c2a --- /dev/null +++ b/scripts/mobiles/dathomir/baritha.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('') + mobileTemplate.setCustomName('Baritha') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_spellweaver.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('baritha', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/diax.py b/scripts/mobiles/dathomir/diax.py new file mode 100644 index 00000000..48a304ae --- /dev/null +++ b/scripts/mobiles/dathomir/diax.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('') + mobileTemplate.setCustomName('Diax') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_rancor_tamer.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('diax', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/fath_hray.py b/scripts/mobiles/dathomir/fath_hray.py new file mode 100644 index 00000000..127ac798 --- /dev/null +++ b/scripts/mobiles/dathomir/fath_hray.py @@ -0,0 +1,37 @@ +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('fath_hray') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_rancor_tamer.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('fath_hray', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/gate_guardian.py b/scripts/mobiles/dathomir/gate_guardian.py new file mode 100644 index 00000000..dfe1a14f --- /dev/null +++ b/scripts/mobiles/dathomir/gate_guardian.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('') + mobileTemplate.setCustomName('Gate Guardian') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_protector.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('gate_guardian', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/gate_keeper.py b/scripts/mobiles/dathomir/gate_keeper.py new file mode 100644 index 00000000..19679a95 --- /dev/null +++ b/scripts/mobiles/dathomir/gate_keeper.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('') + mobileTemplate.setCustomName('Gate Keeper Seik') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.QUEST | Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_protector.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('gate_keeper', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/gethzerion.py b/scripts/mobiles/dathomir/gethzerion.py new file mode 100644 index 00000000..59ec4b24 --- /dev/null +++ b/scripts/mobiles/dathomir/gethzerion.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('') + mobileTemplate.setCustomName('Gethzerion') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_rancor_tamer.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('gethzerion', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/kais.py b/scripts/mobiles/dathomir/kais.py new file mode 100644 index 00000000..a3203b34 --- /dev/null +++ b/scripts/mobiles/dathomir/kais.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('') + mobileTemplate.setCustomName('Kais') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_rancor_tamer.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('kais', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/leandra.py b/scripts/mobiles/dathomir/leandra.py new file mode 100644 index 00000000..a45ea660 --- /dev/null +++ b/scripts/mobiles/dathomir/leandra.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('') + mobileTemplate.setCustomName('Leandra') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_spellweaver.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('leandra', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/nightsister_protector.py b/scripts/mobiles/dathomir/nightsister_protector.py index f9087440..212104d3 100644 --- a/scripts/mobiles/dathomir/nightsister_protector.py +++ b/scripts/mobiles/dathomir/nightsister_protector.py @@ -23,7 +23,7 @@ def addTemplate(core): mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE) templates = Vector() - templates.add('object/mobile/shared_dressed_dathomir_nightsister_protector.iff') + templates.add('object/mobile/shared_dressed_dathomir_nightsister_rancor_tamer.iff') mobileTemplate.setTemplates(templates) weaponTemplates = Vector() diff --git a/scripts/mobiles/dathomir/ns_pirate.py b/scripts/mobiles/dathomir/ns_pirate.py new file mode 100644 index 00000000..a02a7e58 --- /dev/null +++ b/scripts/mobiles/dathomir/ns_pirate.py @@ -0,0 +1,35 @@ +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('pirate') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setRespawnTime(300) + + templates = Vector() + templates.add('object/mobile/shared_dressed_criminal_pirate_human_male_01.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('ns_pirate', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/ns_vendor.py b/scripts/mobiles/dathomir/ns_vendor.py new file mode 100644 index 00000000..a4fcde11 --- /dev/null +++ b/scripts/mobiles/dathomir/ns_vendor.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('') + mobileTemplate.setCustomName('Nightsister Vendor') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_protector.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('ns_vendor', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/satra.py b/scripts/mobiles/dathomir/satra.py new file mode 100644 index 00000000..e4f73954 --- /dev/null +++ b/scripts/mobiles/dathomir/satra.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('') + mobileTemplate.setCustomName('Satra (Nightsister Herbalist)') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_protector.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('satra', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dathomir/singing_mtn_clan_outcast.py b/scripts/mobiles/dathomir/singing_mtn_clan_outcast.py index 5ca536aa..17dec8ef 100644 --- a/scripts/mobiles/dathomir/singing_mtn_clan_outcast.py +++ b/scripts/mobiles/dathomir/singing_mtn_clan_outcast.py @@ -55,4 +55,4 @@ def addTemplate(core): lootGroupChance_5 = 3 mobileTemplate.addToLootGroups(lootPoolNames_5,lootPoolChances_5,lootGroupChance_5) - core.spawnService.addMobileTemplate('singing_mtn_clan_initiate', mobileTemplate) \ No newline at end of file + core.spawnService.addMobileTemplate('singing_mtn_clan_outcast', mobileTemplate) \ No newline at end of file diff --git a/scripts/mobiles/dathomir/st_rancor_tamer.py b/scripts/mobiles/dathomir/st_rancor_tamer.py new file mode 100644 index 00000000..a502fa2a --- /dev/null +++ b/scripts/mobiles/dathomir/st_rancor_tamer.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('') + mobileTemplate.setCustomName('Rancor Tamer') + mobileTemplate.setLevel(81) + mobileTemplate.setDifficulty(Difficulty.ELITE) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(6) + mobileTemplate.setSocialGroup('nightsister') + mobileTemplate.setRespawnTime(300) + mobileTemplate.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dathomir_nightsister_rancor_tamer.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/shared_sword_01.iff', WeaponType.ONEHANDEDMELEE, 1.0, 5, 'kinetic') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('meleehit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('st_rancor_tamer', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/generic/faction/imperial/bek_rabor.py b/scripts/mobiles/generic/faction/imperial/bek_rabor.py index 79219f63..0475fe3c 100644 --- a/scripts/mobiles/generic/faction/imperial/bek_rabor.py +++ b/scripts/mobiles/generic/faction/imperial/bek_rabor.py @@ -11,7 +11,8 @@ from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() - mobileTemplate.setCreatureName('storyteller_imperial_officer') + mobileTemplate.setCreatureName('bek_rabor') + mobileTemplate.setStfFilename('npc_spawner_n') mobileTemplate.setLevel(19) mobileTemplate.setDifficulty(Difficulty.NORMAL) diff --git a/scripts/mobiles/generic/faction/imperial/eow_scout_trooper.py b/scripts/mobiles/generic/faction/imperial/eow_scout_trooper.py new file mode 100644 index 00000000..f2d422e1 --- /dev/null +++ b/scripts/mobiles/generic/faction/imperial/eow_scout_trooper.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 resources.datatables import FactionStatus +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('eow_scout_trooper') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setDeathblow(True) + mobileTemplate.setSocialGroup("imperial") + mobileTemplate.setAssistRange(12) + mobileTemplate.setStalker(False) + mobileTemplate.setFaction("imperial") + mobileTemplate.setFactionStatus(FactionStatus.Combatant) + + templates = Vector() + templates.add('object/mobile/shared_dressed_scout_trooper_m.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/carbine/shared_carbine_e11.iff', WeaponType.CARBINE, 1.0, 15, 'energy') + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShot') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('eow_scout_trooper', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/generic/faction/imperial/juntah_herm.py b/scripts/mobiles/generic/faction/imperial/juntah_herm.py index c2359579..f9a7aa3e 100644 --- a/scripts/mobiles/generic/faction/imperial/juntah_herm.py +++ b/scripts/mobiles/generic/faction/imperial/juntah_herm.py @@ -11,7 +11,8 @@ from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() - mobileTemplate.setCreatureName('storyteller_imperial_pilot') + mobileTemplate.setCreatureName('juntah_herm') + mobileTemplate.setStfFilename('npc_spawner_n') mobileTemplate.setLevel(64) mobileTemplate.setDifficulty(Difficulty.NORMAL) diff --git a/scripts/static_spawns/dantooine/imperial_outpost.py b/scripts/static_spawns/dantooine/imperial_outpost.py index 0e3b5c3a..013124b1 100644 --- a/scripts/static_spawns/dantooine/imperial_outpost.py +++ b/scripts/static_spawns/dantooine/imperial_outpost.py @@ -2,7 +2,7 @@ import sys from resources.datatables import Options from resources.datatables import State from java.util import Vector -import engine.resources.scene.Point3D +from engine.resources.scene import Point3D def addPlanetSpawns(core, planet): @@ -16,78 +16,91 @@ def addPlanetSpawns(core, planet): stormtrooper4 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4212), float(3), float(-2386), float(0.011), float(0.999)) stormtrooper5 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4212), float(3), float(-2388), float(0.011), float(0.999)) - point1_1 = engine.resources.scene.Point3D(float(-4209), float(3), float(-2360)) - point1_2 = engine.resources.scene.Point3D(float(-4225), float(3), float(-2396)) - point1_3 = engine.resources.scene.Point3D(float(-4272), float(3), float(-2396)) - point1_4 = engine.resources.scene.Point3D(float(-4272), float(3), float(-2418)) - point1_5 = engine.resources.scene.Point3D(float(-4203), float(3), float(-2418)) - point1_6 = engine.resources.scene.Point3D(float(-4203), float(3), float(-2396)) - point1_7 = engine.resources.scene.Point3D(float(-4225), float(3), float(-2396)) - point1_8 = engine.resources.scene.Point3D(float(-4242), float(3), float(-2361)) - patrolpoints1 = Vector() - patrolpoints1.add(point1_1) - patrolpoints1.add(point1_2) - patrolpoints1.add(point1_3) - patrolpoints1.add(point1_4) - patrolpoints1.add(point1_5) - patrolpoints1.add(point1_6) - patrolpoints1.add(point1_7) - patrolpoints1.add(point1_8) - aiSvc.setPatrol(stormtrooper1, patrolpoints1) - - aiSvc.setPatrol(stormtrooper2, patrolpoints1) - - aiSvc.setPatrol(stormtrooper3, patrolpoints1) - - aiSvc.setPatrol(stormtrooper4, patrolpoints1) + patrolpoints1.add(Point3D(float(-4209), float(3), float(-2360))) + patrolpoints1.add(Point3D(float(-4225), float(3), float(-2396))) + patrolpoints1.add(Point3D(float(-4272), float(3), float(-2396))) + patrolpoints1.add(Point3D(float(-4272), float(3), float(-2418))) + patrolpoints1.add(Point3D(float(-4203), float(3), float(-2418))) + patrolpoints1.add(Point3D(float(-4203), float(3), float(-2396))) + patrolpoints1.add(Point3D(float(-4225), float(3), float(-2396))) + patrolpoints1.add(Point3D(float(-4242), float(3), float(-2361))) + aiSvc.setPatrol(stormtrooper1, patrolpoints1) + aiSvc.setPatrol(stormtrooper2, patrolpoints1) + aiSvc.setPatrol(stormtrooper3, patrolpoints1) + aiSvc.setPatrol(stormtrooper4, patrolpoints1) aiSvc.setPatrol(stormtrooper5, patrolpoints1) stormtrooper6 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4229), float(3), float(-2394), float(0.703), float(0.710)) corporal1 = stcSvc.spawnObject('eow_fbase_imperial_corporal', 'dantooine', long(0), float(-4228), float(3), float(-2395), float(0.703), float(0.710)) corporal2 = stcSvc.spawnObject('eow_fbase_imperial_corporal', 'dantooine', long(0), float(-4230), float(3), float(-2394), float(0.703), float(0.710)) - point6_1 = engine.resources.scene.Point3D(float(-4209), float(3), float(-2360)) - point6_2 = engine.resources.scene.Point3D(float(-4245), float(3), float(-2382)) - point6_3 = engine.resources.scene.Point3D(float(-4212), float(3), float(-2388)) patrolpoints6 = Vector() - patrolpoints6.add(point6_1) - patrolpoints6.add(point6_2) - patrolpoints6.add(point6_3) + patrolpoints6.add(Point3D(float(-4209), float(3), float(-2360))) + patrolpoints6.add(Point3D(float(-4245), float(3), float(-2382))) + patrolpoints6.add(Point3D(float(-4212), float(3), float(-2388))) + aiSvc.setPatrol(stormtrooper6, patrolpoints6) - aiSvc.setPatrol(corporal1, patrolpoints6) - aiSvc.setPatrol(corporal2, patrolpoints6) + #Group of 3 + stormtrooper7 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4212), float(3), float(-2395), float(0.011), float(0.999)) + stormtrooper8 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4212), float(3), float(-2396), float(0.011), float(0.999)) + stormtrooper9 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4214), float(3), float(-2396), float(0.011), float(0.999)) - stormtrooper7 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4199), float(3), float(-2396), float(0.011), float(0.999)) - stormtrooper8 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4199), float(3), float(-2395), float(0.011), float(0.999)) - stormtrooper9 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4199), float(3), float(-2394), float(0.011), float(0.999)) - point7_1 = engine.resources.scene.Point3D(float(-4209), float(3), float(-2360)) - point7_2 = engine.resources.scene.Point3D(float(-4225), float(3), float(-2396)) - point7_3 = engine.resources.scene.Point3D(float(-4272), float(3), float(-2396)) - point7_4 = engine.resources.scene.Point3D(float(-4272), float(3), float(-2418)) - point7_5 = engine.resources.scene.Point3D(float(-4203), float(3), float(-2418)) - point7_6 = engine.resources.scene.Point3D(float(-4203), float(3), float(-2396)) - point7_7 = engine.resources.scene.Point3D(float(-4225), float(3), float(-2396)) - point7_8 = engine.resources.scene.Point3D(float(-4242), float(3), float(-2361)) - patrolpoints7 = Vector() - patrolpoints7.add(point7_1) - patrolpoints7.add(point7_2) - patrolpoints7.add(point7_3) - patrolpoints7.add(point7_4) - patrolpoints7.add(point7_5) - patrolpoints7.add(point7_6) - patrolpoints7.add(point7_7) - patrolpoints7.add(point7_8) + patrolpoints7.add(Point3D(float(-4177), float(3), float(-2396))) + patrolpoints7.add(Point3D(float(-4177), float(3), float(-2419))) + patrolpoints7.add(Point3D(float(-4246), float(3), float(-2417))) + patrolpoints7.add(Point3D(float(-4246), float(3), float(-2396))) aiSvc.setPatrol(stormtrooper7, patrolpoints7) aiSvc.setPatrol(stormtrooper8, patrolpoints7) aiSvc.setPatrol(stormtrooper9, patrolpoints7) + + stormtrooper10 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4242), float(3), float(-2420), float(0.011), float(0.999)) + stormtrooper11 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4242), float(3), float(-2418), float(0.011), float(0.999)) + corporal3 = stcSvc.spawnObject('eow_fbase_imperial_corporal', 'dantooine', long(0), float(-4240), float(3), float(-2420), float(0.011), float(0.999)) + stormtrooper12 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4240), float(3), float(-2418), float(0.011), float(0.999)) + stormtrooper13 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4238), float(3), float(-2420), float(0.703), float(0.710)) + + patrolpoints8 = Vector() + patrolpoints8.add(Point3D(float(-4273), float(3), float(-2418))) + patrolpoints8.add(Point3D(float(-4273), float(3), float(-2396))) + patrolpoints8.add(Point3D(float(-4177), float(3), float(-2396))) + patrolpoints8.add(Point3D(float(-4177), float(3), float(-2418))) + patrolpoints8.add(Point3D(float(-4242), float(3), float(-2420))) + + aiSvc.setPatrol(stormtrooper10, patrolpoints8) + aiSvc.setPatrol(stormtrooper11, patrolpoints8) + aiSvc.setPatrol(stormtrooper12, patrolpoints8) + aiSvc.setPatrol(stormtrooper13, patrolpoints8) + aiSvc.setPatrol(corporal3, patrolpoints8) + + + #Outside perimeter patrol + stormtrooper14 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4282), float(3), float(-2366), float(0.011), float(0.999)) + stormtrooper15 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4284), float(3), float(-2366), float(0.011), float(0.999)) + stormtrooper16 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4284), float(3), float(-2362), float(0.011), float(0.999)) + + patrolpoints9 = Vector() + patrolpoints9.add(Point3D(float(-4298), float(3), float(-2399))) + patrolpoints9.add(Point3D(float(-4299), float(3), float(-2418))) + patrolpoints9.add(Point3D(float(-4266), float(3), float(-2453))) + patrolpoints9.add(Point3D(float(-4180), float(3), float(-2451))) + patrolpoints9.add(Point3D(float(-4146), float(3), float(-2420))) + patrolpoints9.add(Point3D(float(-4146), float(3), float(-2396))) + patrolpoints9.add(Point3D(float(-4195), float(3), float(-2332))) + patrolpoints9.add(Point3D(float(-4258), float(3), float(-2333))) + + aiSvc.setPatrol(stormtrooper14, patrolpoints9) + aiSvc.setPatrol(stormtrooper15, patrolpoints9) + aiSvc.setPatrol(stormtrooper16, patrolpoints9) + + atst1 = stcSvc.spawnObject('fbase_at_st', 'dantooine', long(0), float(-4291), float(3), float(-2433), float(0.819), float(-0.572)) atst2 = stcSvc.spawnObject('fbase_at_st', 'dantooine', long(0), float(-4154), float(3), float(-2383), float(0.264), float(0.964)) @@ -104,9 +117,19 @@ def addPlanetSpawns(core, planet): commoner1.setOptionsBitmask(Options.INVULNERABLE) commoner2 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_human_female_01.iff', 'dantooine', long(0), float(-4238), float(3), float(-2365), float(0.264), float(0.964)) commoner2.setOptionsBitmask(Options.INVULNERABLE) + commoner3 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_human_female_01.iff', 'dantooine', long(0), float(-4229), float(3), float(-2421), float(0.264), float(0.964)) + commoner3.setOptionsBitmask(Options.INVULNERABLE) + commoner4 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_old_human_female_02.iff', 'dantooine', long(0), float(-4212), float(3), float(-2411), float(0.264), float(0.964)) + commoner4.setOptionsBitmask(Options.INVULNERABLE) + commoner5 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_old_human_male_01.iff', 'dantooine', long(0), float(-4186), float(3), float(-2428), float(0.264), float(0.964)) + commoner5.setOptionsBitmask(Options.INVULNERABLE) + commoner6 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_old_human_male_02.iff', 'dantooine', long(0), float(-4245), float(3), float(-2371), float(0.264), float(0.964)) + commoner6.setOptionsBitmask(Options.INVULNERABLE) - juntah_herm = stcSvc.spawnObject('juntah_herm', 'dantooine', long(0), float(-4223), float(3), float(-2380), float(0.264), float(0.964)) - - bek_rabor = stcSvc.spawnObject('bek_rabor', 'dantooine', long(0), float(-4228), float(3), float(-2380), float(0.264), float(0.964)) + stormtrooper17 = stcSvc.spawnObject('eow_scout_trooper', 'dantooine', long(0), float(-4217), float(3), float(-2431), float(0.011), float(0.999)) + stormtrooper18 = stcSvc.spawnObject('eow_fbase_stormtrooper', 'dantooine', long(0), float(-4184), float(3), float(-2388), float(0.935), float(-0.354)) + + juntah_herm = stcSvc.spawnObject('juntah_herm', 'dantooine', long(0), float(-4223), float(3), float(-2380), float(0.992), float(-0.124)) + bek_rabor = stcSvc.spawnObject('bek_rabor', 'dantooine', long(0), float(-4228), float(3), float(-2380), float(0.992), float(-0.124)) return diff --git a/scripts/static_spawns/dathomir/ns_stronghold.py b/scripts/static_spawns/dathomir/ns_stronghold.py new file mode 100644 index 00000000..ad59f31a --- /dev/null +++ b/scripts/static_spawns/dathomir/ns_stronghold.py @@ -0,0 +1,109 @@ +import sys +from resources.datatables import Options +from resources.datatables import State +from java.util import Vector +from engine.resources.scene import Point3D + + +def addPlanetSpawns(core, planet): + stcSvc = core.staticService + objSvc = core.objectService + aiSvc = core.aiService + + # N Entrance Guards + ns_sentry1 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4100), float(127), float(-100), float(0.55), float(0.83)) + ns_sentry2 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4097), float(127), float(-101), float(0.55), float(0.83)) + ns_sentry3 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4106), float(127), float(-103), float(0.55), float(0.83)) + ns_sentry4 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4097), float(127), float(-104), float(0.55), float(0.83)) + ns_sentry5 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4095), float(127), float(-105), float(0.55), float(0.83)) + + patrolpoints1 = Vector() + patrolpoints1.add(Point3D(float(-4062), float(126), float(-92))) + patrolpoints1.add(Point3D(float(-4019), float(124), float(-95))) + patrolpoints1.add(Point3D(float(-4003), float(123), float(-74))) + patrolpoints1.add(Point3D(float(-3972), float(126), float(-76))) + patrolpoints1.add(Point3D(float(-4003), float(123), float(-74))) + patrolpoints1.add(Point3D(float(-4019), float(124), float(-95))) + patrolpoints1.add(Point3D(float(-4100), float(127), float(-100))) + + aiSvc.setPatrol(ns_sentry1, patrolpoints1) + aiSvc.setPatrol(ns_sentry2, patrolpoints1) + aiSvc.setPatrol(ns_sentry3, patrolpoints1) + aiSvc.setPatrol(ns_sentry4, patrolpoints1) + aiSvc.setPatrol(ns_sentry5, patrolpoints1) + + # SW Entrance Guards + ns_sentry6 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4009.7249), float(119.7003), float(-238.9914), float(-0.6984), float(0.7157)) + ns_sentry7 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4008.7249), float(119.7003), float(-238.9914), float(-0.6984), float(0.7157)) + ns_sentry8 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4007.7249), float(119.7003), float(-238.9914), float(-0.6984), float(0.7157)) + ns_sentry9 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4006.7249), float(119.7003), float(-238.9914), float(-0.6984), float(0.7157)) + ns_sentry10 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4005.7249), float(119.7003), float(-238.9914), float(-0.6984), float(0.7157)) + + patrolpoints2 = Vector() + patrolpoints2.add(Point3D(float(-4023.24), float(118.67), float(-242.87))) + patrolpoints2.add(Point3D(float(-4065.97), float(124.01), float(-278.84))) + patrolpoints2.add(Point3D(float(-4045.83), float(123.62), float(-299.27))) + patrolpoints2.add(Point3D(float(-4065.97), float(124.01), float(-278.84))) + patrolpoints2.add(Point3D(float(-4023.24), float(118.67), float(-242.87))) + patrolpoints2.add(Point3D(float(-4009.72), float(119.70), float(-238.99))) + + aiSvc.setPatrol(ns_sentry6, patrolpoints2) + aiSvc.setPatrol(ns_sentry7, patrolpoints2) + aiSvc.setPatrol(ns_sentry8, patrolpoints2) + aiSvc.setPatrol(ns_sentry9, patrolpoints2) + aiSvc.setPatrol(ns_sentry10, patrolpoints2) + + #NW Entrance Guards + ns_sentry11 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4131.4868), float(125.9164), float(-127.0344), float(0.0496), float(0.9988)) + ns_sentry12 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4131.4868), float(125.9164), float(-127.0344), float(0.0496), float(0.9988)) + ns_sentry13 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4131.4868), float(125.9164), float(-127.0344), float(0.0496), float(0.9988)) + ns_sentry14 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4131.4868), float(125.9164), float(-127.0344), float(0.0496), float(0.9988)) + ns_sentry15 = stcSvc.spawnObject('nightsister_sentry', 'dathomir', long(0), float(-4131.4868), float(125.9164), float(-127.0344), float(0.0496), float(0.9988)) + + patrolpoints3 = Vector() + patrolpoints3.add(Point3D(float(-4126.84), float(121.32), float(-93.56))) + patrolpoints3.add(Point3D(float(-4129.24), float(120.81), float(-23.27))) + patrolpoints3.add(Point3D(float(-4126.84), float(121.32), float(-93.56))) + patrolpoints3.add(Point3D(float(-4131.4868), float(125.9164), float(-127.0344))) + + aiSvc.setPatrol(ns_sentry11, patrolpoints3) + aiSvc.setPatrol(ns_sentry12, patrolpoints3) + aiSvc.setPatrol(ns_sentry13, patrolpoints3) + aiSvc.setPatrol(ns_sentry14, patrolpoints3) + aiSvc.setPatrol(ns_sentry15, patrolpoints3) + + # Quest NPCs etc. + ns_elder = stcSvc.spawnObject('nightsister_elder', 'dathomir', long(0), float(-3975), float(131), float(-158), float(0.992), float(-0.002)) + baritha = stcSvc.spawnObject('baritha', 'dathomir', long(0), float(-3976), float(131), float(-172), float(0.992), float(-0.124)) + fath_hray = stcSvc.spawnObject('fath_hray', 'dathomir', long(0), float(-4118), float(105), float(-156), float(0.992), float(-0.124)) + spell_leandra = stcSvc.spawnObject('leandra', 'dathomir', long(0), float(-4085), float(105), float(-210), float(0.992), float(-0.124)) + gate_guardian = stcSvc.spawnObject('gate_guardian', 'dathomir', long(0), float(-3999), float(105), float(-65), float(0.992), float(-0.124)) + gate_keeper = stcSvc.spawnObject('gate_keeper', 'dathomir', long(189375), float(0.5690), float(0.7599), float(-1.5566), float(-0.0166), float(0.9999)) + ns_vendor = stcSvc.spawnObject('ns_vendor', 'dathomir', long(189379), float(0.6680), float(0.7599), float(-53.5354), float(-0.0587), float(0.9983)) + satra = stcSvc.spawnObject('satra', 'dathomir', long(189378), float(-13.5346), float(0.7599), float(-12.9636), float(0.9879), float(-0.1549)) + rancor_tamer = stcSvc.spawnObject('st_rancor_tamer', 'dathomir', long(0), float(-4156), float(105), float(-83), float(0.992), float(-0.124)) + diax = stcSvc.spawnObject('diax', 'dathomir', long(189384), float(-19.0310), float(7.2190), float(-27.2504), float(0.6629), float(0.7487)) + kais = stcSvc.spawnObject('kais', 'dathomir', long(189382), float(13.62), float(7.21), float(-21.23), float(0.915), float(-0.402)) + gethzerion = stcSvc.spawnObject('gethzerion', 'dathomir', long(189383), float(0.109), float(7.21), float(-4.17), float(0.992), float(-0.119)) + + pirate1 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3964.2300), float(131.6703), float(-201.5431), float(0.1860), float(0.9825)) + pirate2 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3957.6968), float(131.5686), float(-190.7077), float(0.9335), float(-0.3585)) + aiSvc.setLoiter(pirate1, float(6), float(10)) + aiSvc.setLoiter(pirate2, float(6), float(10)) + + pirate3 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3935.2058), float(130.9562), float(-198.1271), float(0.9974), float(-0.0719)) + pirate4 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3934.0264), float(131.3799), float(-212.0725), float(-0.1989), float(0.9800)) + aiSvc.setLoiter(pirate3, float(6), float(10)) + aiSvc.setLoiter(pirate4, float(6), float(10)) + + pirate5 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3951.2546), float(123.8093), float(-258.2355), float(0.9539), float(-0.3003)) + pirate6 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3963.6440), float(122.6283), float(-270.6916), float(0.2454), float(0.9694)) + aiSvc.setLoiter(pirate5, float(6), float(10)) + aiSvc.setLoiter(pirate6, float(6), float(10)) + + pirate7 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3959.8911), float(123.3668), float(-254.1581), float(0.3242), float(0.9460)) + pirate8 = stcSvc.spawnObject('ns_pirate', 'dathomir', long(0), float(-3950.1411), float(125.6901), float(-244.8228), float(0.9176), float(-0.3975)) + aiSvc.setLoiter(pirate7, float(6), float(10)) + aiSvc.setLoiter(pirate8, float(6), float(10)) + + return diff --git a/src/main/NGECore.java b/src/main/NGECore.java index 757f4d39..af65f16a 100644 --- a/src/main/NGECore.java +++ b/src/main/NGECore.java @@ -805,7 +805,7 @@ public class NGECore { public Vector getExcludedDevelopers(){ Vector excludedDevelopers = new Vector(); - excludedDevelopers.add("Charon"); + //excludedDevelopers.add("Charon"); // Feel free to add your OS user account name here to exclude yourself from loading buildouts and snapshots // without having to change options.cfg all the time return excludedDevelopers; diff --git a/src/resources/datatables/ClientPOIRadius.java b/src/resources/datatables/ClientPOIRadius.java new file mode 100644 index 00000000..c17ae3f6 --- /dev/null +++ b/src/resources/datatables/ClientPOIRadius.java @@ -0,0 +1,148 @@ +package resources.datatables; + +import java.util.HashMap; +import java.util.Map; + +public class ClientPOIRadius { + + public static Map radiusMap = new HashMap(); + static{ + radiusMap.put("@clientpoi_n:hideout", 150); + radiusMap.put("@clientpoi_n:corsecbase", 150); + radiusMap.put("@clientpoi_n:grandtheater", 150); + radiusMap.put("@clientpoi_n:crystalfountain", 150); + radiusMap.put("@clientpoi_n:agrilat", 150); + radiusMap.put("@clientpoi_n:drall", 150); + radiusMap.put("@clientpoi_n:nyax", 150); + radiusMap.put("@clientpoi_n:stronghold", 150); + radiusMap.put("@clientpoi_n:afarathu", 150); + radiusMap.put("@clientpoi_n:racingagrilat", 150); + radiusMap.put("@clientpoi_n:dantari1", 150); + radiusMap.put("@clientpoi_n:dantari2", 150); + radiusMap.put("@clientpoi_n:dantari3", 150); + radiusMap.put("@clientpoi_n:abandoned", 150); + radiusMap.put("@clientpoi_n:jeditemple", 250); + radiusMap.put("@clientpoi_n:cystalhunter", 150); + radiusMap.put("@clientpoi_n:janta", 150); + radiusMap.put("@clientpoi_n:mokk", 150); + radiusMap.put("@clientpoi_n:kunga", 150); + radiusMap.put("@clientpoi_n:warren", 150); + radiusMap.put("@clientpoi_n:prison", 150); + radiusMap.put("@clientpoi_n:lessersarlacc", 150); + radiusMap.put("@clientpoi_n:dathpod", 150); + radiusMap.put("@clientpoi_n:mistyfalls", 150); + radiusMap.put("@clientpoi_n:tarpit", 150); + radiusMap.put("@clientpoi_n:nightsister", 300); + radiusMap.put("@clientpoi_n:singing", 150); + radiusMap.put("@clientpoi_n:nightvssing", 150); + radiusMap.put("@clientpoi_n:nightspider", 150); + radiusMap.put("@clientpoi_n:slavecamp", 150); + radiusMap.put("@clientpoi_n:tree1", 150); + radiusMap.put("@clientpoi_n:tree2", 150); + radiusMap.put("@clientpoi_n:lake1", 150); + radiusMap.put("@clientpoi_n:lake2", 150); + radiusMap.put("@clientpoi_n:dulok1", 150); + radiusMap.put("@clientpoi_n:dulok2", 150); + radiusMap.put("@clientpoi_n:marauder", 150); + radiusMap.put("@clientpoi_n:korga", 150); + radiusMap.put("@clientpoi_n:orphan", 150); + radiusMap.put("@clientpoi_n:jinda", 150); + radiusMap.put("@clientpoi_n:dead_mysess", 150); + radiusMap.put("@clientpoi_n:dead_grave", 150); + radiusMap.put("@clientpoi_n:dead_web", 150); + radiusMap.put("@clientpoi_n:dead_entrance_dead", 150); + radiusMap.put("@clientpoi_n:dead_entrance_kkowir", 150); + radiusMap.put("@clientpoi_n:dead_kerritamba", 150); + radiusMap.put("@clientpoi_n:dead_arena", 150); + radiusMap.put("@clientpoi_n:dead_myyydril", 150); + radiusMap.put("@clientpoi_n:dead_abandon", 150); + radiusMap.put("@clientpoi_d:kash_etyyy_gate_to_kachirho", 150); + radiusMap.put("@clientpoi_n:kash_etyyy_rodian_hunters_camp", 150); + radiusMap.put("@clientpoi_n:kash_etyyy_hracca_glade_camp", 150); + radiusMap.put("@clientpoi_n:kash_etyyy_arcona_compound", 150); + radiusMap.put("@clientpoi_n:kashyyyk_kachirho", 150); + radiusMap.put("@clientpoi_n:kashyyyk_dead_forest", 150); + radiusMap.put("@clientpoi_n:kashyyyk_hunting_grounds", 150); + radiusMap.put("@clientpoi_n:kashyyyk_rryatt_trail", 150); + radiusMap.put("@clientpoi_n:kashyyyk_blackscale_compound", 150); + radiusMap.put("@clientpoi_n:kashyyyk_slave_camp_one", 150); + radiusMap.put("@clientpoi_n:kashyyyk_slave_camp_two", 150); + radiusMap.put("@clientpoi_n:kashyyyk_wookiee_village", 150); + radiusMap.put("@clientpoi_n:kashyyyk_rodian_hunters_camp", 150); + radiusMap.put("@clientpoi_n:volcano", 150); + radiusMap.put("@clientpoi_n:lokimpoutpost", 150); + radiusMap.put("@clientpoi_n:kimogilaskel", 150); + radiusMap.put("@clientpoi_n:kimogilatown", 150); + radiusMap.put("@clientpoi_n:canyoncosair", 150); + radiusMap.put("@clientpoi_n:bloodrazor", 150); + radiusMap.put("@clientpoi_n:droidcave", 150); + radiusMap.put("@clientpoi_n:greatmaze", 150); + radiusMap.put("@clientpoi_n:volcano_crash", 150); + radiusMap.put("@clientpoi_n:new_mining_facility", 150); + radiusMap.put("@clientpoi_n:old_mining_facility", 150); + radiusMap.put("@clientpoi_n:striking_mining_camp", 150); + radiusMap.put("@clientpoi_n:old_republic_research", 150); + radiusMap.put("@clientpoi_n:burning_plains", 150); + radiusMap.put("@clientpoi_n:crystal_flats", 150); + radiusMap.put("@clientpoi_n:berkens_flow", 150); + radiusMap.put("@clientpoi_n:mining_fields", 150); + radiusMap.put("@clientpoi_n:tulrus_isle", 150); + radiusMap.put("@clientpoi_n:central_volcano", 150); + radiusMap.put("@clientpoi_n:smoking_forest", 150); + radiusMap.put("@clientpoi_n:gungan", 150); + radiusMap.put("@clientpoi_n:theedfalls", 150); + radiusMap.put("@clientpoi_n:deejafalls", 150); + radiusMap.put("@clientpoi_n:amidalasbeach", 150); + radiusMap.put("@clientpoi_n:impvsgun", 150); + radiusMap.put("@clientpoi_n:mordran", 150); + radiusMap.put("@clientpoi_n:weaponfacility", 150); + radiusMap.put("@clientpoi_n:narglatch", 150); + radiusMap.put("@clientpoi_n:mauler", 150); + radiusMap.put("@clientpoi_n:racingkeren", 150); + radiusMap.put("@clientpoi_n:reboutpost", 150); + radiusMap.put("@clientpoi_n:kobala", 150); + radiusMap.put("@clientpoi_n:impencampment", 150); + radiusMap.put("@clientpoi_n:hyperdrive", 150); + radiusMap.put("@clientpoi_n:garyn", 150); + radiusMap.put("@clientpoi_n:borglebat", 150); + radiusMap.put("@clientpoi_n:cobral", 150); + radiusMap.put("@clientpoi_n:tortoncave", 150); + radiusMap.put("@clientpoi_n:poacher", 150); + radiusMap.put("@clientpoi_n:barkmite", 150); + radiusMap.put("@clientpoi_n:swamptown", 150); + radiusMap.put("@clientpoi_n:impoutpost", 150); + radiusMap.put("@clientpoi_n:creaturevillage", 150); + radiusMap.put("@clientpoi_n:impvsreb", 150); + radiusMap.put("@clientpoi_n:aqualishcave", 150); + radiusMap.put("@clientpoi_n:weapondepot", 150); + radiusMap.put("@clientpoi_n:detainment", 150); + radiusMap.put("@clientpoi_n:corvsflail", 150); + radiusMap.put("@clientpoi_n:flynock", 150); + radiusMap.put("@clientpoi_n:erransif", 150); + radiusMap.put("@clientpoi_n:aakuan", 150); + radiusMap.put("@clientpoi_n:khamurrabio", 150); + radiusMap.put("@clientpoi_n:decaymite", 150); + radiusMap.put("@clientpoi_n:binyare", 150); + radiusMap.put("@clientpoi_n:jabbaspalace", 150); + radiusMap.put("@clientpoi_n:forttusken", 150); + radiusMap.put("@clientpoi_n:jawatraders", 150); + radiusMap.put("@clientpoi_n:darklighter", 150); + radiusMap.put("@clientpoi_n:kraytgraveyard", 250); + radiusMap.put("@clientpoi_n:larshomestead", 150); + radiusMap.put("@clientpoi_n:kenobishouse", 150); + radiusMap.put("@clientpoi_n:sarlacc", 150); + radiusMap.put("@clientpoi_n:pod", 150); + radiusMap.put("@clientpoi_n:skeleton", 150); + radiusMap.put("@clientpoi_n:racingmosespa", 150); + radiusMap.put("@clientpoi_n:woolamander", 150); + radiusMap.put("@clientpoi_n:blueleaf", 150); + radiusMap.put("@clientpoi_n:exarkun", 150); + radiusMap.put("@clientpoi_n:massassi", 150); + } + + public ClientPOIRadius(){} + + public static int getRadius(String POIName){ + return radiusMap.get(POIName); + } +} diff --git a/src/services/DevService.java b/src/services/DevService.java index d0b1f39e..fcb5c294 100644 --- a/src/services/DevService.java +++ b/src/services/DevService.java @@ -150,6 +150,7 @@ public class DevService implements INetworkDispatch { suiOptions.put((long) 166, "Teleport to Imperial Op"); suiOptions.put((long) 167, "Teleport to Rebel Base "); suiOptions.put((long) 168, "Teleport to NS vs SMC Battle"); + suiOptions.put((long) 169, "Teleport to NS Stronghold"); suiOptions.put((long) 153, "Teleport to Force Crystal Hunter's Cave"); suiOptions.put((long) 121, "Teleport to Sandbox City"); } @@ -1280,6 +1281,10 @@ public class DevService implements INetworkDispatch { case 168: core.simulationService.transferToPlanet(player, core.terrainService.getPlanetByName("dathomir"), new Point3D(-2450,18,1521), player.getOrientation(), null); return; + + case 169: + core.simulationService.transferToPlanet(player, core.terrainService.getPlanetByName("dathomir"), new Point3D(-4002, 4, -58), player.getOrientation(), null); + return; case 123: TangibleObject arakydDroids = (TangibleObject) core.objectService.createObject("object/tangible/mission/shared_mission_bounty_droid_probot.iff", planet); diff --git a/src/services/TerrainService.java b/src/services/TerrainService.java index 1653690d..8bea9b00 100644 --- a/src/services/TerrainService.java +++ b/src/services/TerrainService.java @@ -30,6 +30,7 @@ import java.util.concurrent.ConcurrentHashMap; import resources.common.FileUtilities; import resources.common.collidables.CollidableCircle; +import resources.datatables.ClientPOIRadius; import services.playercities.ClientRegion; import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.DatatableVisitor; @@ -58,20 +59,18 @@ public class TerrainService { for (int i = 0; i < poiTable.getRowCount(); i++) { - Planet planet = getPlanetByName((String) poiTable.getObject(i, 0)); + // Planet planet = getPlanetByName((String) poiTable.getObject(i, 0)); Has this ever worked? + Planet planet = getPlanetByName((String) poiTable.getObject(i, 2)); if(planet == null) continue; float x = (Float) poiTable.getObject(i, 4); float z = (Float) poiTable.getObject(i, 6); - - // Account for more extended no-build radii like they were on live - // Issue #849 - x *= 1.1; - z *= 1.1; - - CollidableCircle poiArea = new CollidableCircle(new Point3D(x, 0, z), 150, planet); + String POIName = (String) poiTable.getObject(i, 0); + int radius = ClientPOIRadius.getRadius(POIName); + + CollidableCircle poiArea = new CollidableCircle(new Point3D(x, 0, z), radius, planet); noBuildAreas.get(planet).add(poiArea); } @@ -97,6 +96,9 @@ public class TerrainService { float x = (Float) regionTable.getObject(i, 1); float z = (Float) regionTable.getObject(i, 2); float radius = (Float) regionTable.getObject(i, 3); + // Account for more extended no-build radii like they were on live + // Issue #849 + radius *= 1.1; CollidableCircle region = new CollidableCircle(new Point3D(x, 0, z), radius, planet); noBuildAreas.get(planet).add(region); diff --git a/src/services/ai/states/AIState.java b/src/services/ai/states/AIState.java index b565ae7f..d7354dc7 100644 --- a/src/services/ai/states/AIState.java +++ b/src/services/ai/states/AIState.java @@ -375,8 +375,21 @@ public abstract class AIState { // if (newPosition.getCell()==null) // System.out.println("newPosition.getCell() is NULL"); - - core.simulationService.moveObject(creature, newPosition, quaternion, creature.getMovementCounter(), speed, newPosition.getCell()); + try{ + core.simulationService.moveObject(creature, newPosition, quaternion, creature.getMovementCounter(), speed, newPosition.getCell()); + } catch (NullPointerException e) { + // Just to identify what exactly is null here + if (creature==null) + System.out.print("creature==null" ); + if (newPosition==null) + System.out.print("newPosition==null" ); + if (quaternion==null) + System.out.print("quaternion==null" ); + if (newPosition.getCell()==null) + System.out.print("newPosition.getCell()==null" ); + + System.out.print("creature.getMovementCounter() " + creature.getMovementCounter()); + } } @@ -484,7 +497,21 @@ public abstract class AIState { // if (newPosition.getCell()==null) // System.out.println("newPosition.getCell() is NULL"); - core.simulationService.moveObject(creature, newPosition, quaternion, creature.getMovementCounter(), speed, newPosition.getCell()); + try{ + core.simulationService.moveObject(creature, newPosition, quaternion, creature.getMovementCounter(), speed, newPosition.getCell()); + } catch (NullPointerException e) { + // Just to identify what exactly is null here + if (creature==null) + System.out.print("creature==null" ); + if (newPosition==null) + System.out.print("newPosition==null" ); + if (quaternion==null) + System.out.print("quaternion==null" ); + if (newPosition.getCell()==null) + System.out.print("newPosition.getCell()==null" ); + + System.out.print("creature.getMovementCounter() " + creature.getMovementCounter()); + } } diff --git a/src/services/spawn/MobileTemplate.java b/src/services/spawn/MobileTemplate.java index d0cc6c17..e6b61612 100644 --- a/src/services/spawn/MobileTemplate.java +++ b/src/services/spawn/MobileTemplate.java @@ -45,6 +45,8 @@ public class MobileTemplate implements Cloneable { private int difficulty = 0; private int health, action; private String creatureName; + private String StfFilename; + private String customName; private float scale = 1; private Vector weaponTemplates = new Vector(); private Vector weaponTemplateVector = new Vector(); @@ -333,5 +335,21 @@ public class MobileTemplate implements Cloneable { public Object clone() throws CloneNotSupportedException { return super.clone(); } + + public String getStfFilename() { + return StfFilename; + } + + public void setStfFilename(String stfFilename) { + StfFilename = stfFilename; + } + + public String getCustomName() { + return customName; + } + + public void setCustomName(String customName) { + this.customName = customName; + } } diff --git a/src/services/spawn/SpawnService.java b/src/services/spawn/SpawnService.java index 7de14991..1ba62fe8 100644 --- a/src/services/spawn/SpawnService.java +++ b/src/services/spawn/SpawnService.java @@ -108,8 +108,14 @@ public class SpawnService { creature.setFaction(mobileTemplate.getFaction()); creature.setFactionStatus(mobileTemplate.getFactionStatus()); creature.setPvpBitmask(mobileTemplate.getPvpBitmask()); - creature.setStfFilename("mob/creature_names"); // TODO: set other STFs for NPCs other than creatures - creature.setStfName(mobileTemplate.getCreatureName()); + if (mobileTemplate.getCustomName()==null){ + creature.setStfFilename("mob/creature_names"); // TODO: set other STFs for NPCs other than creatures -> DONE + if (mobileTemplate.getStfFilename()!=null) + creature.setStfFilename(mobileTemplate.getStfFilename()); + creature.setStfName(mobileTemplate.getCreatureName()); + } else { + creature.setCustomName(mobileTemplate.getCustomName()); // For cases where no STF name can be found! + } creature.setHeight(mobileTemplate.getScale()); int difficulty = mobileTemplate.getDifficulty(); creature.setDifficulty((byte) difficulty);