diff --git a/scripts/mobiles/dantooine/dark_adept.py b/scripts/mobiles/dantooine/dark_adept.py new file mode 100644 index 00000000..5a0df6df --- /dev/null +++ b/scripts/mobiles/dantooine/dark_adept.py @@ -0,0 +1,40 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('dark_adept') + mobileTemplate.setLevel(70) + mobileTemplate.setMinLevel(60) + mobileTemplate.setMaxLevel(70) + mobileTemplate.setDifficulty(1) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(4) + mobileTemplate.setMaxSpawnDistance(8) + mobileTemplate.setDeathblow(True) + + + templates = Vector() + templates.add('object/mobile/shared_dressed_dark_jedi_elder_male_human_01.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('dark_adept', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/dark_force_crystal_hunter.py b/scripts/mobiles/dantooine/dark_force_crystal_hunter.py new file mode 100644 index 00000000..219b5091 --- /dev/null +++ b/scripts/mobiles/dantooine/dark_force_crystal_hunter.py @@ -0,0 +1,37 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('dark_force_crystal_hunter') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(2) + mobileTemplate.setMaxSpawnDistance(4) + mobileTemplate.setDeathblow(False) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dark_force_crystal_hunter.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('dark_force_crystal_hunter', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/dark_jedi_knight.py b/scripts/mobiles/dantooine/dark_jedi_knight.py new file mode 100644 index 00000000..337b7b82 --- /dev/null +++ b/scripts/mobiles/dantooine/dark_jedi_knight.py @@ -0,0 +1,62 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('dark_jedi_knight') + mobileTemplate.setLevel(90) + mobileTemplate.setMinLevel(62) + mobileTemplate.setMaxLevel(70) + mobileTemplate.setDifficulty(1) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(3) + mobileTemplate.setMaxSpawnDistance(5) + mobileTemplate.setDeathblow(True) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dark_jedi_male_human_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_human_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_human_03.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_human_04.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_human_05.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_human_06.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_twk_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_twk_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_twk_03.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_zab_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_zab_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_male_zab_03.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_human_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_human_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_human_03.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_human_04.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_twk_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_twk_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_twk_03.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_zab_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_zab_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_female_zab_03.iff') + + + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('dark_jedi_knight', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/dark_jedi_master.py b/scripts/mobiles/dantooine/dark_jedi_master.py new file mode 100644 index 00000000..8ad845e3 --- /dev/null +++ b/scripts/mobiles/dantooine/dark_jedi_master.py @@ -0,0 +1,44 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('dark_jedi_master') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(2) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(3) + mobileTemplate.setMaxSpawnDistance(5) + mobileTemplate.setDeathblow(True) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dark_jedi_master_female_twk_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_master_female_twk_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_master_female_zab_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_master_female_zab_02.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_master_male_human_01.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_master_male_human_04.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_master_male_human_05.iff') + templates.add('object/mobile/shared_dressed_dark_jedi_master_male_human_06.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('dark_jedi_master', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/dark_side_savage.py b/scripts/mobiles/dantooine/dark_side_savage.py new file mode 100644 index 00000000..698c9c9d --- /dev/null +++ b/scripts/mobiles/dantooine/dark_side_savage.py @@ -0,0 +1,37 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('eow_dark_side_savage') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(2) + mobileTemplate.setMaxSpawnDistance(4) + mobileTemplate.setDeathblow(False) + + templates = Vector() + templates.add('object/mobile/shared_dressed_dark_side_savage.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('dark_side_savage', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/force_sensitive_crypt_crawler.py b/scripts/mobiles/dantooine/force_sensitive_crypt_crawler.py new file mode 100644 index 00000000..aee43eee --- /dev/null +++ b/scripts/mobiles/dantooine/force_sensitive_crypt_crawler.py @@ -0,0 +1,37 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('eow_force_sensitive_crypt_crawler') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(2) + mobileTemplate.setMaxSpawnDistance(4) + mobileTemplate.setDeathblow(False) + + templates = Vector() + templates.add('object/mobile/shared_dressed_force_sensitive_crypt_crawler.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('force_sensitive_crypt_crawler', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/force_sensitive_renegade.py b/scripts/mobiles/dantooine/force_sensitive_renegade.py new file mode 100644 index 00000000..dab96945 --- /dev/null +++ b/scripts/mobiles/dantooine/force_sensitive_renegade.py @@ -0,0 +1,37 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('Force_sensitive_Renegade') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(2) + mobileTemplate.setMaxSpawnDistance(4) + mobileTemplate.setDeathblow(False) + + templates = Vector() + templates.add('object/mobile/shared_dressed_force_sensitive_renegade.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('force_sensitive_renegade', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/forsaken_force_drifter.py b/scripts/mobiles/dantooine/forsaken_force_drifter.py new file mode 100644 index 00000000..52e0a5a3 --- /dev/null +++ b/scripts/mobiles/dantooine/forsaken_force_drifter.py @@ -0,0 +1,37 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('eow_forsaken_force_drifter') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(2) + mobileTemplate.setMaxSpawnDistance(4) + mobileTemplate.setDeathblow(False) + + templates = Vector() + templates.add('object/mobile/shared_dressed_forsaken_force_drifter.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('forsaken_force_drifter', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/novice_force_mystic.py b/scripts/mobiles/dantooine/novice_force_mystic.py new file mode 100644 index 00000000..b89227fb --- /dev/null +++ b/scripts/mobiles/dantooine/novice_force_mystic.py @@ -0,0 +1,37 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('novice_force_mystic') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(2) + mobileTemplate.setMaxSpawnDistance(4) + mobileTemplate.setDeathblow(False) + + templates = Vector() + templates.add('object/mobile/shared_dressed_novice_force_mystic.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('novice_force_mystic', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dantooine/untrained_wielder_of_the_dark_side.py b/scripts/mobiles/dantooine/untrained_wielder_of_the_dark_side.py new file mode 100644 index 00000000..71623d04 --- /dev/null +++ b/scripts/mobiles/dantooine/untrained_wielder_of_the_dark_side.py @@ -0,0 +1,37 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('untrained_wielder_of_the_dark_side') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + mobileTemplate.setMinSpawnDistance(2) + mobileTemplate.setMaxSpawnDistance(4) + mobileTemplate.setDeathblow(False) + + templates = Vector() + templates.add('object/mobile/shared_dressed_untrained_wielder_of_the_darkside.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff', 9, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff', 10, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff', 11, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('saberHit') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('untrained_wielder_of_the_dark_side', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/dynamicgroups/force_sensitives_wild_1.py b/scripts/mobiles/dynamicgroups/force_sensitives_wild_1.py index 6a10889e..2281f370 100644 --- a/scripts/mobiles/dynamicgroups/force_sensitives_wild_1.py +++ b/scripts/mobiles/dynamicgroups/force_sensitives_wild_1.py @@ -6,19 +6,13 @@ from java.util import Vector def addDynamicGroup(core): dynamicGroup = DynamicSpawnGroup() mobileTemplates = Vector() - mobileTemplates.add('tusken_raider') - mobileTemplates.add('tusken_raider') - mobileTemplates.add('tusken_raider') + mobileTemplates.add('dark_jedi_master') + mobileTemplates.add('dark_jedi_knight') + mobileTemplates.add('dark_adept') dynamicGroup.setMobiles(mobileTemplates) - memberCLs = Vector() - memberCLs.add(72) - memberCLs.add(90) - memberCLs.add(90) - dynamicGroup.setmemberCLs(memberCLs) - dynamicGroup.setGroupMemberNumber(3) + dynamicGroup.setGroupMembersNumber(3) dynamicGroup.setName('force_sensitives_wild_1') - dynamicGroup.setMaxSpawns(20) - dynamicGroup.setMinSpawnDistance(2) - dynamicGroup.setMaxSpawnDistance(4) + dynamicGroup.setMaxSpawns(-1) + dynamicGroup.setMinSpawnDistance(150) core.spawnService.addDynamicGroup('force_sensitives_wild_1', dynamicGroup) return \ No newline at end of file diff --git a/scripts/mobiles/spawnareas/force_sensitives_dynamic_1.py b/scripts/mobiles/spawnareas/force_sensitives_dynamic_1.py index 608e901c..f2d14b80 100644 --- a/scripts/mobiles/spawnareas/force_sensitives_dynamic_1.py +++ b/scripts/mobiles/spawnareas/force_sensitives_dynamic_1.py @@ -1,5 +1,5 @@ import sys def addSpawnArea(core): - core.spawnService.addDynamicSpawnArea('force_sensitives_wild_1', 3860, -4784, 2048, 'tatooine') + core.spawnService.addDynamicSpawnArea('force_sensitives_wild_1', 4083, 5780, 2048, 'dantooine') return \ No newline at end of file diff --git a/scripts/mobiles/spawnareas/tuskens_dynamic_1.py b/scripts/mobiles/spawnareas/tuskens_dynamic_1.py index 3ef2829a..d807e384 100644 --- a/scripts/mobiles/spawnareas/tuskens_dynamic_1.py +++ b/scripts/mobiles/spawnareas/tuskens_dynamic_1.py @@ -1,5 +1,5 @@ import sys def addSpawnArea(core): - core.spawnService.addDynamicSpawnArea('tuskens_wild_1', 3860, -4784, 2048, 'tatooine') + core.spawnService.addDynamicSpawnArea('tuskens_wild_1', 4193, -4724, 200, 'tatooine') return \ No newline at end of file diff --git a/src/services/DevService.java b/src/services/DevService.java index 01d3d532..8f3822bb 100644 --- a/src/services/DevService.java +++ b/src/services/DevService.java @@ -90,6 +90,7 @@ public class DevService implements INetworkDispatch { if(creature.getClient().isGM()) suiOptions.put((long) 125, "Crafting Tools"); if(creature.getClient().isGM()) suiOptions.put((long) 130, "Vehicle Deeds"); if(creature.getClient().isGM()) suiOptions.put((long) 121, "Sandbox City"); + if(creature.getClient().isGM()) suiOptions.put((long) 122, "Jedi Ruins"); break; case 3: // [Items] Weapons @@ -1167,6 +1168,10 @@ public class DevService implements INetworkDispatch { case 121: NGECore.getInstance().playerCityService.buildSandboxTestCity(player); + + case 122: + Point3D position = new Point3D(4086,15,5554); + core.simulationService.transferToPlanet(player, core.terrainService.getPlanetByName("dantooine"), position, player.getOrientation(), null); case 125: TangibleObject genericCraftingTool = (TangibleObject) core.objectService.createObject("object/tangible/crafting/station/shared_generic_tool.iff", planet); diff --git a/src/services/object/ObjectService.java b/src/services/object/ObjectService.java index 4bb58d2e..5d10d7fe 100644 --- a/src/services/object/ObjectService.java +++ b/src/services/object/ObjectService.java @@ -23,7 +23,6 @@ package services.object; import java.io.FileNotFoundException; import java.io.IOException; -import java.lang.reflect.Method; import java.nio.ByteOrder; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -576,15 +575,6 @@ public class ObjectService implements INetworkDispatch { while (cursor.hasNext()) { SWGObject object = (SWGObject) cursor.next(); -<<<<<<< HEAD - - if (object == null) { - continue; - } - - if (object.getCustomName() != null && customName.length() > 0 && object.getCustomName().startsWith(customName)) { - return object; -======= if (object == null) { continue; @@ -592,7 +582,6 @@ public class ObjectService implements INetworkDispatch { if (object.getCustomName() != null && customName.length() > 0 && object.getCustomName().startsWith(customName)) { return object; ->>>>>>> origin/master } } diff --git a/src/services/spawn/DynamicSpawnArea.java b/src/services/spawn/DynamicSpawnArea.java index 0f2499aa..76078c99 100644 --- a/src/services/spawn/DynamicSpawnArea.java +++ b/src/services/spawn/DynamicSpawnArea.java @@ -65,12 +65,16 @@ public class DynamicSpawnArea extends SpawnArea { creature.getEventBus().subscribe(this); // spawn some creatures - if (spawnGroup.getGroupMemberNumber()==-1){ + if (spawnGroup.getGroupMembersNumber()==0){ for(int i = 0; i < 5; i++) spawnCreature(creature); } else { - for(int i = 0; i < spawnGroup.getGroupMemberNumber(); i++) // A group with a specified number of members - spawnCreatureMember(creature, i); + Vector groupMembers = new Vector(); + for(int i = 0; i < spawnGroup.getGroupMembersNumber(); i++) {// A group with a specified number of members + CreatureObject spawnedCreature = spawnCreatureMember(creature, groupMembers, i); + if (spawnedCreature!=null) + groupMembers.add(spawnedCreature); + } } } @@ -106,8 +110,18 @@ public class DynamicSpawnArea extends SpawnArea { if(creature.getSlottedObject("ghost") == null) return; - if(new Random().nextFloat() <= 0.25) - spawnCreature(creature); + if (spawnGroup.getGroupMembersNumber()==0){ + if(new Random().nextFloat() <= 0.25) + spawnCreature(creature); + } else + { + Vector groupMembers = new Vector(); + for(int i = 0; i < spawnGroup.getGroupMembersNumber(); i++) {// A group with a specified number of members + CreatureObject spawnedCreature = spawnCreatureMember(creature, groupMembers, i); + if (spawnedCreature!=null) + groupMembers.add(spawnedCreature); + } + } } @@ -167,8 +181,8 @@ public class DynamicSpawnArea extends SpawnArea { } - private void spawnCreatureMember(CreatureObject creature, int spawnIndex) { - + private CreatureObject spawnCreatureMember(CreatureObject creature, Vector groupMembers, int spawnIndex) { + System.out.println("spawnCreatureMember"); NGECore core = NGECore.getInstance(); Iterator it = mobiles.iterator(); @@ -177,21 +191,29 @@ public class DynamicSpawnArea extends SpawnArea { it.remove(); }); - if(mobiles.size() >= spawnGroup.getMaxSpawns()) - return; - - short memberCL = (spawnGroup.getMembersCL().get(spawnIndex)).shortValue(); +// if(mobiles.size() >= spawnGroup.getMaxSpawns()) +// return; boolean foundPos = false; int tries = 0; Point3D randomPosition = null; + String template = spawnGroup.getMobiles().get(spawnIndex); + MobileTemplate mobileTemplate = NGECore.getInstance().spawnService.getMobileTemplate(template); + if (mobileTemplate==null) + return null; - while(!foundPos && ++tries < 10) { - randomPosition = getRandomPosition(creature.getWorldPosition(), spawnGroup.getMinSpawnDistance(), spawnGroup.getMaxSpawnDistance()); + for (CreatureObject cr : groupMembers){ + System.out.println("cr " + cr.getTemplate()); + } + + + while(!foundPos && ++tries < 30) { + + randomPosition = getRandomPosition(creature.getWorldPosition(), mobileTemplate.getMinSpawnDistance(), mobileTemplate.getMaxSpawnDistance()); if(randomPosition == null) - return; + return null; TerrainService terrainSvc = core.terrainService; @@ -199,10 +221,16 @@ public class DynamicSpawnArea extends SpawnArea { randomPosition.y = height; if (mobiles.size()>0){ // Fix, mobiles must be filled first, before doing this check + boolean minDistViolated = false; for(CreatureObject mobile : mobiles) { - if(mobile.getWorldPosition().getDistance(randomPosition) > spawnGroup.getMinSpawnDistance()) - foundPos = true; + if(mobile.getWorldPosition().getDistance(randomPosition) < spawnGroup.getMinSpawnDistance() && ! groupMembers.contains(mobile)){ + minDistViolated = true; + } } + if (minDistViolated) + foundPos = false; + else + foundPos = true; } else {foundPos = true;} if(!terrainSvc.canBuildAtPosition(creature, randomPosition.x, randomPosition.z)) @@ -211,13 +239,15 @@ public class DynamicSpawnArea extends SpawnArea { } if(!foundPos) - return; + return null; - String mobileTemplate = spawnGroup.getMobiles().get(spawnIndex); - CreatureObject spawnedCreature = core.spawnService.spawnCreature(mobileTemplate, getPlanet().getName(), 0, randomPosition.x, randomPosition.y, randomPosition.z, memberCL); + + CreatureObject spawnedCreature = core.spawnService.spawnCreature(template, getPlanet().getName(), 0, randomPosition.x, randomPosition.y, randomPosition.z); if(spawnedCreature != null){ mobiles.add(spawnedCreature); } + + return spawnedCreature; } diff --git a/src/services/spawn/DynamicSpawnGroup.java b/src/services/spawn/DynamicSpawnGroup.java index db5acc5d..da3df12e 100644 --- a/src/services/spawn/DynamicSpawnGroup.java +++ b/src/services/spawn/DynamicSpawnGroup.java @@ -29,9 +29,7 @@ public class DynamicSpawnGroup { private String name; private int maxSpawns; private int minSpawnDistance; - private int maxSpawnDistance; - private int groupMemberNumber = -1; - private Vector membersCL; + private int groupMembersNumber = -1; public Vector getMobiles() { return mobiles; @@ -65,28 +63,12 @@ public class DynamicSpawnGroup { this.minSpawnDistance = minSpawnDistance; } - public int getGroupMemberNumber() { - return groupMemberNumber; + public int getGroupMembersNumber() { + return groupMembersNumber; } - public void setGroupMemberNumber(int groupMemberNumber) { - this.groupMemberNumber = groupMemberNumber; - } - - public int getMaxSpawnDistance() { - return maxSpawnDistance; - } - - public void setMaxSpawnDistance(int maxSpawnDistance) { - this.maxSpawnDistance = maxSpawnDistance; - } - - public Vector getMembersCL() { - return membersCL; - } - - public void setMembersCL(Vector membersCL) { - this.membersCL = membersCL; + public void setGroupMembersNumber(int groupMembersNumber) { + this.groupMembersNumber = groupMembersNumber; } } diff --git a/src/services/spawn/MobileTemplate.java b/src/services/spawn/MobileTemplate.java index 92f19f75..7f02ff25 100644 --- a/src/services/spawn/MobileTemplate.java +++ b/src/services/spawn/MobileTemplate.java @@ -32,6 +32,8 @@ public class MobileTemplate { private int optionBitmask = Options.ATTACKABLE; private int pvpBitmask = PvpStatus.Attackable; private short level; + private short minLevel; + private short maxLevel; private Vector attacks; private String defaultAttack; private int minDamage = 0; @@ -46,6 +48,9 @@ public class MobileTemplate { private int attackRange; private Vector weaponTemplates = new Vector(); private Vector weaponTemplateVector = new Vector(); + private int minSpawnDistance = 0; + private int maxSpawnDistance = 0; + private boolean deathblow = false; public Vector getTemplates() { return templates; @@ -190,4 +195,44 @@ public class MobileTemplate { public void setWeaponTemplateVector(Vector weaponTemplateVector) { this.weaponTemplateVector = weaponTemplateVector; } + + public int getMinSpawnDistance() { + return minSpawnDistance; + } + + public void setMinSpawnDistance(int minSpawnDistance) { + this.minSpawnDistance = minSpawnDistance; + } + + public int getMaxSpawnDistance() { + return maxSpawnDistance; + } + + public void setMaxSpawnDistance(int maxSpawnDistance) { + this.maxSpawnDistance = maxSpawnDistance; + } + + public short getMinLevel() { + return minLevel; + } + + public void setMinLevel(short minLevel) { + this.minLevel = minLevel; + } + + public short getMaxLevel() { + return maxLevel; + } + + public void setMaxLevel(short maxLevel) { + this.maxLevel = maxLevel; + } + + public boolean isDeathblow() { + return deathblow; + } + + public void setDeathblow(boolean deathblow) { + this.deathblow = deathblow; + } } diff --git a/src/services/spawn/SpawnService.java b/src/services/spawn/SpawnService.java index 07564577..89d0a8c0 100644 --- a/src/services/spawn/SpawnService.java +++ b/src/services/spawn/SpawnService.java @@ -107,10 +107,19 @@ public class SpawnService { creature.setHeight(mobileTemplate.getScale()); int difficulty = mobileTemplate.getDifficulty(); creature.setDifficulty((byte) difficulty); + if(level != -1) creature.setLevel(level); - else - creature.setLevel(mobileTemplate.getLevel()); + else { + creature.setLevel(mobileTemplate.getLevel()); + level = mobileTemplate.getLevel(); + } + + if (mobileTemplate.getMinLevel()!=0 && mobileTemplate.getMaxLevel()!=0){ + level = (short) (mobileTemplate.getMinLevel() + (new Random().nextInt(mobileTemplate.getMaxLevel()-mobileTemplate.getMinLevel()))); + creature.setLevel(level); + } + //WeaponObject defaultWeapon = (mobileTemplate.getWeaponTemplates().size() > 0) ? (WeaponObject) core.objectService.createObject(mobileTemplate.getWeaponTemplates().get(new Random().nextInt(mobileTemplate.getWeaponTemplates().size())), creature.getPlanet()) : (WeaponObject) core.objectService.createObject("object/weapon/creature/shared_creature_default_weapon.iff", creature.getPlanet()); @@ -172,6 +181,7 @@ public class SpawnService { creature.setMaxAction((int) (400 + level * 134)); creature.setAction((int) (400 + level * 134)); } else { + System.out.println("HERE"); creature.setMaxHealth(customHealth); creature.setHealth(customHealth); creature.setMaxAction((int) (level * 128)); @@ -368,6 +378,12 @@ public class SpawnService { core.simulationService.addCollidable(collidableCircle, x, z); } - + public Map getMobileTemplates() { + return mobileTemplates; + } + + public MobileTemplate getMobileTemplate(String template) { + return mobileTemplates.get(template); + } }