diff --git a/.classpath b/.classpath index 6da71800..6ea45b44 100644 --- a/.classpath +++ b/.classpath @@ -1,7 +1,6 @@ - @@ -31,5 +30,6 @@ + diff --git a/.gitignore b/.gitignore index e9956083..63147709 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,19 @@ footprint/ interiorlayout/ clientdata/quest/ +# PSWG Object Databases +odb/building/je.info.* +odb/creature/je.info.* +odb/doids/je.info.* +odb/guild/je.info.* +odb/mails/je.info.* +odb/oids/je.info.* +odb/chatRooms/je.info.* +odb/resourcehistory/je.info.* +odb/resourceroots/je.info.* +odb/resources/je.info.* +odb/auction/je.info.* + # External tool builders .externalToolBuilders/ @@ -199,4 +212,4 @@ pip-log.txt ############# ## PyCharm ############# -.idea \ No newline at end of file +.idea diff --git a/README.md b/README.md index 24abfa1e..ff4c8504 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ The Engine(NGEngine) is a closed source library and is only licensed for use wit Requirements for Building the Core: ======== -- JDK 7 -- An IDE like Eclipse Juno +- JDK 8 +- A Java 8 compatible IDE like Eclipse Kepler (https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler) - A valid Star Wars Galaxies Installation with the final patch - Postgresql server (www.postgresql.org) - TRE Explorer(http://forum.modsource.org/index.php?PHPSESSID=bf02fd8244123807f4716c1686abb59f&action=dlattach;topic=33.0;attach=49) diff --git a/nge.cfg b/nge.cfg index 328f9018..036d6202 100644 --- a/nge.cfg +++ b/nge.cfg @@ -11,3 +11,6 @@ DB.URL=localhost DB.PASS=nge GALAXY_ID=2 GALAXY_NAME=Local Connection +XPMULTIPLIER=1.0 +MAXNUMBEROFCHARACTERS=2 +MOTD=Welcome to PSWG Test Center! \ No newline at end of file diff --git a/ngengine_public.jar b/ngengine_public.jar index ebf3d16a..8dbc2777 100644 Binary files a/ngengine_public.jar and b/ngengine_public.jar differ diff --git a/odb/WipeAllOdbFolders_ONLY_EXECUTE_IN_ODB_FOLDER.bat b/odb/WipeAllOdbFolders_ONLY_EXECUTE_IN_ODB_FOLDER.bat new file mode 100644 index 00000000..ebbd9e09 --- /dev/null +++ b/odb/WipeAllOdbFolders_ONLY_EXECUTE_IN_ODB_FOLDER.bat @@ -0,0 +1,19 @@ +:: Odb file wiper by Charon +:: Use at your own risk! +:: Do NOT execute outside the odb folder +:: because it deletes files in subfolders! + +@echo off +cls +setlocal EnableDelayedExpansion + +set /a count=0 + +for /d %%d in (*) do ( + set /a count+=1 + @echo !count!. %%d + del "%%d\*.*" /s/q + echo. 2>%%d\placeholder.txt +) +setlocal DisableDelayedExpansion + diff --git a/odb/creature/je.info.0.1 b/odb/auction/placeholder.txt similarity index 100% rename from odb/creature/je.info.0.1 rename to odb/auction/placeholder.txt diff --git a/odb/chatRooms/placeholder.txt b/odb/chatRooms/placeholder.txt new file mode 100644 index 00000000..e69de29b diff --git a/odb/doids/placeholder.txt b/odb/doids/placeholder.txt new file mode 100644 index 00000000..e69de29b diff --git a/odb/oids/placeholder.txt b/odb/oids/placeholder.txt new file mode 100644 index 00000000..e69de29b diff --git a/odb/resourcehistory/placeholder.txt b/odb/resourcehistory/placeholder.txt new file mode 100644 index 00000000..e69de29b diff --git a/odb/resourceroots/placeholder.txt b/odb/resourceroots/placeholder.txt new file mode 100644 index 00000000..e69de29b diff --git a/odb/resources/placeholder.txt b/odb/resources/placeholder.txt new file mode 100644 index 00000000..e69de29b diff --git a/options.cfg b/options.cfg index 4f6d91ad..5a3a7f8e 100644 --- a/options.cfg +++ b/options.cfg @@ -1,2 +1,3 @@ LOAD.SNAPSHOT_OBJECTS=1 -LOAD.BUILDOUT_OBJECTS=1 \ No newline at end of file +LOAD.BUILDOUT_OBJECTS=1 +LOAD.RESOURCE.SYSTEM=1 \ No newline at end of file diff --git a/scripts/buffs/armor_break.py b/scripts/buffs/armor_break.py index 288a2db0..f0a2f58e 100644 --- a/scripts/buffs/armor_break.py +++ b/scripts/buffs/armor_break.py @@ -1,12 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.addSkillMod('expertise_innate_reduction_all_player', 6 * buff.getStacks()) actor.addSkillMod('expertise_innate_reduction_all_mob', 600 * buff.getStacks()) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.deductSkillMod('expertise_innate_reduction_all_mob', 600 * buff.getStacks()) actor.deductSkillMod('expertise_innate_reduction_all_player', 6 * buff.getStacks()) return - diff --git a/scripts/buffs/bh_armor_sprint_1.py b/scripts/buffs/bh_armor_sprint_1.py index e9637ebd..5f39a64d 100644 --- a/scripts/buffs/bh_armor_sprint_1.py +++ b/scripts/buffs/bh_armor_sprint_1.py @@ -1,12 +1,15 @@ import sys -def setup(core, actor, buff): +def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'movement', 6) core.skillModService.addSkillMod(actor, 'movement_resist_snare', 100) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'movement', 6) core.skillModService.deductSkillMod(actor, 'movement_resist_snare', 100) diff --git a/scripts/buffs/bh_cover_1.py b/scripts/buffs/bh_cover_1.py index b3ca84ce..b68de518 100644 --- a/scripts/buffs/bh_cover_1.py +++ b/scripts/buffs/bh_cover_1.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_damage_all', 10) core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_ranged', 40) core.skillModService.addSkillMod(actor, 'invis', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_damage_all', 10) core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_ranged', 40) core.skillModService.deductSkillMod(actor, 'invis', 1) diff --git a/scripts/buffs/bh_power_sprint.py b/scripts/buffs/bh_power_sprint.py new file mode 100644 index 00000000..e7550d0d --- /dev/null +++ b/scripts/buffs/bh_power_sprint.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 6) + core.skillModService.addSkillMod(actor, 'movement_resist_snare', 100) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 6) + core.skillModService.deductSkillMod(actor, 'movement_resist_snare', 100) + + return \ No newline at end of file diff --git a/scripts/buffs/bh_prescience.py b/scripts/buffs/bh_prescience.py index e09c02e5..c60417a0 100644 --- a/scripts/buffs/bh_prescience.py +++ b/scripts/buffs/bh_prescience.py @@ -2,7 +2,10 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/bh_return_fire_1.py b/scripts/buffs/bh_return_fire_1.py index 7a0f25b4..95612d87 100644 --- a/scripts/buffs/bh_return_fire_1.py +++ b/scripts/buffs/bh_return_fire_1.py @@ -2,11 +2,14 @@ import sys def setup(core, actor, buff): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_bh_return_fire'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_bh_return_fire_1', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_bh_return_fire_1', 1) return \ No newline at end of file diff --git a/scripts/buffs/bh_shields.py b/scripts/buffs/bh_shields.py new file mode 100644 index 00000000..36115d7f --- /dev/null +++ b/scripts/buffs/bh_shields.py @@ -0,0 +1,12 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'combat_divide_damage_taken', 1) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'combat_divide_damage_taken', 1) + return \ No newline at end of file diff --git a/scripts/buffs/bh_shields_charged.py b/scripts/buffs/bh_shields_charged.py new file mode 100644 index 00000000..d66644af --- /dev/null +++ b/scripts/buffs/bh_shields_charged.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'combat_multiply_damage_given', 1) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'combat_multiply_damage_given', 1) + return + \ No newline at end of file diff --git a/scripts/buffs/bleeding.py b/scripts/buffs/bleeding.py index e09c02e5..c60417a0 100644 --- a/scripts/buffs/bleeding.py +++ b/scripts/buffs/bleeding.py @@ -2,7 +2,10 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/buildabuff_inspiration.py b/scripts/buffs/buildabuff_inspiration.py index bfcff248..35a49556 100644 --- a/scripts/buffs/buildabuff_inspiration.py +++ b/scripts/buffs/buildabuff_inspiration.py @@ -2,26 +2,29 @@ from resources.common import BuffBuilder import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): buffWorkshop = actor.getAttachment('buffWorkshop') if buffWorkshop is None: return - buff.setDuration(3600) #1 hour - - for BuffBuilder in buffWorkshop: - core.skillModService.addSkillMod(actor, BuffBuilder.getStatAffects(), BuffBuilder.getTotalAffected()) - print (' gave the skill mod ' + BuffBuilder.getStatAffects() + ' with affect of ' + str(BuffBuilder.getTotalAffected())) - return - + attached = actor.getAttachment('inspireDuration') + + buff.setDuration(float(actor.getAttachment('inspireDuration') * 60)) + + for BuffItem in buffWorkshop: + core.skillModService.addSkillMod(actor, BuffItem.getSkillName(), BuffItem.getAffectAmount()) + return -def removeBuff(core, actor, buff): - for BuffBuilder in actor.getAttachment('buffWorkshop'): - core.skillModService.deductSkillMod(actor, BuffBuilder.getStatAffects(), BuffBuilder.getTotalAffected()) - print ('removed skill mod!') - return - - actor.setAttachment('buffWorkshop', 'none') - return \ No newline at end of file +def remove(core, actor, buff): + if actor.getAttachment('buffWorkshop') is not None: + + for BuffItem in actor.getAttachment('buffWorkshop'): + core.skillModService.deductSkillMod(actor, BuffItem.getSkillName(), BuffItem.getAffectAmount()) + + actor.setAttachment('buffWorkshop', None) + return \ No newline at end of file diff --git a/scripts/buffs/co_base_of_operations.py b/scripts/buffs/co_base_of_operations.py index 894c389c..8c8eb346 100644 --- a/scripts/buffs/co_base_of_operations.py +++ b/scripts/buffs/co_base_of_operations.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_innate_protection_all', 1000) core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_innate_protection_all', 1000) core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 5) return diff --git a/scripts/buffs/co_first_aid_training.py b/scripts/buffs/co_first_aid_training.py index b0ffe0f9..8679678c 100644 --- a/scripts/buffs/co_first_aid_training.py +++ b/scripts/buffs/co_first_aid_training.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_healing_all', 20) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_healing_all', 20) return \ No newline at end of file diff --git a/scripts/buffs/co_position_secured.py b/scripts/buffs/co_position_secured.py index b0b2781c..0885ccd9 100644 --- a/scripts/buffs/co_position_secured.py +++ b/scripts/buffs/co_position_secured.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.setSpeedMultiplierMod(0) @@ -22,7 +25,7 @@ def setup(core, actor, buff): return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierMod(1) diff --git a/scripts/buffs/co_stand_fast.py b/scripts/buffs/co_stand_fast.py index 17563ff9..8f8be535 100644 --- a/scripts/buffs/co_stand_fast.py +++ b/scripts/buffs/co_stand_fast.py @@ -3,7 +3,9 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_co_stand_fast'): buff.setDuration(buff.getDuration() + actor.getSkillMod('expertise_buff_duration_line_co_stand_fast').getBase()) - + return + +def add(core, actor, buff): if actor.getSkillMod('expertise_damage_decrease_percentage'): core.skillModService.addSkillMod(actor, 'damage_decrease_percentage', (60 + actor.getSkillMod('expertise_damage_decrease_percentage').getBase()) / 2) else: @@ -11,7 +13,7 @@ def setup(core, actor, buff): return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): if actor.getSkillMod('expertise_damage_decrease_percentage'): core.skillModService.deductSkillMod(actor, 'damage_decrease_percentage', (60 + actor.getSkillMod('expertise_damage_decrease_percentage').getBase()) / 2) else: diff --git a/scripts/buffs/en_action_regen.py b/scripts/buffs/en_action_regen.py new file mode 100644 index 00000000..850186d0 --- /dev/null +++ b/scripts/buffs/en_action_regen.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_action_weapon_melee', 60) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_action_weapon_melee', 60) + return \ No newline at end of file diff --git a/scripts/buffs/en_debuff_thrill.py b/scripts/buffs/en_debuff_thrill.py new file mode 100644 index 00000000..9a25438b --- /dev/null +++ b/scripts/buffs/en_debuff_thrill.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 2) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 2) + return \ No newline at end of file diff --git a/scripts/buffs/en_debuff_thrill_1.py b/scripts/buffs/en_debuff_thrill_1.py new file mode 100644 index 00000000..cbcb2ac4 --- /dev/null +++ b/scripts/buffs/en_debuff_thrill_1.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 4) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 4) + return \ No newline at end of file diff --git a/scripts/buffs/en_debuff_thrill_2.py b/scripts/buffs/en_debuff_thrill_2.py new file mode 100644 index 00000000..6b887e82 --- /dev/null +++ b/scripts/buffs/en_debuff_thrill_2.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 6) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 6) + return \ No newline at end of file diff --git a/scripts/buffs/en_spiral_kick_snare.py b/scripts/buffs/en_spiral_kick_snare.py new file mode 100644 index 00000000..2ee81fe9 --- /dev/null +++ b/scripts/buffs/en_spiral_kick_snare.py @@ -0,0 +1,12 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) + return + +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/en_sprint.py b/scripts/buffs/en_sprint.py new file mode 100644 index 00000000..288b25b1 --- /dev/null +++ b/scripts/buffs/en_sprint.py @@ -0,0 +1,15 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement_resist_snare', 100) + core.skillModService.addSkillMod(actor, 'movement', 5) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) + core.skillModService.deductSkillMod(actor, 'movement_resist_snare', 100) + return + \ No newline at end of file diff --git a/scripts/buffs/en_sweeping_pirouette_root.py b/scripts/buffs/en_sweeping_pirouette_root.py new file mode 100644 index 00000000..42418564 --- /dev/null +++ b/scripts/buffs/en_sweeping_pirouette_root.py @@ -0,0 +1,12 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 10) + return + +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 10) + return \ No newline at end of file diff --git a/scripts/buffs/en_unhealthy_fixation_debuff.py b/scripts/buffs/en_unhealthy_fixation_debuff.py new file mode 100644 index 00000000..7dfe77af --- /dev/null +++ b/scripts/buffs/en_unhealthy_fixation_debuff.py @@ -0,0 +1,12 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'en_unhealthy_stun', 1) + return + +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'en_unhealthy_stun', 1) + return \ No newline at end of file diff --git a/scripts/buffs/en_void_dance_buff.py b/scripts/buffs/en_void_dance_buff.py new file mode 100644 index 00000000..3197e246 --- /dev/null +++ b/scripts/buffs/en_void_dance_buff.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 60) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 60) + return \ No newline at end of file diff --git a/scripts/buffs/en_void_dance_buff_1.py b/scripts/buffs/en_void_dance_buff_1.py new file mode 100644 index 00000000..6a37025d --- /dev/null +++ b/scripts/buffs/en_void_dance_buff_1.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 65) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 65) + return \ No newline at end of file diff --git a/scripts/buffs/en_void_dance_buff_2.py b/scripts/buffs/en_void_dance_buff_2.py new file mode 100644 index 00000000..bcd31db8 --- /dev/null +++ b/scripts/buffs/en_void_dance_buff_2.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 70) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 70) + return \ No newline at end of file diff --git a/scripts/buffs/en_void_dance_buff_3.py b/scripts/buffs/en_void_dance_buff_3.py new file mode 100644 index 00000000..e2d98d20 --- /dev/null +++ b/scripts/buffs/en_void_dance_buff_3.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 75) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 75) + return \ No newline at end of file diff --git a/scripts/buffs/flawless_bead_1.py b/scripts/buffs/flawless_bead_1.py index 84123a88..9d402987 100644 --- a/scripts/buffs/flawless_bead_1.py +++ b/scripts/buffs/flawless_bead_1.py @@ -2,6 +2,9 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/flawless_bead_2.py b/scripts/buffs/flawless_bead_2.py index 84123a88..9d402987 100644 --- a/scripts/buffs/flawless_bead_2.py +++ b/scripts/buffs/flawless_bead_2.py @@ -2,6 +2,9 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/flawless_bead_3.py b/scripts/buffs/flawless_bead_3.py index 84123a88..9d402987 100644 --- a/scripts/buffs/flawless_bead_3.py +++ b/scripts/buffs/flawless_bead_3.py @@ -2,6 +2,9 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/fs_ae_dm_cc_0.py b/scripts/buffs/fs_ae_dm_cc_0.py index 493481d7..2ee81fe9 100644 --- a/scripts/buffs/fs_ae_dm_cc_0.py +++ b/scripts/buffs/fs_ae_dm_cc_0.py @@ -1,10 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(0.5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_ae_dm_cc_1.py b/scripts/buffs/fs_ae_dm_cc_1.py index 493481d7..2ee81fe9 100644 --- a/scripts/buffs/fs_ae_dm_cc_1.py +++ b/scripts/buffs/fs_ae_dm_cc_1.py @@ -1,10 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(0.5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_ae_dm_cc_2.py b/scripts/buffs/fs_ae_dm_cc_2.py index 493481d7..2ee81fe9 100644 --- a/scripts/buffs/fs_ae_dm_cc_2.py +++ b/scripts/buffs/fs_ae_dm_cc_2.py @@ -1,10 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(0.5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_ae_dm_cc_3.py b/scripts/buffs/fs_ae_dm_cc_3.py index 493481d7..2ee81fe9 100644 --- a/scripts/buffs/fs_ae_dm_cc_3.py +++ b/scripts/buffs/fs_ae_dm_cc_3.py @@ -1,10 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(0.5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_ae_dm_cc_4.py b/scripts/buffs/fs_ae_dm_cc_4.py index 493481d7..2ee81fe9 100644 --- a/scripts/buffs/fs_ae_dm_cc_4.py +++ b/scripts/buffs/fs_ae_dm_cc_4.py @@ -1,10 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(0.5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_ae_dm_cc_5.py b/scripts/buffs/fs_ae_dm_cc_5.py index 493481d7..2ee81fe9 100644 --- a/scripts/buffs/fs_ae_dm_cc_5.py +++ b/scripts/buffs/fs_ae_dm_cc_5.py @@ -1,10 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(0.5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_ae_dm_cc_6.py b/scripts/buffs/fs_ae_dm_cc_6.py index 493481d7..2ee81fe9 100644 --- a/scripts/buffs/fs_ae_dm_cc_6.py +++ b/scripts/buffs/fs_ae_dm_cc_6.py @@ -1,10 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(0.5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_buff_ca_1.py b/scripts/buffs/fs_buff_ca_1.py index 5fb1239f..837e11f7 100644 --- a/scripts/buffs/fs_buff_ca_1.py +++ b/scripts/buffs/fs_buff_ca_1.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.playEffectObject('appearance/pt_sokan_focus.prt', 'fs_buff_ca_1') core.skillModService.addSkillMod(actor, 'expertise_focus', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_focus', 1) return \ No newline at end of file diff --git a/scripts/buffs/fs_buff_def_1_1.py b/scripts/buffs/fs_buff_def_1_1.py index 0d7ad4dd..743dc69b 100644 --- a/scripts/buffs/fs_buff_def_1_1.py +++ b/scripts/buffs/fs_buff_def_1_1.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.playEffectObject('appearance/pt_force_avoid_incapacitation.prt', 'fs_buff_def_1_1') core.skillModService.addSkillMod(actor, 'expertise_stance', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_stance', 1) return \ No newline at end of file diff --git a/scripts/buffs/fs_dm_cc_crit_1.py b/scripts/buffs/fs_dm_cc_crit_1.py index 493481d7..df2109d8 100644 --- a/scripts/buffs/fs_dm_cc_crit_1.py +++ b/scripts/buffs/fs_dm_cc_crit_1.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.setSpeedMultiplierBase(0.5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierBase(1) return \ No newline at end of file diff --git a/scripts/buffs/fs_dm_cc_crit_2.py b/scripts/buffs/fs_dm_cc_crit_2.py index 493481d7..df2109d8 100644 --- a/scripts/buffs/fs_dm_cc_crit_2.py +++ b/scripts/buffs/fs_dm_cc_crit_2.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.setSpeedMultiplierBase(0.5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierBase(1) return \ No newline at end of file diff --git a/scripts/buffs/fs_dm_cc_crit_3.py b/scripts/buffs/fs_dm_cc_crit_3.py index 493481d7..df2109d8 100644 --- a/scripts/buffs/fs_dm_cc_crit_3.py +++ b/scripts/buffs/fs_dm_cc_crit_3.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.setSpeedMultiplierBase(0.5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierBase(1) return \ No newline at end of file diff --git a/scripts/buffs/fs_dm_cc_crit_4.py b/scripts/buffs/fs_dm_cc_crit_4.py index 493481d7..df2109d8 100644 --- a/scripts/buffs/fs_dm_cc_crit_4.py +++ b/scripts/buffs/fs_dm_cc_crit_4.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.setSpeedMultiplierBase(0.5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierBase(1) return \ No newline at end of file diff --git a/scripts/buffs/fs_dm_cc_crit_5.py b/scripts/buffs/fs_dm_cc_crit_5.py index 493481d7..df2109d8 100644 --- a/scripts/buffs/fs_dm_cc_crit_5.py +++ b/scripts/buffs/fs_dm_cc_crit_5.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.setSpeedMultiplierBase(0.5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierBase(1) return \ No newline at end of file diff --git a/scripts/buffs/fs_force_run.py b/scripts/buffs/fs_force_run.py index f691d76f..714e8198 100644 --- a/scripts/buffs/fs_force_run.py +++ b/scripts/buffs/fs_force_run.py @@ -1,7 +1,10 @@ import sys -def setup(core, actor, buff): +def setup(core, actor, buff): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_fs_force_run'))) + return + +def add(core, actor, buff): actor.playEffectObject('clienteffect/pl_force_run.cef', 'fs_force_run') actor.playEffectObject('appearance/pt_force_speed.prt', 'fs_force_run') actor.setSpeedMultiplierBase(actor.getSpeedMultiplierBase() + 2.5 + (2.5 * (actor.getSkillModBase('expertise_movement_buff_fs_force_run')) / 100)) @@ -14,7 +17,7 @@ def setup(core, actor, buff): return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.stopEffectObject('fs_force_run') actor.setSpeedMultiplierBase(actor.getSpeedMultiplierBase() - 2.5 - (2.5 * (actor.getSkillModBase('expertise_movement_buff_fs_force_run')) / 100)) core.skillModService.deductSkillMod(actor, 'slope_move', 5) diff --git a/scripts/buffs/fs_force_throw.py b/scripts/buffs/fs_force_throw.py index f20ef882..2ee81fe9 100644 --- a/scripts/buffs/fs_force_throw.py +++ b/scripts/buffs/fs_force_throw.py @@ -1,11 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', float(-0.5)) - + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', float(-0.5)) - return - \ No newline at end of file +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) + return \ No newline at end of file diff --git a/scripts/buffs/fs_saber_reflect.py b/scripts/buffs/fs_saber_reflect.py index cba5694e..815b8b7d 100644 --- a/scripts/buffs/fs_saber_reflect.py +++ b/scripts/buffs/fs_saber_reflect.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_saber_block', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_saber_block', 1) return \ No newline at end of file diff --git a/scripts/buffs/invis_fs_buff_invis_1.py b/scripts/buffs/invis_fs_buff_invis_1.py index e09c02e5..c60417a0 100644 --- a/scripts/buffs/invis_fs_buff_invis_1.py +++ b/scripts/buffs/invis_fs_buff_invis_1.py @@ -2,7 +2,10 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/me_buff_action_1.py b/scripts/buffs/me_buff_action_1.py index d5cff5fb..7cd3cf3c 100644 --- a/scripts/buffs/me_buff_action_1.py +++ b/scripts/buffs/me_buff_action_1.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stamina_modified', 35) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stamina_modified', 35) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_action_2.py b/scripts/buffs/me_buff_action_2.py index 9848727e..0d1a1718 100644 --- a/scripts/buffs/me_buff_action_2.py +++ b/scripts/buffs/me_buff_action_2.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stamina_modified', 80) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stamina_modified', 80) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_action_3.py b/scripts/buffs/me_buff_action_3.py index f59277c9..625808f2 100644 --- a/scripts/buffs/me_buff_action_3.py +++ b/scripts/buffs/me_buff_action_3.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stamina_modified', 250) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stamina_modified', 250) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_agility_1.py b/scripts/buffs/me_buff_agility_1.py index 10d3a0a6..cc0368a7 100644 --- a/scripts/buffs/me_buff_agility_1.py +++ b/scripts/buffs/me_buff_agility_1.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'agility_modified', 15) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'agility_modified', 15) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_agility_2.py b/scripts/buffs/me_buff_agility_2.py index 8130ad0f..47ae13c6 100644 --- a/scripts/buffs/me_buff_agility_2.py +++ b/scripts/buffs/me_buff_agility_2.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'agility_modified', 45) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'agility_modified', 45) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_agility_3.py b/scripts/buffs/me_buff_agility_3.py index a9727dc2..83686069 100644 --- a/scripts/buffs/me_buff_agility_3.py +++ b/scripts/buffs/me_buff_agility_3.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'agility_modified', 80) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'agility_modified', 80) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_health.py b/scripts/buffs/me_buff_health.py index 70dd9938..f5396585 100644 --- a/scripts/buffs/me_buff_health.py +++ b/scripts/buffs/me_buff_health.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'constitution_modified', 80) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'constitution_modified', 80) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_health_0.py b/scripts/buffs/me_buff_health_0.py index b20b680b..513dabb4 100644 --- a/scripts/buffs/me_buff_health_0.py +++ b/scripts/buffs/me_buff_health_0.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'constitution_modified', 35) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'constitution_modified', 35) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_health_2.py b/scripts/buffs/me_buff_health_2.py index fc52c4a3..4c0a9502 100644 --- a/scripts/buffs/me_buff_health_2.py +++ b/scripts/buffs/me_buff_health_2.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'constitution_modified', 250) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'constitution_modified', 250) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_melee_gb_1.py b/scripts/buffs/me_buff_melee_gb_1.py index f052d7b9..9819dcb3 100644 --- a/scripts/buffs/me_buff_melee_gb_1.py +++ b/scripts/buffs/me_buff_melee_gb_1.py @@ -3,11 +3,14 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'display_only_block', 1000) core.skillModService.addSkillMod(actor, 'combat_block_value', 200) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'display_only_block', 1000) core.skillModService.deductSkillMod(actor, 'combat_block_value', 200) return diff --git a/scripts/buffs/me_buff_precision_1.py b/scripts/buffs/me_buff_precision_1.py index 3006e18e..6b24b151 100644 --- a/scripts/buffs/me_buff_precision_1.py +++ b/scripts/buffs/me_buff_precision_1.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'precision_modified', 15) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'precision_modified', 15) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_precision_2.py b/scripts/buffs/me_buff_precision_2.py index fbf6d978..b3c2aab5 100644 --- a/scripts/buffs/me_buff_precision_2.py +++ b/scripts/buffs/me_buff_precision_2.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'precision_modified', 45) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'precision_modified', 45) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_precision_3.py b/scripts/buffs/me_buff_precision_3.py index f6490d10..40899ffb 100644 --- a/scripts/buffs/me_buff_precision_3.py +++ b/scripts/buffs/me_buff_precision_3.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'precision_modified', 80) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'precision_modified', 80) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_ranged_gb_1.py b/scripts/buffs/me_buff_ranged_gb_1.py index d2476abe..ce5770a8 100644 --- a/scripts/buffs/me_buff_ranged_gb_1.py +++ b/scripts/buffs/me_buff_ranged_gb_1.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'display_only_dodge', 500) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'display_only_dodge', 500) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_strength_1.py b/scripts/buffs/me_buff_strength_1.py index 462d84a5..fa50d073 100644 --- a/scripts/buffs/me_buff_strength_1.py +++ b/scripts/buffs/me_buff_strength_1.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'strength_modified', 15) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'strength_modified', 15) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_strength_2.py b/scripts/buffs/me_buff_strength_2.py index 85f6d038..5f8f02d2 100644 --- a/scripts/buffs/me_buff_strength_2.py +++ b/scripts/buffs/me_buff_strength_2.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'strength_modified', 45) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'strength_modified', 45) return \ No newline at end of file diff --git a/scripts/buffs/me_buff_strength_3.py b/scripts/buffs/me_buff_strength_3.py index 6fa59e33..fcba94f9 100644 --- a/scripts/buffs/me_buff_strength_3.py +++ b/scripts/buffs/me_buff_strength_3.py @@ -3,10 +3,13 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_buff_duration_line_me_enhance'): buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_me_enhance'))) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'strength_modified', 80) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'strength_modified', 80) return \ No newline at end of file diff --git a/scripts/buffs/me_burst_1.py b/scripts/buffs/me_burst_1.py index 15d5cd85..82f6065b 100644 --- a/scripts/buffs/me_burst_1.py +++ b/scripts/buffs/me_burst_1.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 3) core.skillModService.addSkillMod(actor, 'strikethrough_vulnerable', 5) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 3) core.skillModService.deductSkillMod(actor, 'strikethrough_vulnerable', 5) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 5) diff --git a/scripts/buffs/me_cranial_smash_1.py b/scripts/buffs/me_cranial_smash_1.py index f63ec968..3daa6068 100644 --- a/scripts/buffs/me_cranial_smash_1.py +++ b/scripts/buffs/me_cranial_smash_1.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_divide_damage_dealt', 10) core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.addSkillMod(actor, 'movement', 5) core.skillModService.deductSkillMod(actor, 'combat_divide_damage_dealt', 10) return diff --git a/scripts/buffs/me_cure_affliction_1.py b/scripts/buffs/me_cure_affliction_1.py index f5e1ce07..b071a958 100644 --- a/scripts/buffs/me_cure_affliction_1.py +++ b/scripts/buffs/me_cure_affliction_1.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_reduction_all', 5) core.skillModService.addSkillMod(actor, 'dot_resist_all', 100) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_reduction_all', 5) core.skillModService.deductSkillMod(actor, 'dot_resist_all', 100) return diff --git a/scripts/buffs/me_doom.py b/scripts/buffs/me_doom.py index d4f40162..fe90deb5 100644 --- a/scripts/buffs/me_doom.py +++ b/scripts/buffs/me_doom.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'me_doom', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'me_doom', 1) return \ No newline at end of file diff --git a/scripts/buffs/me_electrolyte_drain_1.py b/scripts/buffs/me_electrolyte_drain_1.py index 82a33b29..2ee81fe9 100644 --- a/scripts/buffs/me_electrolyte_drain_1.py +++ b/scripts/buffs/me_electrolyte_drain_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/me_evasion_1.py b/scripts/buffs/me_evasion_1.py index 59984429..723b5ad5 100644 --- a/scripts/buffs/me_evasion_1.py +++ b/scripts/buffs/me_evasion_1.py @@ -1,12 +1,17 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 35) core.skillModService.addSkillMod(actor, 'display_only_evasion', 5000) core.skillModService.addSkillMod(actor, 'combat_evasion_value', 50) + + core.combatService.endCombat(actor) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 35) core.skillModService.deductSkillMod(actor, 'display_only_evasion', 5000) core.skillModService.deductSkillMod(actor, 'combat_evasion_value', 50) diff --git a/scripts/buffs/me_rheumatic_calamity_1.py b/scripts/buffs/me_rheumatic_calamity_1.py index 2884acd8..8870a12b 100644 --- a/scripts/buffs/me_rheumatic_calamity_1.py +++ b/scripts/buffs/me_rheumatic_calamity_1.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.deductSkillMod(actor, 'action_burn', 65) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'action_burn', 65) return \ No newline at end of file diff --git a/scripts/buffs/me_serotonin_boost_1.py b/scripts/buffs/me_serotonin_boost_1.py index 5eb23142..2c931a78 100644 --- a/scripts/buffs/me_serotonin_boost_1.py +++ b/scripts/buffs/me_serotonin_boost_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'debuff_purge', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'debuff_purge', 1) return \ No newline at end of file diff --git a/scripts/buffs/me_serotonin_purge_1.py b/scripts/buffs/me_serotonin_purge_1.py index 8b288359..c5540781 100644 --- a/scripts/buffs/me_serotonin_purge_1.py +++ b/scripts/buffs/me_serotonin_purge_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'buff_purge', 1) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'buff_purge', 1) return \ No newline at end of file diff --git a/scripts/buffs/me_stasis_1.py b/scripts/buffs/me_stasis_1.py index 1539e280..7d4b7fe5 100644 --- a/scripts/buffs/me_stasis_1.py +++ b/scripts/buffs/me_stasis_1.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.playEffectObject('clienteffect/medic_stasis.cef', 'me_stasis_1') actor.setSpeedMultiplierBase(0.2) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierBase(1) return \ No newline at end of file diff --git a/scripts/buffs/me_stasis_self_1.py b/scripts/buffs/me_stasis_self_1.py index 6341cb4c..cfb0b3f3 100644 --- a/scripts/buffs/me_stasis_self_1.py +++ b/scripts/buffs/me_stasis_self_1.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): actor.playEffectObject('clienteffect/medic_stasis.cef', 'me_stasis_self_1') actor.setSpeedMultiplierBase(0.2) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): actor.setSpeedMultiplierBase(1) return \ No newline at end of file diff --git a/scripts/buffs/me_thyroid_rupture_1.py b/scripts/buffs/me_thyroid_rupture_1.py index 03b1fba8..fcafd14c 100644 --- a/scripts/buffs/me_thyroid_rupture_1.py +++ b/scripts/buffs/me_thyroid_rupture_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_divide_damage_dealt', 25) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_divide_damage_dealt', 25) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_1.py b/scripts/buffs/of_adv_paint_debuff_1.py index 7f6894de..54bbaa4e 100644 --- a/scripts/buffs/of_adv_paint_debuff_1.py +++ b/scripts/buffs/of_adv_paint_debuff_1.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 3) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 3) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_2.py b/scripts/buffs/of_adv_paint_debuff_2.py index 92f239c0..2a7c28ce 100644 --- a/scripts/buffs/of_adv_paint_debuff_2.py +++ b/scripts/buffs/of_adv_paint_debuff_2.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 4) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 4) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_3.py b/scripts/buffs/of_adv_paint_debuff_3.py index 58fe704f..18dc8a8c 100644 --- a/scripts/buffs/of_adv_paint_debuff_3.py +++ b/scripts/buffs/of_adv_paint_debuff_3.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_4.py b/scripts/buffs/of_adv_paint_debuff_4.py index f41ae124..ec98f8ea 100644 --- a/scripts/buffs/of_adv_paint_debuff_4.py +++ b/scripts/buffs/of_adv_paint_debuff_4.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 6) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 6) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_5.py b/scripts/buffs/of_adv_paint_debuff_5.py index d31be060..e8fc48e0 100644 --- a/scripts/buffs/of_adv_paint_debuff_5.py +++ b/scripts/buffs/of_adv_paint_debuff_5.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 7) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 7) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_6.py b/scripts/buffs/of_adv_paint_debuff_6.py index 84ffe9ed..739acd40 100644 --- a/scripts/buffs/of_adv_paint_debuff_6.py +++ b/scripts/buffs/of_adv_paint_debuff_6.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 8) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 8) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_7.py b/scripts/buffs/of_adv_paint_debuff_7.py index 231f4a1b..32276a5f 100644 --- a/scripts/buffs/of_adv_paint_debuff_7.py +++ b/scripts/buffs/of_adv_paint_debuff_7.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 9) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 9) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_debuff_8.py b/scripts/buffs/of_adv_paint_debuff_8.py index 65e1c826..7af4032c 100644 --- a/scripts/buffs/of_adv_paint_debuff_8.py +++ b/scripts/buffs/of_adv_paint_debuff_8.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'critical_damage_vulnerability', 10) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'critical_damage_vulnerability', 10) return \ No newline at end of file diff --git a/scripts/buffs/of_adv_paint_expose_1.py b/scripts/buffs/of_adv_paint_expose_1.py index e3583535..cf3db901 100644 --- a/scripts/buffs/of_adv_paint_expose_1.py +++ b/scripts/buffs/of_adv_paint_expose_1.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 15) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 3) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 3) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 15) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 3) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 3) diff --git a/scripts/buffs/of_adv_paint_expose_2.py b/scripts/buffs/of_adv_paint_expose_2.py index 07ed0966..cb86a0d8 100644 --- a/scripts/buffs/of_adv_paint_expose_2.py +++ b/scripts/buffs/of_adv_paint_expose_2.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 20) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 4) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 4) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 20) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 4) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 4) diff --git a/scripts/buffs/of_adv_paint_expose_3.py b/scripts/buffs/of_adv_paint_expose_3.py index 4ab6e431..7a7d18af 100644 --- a/scripts/buffs/of_adv_paint_expose_3.py +++ b/scripts/buffs/of_adv_paint_expose_3.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 25) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 5) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 25) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 5) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 5) diff --git a/scripts/buffs/of_adv_paint_expose_4.py b/scripts/buffs/of_adv_paint_expose_4.py index df8fae5c..3716ee92 100644 --- a/scripts/buffs/of_adv_paint_expose_4.py +++ b/scripts/buffs/of_adv_paint_expose_4.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 30) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 6) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 6) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 30) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 6) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 6) diff --git a/scripts/buffs/of_adv_paint_expose_5.py b/scripts/buffs/of_adv_paint_expose_5.py index d22f46f0..210f262d 100644 --- a/scripts/buffs/of_adv_paint_expose_5.py +++ b/scripts/buffs/of_adv_paint_expose_5.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 35) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 7) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 7) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 35) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 7) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 7) diff --git a/scripts/buffs/of_adv_paint_expose_6.py b/scripts/buffs/of_adv_paint_expose_6.py index 4e3af368..d58904ce 100644 --- a/scripts/buffs/of_adv_paint_expose_6.py +++ b/scripts/buffs/of_adv_paint_expose_6.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 40) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 8) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 8) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 40) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 8) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 8) diff --git a/scripts/buffs/of_adv_paint_expose_7.py b/scripts/buffs/of_adv_paint_expose_7.py index 46e42ba4..c83c4950 100644 --- a/scripts/buffs/of_adv_paint_expose_7.py +++ b/scripts/buffs/of_adv_paint_expose_7.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 45) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 9) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 9) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 45) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 9) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 9) diff --git a/scripts/buffs/of_adv_paint_expose_8.py b/scripts/buffs/of_adv_paint_expose_8.py index ff43fe6c..38a00bf2 100644 --- a/scripts/buffs/of_adv_paint_expose_8.py +++ b/scripts/buffs/of_adv_paint_expose_8.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stealth_divisor', 50) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 10) core.skillModService.addSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 10) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stealth_divisor', 50) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_buff_def', 10) core.skillModService.deductSkillMod(actor, 'expertise_damage_line_vulnerability_of_dm', 10) diff --git a/scripts/buffs/of_ae_dm_cc_1.py b/scripts/buffs/of_ae_dm_cc_1.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_ae_dm_cc_1.py +++ b/scripts/buffs/of_ae_dm_cc_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_ae_dm_cc_2.py b/scripts/buffs/of_ae_dm_cc_2.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_ae_dm_cc_2.py +++ b/scripts/buffs/of_ae_dm_cc_2.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_ae_dm_cc_3.py b/scripts/buffs/of_ae_dm_cc_3.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_ae_dm_cc_3.py +++ b/scripts/buffs/of_ae_dm_cc_3.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_buff_def_1.py b/scripts/buffs/of_buff_def_1.py index dd15adaf..01f17ada 100644 --- a/scripts/buffs/of_buff_def_1.py +++ b/scripts/buffs/of_buff_def_1.py @@ -1,11 +1,17 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 1) core.skillModService.addSkillMod(actor, 'constitution_modified', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 1) core.skillModService.deductSkillMod(actor, 'constitution_modified', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_buff_def_2.py b/scripts/buffs/of_buff_def_2.py index d819404b..7536841f 100644 --- a/scripts/buffs/of_buff_def_2.py +++ b/scripts/buffs/of_buff_def_2.py @@ -1,11 +1,17 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 2) core.skillModService.addSkillMod(actor, 'constitution_modified', 10) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 2) core.skillModService.deductSkillMod(actor, 'constitution_modified', 10) return \ No newline at end of file diff --git a/scripts/buffs/of_buff_def_3.py b/scripts/buffs/of_buff_def_3.py index d18a3633..dd577237 100644 --- a/scripts/buffs/of_buff_def_3.py +++ b/scripts/buffs/of_buff_def_3.py @@ -1,11 +1,17 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 2) core.skillModService.addSkillMod(actor, 'constitution_modified', 20) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 2) core.skillModService.deductSkillMod(actor, 'constitution_modified', 20) return \ No newline at end of file diff --git a/scripts/buffs/of_buff_def_4.py b/scripts/buffs/of_buff_def_4.py index b115ce6b..6a650b41 100644 --- a/scripts/buffs/of_buff_def_4.py +++ b/scripts/buffs/of_buff_def_4.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 2) core.skillModService.addSkillMod(actor, 'constitution_modified', 20) core.skillModService.addSkillMod(actor, 'combat_critical_hit_reduction', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 2) core.skillModService.deductSkillMod(actor, 'constitution_modified', 20) core.skillModService.deductSkillMod(actor, 'combat_critical_hit_reduction', 5) diff --git a/scripts/buffs/of_buff_def_5.py b/scripts/buffs/of_buff_def_5.py index 5c6ff8eb..0dfd361a 100644 --- a/scripts/buffs/of_buff_def_5.py +++ b/scripts/buffs/of_buff_def_5.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 3) core.skillModService.addSkillMod(actor, 'constitution_modified', 25) core.skillModService.addSkillMod(actor, 'combat_critical_hit_reduction', 6) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 3) core.skillModService.deductSkillMod(actor, 'constitution_modified', 25) core.skillModService.deductSkillMod(actor, 'combat_critical_hit_reduction', 6) diff --git a/scripts/buffs/of_buff_def_6.py b/scripts/buffs/of_buff_def_6.py index b8a4b168..06dac062 100644 --- a/scripts/buffs/of_buff_def_6.py +++ b/scripts/buffs/of_buff_def_6.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 3) core.skillModService.addSkillMod(actor, 'constitution_modified', 35) core.skillModService.addSkillMod(actor, 'combat_critical_hit_reduction', 7) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 3) core.skillModService.deductSkillMod(actor, 'constitution_modified', 35) core.skillModService.deductSkillMod(actor, 'combat_critical_hit_reduction', 7) diff --git a/scripts/buffs/of_buff_def_7.py b/scripts/buffs/of_buff_def_7.py index 77bdd6b4..b18cd574 100644 --- a/scripts/buffs/of_buff_def_7.py +++ b/scripts/buffs/of_buff_def_7.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 4) core.skillModService.addSkillMod(actor, 'constitution_modified', 50) core.skillModService.addSkillMod(actor, 'combat_critical_hit_reduction', 8) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 4) core.skillModService.deductSkillMod(actor, 'constitution_modified', 50) core.skillModService.deductSkillMod(actor, 'combat_critical_hit_reduction', 8) diff --git a/scripts/buffs/of_buff_def_8.py b/scripts/buffs/of_buff_def_8.py index e4b5ba0c..1b16cad6 100644 --- a/scripts/buffs/of_buff_def_8.py +++ b/scripts/buffs/of_buff_def_8.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 4) core.skillModService.addSkillMod(actor, 'constitution_modified', 60) core.skillModService.addSkillMod(actor, 'combat_critical_hit_reduction', 9) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 4) core.skillModService.deductSkillMod(actor, 'constitution_modified', 60) core.skillModService.deductSkillMod(actor, 'combat_critical_hit_reduction', 9) diff --git a/scripts/buffs/of_buff_def_9.py b/scripts/buffs/of_buff_def_9.py index 6f5e35e7..ac342f70 100644 --- a/scripts/buffs/of_buff_def_9.py +++ b/scripts/buffs/of_buff_def_9.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 5) core.skillModService.addSkillMod(actor, 'constitution_modified', 70) core.skillModService.addSkillMod(actor, 'combat_critical_hit_reduction', 10) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 5) core.skillModService.deductSkillMod(actor, 'constitution_modified', 70) core.skillModService.deductSkillMod(actor, 'combat_critical_hit_reduction', 10) diff --git a/scripts/buffs/of_cc_melee_1.py b/scripts/buffs/of_cc_melee_1.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_cc_melee_1.py +++ b/scripts/buffs/of_cc_melee_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_cc_melee_2.py b/scripts/buffs/of_cc_melee_2.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_cc_melee_2.py +++ b/scripts/buffs/of_cc_melee_2.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_cc_melee_3.py b/scripts/buffs/of_cc_melee_3.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_cc_melee_3.py +++ b/scripts/buffs/of_cc_melee_3.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_cc_melee_4.py b/scripts/buffs/of_cc_melee_4.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_cc_melee_4.py +++ b/scripts/buffs/of_cc_melee_4.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_cc_melee_5.py b/scripts/buffs/of_cc_melee_5.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_cc_melee_5.py +++ b/scripts/buffs/of_cc_melee_5.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_cc_melee_6.py b/scripts/buffs/of_cc_melee_6.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_cc_melee_6.py +++ b/scripts/buffs/of_cc_melee_6.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_cc_melee_7.py b/scripts/buffs/of_cc_melee_7.py index 620bbaaa..2ee81fe9 100644 --- a/scripts/buffs/of_cc_melee_7.py +++ b/scripts/buffs/of_cc_melee_7.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', -5) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 15) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/of_charge_1.py b/scripts/buffs/of_charge_1.py index 1edd38b5..104612e7 100644 --- a/scripts/buffs/of_charge_1.py +++ b/scripts/buffs/of_charge_1.py @@ -1,13 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_buff_duration_line_of_group_buff'): + buff.setDuration(buff.getDuration() + actor.getSkillModBase('expertise_buff_duration_line_of_group_buff')) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_damage_all', 10) core.skillModService.addSkillMod(actor, 'expertise_action_all', 10) core.skillModService.addSkillMod(actor, 'movement_resist_snare', 100) core.skillModService.addSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'movement', 5) core.skillModService.deductSkillMod(actor, 'expertise_damage_all', 10) core.skillModService.deductSkillMod(actor, 'expertise_action_all', 10) diff --git a/scripts/buffs/of_deadeye_debuff.py b/scripts/buffs/of_deadeye_debuff.py index 533e3262..be22ec3e 100644 --- a/scripts/buffs/of_deadeye_debuff.py +++ b/scripts/buffs/of_deadeye_debuff.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'action_burn', 50) core.skillModService.addSkillMod(actor, 'glancing_blow_vulnerable', 30) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'action_burn', 50) core.skillModService.deductSkillMod(actor, 'glancing_blow_vulnerable', 30) return \ No newline at end of file diff --git a/scripts/buffs/of_deb_def_1.py b/scripts/buffs/of_deb_def_1.py index 5a4b5cff..13cdab58 100644 --- a/scripts/buffs/of_deb_def_1.py +++ b/scripts/buffs/of_deb_def_1.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -2) core.skillModService.addSkillMod(actor, 'expertise_parry', -2) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 3) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -2) core.skillModService.deductSkillMod(actor, 'expertise_parry', -2) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 3) diff --git a/scripts/buffs/of_deb_def_2.py b/scripts/buffs/of_deb_def_2.py index 75c97f71..097ffe2b 100644 --- a/scripts/buffs/of_deb_def_2.py +++ b/scripts/buffs/of_deb_def_2.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -3) core.skillModService.addSkillMod(actor, 'expertise_parry', -3) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 4) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -3) core.skillModService.deductSkillMod(actor, 'expertise_parry', -3) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 4) diff --git a/scripts/buffs/of_deb_def_3.py b/scripts/buffs/of_deb_def_3.py index 5b125b31..c3b28b0b 100644 --- a/scripts/buffs/of_deb_def_3.py +++ b/scripts/buffs/of_deb_def_3.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -3) core.skillModService.addSkillMod(actor, 'expertise_parry', -3) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -3) core.skillModService.deductSkillMod(actor, 'expertise_parry', -3) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 5) diff --git a/scripts/buffs/of_deb_def_4.py b/scripts/buffs/of_deb_def_4.py index 056db66a..e93dde70 100644 --- a/scripts/buffs/of_deb_def_4.py +++ b/scripts/buffs/of_deb_def_4.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -4) core.skillModService.addSkillMod(actor, 'expertise_parry', -4) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 4) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -4) core.skillModService.deductSkillMod(actor, 'expertise_parry', -4) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 4) diff --git a/scripts/buffs/of_deb_def_5.py b/scripts/buffs/of_deb_def_5.py index ec243e5b..233ec4dd 100644 --- a/scripts/buffs/of_deb_def_5.py +++ b/scripts/buffs/of_deb_def_5.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -4) core.skillModService.addSkillMod(actor, 'expertise_parry', -4) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -4) core.skillModService.deductSkillMod(actor, 'expertise_parry', -4) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 5) diff --git a/scripts/buffs/of_deb_def_6.py b/scripts/buffs/of_deb_def_6.py index 3ebd39ea..cdb29995 100644 --- a/scripts/buffs/of_deb_def_6.py +++ b/scripts/buffs/of_deb_def_6.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -5) core.skillModService.addSkillMod(actor, 'expertise_parry', -5) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 6) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -5) core.skillModService.deductSkillMod(actor, 'expertise_parry', -5) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 6) diff --git a/scripts/buffs/of_deb_def_7.py b/scripts/buffs/of_deb_def_7.py index 7503918d..9e9fedf5 100644 --- a/scripts/buffs/of_deb_def_7.py +++ b/scripts/buffs/of_deb_def_7.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -6) core.skillModService.addSkillMod(actor, 'expertise_parry', -6) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 7) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -6) core.skillModService.deductSkillMod(actor, 'expertise_parry', -6) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 7) diff --git a/scripts/buffs/of_deb_def_8.py b/scripts/buffs/of_deb_def_8.py index bc8e5334..6016ba0d 100644 --- a/scripts/buffs/of_deb_def_8.py +++ b/scripts/buffs/of_deb_def_8.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', -7) core.skillModService.addSkillMod(actor, 'expertise_parry', -7) core.skillModService.addSkillMod(actor, 'critical_hit_vulnerable', 8) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', -7) core.skillModService.deductSkillMod(actor, 'expertise_parry', -7) core.skillModService.deductSkillMod(actor, 'critical_hit_vulnerable', 8) diff --git a/scripts/buffs/of_decap_bleed_1.py b/scripts/buffs/of_decap_bleed_1.py index 16152e90..ff8b7fcf 100644 --- a/scripts/buffs/of_decap_bleed_1.py +++ b/scripts/buffs/of_decap_bleed_1.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 18) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 18) return \ No newline at end of file diff --git a/scripts/buffs/of_decap_bleed_2.py b/scripts/buffs/of_decap_bleed_2.py index f34171fc..1cdbd89d 100644 --- a/scripts/buffs/of_decap_bleed_2.py +++ b/scripts/buffs/of_decap_bleed_2.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 25) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 25) return \ No newline at end of file diff --git a/scripts/buffs/of_decap_bleed_3.py b/scripts/buffs/of_decap_bleed_3.py index 01d777ca..13629ef6 100644 --- a/scripts/buffs/of_decap_bleed_3.py +++ b/scripts/buffs/of_decap_bleed_3.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 32) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 32) return \ No newline at end of file diff --git a/scripts/buffs/of_decap_bleed_4.py b/scripts/buffs/of_decap_bleed_4.py index 1e847dea..3e266371 100644 --- a/scripts/buffs/of_decap_bleed_4.py +++ b/scripts/buffs/of_decap_bleed_4.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 42) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 42) return \ No newline at end of file diff --git a/scripts/buffs/of_decap_bleed_5.py b/scripts/buffs/of_decap_bleed_5.py index 596a9457..22db45c2 100644 --- a/scripts/buffs/of_decap_bleed_5.py +++ b/scripts/buffs/of_decap_bleed_5.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 50) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 50) return \ No newline at end of file diff --git a/scripts/buffs/of_decap_bleed_6.py b/scripts/buffs/of_decap_bleed_6.py index 1e96e637..8bbabdd6 100644 --- a/scripts/buffs/of_decap_bleed_6.py +++ b/scripts/buffs/of_decap_bleed_6.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 60) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 60) return \ No newline at end of file diff --git a/scripts/buffs/of_dot_bomb_1.py b/scripts/buffs/of_dot_bomb_1.py index 9ab3d9f7..1534cc2e 100644 --- a/scripts/buffs/of_dot_bomb_1.py +++ b/scripts/buffs/of_dot_bomb_1.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_fire', 200) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_fire', 200) return \ No newline at end of file diff --git a/scripts/buffs/of_drillmaster_1.py b/scripts/buffs/of_drillmaster_1.py index 9dd26849..233744a6 100644 --- a/scripts/buffs/of_drillmaster_1.py +++ b/scripts/buffs/of_drillmaster_1.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 2: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_damage_all', 5) core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) core.skillModService.addSkillMod(actor, 'expertise_damage_weapon_2', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_damage_all', 5) core.skillModService.deductSkillMod(actor, 'expertise_action_all', 5) core.skillModService.deductSkillMod(actor, 'expertise_damage_weapon_2', 5) diff --git a/scripts/buffs/of_emergency_shield.py b/scripts/buffs/of_emergency_shield.py index 8b27d418..e4f367c3 100644 --- a/scripts/buffs/of_emergency_shield.py +++ b/scripts/buffs/of_emergency_shield.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_divide_damage_taken', 75) core.skillModService.addSkillMod(actor, 'combat_divide_damage_dealt', 75) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_divide_damage_taken', 75) core.skillModService.deductSkillMod(actor, 'combat_divide_damage_dealt', 75) return \ No newline at end of file diff --git a/scripts/buffs/of_firepower.py b/scripts/buffs/of_firepower.py index e7b0b129..9bf1f1fe 100644 --- a/scripts/buffs/of_firepower.py +++ b/scripts/buffs/of_firepower.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_damage_line_of_aoe', 125) core.skillModService.addSkillMod(actor, 'expertise_critical_line_of_aoe', 50) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_damage_line_of_aoe', 125) core.skillModService.deductSkillMod(actor, 'expertise_critical_line_of_aoe', 50) return \ No newline at end of file diff --git a/scripts/buffs/of_focus_fire_1.py b/scripts/buffs/of_focus_fire_1.py index c8e0d364..4e191992 100644 --- a/scripts/buffs/of_focus_fire_1.py +++ b/scripts/buffs/of_focus_fire_1.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_strikethrough_value', 2) core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 15) core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 2) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_strikethrough_value', 2) core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 15) core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 2) diff --git a/scripts/buffs/of_focus_fire_2.py b/scripts/buffs/of_focus_fire_2.py index 7803b873..60404f53 100644 --- a/scripts/buffs/of_focus_fire_2.py +++ b/scripts/buffs/of_focus_fire_2.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_strikethrough_value', 3) core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 20) core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 2) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_strikethrough_value', 3) core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 20) core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 2) diff --git a/scripts/buffs/of_focus_fire_3.py b/scripts/buffs/of_focus_fire_3.py index a4084512..3420c94c 100644 --- a/scripts/buffs/of_focus_fire_3.py +++ b/scripts/buffs/of_focus_fire_3.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_strikethrough_value', 3) core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 23) core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 3) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_strikethrough_value', 3) core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 23) core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 3) diff --git a/scripts/buffs/of_focus_fire_4.py b/scripts/buffs/of_focus_fire_4.py index 27402933..a95fb77f 100644 --- a/scripts/buffs/of_focus_fire_4.py +++ b/scripts/buffs/of_focus_fire_4.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_strikethrough_value', 4) core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 26) core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 3) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_strikethrough_value', 4) core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 26) core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 4) diff --git a/scripts/buffs/of_focus_fire_5.py b/scripts/buffs/of_focus_fire_5.py index 9cc90e8d..4d084789 100644 --- a/scripts/buffs/of_focus_fire_5.py +++ b/scripts/buffs/of_focus_fire_5.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_strikethrough_value', 4) core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 29) core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 4) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_strikethrough_value', 4) core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 29) core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 4) diff --git a/scripts/buffs/of_focus_fire_6.py b/scripts/buffs/of_focus_fire_6.py index 58879cbe..e091b13f 100644 --- a/scripts/buffs/of_focus_fire_6.py +++ b/scripts/buffs/of_focus_fire_6.py @@ -1,12 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'combat_strikethrough_value', 5) core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 32) core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'combat_strikethrough_value', 5) core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 32) core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 5) diff --git a/scripts/buffs/of_inspiration_1.py b/scripts/buffs/of_inspiration_1.py index 6cd2da65..cbf0963e 100644 --- a/scripts/buffs/of_inspiration_1.py +++ b/scripts/buffs/of_inspiration_1.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) core.skillModService.addSkillMod(actor, 'healing_action', 870) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_all', 870) core.skillModService.deductSkillMod(actor, 'healing_action', 870) return \ No newline at end of file diff --git a/scripts/buffs/of_inspiration_2.py b/scripts/buffs/of_inspiration_2.py index a26bbe86..1cf07e9c 100644 --- a/scripts/buffs/of_inspiration_2.py +++ b/scripts/buffs/of_inspiration_2.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) core.skillModService.addSkillMod(actor, 'healing_action', 1111) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_all', 5) core.skillModService.deductSkillMod(actor, 'healing_action', 1111) return \ No newline at end of file diff --git a/scripts/buffs/of_inspiration_3.py b/scripts/buffs/of_inspiration_3.py index 337108a6..1162d3b3 100644 --- a/scripts/buffs/of_inspiration_3.py +++ b/scripts/buffs/of_inspiration_3.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) core.skillModService.addSkillMod(actor, 'healing_action', 1532) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_all', 5) core.skillModService.deductSkillMod(actor, 'healing_action', 1532) return \ No newline at end of file diff --git a/scripts/buffs/of_inspiration_4.py b/scripts/buffs/of_inspiration_4.py index 5738cd3d..67879833 100644 --- a/scripts/buffs/of_inspiration_4.py +++ b/scripts/buffs/of_inspiration_4.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) core.skillModService.addSkillMod(actor, 'healing_action', 1954) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_all', 5) core.skillModService.deductSkillMod(actor, 'healing_action', 1954) return \ No newline at end of file diff --git a/scripts/buffs/of_inspiration_5.py b/scripts/buffs/of_inspiration_5.py index 6ab7d9d3..f566e44a 100644 --- a/scripts/buffs/of_inspiration_5.py +++ b/scripts/buffs/of_inspiration_5.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) core.skillModService.addSkillMod(actor, 'healing_action', 2374) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_all', 5) core.skillModService.deductSkillMod(actor, 'healing_action', 2374) return \ No newline at end of file diff --git a/scripts/buffs/of_inspiration_6.py b/scripts/buffs/of_inspiration_6.py index 9e7e9def..31bcc7df 100644 --- a/scripts/buffs/of_inspiration_6.py +++ b/scripts/buffs/of_inspiration_6.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) core.skillModService.addSkillMod(actor, 'healing_action', 2800) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_all', 5) core.skillModService.deductSkillMod(actor, 'healing_action', 2800) return \ No newline at end of file diff --git a/scripts/buffs/of_last_words.py b/scripts/buffs/of_last_words.py index 9611d588..49c70490 100644 --- a/scripts/buffs/of_last_words.py +++ b/scripts/buffs/of_last_words.py @@ -1,13 +1,16 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'healing_health', 3500) core.skillModService.addSkillMod(actor, 'healing_action', 6000) core.skillModService.addSkillMod(actor, 'expertise_damage_all', 10) core.skillModService.addSkillMod(actor, 'expertise_action_all', 10) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'healing_health', 125) core.skillModService.deductSkillMod(actor, 'healing_action', 50) core.skillModService.deductSkillMod(actor, 'expertise_damage_all', 50) diff --git a/scripts/buffs/of_pistol_bleed.py b/scripts/buffs/of_pistol_bleed.py index 1e96e637..8bbabdd6 100644 --- a/scripts/buffs/of_pistol_bleed.py +++ b/scripts/buffs/of_pistol_bleed.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 60) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 60) return \ No newline at end of file diff --git a/scripts/buffs/of_purge_1.py b/scripts/buffs/of_purge_1.py index c41e52e8..21dd70e7 100644 --- a/scripts/buffs/of_purge_1.py +++ b/scripts/buffs/of_purge_1.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_divisor_all', 50) core.skillModService.addSkillMod(actor, 'dot_resist_all', 100) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_divisor_all', 50) core.skillModService.deductSkillMod(actor, 'dot_resist_all', 100) return \ No newline at end of file diff --git a/scripts/buffs/of_scatter_1.py b/scripts/buffs/of_scatter_1.py index ed252b06..8309302a 100644 --- a/scripts/buffs/of_scatter_1.py +++ b/scripts/buffs/of_scatter_1.py @@ -1,13 +1,18 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_buff_duration_line_of_group_buff'): + buff.setDuration(buff.getDuration() + actor.getSkillModBase('expertise_buff_duration_line_of_group_buff')) + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 2) core.skillModService.addSkillMod(actor, 'movement_resist_snare', 15) core.skillModService.addSkillMod(actor, 'movement_resist_root', 2) core.skillModService.addSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'movement', 5) core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 2) core.skillModService.deductSkillMod(actor, 'movement_resist_snare', 15) diff --git a/scripts/buffs/of_stimulator_1.py b/scripts/buffs/of_stimulator_1.py index f28888e7..4e120b7f 100644 --- a/scripts/buffs/of_stimulator_1.py +++ b/scripts/buffs/of_stimulator_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'debuff_purge', 2) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'debuff_purge', 2) return \ No newline at end of file diff --git a/scripts/buffs/of_vortex_bleed_1.py b/scripts/buffs/of_vortex_bleed_1.py index e1095bbc..188e61a7 100644 --- a/scripts/buffs/of_vortex_bleed_1.py +++ b/scripts/buffs/of_vortex_bleed_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 30) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 30) return \ No newline at end of file diff --git a/scripts/buffs/of_vortex_bleed_2.py b/scripts/buffs/of_vortex_bleed_2.py index cc0b1590..9a2bb14b 100644 --- a/scripts/buffs/of_vortex_bleed_2.py +++ b/scripts/buffs/of_vortex_bleed_2.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 44) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 44) return \ No newline at end of file diff --git a/scripts/buffs/of_vortex_bleed_3.py b/scripts/buffs/of_vortex_bleed_3.py index 12c3f4cd..711ac6ef 100644 --- a/scripts/buffs/of_vortex_bleed_3.py +++ b/scripts/buffs/of_vortex_bleed_3.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 58) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 58) return \ No newline at end of file diff --git a/scripts/buffs/of_vortex_bleed_4.py b/scripts/buffs/of_vortex_bleed_4.py index 9d2c2648..a6b25916 100644 --- a/scripts/buffs/of_vortex_bleed_4.py +++ b/scripts/buffs/of_vortex_bleed_4.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 72) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 72) return \ No newline at end of file diff --git a/scripts/buffs/of_vortex_bleed_5.py b/scripts/buffs/of_vortex_bleed_5.py index 760cc493..20f90a7f 100644 --- a/scripts/buffs/of_vortex_bleed_5.py +++ b/scripts/buffs/of_vortex_bleed_5.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 90) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 90) return \ No newline at end of file diff --git a/scripts/buffs/of_vortex_root.py b/scripts/buffs/of_vortex_root.py index 5048a0be..42418564 100644 --- a/scripts/buffs/of_vortex_root.py +++ b/scripts/buffs/of_vortex_root.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - core.skillModService.addSkillMod(actor, 'movement', 0) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 10) return -def removeBuff(core, actor, buff): - core.skillModService.deductSkillMod(actor, 'movement', 10) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 10) return \ No newline at end of file diff --git a/scripts/buffs/poisoned.py b/scripts/buffs/poisoned.py index e09c02e5..c60417a0 100644 --- a/scripts/buffs/poisoned.py +++ b/scripts/buffs/poisoned.py @@ -2,7 +2,10 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/proc_old_dark_jedi_gift.py b/scripts/buffs/proc_old_dark_jedi_gift.py index e09c02e5..c60417a0 100644 --- a/scripts/buffs/proc_old_dark_jedi_gift.py +++ b/scripts/buffs/proc_old_dark_jedi_gift.py @@ -2,7 +2,10 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/proc_old_light_jedi_gift.py b/scripts/buffs/proc_old_light_jedi_gift.py index e09c02e5..c60417a0 100644 --- a/scripts/buffs/proc_old_light_jedi_gift.py +++ b/scripts/buffs/proc_old_light_jedi_gift.py @@ -2,7 +2,10 @@ import sys def setup(core, actor, buff): return + +def add(core, actor, buff): + return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): return \ No newline at end of file diff --git a/scripts/buffs/saberblock.py b/scripts/buffs/saberblock.py index 15962ce9..3386a66a 100644 --- a/scripts/buffs/saberblock.py +++ b/scripts/buffs/saberblock.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'display_only_parry', 1000 + (actor.getSkillModBase('expertise_saber_block') * 100)) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'display_only_parry', 1000 + (actor.getSkillModBase('expertise_saber_block') * 100)) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_bh_dps_1.py b/scripts/buffs/set_bonus_bh_dps_1.py index 58d3ed08..6055bf9f 100644 --- a/scripts/buffs/set_bonus_bh_dps_1.py +++ b/scripts/buffs/set_bonus_bh_dps_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_line_dm', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_line_dm', 5) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_bh_dps_2.py b/scripts/buffs/set_bonus_bh_dps_2.py index cf463a7a..5f0aa83c 100644 --- a/scripts/buffs/set_bonus_bh_dps_2.py +++ b/scripts/buffs/set_bonus_bh_dps_2.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_line_dm', 5) core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_bh_return_fire' , 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_line_dm', 5) core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_bh_return_fire' , 5) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_bh_dps_3.py b/scripts/buffs/set_bonus_bh_dps_3.py index 06bcee28..4d48df3e 100644 --- a/scripts/buffs/set_bonus_bh_dps_3.py +++ b/scripts/buffs/set_bonus_bh_dps_3.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_action_line_dm', 10) core.skillModService.addSkillMod(actor, 'expertise_action_line_dm_crit', 10) core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_bh_return_fire' , 10) @@ -8,7 +11,7 @@ def setup(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_bh_return_fire' , 750) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_action_line_dm', 10) core.skillModService.deductSkillMod(actor, 'expertise_action_line_dm_crit', 10) core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_bh_return_fire' , 10) diff --git a/scripts/buffs/set_bonus_bh_utility_a_1.py b/scripts/buffs/set_bonus_bh_utility_a_1.py index 4f9e42e4..3035fdd8 100644 --- a/scripts/buffs/set_bonus_bh_utility_a_1.py +++ b/scripts/buffs/set_bonus_bh_utility_a_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_bh_flawless_strike', 15) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_bh_flawless_strike', 15) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_bh_utility_a_2.py b/scripts/buffs/set_bonus_bh_utility_a_2.py index 4f9e42e4..3035fdd8 100644 --- a/scripts/buffs/set_bonus_bh_utility_a_2.py +++ b/scripts/buffs/set_bonus_bh_utility_a_2.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_bh_flawless_strike', 15) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_bh_flawless_strike', 15) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_bh_utility_a_3.py b/scripts/buffs/set_bonus_bh_utility_a_3.py index e98992f3..6a3ed086 100644 --- a/scripts/buffs/set_bonus_bh_utility_a_3.py +++ b/scripts/buffs/set_bonus_bh_utility_a_3.py @@ -1,10 +1,13 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_bh_flawless_strike', 30) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_bh_flawless_strike', 30) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_bh_utility_b_1.py b/scripts/buffs/set_bonus_bh_utility_b_1.py index 0f4597fe..9115f6d4 100644 --- a/scripts/buffs/set_bonus_bh_utility_b_1.py +++ b/scripts/buffs/set_bonus_bh_utility_b_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'fast_attack_line_dm_cc', 5) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'fast_attack_line_dm_cc', 5) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_bh_utility_b_2.py b/scripts/buffs/set_bonus_bh_utility_b_2.py index 945c2883..b641c6a6 100644 --- a/scripts/buffs/set_bonus_bh_utility_b_2.py +++ b/scripts/buffs/set_bonus_bh_utility_b_2.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'fast_attack_line_dm_cc', 10) core.skillModService.addSkillMod(actor, 'bh_dire_root', 20) core.skillModService.addSkillMod(actor, 'bh_dire_snare', 20) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'fast_attack_line_dm_cc', 10) core.skillModService.deductSkillMod(actor, 'bh_dire_root', 20) core.skillModService.deductSkillMod(actor, 'bh_dire_snare', 20) diff --git a/scripts/buffs/set_bonus_bh_utility_b_3.py b/scripts/buffs/set_bonus_bh_utility_b_3.py index d136c4ec..b4b4154f 100644 --- a/scripts/buffs/set_bonus_bh_utility_b_3.py +++ b/scripts/buffs/set_bonus_bh_utility_b_3.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'fast_attack_line_dm_cc', 35) core.skillModService.addSkillMod(actor, 'bh_dire_root', 45) core.skillModService.addSkillMod(actor, 'bh_dire_snare', 45) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'fast_attack_line_dm_cc', 35) core.skillModService.deductSkillMod(actor, 'bh_dire_root', 45) core.skillModService.deductSkillMod(actor, 'bh_dire_snare', 45) diff --git a/scripts/buffs/set_bonus_hero_1.py b/scripts/buffs/set_bonus_hero_1.py index d84a60fc..c589b0f4 100644 --- a/scripts/buffs/set_bonus_hero_1.py +++ b/scripts/buffs/set_bonus_hero_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stamina_modified', 60) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stamina_modified', 60) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_hero_2.py b/scripts/buffs/set_bonus_hero_2.py index 6c87d81e..630b0e30 100644 --- a/scripts/buffs/set_bonus_hero_2.py +++ b/scripts/buffs/set_bonus_hero_2.py @@ -1,11 +1,14 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stamina_modified', 90) core.skillModService.addSkillMod(actor, 'agility_modified', 90) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stamina_modified', 90) core.skillModService.deductSkillMod(actor, 'agility_modified', 90) return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_hero_3.py b/scripts/buffs/set_bonus_hero_3.py index 11c03f31..d2755af3 100644 --- a/scripts/buffs/set_bonus_hero_3.py +++ b/scripts/buffs/set_bonus_hero_3.py @@ -1,12 +1,15 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'stamina_modified', 150) core.skillModService.addSkillMod(actor, 'agility_modified', 150) core.skillModService.addSkillMod(actor, 'constitution_modified', 150) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'stamina_modified', 150) core.skillModService.deductSkillMod(actor, 'agility_modified', 150) core.skillModService.deductSkillMod(actor, 'constitution_modified', 150) diff --git a/scripts/buffs/set_bonus_medic_dps_1.py b/scripts/buffs/set_bonus_medic_dps_1.py new file mode 100644 index 00000000..178d4c76 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_dps_1.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_dm', 5) + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_burst', 5) + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_smash', 5) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_dm', 5) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_burst', 5) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_smash', 5) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_dps_2.py b/scripts/buffs/set_bonus_medic_dps_2.py new file mode 100644 index 00000000..36833f96 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_dps_2.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_dm', 10) + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_burst', 10) + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_smash', 10) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_dm', 5) + core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_me_enhance', 900) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_dm', 10) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_burst', 10) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_smash', 10) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_dm', 5) + core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_me_enhance', 900) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_dps_3.py b/scripts/buffs/set_bonus_medic_dps_3.py new file mode 100644 index 00000000..f9082b73 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_dps_3.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_dm', 15) + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_burst', 20) + core.skillModService.addSkillMod(actor, 'expertise_action_line_me_smash', 20) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_dm', 15) + core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_me_enhance', 1800) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_dm', 15) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_burst', 20) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_me_smash', 20) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_dm', 15) + core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_me_enhance', 1800) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_utility_a_1.py b/scripts/buffs/set_bonus_medic_utility_a_1.py new file mode 100644 index 00000000..a04d1d33 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_utility_a_1.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_freeshot_me_heal', 5) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_revive', 5) + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_me_evasion', 10) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_freeshot_me_heal', 5) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_revive', 5) + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_me_evasion', 10) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_utility_a_2.py b/scripts/buffs/set_bonus_medic_utility_a_2.py new file mode 100644 index 00000000..3fd9f063 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_utility_a_2.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_heal', 5) + core.skillModService.addSkillMod(actor, 'expertise_freeshot_me_heal', 10) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_revive', 10) + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_me_evasion', 20) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_heal', 5) + core.skillModService.deductSkillMod(actor, 'expertise_freeshot_me_heal', 10) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_revive', 10) + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_me_evasion', 20) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_utility_a_3.py b/scripts/buffs/set_bonus_medic_utility_a_3.py new file mode 100644 index 00000000..11bad3ba --- /dev/null +++ b/scripts/buffs/set_bonus_medic_utility_a_3.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_heal', 10) + core.skillModService.addSkillMod(actor, 'expertise_freeshot_me_heal', 15) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_revive', 15) + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_me_evasion', 30) + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_me_stasis_self', 2) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_heal', 10) + core.skillModService.deductSkillMod(actor, 'expertise_freeshot_me_heal', 15) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_revive', 15) + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_me_evasion', 30) + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_me_stasis_self', 2) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_utility_b_1.py b/scripts/buffs/set_bonus_medic_utility_b_1.py new file mode 100644 index 00000000..1ec0be40 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_utility_b_1.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_me_dot', 10) + core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_me_debuff', 1) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_debuff', 5) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_me_dot', 10) + core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_me_debuff', 1) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_debuff', 5) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_utility_b_2.py b/scripts/buffs/set_bonus_medic_utility_b_2.py new file mode 100644 index 00000000..b6d95b63 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_utility_b_2.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_me_dot', 20) + core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_me_debuff', 3) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_debuff', 10) + core.skillModService.addSkillMod(actor, 'expertise_freeshot_me_debuff', 10) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_me_dot', 20) + core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_me_debuff', 3) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_debuff', 10) + core.skillModService.deductSkillMod(actor, 'expertise_freeshot_me_debuff', 10) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_medic_utility_b_3.py b/scripts/buffs/set_bonus_medic_utility_b_3.py new file mode 100644 index 00000000..4a5af114 --- /dev/null +++ b/scripts/buffs/set_bonus_medic_utility_b_3.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_me_dot', 30) + core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_me_debuff', 5) + core.skillModService.addSkillMod(actor, 'fast_attack_line_me_debuff', 15) + core.skillModService.addSkillMod(actor, 'expertise_freeshot_me_debuff', 15) + core.skillModService.addSkillMod(actor, 'me_doom_chance', 20) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_me_dot', 30) + core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_me_debuff', 5) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_me_debuff', 15) + core.skillModService.deductSkillMod(actor, 'expertise_freeshot_me_debuff', 15) + core.skillModService.deductSkillMod(actor, 'me_doom_chance', 20) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_dps_1.py b/scripts/buffs/set_bonus_spy_dps_1.py new file mode 100644 index 00000000..a375544a --- /dev/null +++ b/scripts/buffs/set_bonus_spy_dps_1.py @@ -0,0 +1,14 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_action_line_sp_dm', 10) + core.skillModService.addSkillMod(actor, 'fast_attack_line_sp_dm', 5) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_action_line_sp_dm', 10) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_sp_dm', 5) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_dps_2.py b/scripts/buffs/set_bonus_spy_dps_2.py new file mode 100644 index 00000000..25132b6d --- /dev/null +++ b/scripts/buffs/set_bonus_spy_dps_2.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_action_line_sp_dm', 15) + core.skillModService.addSkillMod(actor, 'fast_attack_line_sp_dm', 10) + core.skillModService.addSkillMod(actor, 'expertise_action_line_sp_dot', 15) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_action_line_sp_dm', 15) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_sp_dm', 10) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_sp_dot', 15) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_dps_3.py b/scripts/buffs/set_bonus_spy_dps_3.py new file mode 100644 index 00000000..9fdedc7e --- /dev/null +++ b/scripts/buffs/set_bonus_spy_dps_3.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_action_line_sp_dm', 20) + core.skillModService.addSkillMod(actor, 'fast_attack_line_sp_dm', 15) + core.skillModService.addSkillMod(actor, 'expertise_freeshot_sp_dm', 20) + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_sp_dm', 20) + core.skillModService.addSkillMod(actor, 'expertise_action_line_sp_dot', 25) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_action_line_sp_dm', 20) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_sp_dm', 15) + core.skillModService.deductSkillMod(actor, 'expertise_freeshot_sp_dm', 20) + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_sp_dm', 20) + core.skillModService.deductSkillMod(actor, 'expertise_action_line_sp_dot', 25) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_utility_a_1.py b/scripts/buffs/set_bonus_spy_utility_a_1.py new file mode 100644 index 00000000..dab7ff64 --- /dev/null +++ b/scripts/buffs/set_bonus_spy_utility_a_1.py @@ -0,0 +1,14 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_sp_preparation', 20) + core.skillModService.addSkillMod(actor, 'fast_attack_line_sp_smoke', 5) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_sp_preparation', 20) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_sp_smoke', 5) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_utility_a_2.py b/scripts/buffs/set_bonus_spy_utility_a_2.py new file mode 100644 index 00000000..a1892f96 --- /dev/null +++ b/scripts/buffs/set_bonus_spy_utility_a_2.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_sp_preparation', 40) + core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_sp_preparation', 5) + core.skillModService.addSkillMod(actor, 'fast_attack_line_sp_smoke', 15) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_sp_preparation', 40) + core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_sp_preparation', 5) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_sp_smoke', 15) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_utility_a_3.py b/scripts/buffs/set_bonus_spy_utility_a_3.py new file mode 100644 index 00000000..22e3a920 --- /dev/null +++ b/scripts/buffs/set_bonus_spy_utility_a_3.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_cooldown_line_sp_preparation', 60) + core.skillModService.addSkillMod(actor, 'expertise_buff_duration_line_sp_preparation', 10) + core.skillModService.addSkillMod(actor, 'fast_attack_line_sp_smoke', 20) + core.skillModService.addSkillMod(actor, 'fast_attack_line_sp_perfect', 15) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_cooldown_line_sp_preparation', 60) + core.skillModService.deductSkillMod(actor, 'expertise_buff_duration_line_sp_preparation', 10) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_sp_smoke', 20) + core.skillModService.deductSkillMod(actor, 'fast_attack_line_sp_perfect', 15) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_utility_b_1.py b/scripts/buffs/set_bonus_spy_utility_b_1.py new file mode 100644 index 00000000..74851b44 --- /dev/null +++ b/scripts/buffs/set_bonus_spy_utility_b_1.py @@ -0,0 +1,14 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 1) + core.skillModService.addSkillMod(actor, 'expertise_action_all', 5) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 1) + core.skillModService.deductSkillMod(actor, 'expertise_action_all', 5) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_utility_b_2.py b/scripts/buffs/set_bonus_spy_utility_b_2.py new file mode 100644 index 00000000..c2f90380 --- /dev/null +++ b/scripts/buffs/set_bonus_spy_utility_b_2.py @@ -0,0 +1,14 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 2) + core.skillModService.addSkillMod(actor, 'expertise_action_all', 10) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 2) + core.skillModService.deductSkillMod(actor, 'expertise_action_all', 10) + return \ No newline at end of file diff --git a/scripts/buffs/set_bonus_spy_utility_b_3.py b/scripts/buffs/set_bonus_spy_utility_b_3.py new file mode 100644 index 00000000..41d58c47 --- /dev/null +++ b/scripts/buffs/set_bonus_spy_utility_b_3.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'expertise_strikethrough_chance', 3) + core.skillModService.addSkillMod(actor, 'expertise_action_all', 15) + core.skillModService.addSkillMod(actor, 'expertise_avoidance_overpower', 5) + core.skillModService.addSkillMod(actor, 'movement_resist_snare', 100) + core.skillModService.addSkillMod(actor, 'movement_resist_root', 100) + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'expertise_strikethrough_chance', 3) + core.skillModService.deductSkillMod(actor, 'expertise_action_all', 15) + core.skillModService.deductSkillMod(actor, 'expertise_avoidance_overpower', 5) + core.skillModService.deductSkillMod(actor, 'movement_resist_snare', 100) + core.skillModService.deductSkillMod(actor, 'movement_resist_root', 100) + return \ No newline at end of file diff --git a/scripts/buffs/sm_ae_dm_cc_1.py b/scripts/buffs/sm_ae_dm_cc_1.py index 18da7f78..2ee81fe9 100644 --- a/scripts/buffs/sm_ae_dm_cc_1.py +++ b/scripts/buffs/sm_ae_dm_cc_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(1) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/sm_ae_dm_cc_2.py b/scripts/buffs/sm_ae_dm_cc_2.py index 18da7f78..2ee81fe9 100644 --- a/scripts/buffs/sm_ae_dm_cc_2.py +++ b/scripts/buffs/sm_ae_dm_cc_2.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(1) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/sm_ae_dm_cc_3.py b/scripts/buffs/sm_ae_dm_cc_3.py index 18da7f78..2ee81fe9 100644 --- a/scripts/buffs/sm_ae_dm_cc_3.py +++ b/scripts/buffs/sm_ae_dm_cc_3.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(1) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/sm_ae_dm_cc_4.py b/scripts/buffs/sm_ae_dm_cc_4.py index 18da7f78..2ee81fe9 100644 --- a/scripts/buffs/sm_ae_dm_cc_4.py +++ b/scripts/buffs/sm_ae_dm_cc_4.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(1) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/sm_ae_dm_cc_5.py b/scripts/buffs/sm_ae_dm_cc_5.py index 18da7f78..2ee81fe9 100644 --- a/scripts/buffs/sm_ae_dm_cc_5.py +++ b/scripts/buffs/sm_ae_dm_cc_5.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(1) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/sm_ae_dm_cc_6.py b/scripts/buffs/sm_ae_dm_cc_6.py index 18da7f78..2ee81fe9 100644 --- a/scripts/buffs/sm_ae_dm_cc_6.py +++ b/scripts/buffs/sm_ae_dm_cc_6.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): - actor.setSpeedMultiplierBase(1) + return + +def add(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 5) return -def removeBuff(core, actor, buff): - actor.setSpeedMultiplierBase(1) +def remove(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 5) return \ No newline at end of file diff --git a/scripts/buffs/sm_pistol_whip_1.py b/scripts/buffs/sm_pistol_whip_1.py index 5537d303..f83a6829 100644 --- a/scripts/buffs/sm_pistol_whip_1.py +++ b/scripts/buffs/sm_pistol_whip_1.py @@ -1,9 +1,12 @@ import sys def setup(core, actor, buff): + return + +def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'sm_pistol_whip', 0) return -def removeBuff(core, actor, buff): +def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'sm_pistol_whip', 0) return \ No newline at end of file diff --git a/scripts/buffs/sp_burst_shadows.py b/scripts/buffs/sp_burst_shadows.py new file mode 100644 index 00000000..1047f8fd --- /dev/null +++ b/scripts/buffs/sp_burst_shadows.py @@ -0,0 +1,15 @@ +import sys + +def setup(core, actor, buff): + return + +def add(core, actor, buff): + core.skillModService.addSkillMod(actor, 'movement', 8) + + return + +def remove(core, actor, buff): + core.skillModService.deductSkillMod(actor, 'movement', 8) + + + return diff --git a/scripts/collections/col_entertainer_01.py b/scripts/collections/col_entertainer_01.py new file mode 100644 index 00000000..100fa53e --- /dev/null +++ b/scripts/collections/col_entertainer_01.py @@ -0,0 +1,12 @@ +from java.lang import System +import sys + +def modify(core, actor, count): + return + +def complete(core, actor, collection): + ghost = actor.getSlottedObject('ghost') + + actor.sendSystemMessage('@collection_n:col_entertainer_01_finished', 0) + ghost.addAbility('bm_dancing_pet_entertainer') + return \ No newline at end of file diff --git a/scripts/commands/auction.py b/scripts/commands/auction.py new file mode 100644 index 00000000..fe744e57 --- /dev/null +++ b/scripts/commands/auction.py @@ -0,0 +1,11 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + room = core.chatService.getChatRoomByAddress('SWG.' + core.getGalaxyName() + '.' + 'Auction') + + if actor.getSlottedObject('ghost').isMemberOfChannel(room.getRoomId()): + core.chatService.sendChatRoomMessage(actor, room.getRoomId(), 0, commandString) + return \ No newline at end of file diff --git a/scripts/commands/bandflourish.py b/scripts/commands/bandflourish.py index e30daa8f..446ceb72 100644 --- a/scripts/commands/bandflourish.py +++ b/scripts/commands/bandflourish.py @@ -31,15 +31,10 @@ def run(core, actor, target, commandString): if actor.getPerformanceId() <= 0: actor.sendSystemMessage('@performance:flourish_not_performing', 0) return - - animation = 'skill_action_' + str(flourish) - if flourish == 9: - animation = 'mistake' if actor.getAcceptBandflourishes(): actor.sendSystemMessage('@performance:flourish_perform_band_self', 0) - actor.sendSystemMessage('@performance:flourish_perform', 0) - actor.doSkillAnimation(animation) + core.entertainmentService.performFlourish(actor, flourish) group = core.objectService.getObject(actor.getGroupId()) if not group: @@ -50,8 +45,7 @@ def run(core, actor, target, commandString): continue if creature.getAcceptBandflourishes(): creature.sendSystemMessage('@performance:flourish_perform_band_member', 0) - creature.sendSystemMessage('@performance:flourish_perform', 0) - creature.doSkillAnimation(animation) + core.entertainmentService.performFlourish(creature, flourish) return diff --git a/scripts/commands/bh_armor_sprint_1.py b/scripts/commands/bh_armor_sprint_1.py index b7e33772..45376aa9 100644 --- a/scripts/commands/bh_armor_sprint_1.py +++ b/scripts/commands/bh_armor_sprint_1.py @@ -1,7 +1,7 @@ import sys def setup(core, actor, buff): - core.buffService.addBuffToCreature(actor, 'bh_armor_sprint_1') + core.buffService.addBuffToCreature(actor, 'bh_power_sprint_1') return def run(core, actor, target, commandString): diff --git a/scripts/commands/bh_shields_1.py b/scripts/commands/bh_shields_1.py new file mode 100644 index 00000000..41e93a6a --- /dev/null +++ b/scripts/commands/bh_shields_1.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, actor, target, command): + return + +def run(core, actor, target, commandString): + core.buffService.addBuffToCreature(actor, 'bh_shields') + core.buffService.addBuffToCreature(actor, 'bh_shields_charged') + core.buffService.addBuffToCreature(actor, 'bh_shields_handler') + return \ No newline at end of file diff --git a/scripts/commands/broadcast.py b/scripts/commands/broadcast.py new file mode 100644 index 00000000..afcaebef --- /dev/null +++ b/scripts/commands/broadcast.py @@ -0,0 +1,12 @@ +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.chatService.broadcastGalaxy(commandString) + return + diff --git a/scripts/commands/centerstage.py b/scripts/commands/centerstage.py new file mode 100644 index 00000000..362738c5 --- /dev/null +++ b/scripts/commands/centerstage.py @@ -0,0 +1,14 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if actor.getLevel() < 66: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, 'CenterStage', 'clienteffect/entertainer_center_stage.cef', target) is True: + actor.sendSystemMessage('@performance:effect_perform_center_stage', 0) + return \ No newline at end of file diff --git a/scripts/commands/co_first_aid_training.py b/scripts/commands/co_first_aid_training.py index baf4621d..e185f733 100644 --- a/scripts/commands/co_first_aid_training.py +++ b/scripts/commands/co_first_aid_training.py @@ -4,6 +4,5 @@ def setup(): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'co_first_aid_training') return \ No newline at end of file diff --git a/scripts/commands/co_hw_dot.py b/scripts/commands/co_hw_dot.py index 7b9a8aac..ca43a28e 100644 --- a/scripts/commands/co_hw_dot.py +++ b/scripts/commands/co_hw_dot.py @@ -12,13 +12,10 @@ def run(core, actor, target, commandString): if not weapon: return - if not weapon.getWeaponType() == 12: - return - elementalType = weapon.getElementalType() commandName = '' - if elementalType == '@obj_attr_n:elemental_heat': + if elementalType == 'heat': if actor.getLevel() >= 58: commandName = 'co_hw_dot_fire_1' if actor.getLevel() >= 60: @@ -29,7 +26,7 @@ def run(core, actor, target, commandString): commandName = 'co_hw_dot_fire_4' if actor.getLevel() >= 90: commandName = 'co_hw_dot_fire_5' - elif elementalType == '@obj_attr_n:elemental_cold': + elif elementalType == 'cold': if actor.getLevel() >= 58: commandName = 'co_hw_dot_cold_1' if actor.getLevel() >= 60: @@ -40,7 +37,7 @@ def run(core, actor, target, commandString): commandName = 'co_hw_dot_cold_4' if actor.getLevel() >= 90: commandName = 'co_hw_dot_cold_5' - elif elementalType == '@obj_attr_n:elemental_acid': + elif elementalType == 'acid': if actor.getLevel() >= 58: commandName = 'co_hw_dot_acid_1' if actor.getLevel() >= 60: @@ -51,7 +48,7 @@ def run(core, actor, target, commandString): commandName = 'co_hw_dot_acid_4' if actor.getLevel() >= 90: commandName = 'co_hw_dot_acid_5' - elif elementalType == '@obj_attr_n:elemental_electricity': + elif elementalType == 'electricity': if actor.getLevel() >= 58: commandName = 'co_hw_dot_electrical_1' if actor.getLevel() >= 60: @@ -62,7 +59,7 @@ def run(core, actor, target, commandString): commandName = 'co_hw_dot_electrical_4' if actor.getLevel() >= 90: commandName = 'co_hw_dot_electrical_5' - elif elementalType == '@obj_attr_n:elemental_energy': + elif elementalType == 'energy': if actor.getLevel() >= 58: commandName = 'co_hw_dot_energy_1' if actor.getLevel() >= 60: @@ -73,7 +70,7 @@ def run(core, actor, target, commandString): commandName = 'co_hw_dot_energy_4' if actor.getLevel() >= 90: commandName = 'co_hw_dot_energy_5' - elif elementalType =='@obj_attr_n:elemental_kinetic': + elif elementalType =='kinetic': if actor.getLevel() >= 58: commandName = 'co_hw_dot_kinetic_1' if actor.getLevel() >= 60: diff --git a/scripts/commands/co_position_secured.py b/scripts/commands/co_position_secured.py deleted file mode 100644 index a2165915..00000000 --- a/scripts/commands/co_position_secured.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys - -def setup(): - return - -def run(core, actor, target, commandString): - - if actor.hasBuff('co_position_secured'): - core.buffService.removeBuffFromCreature(actor, actor.getBuffByName('co_position_secured')) - else: - core.buffService.addBuffToCreature(actor, 'co_position_secured') - - return - \ No newline at end of file diff --git a/scripts/commands/colorSwirl.py b/scripts/commands/colorSwirl.py new file mode 100644 index 00000000..cae47e72 --- /dev/null +++ b/scripts/commands/colorSwirl.py @@ -0,0 +1,14 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if actor.getLevel() < 34: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, 'ColorSwirl', 'clienteffect/entertainer_color_swirl.cef', target) is True: + actor.sendSystemMessage('@performance:effect_perform_color_swirl', 0) + return \ No newline at end of file diff --git a/scripts/commands/colorlights.py b/scripts/commands/colorlights.py new file mode 100644 index 00000000..0708c4ea --- /dev/null +++ b/scripts/commands/colorlights.py @@ -0,0 +1,39 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + level = actor.getLevel() + command = 'ColorLights1' + effect = 'clienteffect/entertainer_color_lights_level_1.cef' + rLevel = 4 # minimum level to perform this effect + + if commandString is None or commandString == '': + + if level >= 50: + command = 'ColorLights3' + effect = 'clienteffect/entertainer_color_lights_level_3.cef' + + elif level >= 20: + command = 'ColorLights2' + effect = 'clienteffect/entertainer_color_lights_level_2.cef' + + if commandString is not None: + if commandString == '2': + command = 'ColorLights2' + effect = 'clienteffect/entertainer_color_lights_level_2.cef' + rLevel = 20 + + elif commandString == '3': + command = 'ColorLights3' + effect = 'clienteffect/entertainer_color_lights_level_3.cef' + rLevel = 50 + + if level < rLevel: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, command, effect, target) is True: + actor.sendSystemMessage('@performance:effect_perform_color_lights', 0) + return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_1.py b/scripts/commands/combat/bh_dm_1.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_1.py +++ b/scripts/commands/combat/bh_dm_1.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_2.py b/scripts/commands/combat/bh_dm_2.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_2.py +++ b/scripts/commands/combat/bh_dm_2.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_3.py b/scripts/commands/combat/bh_dm_3.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_3.py +++ b/scripts/commands/combat/bh_dm_3.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_4.py b/scripts/commands/combat/bh_dm_4.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_4.py +++ b/scripts/commands/combat/bh_dm_4.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_5.py b/scripts/commands/combat/bh_dm_5.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_5.py +++ b/scripts/commands/combat/bh_dm_5.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_6.py b/scripts/commands/combat/bh_dm_6.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_6.py +++ b/scripts/commands/combat/bh_dm_6.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_7.py b/scripts/commands/combat/bh_dm_7.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_7.py +++ b/scripts/commands/combat/bh_dm_7.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_8.py b/scripts/commands/combat/bh_dm_8.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_8.py +++ b/scripts/commands/combat/bh_dm_8.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_1.py b/scripts/commands/combat/bh_dm_crit_1.py index 94292ffd..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_1.py +++ b/scripts/commands/combat/bh_dm_crit_1.py @@ -2,7 +2,17 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/bh_dm_crit_2.py b/scripts/commands/combat/bh_dm_crit_2.py index 94292ffd..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_2.py +++ b/scripts/commands/combat/bh_dm_crit_2.py @@ -2,7 +2,17 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/bh_dm_crit_3.py b/scripts/commands/combat/bh_dm_crit_3.py index 94b54628..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_3.py +++ b/scripts/commands/combat/bh_dm_crit_3.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_4.py b/scripts/commands/combat/bh_dm_crit_4.py index 94b54628..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_4.py +++ b/scripts/commands/combat/bh_dm_crit_4.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_5.py b/scripts/commands/combat/bh_dm_crit_5.py index 94b54628..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_5.py +++ b/scripts/commands/combat/bh_dm_crit_5.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_6.py b/scripts/commands/combat/bh_dm_crit_6.py index 94b54628..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_6.py +++ b/scripts/commands/combat/bh_dm_crit_6.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_7.py b/scripts/commands/combat/bh_dm_crit_7.py index 94b54628..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_7.py +++ b/scripts/commands/combat/bh_dm_crit_7.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_8.py b/scripts/commands/combat/bh_dm_crit_8.py index 94b54628..c12e2a2a 100644 --- a/scripts/commands/combat/bh_dm_crit_8.py +++ b/scripts/commands/combat/bh_dm_crit_8.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit')) + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/co_position_secured.py b/scripts/commands/combat/co_position_secured.py new file mode 100644 index 00000000..84e13b7a --- /dev/null +++ b/scripts/commands/combat/co_position_secured.py @@ -0,0 +1,9 @@ +from resources.objects import Buff +import sys + +def setup(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/combat/en_spiral_kick_0.py b/scripts/commands/combat/en_spiral_kick_0.py new file mode 100644 index 00000000..eee76225 --- /dev/null +++ b/scripts/commands/combat/en_spiral_kick_0.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_spiral_kick_snare') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_spiral_kick_1.py b/scripts/commands/combat/en_spiral_kick_1.py new file mode 100644 index 00000000..eee76225 --- /dev/null +++ b/scripts/commands/combat/en_spiral_kick_1.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_spiral_kick_snare') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_spiral_kick_2.py b/scripts/commands/combat/en_spiral_kick_2.py new file mode 100644 index 00000000..eee76225 --- /dev/null +++ b/scripts/commands/combat/en_spiral_kick_2.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_spiral_kick_snare') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_spiral_kick_3.py b/scripts/commands/combat/en_spiral_kick_3.py new file mode 100644 index 00000000..eee76225 --- /dev/null +++ b/scripts/commands/combat/en_spiral_kick_3.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_spiral_kick_snare') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_spiral_kick_4.py b/scripts/commands/combat/en_spiral_kick_4.py new file mode 100644 index 00000000..eee76225 --- /dev/null +++ b/scripts/commands/combat/en_spiral_kick_4.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_spiral_kick_snare') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_thrill.py b/scripts/commands/combat/en_thrill.py new file mode 100644 index 00000000..868b6bed --- /dev/null +++ b/scripts/commands/combat/en_thrill.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_debuff_thrill') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_thrill_1.py b/scripts/commands/combat/en_thrill_1.py new file mode 100644 index 00000000..c3fd3fc2 --- /dev/null +++ b/scripts/commands/combat/en_thrill_1.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_debuff_thrill_1') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_thrill_2.py b/scripts/commands/combat/en_thrill_2.py new file mode 100644 index 00000000..c3fd3fc2 --- /dev/null +++ b/scripts/commands/combat/en_thrill_2.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_debuff_thrill_1') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_thrill_3.py b/scripts/commands/combat/en_thrill_3.py new file mode 100644 index 00000000..2783c9d7 --- /dev/null +++ b/scripts/commands/combat/en_thrill_3.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_debuff_thrill_2') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_unhealthy_fixation.py b/scripts/commands/combat/en_unhealthy_fixation.py new file mode 100644 index 00000000..620dd09a --- /dev/null +++ b/scripts/commands/combat/en_unhealthy_fixation.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_unhealthy_fixation_debuff') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_void_dance.py b/scripts/commands/combat/en_void_dance.py new file mode 100644 index 00000000..2354238e --- /dev/null +++ b/scripts/commands/combat/en_void_dance.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_void_dance_buff') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_void_dance_1.py b/scripts/commands/combat/en_void_dance_1.py new file mode 100644 index 00000000..cdc97c59 --- /dev/null +++ b/scripts/commands/combat/en_void_dance_1.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_void_dance_buff_1') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_void_dance_2.py b/scripts/commands/combat/en_void_dance_2.py new file mode 100644 index 00000000..186e477a --- /dev/null +++ b/scripts/commands/combat/en_void_dance_2.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_void_dance_buff_2') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/en_void_dance_3.py b/scripts/commands/combat/en_void_dance_3.py new file mode 100644 index 00000000..77d58c3d --- /dev/null +++ b/scripts/commands/combat/en_void_dance_3.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + core.buffService.addBuffToCreature(target, 'en_void_dance_buff_3') + return + +def preRun(core, actor, target, command): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_ae_dm_cc_1.py b/scripts/commands/combat/fs_ae_dm_cc_1.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_ae_dm_cc_1.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_ae_dm_cc_2.py b/scripts/commands/combat/fs_ae_dm_cc_2.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_ae_dm_cc_2.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_ae_dm_cc_3.py b/scripts/commands/combat/fs_ae_dm_cc_3.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_ae_dm_cc_3.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_ae_dm_cc_4.py b/scripts/commands/combat/fs_ae_dm_cc_4.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_ae_dm_cc_4.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_ae_dm_cc_5.py b/scripts/commands/combat/fs_ae_dm_cc_5.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_ae_dm_cc_5.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_ae_dm_cc_6.py b/scripts/commands/combat/fs_ae_dm_cc_6.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_ae_dm_cc_6.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_cc_crit_1.py b/scripts/commands/combat/fs_dm_cc_crit_1.py new file mode 100644 index 00000000..493481d7 --- /dev/null +++ b/scripts/commands/combat/fs_dm_cc_crit_1.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, actor, buff): + actor.setSpeedMultiplierBase(0.5) + return + +def removeBuff(core, actor, buff): + actor.setSpeedMultiplierBase(1) + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_drain_1.py b/scripts/commands/combat/fs_drain_1.py new file mode 100644 index 00000000..c7937d1e --- /dev/null +++ b/scripts/commands/combat/fs_drain_1.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, damage): + + if actor.getSkillMod('expertise_fs_imp_drain'): + damage *= (100 + float(actor.getSkillModBase('expertise_fs_imp_drain')))/100 + + core.combatService.doDrainHeal(actor, int(damage)) + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_drain_2.py b/scripts/commands/combat/fs_drain_2.py new file mode 100644 index 00000000..c7937d1e --- /dev/null +++ b/scripts/commands/combat/fs_drain_2.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, damage): + + if actor.getSkillMod('expertise_fs_imp_drain'): + damage *= (100 + float(actor.getSkillModBase('expertise_fs_imp_drain')))/100 + + core.combatService.doDrainHeal(actor, int(damage)) + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_drain_3.py b/scripts/commands/combat/fs_drain_3.py new file mode 100644 index 00000000..c7937d1e --- /dev/null +++ b/scripts/commands/combat/fs_drain_3.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, damage): + + if actor.getSkillMod('expertise_fs_imp_drain'): + damage *= (100 + float(actor.getSkillModBase('expertise_fs_imp_drain')))/100 + + core.combatService.doDrainHeal(actor, int(damage)) + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_drain_4.py b/scripts/commands/combat/fs_drain_4.py new file mode 100644 index 00000000..c7937d1e --- /dev/null +++ b/scripts/commands/combat/fs_drain_4.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, damage): + + if actor.getSkillMod('expertise_fs_imp_drain'): + damage *= (100 + float(actor.getSkillModBase('expertise_fs_imp_drain')))/100 + + core.combatService.doDrainHeal(actor, int(damage)) + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_drain_5.py b/scripts/commands/combat/fs_drain_5.py new file mode 100644 index 00000000..c7937d1e --- /dev/null +++ b/scripts/commands/combat/fs_drain_5.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, damage): + + if actor.getSkillMod('expertise_fs_imp_drain'): + damage *= (100 + float(actor.getSkillModBase('expertise_fs_imp_drain')))/100 + + core.combatService.doDrainHeal(actor, int(damage)) + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_1.py b/scripts/commands/combat/fs_flurry_1.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_1.py +++ b/scripts/commands/combat/fs_flurry_1.py @@ -7,9 +7,6 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) - if actor.getSkillMod('expertise_action_line_fs_dm'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) - return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/fs_flurry_2.py b/scripts/commands/combat/fs_flurry_2.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_2.py +++ b/scripts/commands/combat/fs_flurry_2.py @@ -7,9 +7,6 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) - if actor.getSkillMod('expertise_action_line_fs_dm'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) - return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/fs_flurry_3.py b/scripts/commands/combat/fs_flurry_3.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_3.py +++ b/scripts/commands/combat/fs_flurry_3.py @@ -7,9 +7,6 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) - if actor.getSkillMod('expertise_action_line_fs_dm'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) - return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/fs_flurry_4.py b/scripts/commands/combat/fs_flurry_4.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_4.py +++ b/scripts/commands/combat/fs_flurry_4.py @@ -7,9 +7,6 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) - if actor.getSkillMod('expertise_action_line_fs_dm'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) - return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/fs_flurry_5.py b/scripts/commands/combat/fs_flurry_5.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_5.py +++ b/scripts/commands/combat/fs_flurry_5.py @@ -7,9 +7,6 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) - if actor.getSkillMod('expertise_action_line_fs_dm'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) - return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/fs_flurry_6.py b/scripts/commands/combat/fs_flurry_6.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_6.py +++ b/scripts/commands/combat/fs_flurry_6.py @@ -7,9 +7,6 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) - if actor.getSkillMod('expertise_action_line_fs_dm'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) - return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/fs_flurry_7.py b/scripts/commands/combat/fs_flurry_7.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_7.py +++ b/scripts/commands/combat/fs_flurry_7.py @@ -7,9 +7,6 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) - if actor.getSkillMod('expertise_action_line_fs_dm'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) - return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/fs_maelstrom_1.py b/scripts/commands/combat/fs_maelstrom_1.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_maelstrom_1.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_maelstrom_2.py b/scripts/commands/combat/fs_maelstrom_2.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_maelstrom_2.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_maelstrom_3.py b/scripts/commands/combat/fs_maelstrom_3.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_maelstrom_3.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_maelstrom_4.py b/scripts/commands/combat/fs_maelstrom_4.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_maelstrom_4.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_maelstrom_5.py b/scripts/commands/combat/fs_maelstrom_5.py new file mode 100644 index 00000000..70a66b61 --- /dev/null +++ b/scripts/commands/combat/fs_maelstrom_5.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_fs_dm_armor_bypass'): + command.setBypassArmor(actor.getSkillModBase("expertise_fs_dm_armor_bypass")) + + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/covercharge.py b/scripts/commands/covercharge.py new file mode 100644 index 00000000..d0eae641 --- /dev/null +++ b/scripts/commands/covercharge.py @@ -0,0 +1,46 @@ +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + ghost = actor.getSlottedObject('ghost') + if ghost.getProfession() != 'entertainer_1a': + actor.sendSystemMessage('@performance:cc_no_skill', 0) + return + if commandString == '0': + actor.setCoverCharge(0) + actor.sendSystemMessage('@performance:cc_stop_charge', 0) + return + + if commandString == None or commandString == '': + window = core.suiService.createInputBox(2, '@performance:cc_set_title', '@performance:cc_set_prompt', actor, None, 10, handleCoverCharge) + window.setProperty('txtInput:NumericInteger', 'true') + window.setProperty('txtInput:MaxLength', '12') + core.suiService.openSUIWindow(window) + return + else: + try: + actor.setCoverCharge(int(commandString)) + actor.sendSystemMessage('You are now charging a cover of ' + commandString + ' credit(s).', 0) + except ValueError: + return + return + return + +def handleCoverCharge(actor, window, eventType, returnList): + if eventType == 0 and len(returnList) == 1: + charge = returnList.get(0) + if charge == "0": + actor.setCoverCharge(0) + actor.sendSystemMessage('@performance:cc_stop_charge', 0) + return + else: + actor.setCoverCharge(charge) + actor.sendSystemMessage('You are now charging a cover of ' + returnList.get(0) + ' credits(s).', 0) + return + return + return \ No newline at end of file diff --git a/scripts/commands/dazzle.py b/scripts/commands/dazzle.py new file mode 100644 index 00000000..03e79b11 --- /dev/null +++ b/scripts/commands/dazzle.py @@ -0,0 +1,39 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + level = actor.getLevel() + command = 'Dazzle1' + effect = 'clienteffect/entertainer_dazzle_level_1.cef' + rLevel = 10 # minimum level to perform this effect + + if commandString is None or commandString == '': + + if level >= 30: + command = 'Dazzle3' + effect = 'clienteffect/entertainer_dazzle_level_3.cef' + + elif level >= 20: + command = 'Dazzle2' + effect = 'clienteffect/entertainer_dazzle_level_2.cef' + + if commandString is not None: + if commandString == '2': + command = 'Dazzle2' + effect = 'clienteffect/entertainer_dazzle_level_2.cef' + rLevel = 20 + + elif commandString == '3': + command = 'Dazzle3' + effect = 'clienteffect/entertainer_dazzle_level_3.cef' + rLevel = 30 + + if level < rLevel: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, command, effect, target) is True: + actor.sendSystemMessage('@performance:effect_perform_dazzle', 0) + return \ No newline at end of file diff --git a/scripts/commands/dismount.py b/scripts/commands/dismount.py new file mode 100644 index 00000000..08aeba54 --- /dev/null +++ b/scripts/commands/dismount.py @@ -0,0 +1,18 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + if not target: + return + + if actor.getObjectID() != target.getOwnerId(): + return + + + if core.mountService.isMounted(actor) is True: + core.mountService.dismount(actor, target) + + return + diff --git a/scripts/commands/distract.py b/scripts/commands/distract.py new file mode 100644 index 00000000..ec57828b --- /dev/null +++ b/scripts/commands/distract.py @@ -0,0 +1,38 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + level = actor.getLevel() + command = 'Distract1' + effect = 'clienteffect/entertainer_distract_level_1.cef' + rLevel = 18 # minimum level to perform this effect + + if commandString is None or commandString == '': + if level >= 75: + command = 'Distract3' + effect = 'clienteffect/entertainer_distract_level_3.cef' + + elif level >= 50: + command = 'Distract2' + effect = 'clienteffect/entertainer_distract_level_2.cef' + + if commandString is not None: + if commandString == '2': + command = 'Distract2' + effect = 'clienteffect/entertainer_distract_level_2.cef' + rLevel = 50 + + elif commandString == '3': + command = 'Distract3' + effect = 'clienteffect/entertainer_distract_level_3.cef' + rLevel = 75 + + if level < rLevel: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, command, effect, target) is True: + actor.sendSystemMessage('@performance:effect_perform_distract', 0) + return \ No newline at end of file diff --git a/scripts/commands/duel.py b/scripts/commands/duel.py index 4ce25bdf..cd26b240 100644 --- a/scripts/commands/duel.py +++ b/scripts/commands/duel.py @@ -22,6 +22,7 @@ def run(core, actor, target, commandString): if actor.getDuelList().contains(target): actor.sendSystemMessage('You already challenged ' + target.getCustomName() + ' to a duel.', 0) + return combatSvc.handleDuel(actor, target) diff --git a/scripts/commands/editbiography.py b/scripts/commands/editbiography.py new file mode 100644 index 00000000..cfdb755f --- /dev/null +++ b/scripts/commands/editbiography.py @@ -0,0 +1,10 @@ +import sys +from protocol.swg.objectControllerObjects import BiographyUpdate +from protocol.swg import ObjControllerMessage + +def setup(): + return + +def run(core, actor, target, commandString): + print ('do you do anything?!') + return \ No newline at end of file diff --git a/scripts/commands/eject.py b/scripts/commands/eject.py new file mode 100644 index 00000000..eafbd1f0 --- /dev/null +++ b/scripts/commands/eject.py @@ -0,0 +1,8 @@ +import sys + +def run(core, actor, target, commandString): + instSvc = core.instanceService + + if instSvc.isInInstance(actor): + instSvc.remove(instSvc.getActiveInstance(actor), actor) + diff --git a/scripts/commands/en_action_regen.py b/scripts/commands/en_action_regen.py new file mode 100644 index 00000000..c6905572 --- /dev/null +++ b/scripts/commands/en_action_regen.py @@ -0,0 +1,8 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.buffService.addBuffToCreature(actor, 'en_action_regen') + return \ No newline at end of file diff --git a/scripts/commands/en_holographic_image.py b/scripts/commands/en_holographic_image.py new file mode 100644 index 00000000..ad5e8eb7 --- /dev/null +++ b/scripts/commands/en_holographic_image.py @@ -0,0 +1,21 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + player = actor.getSlottedObject('ghost') + + maxHolos = 1 + + if actor.getSkillMod('expertise_en_holographic_additional_backup') is not None: + maxHolos += actor.getSkillMod('expertise_en_holographic_additional_backup').getBase() + + holo = core.objectService.createObject(actor.getTemplate(), 0, actor.getPlanet(), actor.getPosition(), actor.getOrientation(), None, False) + holo.setHologram(True) + holo.setCustomName('a Hologram') # a Hologram + holo.setHeight(actor.getHeight()) + holo.setCustomization(actor.getCustomization()) + + core.simulationService.add(holo, holo.getPosition().x, holo.getPosition().z, True) + return \ No newline at end of file diff --git a/scripts/commands/en_holographic_recall.py b/scripts/commands/en_holographic_recall.py new file mode 100644 index 00000000..66c6ae4e --- /dev/null +++ b/scripts/commands/en_holographic_recall.py @@ -0,0 +1,7 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/en_sprint_1.py b/scripts/commands/en_sprint_1.py new file mode 100644 index 00000000..1393d38e --- /dev/null +++ b/scripts/commands/en_sprint_1.py @@ -0,0 +1,8 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.buffService.addBuffToCreature(actor, 'en_sprint') + return \ No newline at end of file diff --git a/scripts/commands/endduel.py b/scripts/commands/endduel.py index 030ef9b3..5df64250 100644 --- a/scripts/commands/endduel.py +++ b/scripts/commands/endduel.py @@ -19,7 +19,7 @@ def run(core, actor, target, commandString): if not combatSvc.areInDuel(actor, target): return - combatSvc.handleEndDuel(actor, target) + combatSvc.handleEndDuel(actor, target, True) return \ No newline at end of file diff --git a/scripts/commands/featuredSolo.py b/scripts/commands/featuredSolo.py new file mode 100644 index 00000000..e7e943b0 --- /dev/null +++ b/scripts/commands/featuredSolo.py @@ -0,0 +1,14 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if actor.getLevel() < 90: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, 'FeaturedSolo', 'clienteffect/entertainer_featured_solo.cef', target) is True: + actor.sendSystemMessage('@performance:effect_perform_featured_solo', 0) + return \ No newline at end of file diff --git a/scripts/commands/firejet.py b/scripts/commands/firejet.py new file mode 100644 index 00000000..26261d56 --- /dev/null +++ b/scripts/commands/firejet.py @@ -0,0 +1,38 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + level = actor.getLevel() + command = 'FireJets1' + effect = 'clienteffect/entertainer_fire_jets_level_1.cef' + rLevel = 26 # minimum level to perform this effect + + if commandString is None or commandString == '': + if level >= 75: + command = 'FireJets3' + effect = 'clienteffect/entertainer_fire_jets_level_3.cef' + + elif level >= 50: + command = 'FireJets2' + effect = 'clienteffect/entertainer_fire_jets_level_2.cef' + + if commandString is not None: + if commandString == '2': + command = 'FireJets2' + effect = 'clienteffect/entertainer_fire_jets_level_2.cef' + rLevel = 50 + + elif commandString == '3': + command = 'FireJets3' + effect = 'clienteffect/entertainer_fire_jets_level_3.cef' + rLevel = 75 + + if level < rLevel: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, command, effect, target) is True: + actor.sendSystemMessage('@performance:effect_perform_fire_jets', 0) + return \ No newline at end of file diff --git a/scripts/commands/firejet2.py b/scripts/commands/firejet2.py new file mode 100644 index 00000000..f51758fb --- /dev/null +++ b/scripts/commands/firejet2.py @@ -0,0 +1,14 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if actor.getLevel() < 76: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, 'FireJetsB', 'clienteffect/entertainer_fire_jets2.cef', target) is True: + actor.sendSystemMessage('@performance:effect_perform_fire_jets_2', 0) + return \ No newline at end of file diff --git a/scripts/commands/floorLights.py b/scripts/commands/floorLights.py new file mode 100644 index 00000000..d69f30e8 --- /dev/null +++ b/scripts/commands/floorLights.py @@ -0,0 +1,14 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if actor.getLevel() < 82: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, 'DanceFloor', 'clienteffect/entertainer_dance_floor.cef', target) is True: + actor.sendSystemMessage('@performance:effect_perform_dance_floor', 0) + return \ No newline at end of file diff --git a/scripts/commands/flourish.py b/scripts/commands/flourish.py index 37c26077..51835b03 100644 --- a/scripts/commands/flourish.py +++ b/scripts/commands/flourish.py @@ -4,9 +4,9 @@ def setup(): return def run(core, actor, target, commandString): - - if len(commandString) <= 0: - actor.sendSystemMessage('@performance:flourish_not_valid', 0) + + if len(commandString) == 0 or commandString == None or commandString == "": + actor.sendSystemMessage('@performance:flourish_format') return try: @@ -22,11 +22,5 @@ def run(core, actor, target, commandString): if actor.getPerformanceId() <= 0: actor.sendSystemMessage('@performance:flourish_not_performing', 0) return - - actor.incFlourishCount() - actor.sendSystemMessage('@performance:flourish_perform', 0) - animation = 'skill_action_' + str(flourish) - if flourish == 9: - animation = 'mistake' - actor.doSkillAnimation(animation) + core.entertainmentService.performFlourish(actor, flourish) \ No newline at end of file diff --git a/scripts/commands/gc.py b/scripts/commands/gc.py new file mode 100644 index 00000000..b3559b3b --- /dev/null +++ b/scripts/commands/gc.py @@ -0,0 +1,13 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + group = core.objectService.getObject(actor.getGroupId()) + + if group is None: + return + + core.chatService.sendChatRoomMessage(actor, group.getChatRoomId(), commandString) + return \ No newline at end of file diff --git a/scripts/commands/getfriendlist.py b/scripts/commands/getfriendlist.py index 5826dfac..41188658 100644 --- a/scripts/commands/getfriendlist.py +++ b/scripts/commands/getfriendlist.py @@ -1,4 +1,4 @@ -from protocol.swg import ChatOnGetFriendsList +from protocol.swg.chat import ChatOnGetFriendsList import sys def setup(): diff --git a/scripts/commands/getplayerid.py b/scripts/commands/getplayerid.py index 9b334674..bb4141a4 100644 --- a/scripts/commands/getplayerid.py +++ b/scripts/commands/getplayerid.py @@ -4,22 +4,18 @@ def setup(): return def run(core, actor, target, commandString): - - if commandString.startswith("quart"): - print ('commnad: ' + commandString) - #cmdArgs = commandString.split(" ") - #qY = cmdArgs[1] - #qW = cmdArgs[2] - - quaternion = actor.getOrientation() - #tp = core.travelService.getTravelPointByName(actor.getPlanet().name, "Mos Eisley Starport") - #obj = tp.getShuttle() - target.setOrientation(quaternion) - print ('Orientation: qY- ' + str(quaternion.y) + ' --- qW- ' + str(quaternion.w)) - Console.println('Orientation: qY- ' + str(quaternion.y) + ' --- qW- ' + str(quaternion.w)) - return - - elif commandString.startswith("id"): - print ( str(target.getObjectId())) + commandArgs = commandString.split(" ") + target = core.chatService.getObjectByFirstName(commandArgs[0]) + + if len(commandArgs) > 1: + if commandArgs[1].startswith("id"): + actor.sendSystemMessage('Player Object ID: ' + target.getObjectId()) + return + + elif commandArgs[1].startswith("pid"): + actor.sendSystemMessage('Account ID: ' + str(core.characterService.getAccountId(target.getObjectId())), 0) + return + else: + actor.sendSystemMessage('Player Object ID: ' + str(target.getObjectId()) + ' Account ID: ' + str(core.characterService.getAccountId(target.getObjectId())), 0) return return \ No newline at end of file diff --git a/scripts/commands/giveitem.py b/scripts/commands/giveitem.py index de894888..2d5aba72 100644 --- a/scripts/commands/giveitem.py +++ b/scripts/commands/giveitem.py @@ -2,23 +2,26 @@ import sys def setup(): return - + def run(core, actor, target, commandString): - + if actor.getClient() and actor.getClient().isGM() == False: return - + if not commandString.startswith('object/tangible') and not commandString.startswith('object/weapon'): return - + object = core.objectService.createObject(commandString, actor.getPlanet()) + #object.setCustomizationVariable('/private/index_color_blade', 0x02) + #object.setCustomizationVariable('private/alternate_shader_blade', 0x02) + if not object: return - + inventory = actor.getSlottedObject('inventory') - + if inventory: inventory.add(object) - + return \ No newline at end of file diff --git a/scripts/commands/groupchat.py b/scripts/commands/groupchat.py new file mode 100644 index 00000000..03a6ed26 --- /dev/null +++ b/scripts/commands/groupchat.py @@ -0,0 +1,19 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + group = core.objectService.getObject(actor.getGroupId()) + + if group is None: + return + + room = core.chatService.getChatRoom(group.getChatRoomId()) + + if room is None: + return + + core.chatService.sendChatRoomMessage(actor, room.getRoomId(), 0, commandString) + return \ No newline at end of file diff --git a/scripts/commands/harvesteractivate.py b/scripts/commands/harvesteractivate.py new file mode 100644 index 00000000..5411445a --- /dev/null +++ b/scripts/commands/harvesteractivate.py @@ -0,0 +1,10 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.harvesterService.handleHarvesterActivateCommand(actor, target, commandString) + return + + \ No newline at end of file diff --git a/scripts/commands/harvesterdeactivate.py b/scripts/commands/harvesterdeactivate.py new file mode 100644 index 00000000..3a225b3f --- /dev/null +++ b/scripts/commands/harvesterdeactivate.py @@ -0,0 +1,10 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.harvesterService.handleHarvesterDeactivateCommand(actor, target, commandString) + return + + \ No newline at end of file diff --git a/scripts/commands/harvesterdiscardhopper.py b/scripts/commands/harvesterdiscardhopper.py new file mode 100644 index 00000000..3a52f754 --- /dev/null +++ b/scripts/commands/harvesterdiscardhopper.py @@ -0,0 +1,11 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + actor.sendSystemMessage('handleEmptyHarvester', 0) + core.harvesterService.handleEmptyHarvester(actor, target, commandString) + return + + \ No newline at end of file diff --git a/scripts/commands/harvesterselectresource.py b/scripts/commands/harvesterselectresource.py new file mode 100644 index 00000000..69c8c725 --- /dev/null +++ b/scripts/commands/harvesterselectresource.py @@ -0,0 +1,10 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.harvesterService.handleHarvesterSelectResourceCommand(actor, target, commandString) + return + + \ No newline at end of file diff --git a/scripts/commands/holoemote.py b/scripts/commands/holoemote.py new file mode 100644 index 00000000..36c15235 --- /dev/null +++ b/scripts/commands/holoemote.py @@ -0,0 +1,76 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + player = actor.getSlottedObject('ghost') + + if player is None: + return + + if commandString is not None: + commandString = commandString.lower() + + installedEmote = '' + + if actor.hasCooldown('holoEmote'): + actor.sendSystemMessage('Your Holo-Emote generator is in use or recharging.', 0) # Not sure if this is correct. + return + + if player.getHoloEmote() is not None: + installedEmote = player.getHoloEmote().replace('holoemote_','') + + if commandString is None or commandString == "": + commandString = installedEmote + + if installedEmote == None or installedEmote == "": + actor.sendSystemMessage('@image_designer:no_holoemote', 0) + return + + if commandString == 'help': + helpWindow = core.suiService.createMessageBox(1, 'HOLO-EMOTE HELP', holoPrompt(player, installedEmote), actor, actor, 10) + core.suiService.openSUIWindow(helpWindow) + return + + if player.getHoloEmoteUses() < 1: + actor.sendSystemMessage('@image_designer:no_charges_holoemote', 0) + return + + if commandString == "kitty": + commandString = "technokitty" + + if commandString != installedEmote and installedEmote != 'all': + actor.sendSystemMessage('Your installed Holo-Emote generator does not support that emote.', 0) + return + + effectObj = 'clienteffect/holoemote_' + commandString + '.cef' + actor.playEffectObject(effectObj, 'head') + player.setHoloEmoteUses(player.getHoloEmoteUses() - 1) + + actor.addCooldown('holoEmote', float(30)) + + return + +def holoPrompt(player, emote): + emotesToPlay = "Your Holo-Emote generator can only play the " + emote + " Holo-Emote.\n" + if emote == "all": + emotesToPlay = "Your Holo-Emote generator can play all Holo-Emotes available.\n" + + remainingCharges = "You have " + str(player.getHoloEmoteUses()) + " charges remaining.\n" + if player.getHoloEmoteUses() == 1: + remainingCharges = "You have 1 charge remaining.\n" + + body = "To play a Holo-Emote, type /holoemote .\n" \ +"To delete your Holo-Emote type /holoemote delete.\n" \ +"Purchasing a new Holo-Emote will automatically delete your current Holo-Emote.\n" \ +"\n" \ +"The available Holo-Emote names are:\n\n" \ +"Beehive\t Blossom\tBrainstorm\n" \ +"Bubblehead\t Bullhorns\tButterflies\n" \ +"Champagne\t Haunted\tHearts\n" \ +"Hologlitter\t Holonotes\tImperial\n" \ +"Kitty\t\t Phonytail\tRebel\n" \ +"Sparky" + + return emotesToPlay + remainingCharges + body diff --git a/scripts/commands/imagedesign.py b/scripts/commands/imagedesign.py new file mode 100644 index 00000000..d9a87e92 --- /dev/null +++ b/scripts/commands/imagedesign.py @@ -0,0 +1,33 @@ +from protocol.swg.objectControllerObjects import ImageDesignStartMessage +from protocol.swg import ObjControllerMessage +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if target is None and commandString is None: + design = ImageDesignStartMessage(actor.getObjectId(), actor.getObjectId(), actor.getObjectId()) + obj = ObjControllerMessage(11, design) + actor.getClient().getSession().write(obj.serialize()) + return + + else: + if target is None and commandString is not None: + target = core.chatService.getObjectByFirstName(commandString) + if target is None: + return + + if target.getGroupId() == actor.getGroupId(): + + tDesign = ImageDesignStartMessage(target.getObjectId(), actor.getObjectId(), target.getObjectId()) + tObj = ObjControllerMessage(11, tDesign) + target.getClient().getSession().write(tObj.serialize()) + + design = ImageDesignStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId()) + obj = ObjControllerMessage(11, design) + actor.getClient().getSession().write(obj.serialize()) + return + return + return \ No newline at end of file diff --git a/scripts/commands/inspire.py b/scripts/commands/inspire.py index 30df2e29..57cd0a29 100644 --- a/scripts/commands/inspire.py +++ b/scripts/commands/inspire.py @@ -7,12 +7,22 @@ def setup(): def run(core, actor, target, commandString): playerObject = actor.getSlottedObject('ghost') - print playerObject.getProfession() + if not playerObject or playerObject.getProfession() != "entertainer_1a": return - - print 'x' - if actor.getPosture() != 0x09: + + if target is None or actor.getObjectId() == target.getObjectId(): + openBuffWindow = BuffBuilderStartMessage(actor.getObjectId(), actor.getObjectId(), actor.getObjectId()) + objController = ObjControllerMessage(11, openBuffWindow) + actor.getClient().getSession().write(objController.serialize()) + return + + if target is None and commandString is not None: + target = core.chatService.getObjectByFirstName(commandString) + if target is None: + return + + if actor.getPosture() != 0x09 and target.getObjectId() != actor.getObjectId(): actor.sendSystemMessage('@performance:insp_buff_must_perform', 2) return @@ -23,13 +33,16 @@ def run(core, actor, target, commandString): else: actor.sendSystemMessage('@performance:insp_buff_must_listen', 2) return - - print ('Buffing Player: ' + str(target.getObjectId()) + ' or: ' + target.getCustomName()) - openBuffWindow = BuffBuilderStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId()) - objController = ObjControllerMessage(11, openBuffWindow) + + if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20): + actor.sendSystemMessage(target.getCustomName() + ' is too far away to inspire.', 0) + return + + builderWindow = BuffBuilderStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId()) + objController = ObjControllerMessage(11, builderWindow) actor.getClient().getSession().write(objController.serialize()) - openBuffWindow = BuffBuilderStartMessage(target.getObjectId(), actor.getObjectId(), target.getObjectId()) - objController2 = ObjControllerMessage(11, openBuffWindow) + recipientWindow = BuffBuilderStartMessage(target.getObjectId(), actor.getObjectId(), target.getObjectId()) + objController2 = ObjControllerMessage(11, recipientWindow) target.getClient().getSession().write(objController2.serialize()) return diff --git a/scripts/commands/laserShow.py b/scripts/commands/laserShow.py new file mode 100644 index 00000000..df9af800 --- /dev/null +++ b/scripts/commands/laserShow.py @@ -0,0 +1,14 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if actor.getLevel() < 42: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, 'LaserShow', 'clienteffect/entertainer_laser_show.cef', target) is True: + actor.sendSystemMessage('@performance:effect_perform_laser_show', 0) + return diff --git a/scripts/commands/lfg.py b/scripts/commands/lfg.py index dc0033c5..4d22f5ca 100644 --- a/scripts/commands/lfg.py +++ b/scripts/commands/lfg.py @@ -1,4 +1,4 @@ -from resources.common import PlayerFlags +from resources.datatables import PlayerFlags import sys def setup(): diff --git a/scripts/commands/lootall.py b/scripts/commands/lootall.py new file mode 100644 index 00000000..7d0154a3 --- /dev/null +++ b/scripts/commands/lootall.py @@ -0,0 +1,11 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + actor.sendSystemMessage('LootALL.', 0) + + return + \ No newline at end of file diff --git a/scripts/commands/me_buff_health_1.py b/scripts/commands/me_buff_health_1.py index 1bbefb27..ad02456d 100644 --- a/scripts/commands/me_buff_health_1.py +++ b/scripts/commands/me_buff_health_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_health') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_health_0', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_health_0', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_health_0', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_buff_health_2.py b/scripts/commands/me_buff_health_2.py index dad03f73..fb9880d2 100644 --- a/scripts/commands/me_buff_health_2.py +++ b/scripts/commands/me_buff_health_2.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_health_2') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_health', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_health', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_health', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_buff_health_3.py b/scripts/commands/me_buff_health_3.py index 7dce8f50..dd4c396c 100644 --- a/scripts/commands/me_buff_health_3.py +++ b/scripts/commands/me_buff_health_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_health_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_health_2', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_health_2', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_health_2', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_action_1.py b/scripts/commands/me_enhance_action_1.py index db09845c..9239af4d 100644 --- a/scripts/commands/me_enhance_action_1.py +++ b/scripts/commands/me_enhance_action_1.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_action_1') + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_action_1', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_1', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_1', actor) + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_action_2.py b/scripts/commands/me_enhance_action_2.py index cc476e94..1c9b8dff 100644 --- a/scripts/commands/me_enhance_action_2.py +++ b/scripts/commands/me_enhance_action_2.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_action_2') + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_action_2', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_2', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_2', actor) + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_action_3.py b/scripts/commands/me_enhance_action_3.py index e945d92c..a4d9dd4a 100644 --- a/scripts/commands/me_enhance_action_3.py +++ b/scripts/commands/me_enhance_action_3.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_action_3') + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_action_3', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_3', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_3', actor) + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_agility_1.py b/scripts/commands/me_enhance_agility_1.py index 5f489803..50b163ac 100644 --- a/scripts/commands/me_enhance_agility_1.py +++ b/scripts/commands/me_enhance_agility_1.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_agility_1') + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_agility_1', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_1', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_1', actor) + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_agility_2.py b/scripts/commands/me_enhance_agility_2.py index f3935dcb..0df03459 100644 --- a/scripts/commands/me_enhance_agility_2.py +++ b/scripts/commands/me_enhance_agility_2.py @@ -1,9 +1,19 @@ import sys def setup(core, actor, buff): - return + return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_agility_2') + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_agility_2', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_2', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_2', actor) + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_agility_3.py b/scripts/commands/me_enhance_agility_3.py index e1dfd7fd..fe489909 100644 --- a/scripts/commands/me_enhance_agility_3.py +++ b/scripts/commands/me_enhance_agility_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_agility_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_agility_3', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_3', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_3', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_block_1.py b/scripts/commands/me_enhance_block_1.py index c2758143..d1f27220 100644 --- a/scripts/commands/me_enhance_block_1.py +++ b/scripts/commands/me_enhance_block_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_melee_gb_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_melee_gb_1', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_melee_gb_1', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_melee_gb_1', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_dodge_1.py b/scripts/commands/me_enhance_dodge_1.py index bb1a034e..9702a6f3 100644 --- a/scripts/commands/me_enhance_dodge_1.py +++ b/scripts/commands/me_enhance_dodge_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_ranged_gb_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_ranged_gb_1', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_ranged_gb_1', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_ranged_gb_1', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_precision_1.py b/scripts/commands/me_enhance_precision_1.py index 398e39fa..a5ddce5a 100644 --- a/scripts/commands/me_enhance_precision_1.py +++ b/scripts/commands/me_enhance_precision_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_precision_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_precision_1', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_1', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_1', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_precision_2.py b/scripts/commands/me_enhance_precision_2.py index a9bba8a5..9c6906d2 100644 --- a/scripts/commands/me_enhance_precision_2.py +++ b/scripts/commands/me_enhance_precision_2.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_precision_2') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_precision_2', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_2', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_2', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_precision_3.py b/scripts/commands/me_enhance_precision_3.py index 8f218b1c..a4997749 100644 --- a/scripts/commands/me_enhance_precision_3.py +++ b/scripts/commands/me_enhance_precision_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_precision_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_precision_3', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_3', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_3', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_strength_1.py b/scripts/commands/me_enhance_strength_1.py index 6ed252e5..cf3529bc 100644 --- a/scripts/commands/me_enhance_strength_1.py +++ b/scripts/commands/me_enhance_strength_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_strength_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_strength_1', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_1', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_1', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_strength_2.py b/scripts/commands/me_enhance_strength_2.py index b56331fe..13ddfe22 100644 --- a/scripts/commands/me_enhance_strength_2.py +++ b/scripts/commands/me_enhance_strength_2.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_strength_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_strength_2', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_2', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_2', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_strength_3.py b/scripts/commands/me_enhance_strength_3.py index b56331fe..2a822999 100644 --- a/scripts/commands/me_enhance_strength_3.py +++ b/scripts/commands/me_enhance_strength_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_strength_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target and target.getSlottedObject("ghost"): + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(target, 'me_buff_strength_3', actor) + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_3', actor) + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_3', actor) + + return + \ No newline at end of file diff --git a/scripts/commands/meditate.py b/scripts/commands/meditate.py index 9c02f74f..8e0ed60f 100644 --- a/scripts/commands/meditate.py +++ b/scripts/commands/meditate.py @@ -6,8 +6,8 @@ def setup(): def run(core, actor, target, commandString): ##To do make it reset moodanimations when meditation is cancled. - if core.collectionService.isComplete(actor, 'inv_holocron_collection_02') is False: - return + # if core.collectionService.isComplete(actor, 'inv_holocron_collection_02') is False: + # return if actor.getPosture() != 0x08: actor.sendSystemMessage('You need to sit',0) diff --git a/scripts/commands/mount.py b/scripts/commands/mount.py new file mode 100644 index 00000000..40b6e080 --- /dev/null +++ b/scripts/commands/mount.py @@ -0,0 +1,16 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + if not target: + return + + if actor.getObjectID() != target.getOwnerId(): + return + + if core.mountService.isMounted(actor) is False: + core.mountService.mount(actor, target) + + return diff --git a/scripts/commands/movefurniture.py b/scripts/commands/movefurniture.py new file mode 100644 index 00000000..1f4a7148 --- /dev/null +++ b/scripts/commands/movefurniture.py @@ -0,0 +1,37 @@ +import sys +from engine.resources.scene import Point3D + +def setup(): + return + +def run(core, actor, target, commandString): + tarObj = core.objectService.getObject(actor.getTargetId()) + container = actor.getContainer() + parsedMsg = commandString.split(' ', 2) + + if core.housingService.getPermissions(actor, container): # i should probably relook into my permissions system... it kinda sucks + if parsedMsg[0] == "up": + core.simulationService.transform(tarObj, Point3D(0, float(parsedMsg[1]) * 0.01, 0)) + return + elif parsedMsg[0] == "down": + core.simulationService.transform(tarObj, Point3D(0, float(parsedMsg[1]) * -0.01, 0)) + return + elif parsedMsg[0] == "forward": + core.simulationService.transform(tarObj, Point3D(0, 0, float(parsedMsg[1]) * 0.01)) + return + elif parsedMsg[0] == "back": + core.simulationService.transform(tarObj, Point3D(0, 0, float(parsedMsg[1]) * -0.01)) + return + elif parsedMsg[0] == "right": + core.simulationService.transform(tarObj, Point3D(float(parsedMsg[1]) * 0.01, 0, 0)) + return + elif parsedMsg[0] == "left": + core.simulationService.transform(tarObj, Point3D(float(parsedMsg[1]) * -0.01, 0, 0)) + return + + elif container.getTemplate() == "object/cell/shared_cell.iff": + actor.sendSystemMessage("You do not have permission to access that container!", 0) + return + + return + \ No newline at end of file diff --git a/scripts/commands/newbiehelper.py b/scripts/commands/newbiehelper.py index cce8079c..277ecd01 100644 --- a/scripts/commands/newbiehelper.py +++ b/scripts/commands/newbiehelper.py @@ -1,4 +1,4 @@ -from resources.common import PlayerFlags +from resources.datatables import PlayerFlags import sys def setup(): diff --git a/scripts/commands/npcconversationselect.py b/scripts/commands/npcconversationselect.py new file mode 100644 index 00000000..01d6aa0d --- /dev/null +++ b/scripts/commands/npcconversationselect.py @@ -0,0 +1,10 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + print int(commandString) + core.conversationService.handleConversationSelection(actor, int(commandString)) + return + \ No newline at end of file diff --git a/scripts/commands/npcconversationstop.py b/scripts/commands/npcconversationstop.py new file mode 100644 index 00000000..f7b6b21b --- /dev/null +++ b/scripts/commands/npcconversationstop.py @@ -0,0 +1,10 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + if actor.getConversingNpc(): + core.conversationService.handleEndConversation(actor, actor.getConversingNpc()) + return + \ No newline at end of file diff --git a/scripts/commands/of_buff_def_1.py b/scripts/commands/of_buff_def_1.py index d7403af1..a83218bd 100644 --- a/scripts/commands/of_buff_def_1.py +++ b/scripts/commands/of_buff_def_1.py @@ -4,9 +4,7 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_1') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_1') + + core.buffService.addGroupBuff(actor, 'of_buff_def_1', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_2.py b/scripts/commands/of_buff_def_2.py index cd5fd42d..f8f1b6be 100644 --- a/scripts/commands/of_buff_def_2.py +++ b/scripts/commands/of_buff_def_2.py @@ -4,9 +4,7 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_2') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_2') + + core.buffService.addGroupBuff(actor, 'of_buff_def_2', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_3.py b/scripts/commands/of_buff_def_3.py index 85b34c54..9215bcf2 100644 --- a/scripts/commands/of_buff_def_3.py +++ b/scripts/commands/of_buff_def_3.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_3') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_3') + core.buffService.addGroupBuff(actor, 'of_buff_def_3', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_4.py b/scripts/commands/of_buff_def_4.py index 0831b80f..819db023 100644 --- a/scripts/commands/of_buff_def_4.py +++ b/scripts/commands/of_buff_def_4.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_4') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_4') + core.buffService.addGroupBuff(actor, 'of_buff_def_4', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_5.py b/scripts/commands/of_buff_def_5.py index f3577253..f919171c 100644 --- a/scripts/commands/of_buff_def_5.py +++ b/scripts/commands/of_buff_def_5.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_5') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_5') + core.buffService.addGroupBuff(actor, 'of_buff_def_5', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_6.py b/scripts/commands/of_buff_def_6.py index 890aea37..54aaa36e 100644 --- a/scripts/commands/of_buff_def_6.py +++ b/scripts/commands/of_buff_def_6.py @@ -4,9 +4,7 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_6') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_6') + + core.buffService.addGroupBuff(actor, 'of_buff_def_6', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_7.py b/scripts/commands/of_buff_def_7.py index 7235a9a0..a7b8e72a 100644 --- a/scripts/commands/of_buff_def_7.py +++ b/scripts/commands/of_buff_def_7.py @@ -4,9 +4,7 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_7') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_7') + + core.buffService.addGroupBuff(actor, 'of_buff_def_7', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_8.py b/scripts/commands/of_buff_def_8.py index 3ef2ec72..d84ba723 100644 --- a/scripts/commands/of_buff_def_8.py +++ b/scripts/commands/of_buff_def_8.py @@ -4,9 +4,7 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_8') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_8') + + core.buffService.addGroupBuff(actor, 'of_buff_def_8', actor) return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_9.py b/scripts/commands/of_buff_def_9.py index ecf3917c..45f6a8f8 100644 --- a/scripts/commands/of_buff_def_9.py +++ b/scripts/commands/of_buff_def_9.py @@ -4,9 +4,7 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_9') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_9') + + core.buffService.addGroupBuff(actor, 'of_buff_def_9', actor) return \ No newline at end of file diff --git a/scripts/commands/of_charge_1.py b/scripts/commands/of_charge_1.py index 8a1c683d..74dfbc79 100644 --- a/scripts/commands/of_charge_1.py +++ b/scripts/commands/of_charge_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_charge_1') + core.buffService.addBuffToCreature(actor, 'of_charge_1', actor) return \ No newline at end of file diff --git a/scripts/commands/of_drillmaster_1.py b/scripts/commands/of_drillmaster_1.py index 0b448c2b..179b494a 100644 --- a/scripts/commands/of_drillmaster_1.py +++ b/scripts/commands/of_drillmaster_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_drillmaster_1') + core.buffService.addGroupBuff(actor, 'of_drillmaster_1', actor) return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_1.py b/scripts/commands/of_focus_fire_1.py index d3a2cfb8..1cd0503c 100644 --- a/scripts/commands/of_focus_fire_1.py +++ b/scripts/commands/of_focus_fire_1.py @@ -4,11 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - group = core.objectService.getObject(actor.getGroupId()) - if group is not None: - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_focus_fire_1') - return + core.buffService.addGroupBuff(actor, 'of_focus_fire_1', actor) return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_2.py b/scripts/commands/of_focus_fire_2.py index cafae5bd..b7fe9e07 100644 --- a/scripts/commands/of_focus_fire_2.py +++ b/scripts/commands/of_focus_fire_2.py @@ -4,11 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_2') - group = core.objectService.getObject(actor.getGroupId()) - if group is not None: - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_focus_fire_2') - return + core.buffService.addGroupBuff(actor, 'of_focus_fire_2', actor) return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_3.py b/scripts/commands/of_focus_fire_3.py index 75129446..a7cd6223 100644 --- a/scripts/commands/of_focus_fire_3.py +++ b/scripts/commands/of_focus_fire_3.py @@ -4,11 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_3') - group = core.objectService.getObject(actor.getGroupId()) - if group is not None: - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_focus_fire_3') - return + core.buffService.addGroupBuff(actor, 'of_focus_fire_3', actor) return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_4.py b/scripts/commands/of_focus_fire_4.py index a5fa51f9..208f53e5 100644 --- a/scripts/commands/of_focus_fire_4.py +++ b/scripts/commands/of_focus_fire_4.py @@ -4,5 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - return \ No newline at end of file + core.buffService.addGroupBuff(actor, 'of_focus_fire_4', actor) + return + \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_5.py b/scripts/commands/of_focus_fire_5.py index a5fa51f9..7842cb4f 100644 --- a/scripts/commands/of_focus_fire_5.py +++ b/scripts/commands/of_focus_fire_5.py @@ -4,5 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - return \ No newline at end of file + core.buffService.addGroupBuff(actor, 'of_focus_fire_5', actor) + return + \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_6.py b/scripts/commands/of_focus_fire_6.py index a5fa51f9..ae915fa1 100644 --- a/scripts/commands/of_focus_fire_6.py +++ b/scripts/commands/of_focus_fire_6.py @@ -4,5 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - return \ No newline at end of file + core.buffService.addGroupBuff(actor, 'of_focus_fire_6', actor) + return + \ No newline at end of file diff --git a/scripts/commands/of_inspiration_1.py b/scripts/commands/of_inspiration_1.py index 001b0e69..9f0c3a20 100644 --- a/scripts/commands/of_inspiration_1.py +++ b/scripts/commands/of_inspiration_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_1') + core.buffService.addGroupBuff(actor, 'of_inspiration_1') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_2.py b/scripts/commands/of_inspiration_2.py index 01dbef43..c7ffcb5e 100644 --- a/scripts/commands/of_inspiration_2.py +++ b/scripts/commands/of_inspiration_2.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_2') + core.buffService.addGroupBuff(actor, 'of_inspiration_2') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_3.py b/scripts/commands/of_inspiration_3.py index a1d2296f..fd2e8b80 100644 --- a/scripts/commands/of_inspiration_3.py +++ b/scripts/commands/of_inspiration_3.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_3') + core.buffService.addGroupBuff(actor, 'of_inspiration_3') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_4.py b/scripts/commands/of_inspiration_4.py index d1954310..35bae1ab 100644 --- a/scripts/commands/of_inspiration_4.py +++ b/scripts/commands/of_inspiration_4.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_4') + core.buffService.addGroupBuff(actor, 'of_inspiration_4') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_5.py b/scripts/commands/of_inspiration_5.py index e2d35933..f9c9ba48 100644 --- a/scripts/commands/of_inspiration_5.py +++ b/scripts/commands/of_inspiration_5.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_5') + core.buffService.addGroupBuff(actor, 'of_inspiration_5') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_6.py b/scripts/commands/of_inspiration_6.py index c73a2000..ca05422d 100644 --- a/scripts/commands/of_inspiration_6.py +++ b/scripts/commands/of_inspiration_6.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_6') + core.buffService.addGroupBuff(actor, 'of_inspiration_6') return \ No newline at end of file diff --git a/scripts/commands/of_medical_sup_1.py b/scripts/commands/of_medical_sup_1.py index b7186ab6..52ae6c13 100644 --- a/scripts/commands/of_medical_sup_1.py +++ b/scripts/commands/of_medical_sup_1.py @@ -39,6 +39,8 @@ def spawnCrate(core, actor, shuttle): for i in range(0, 8): tactical = core.objectService.createObject('object/tangible/loot/generic_usable/shared_stim_syringe_generic.iff', actor.getPlanet()) #FIXME: Use the correct template tactical.setCustomName('Tactical Serum A') + tactical.setStringAttribute('proc_name', '@ui_buff:of_tactical_drop_6') + tactical.setAttachment("tempUseCount", 1) crate.add(tactical) for i in range(0, 8): diff --git a/scripts/commands/of_scatter_1.py b/scripts/commands/of_scatter_1.py index 8ee17071..3984ca10 100644 --- a/scripts/commands/of_scatter_1.py +++ b/scripts/commands/of_scatter_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_scatter_1') + core.buffService.addBuffToCreature(actor, 'of_scatter_1', actor) return \ No newline at end of file diff --git a/scripts/commands/permissionlistmodify.py b/scripts/commands/permissionlistmodify.py new file mode 100644 index 00000000..8c0108ba --- /dev/null +++ b/scripts/commands/permissionlistmodify.py @@ -0,0 +1,17 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + permissionType = 'Undetermined' + commandArgs = commandString.split(' ') + if len(commandArgs) > 3: + permissionType = commandArgs[2] + if permissionType=='ENTRY' | permissionType=='BAN': + core.housingService.handlePermissionListModify(actor, target, commandString) + if permissionType=='ADMIN' | permissionType=='HOPPER': + core.harvesterService.handlePermissionListModify(actor, target, commandString) + return + + \ No newline at end of file diff --git a/scripts/commands/placestructure.py b/scripts/commands/placestructure.py new file mode 100644 index 00000000..f6f5c122 --- /dev/null +++ b/scripts/commands/placestructure.py @@ -0,0 +1,32 @@ +import sys +import resources.objects.deed.Harvester_Deed + +def setup(): + return + +def run(core, actor, target, commandString): + cmdArgs = commandString.split(" ") + + deedId = long(cmdArgs[0]) + deed = core.objectService.getObject(deedId) + + if (actor.getAttachment('UsingHarvesterDeed') == '1'): + actor.setAttachment('UsingHarvesterDeed', '0'); + core.harvesterService.handlePlaceStructureCommand(actor, target, commandString) + return + + positionX = float(cmdArgs[1]) + positionZ = float(cmdArgs[2]) + #positionY = core.terrainService.getHeight(actor.getPlanetId(), positionX, positionZ) + 2 + + rotation = float(cmdArgs[3]) + + + #structureTemplate = deed.getAttachment("structureTemplate") + + core.housingService.placeStructure(actor, deed, positionX, positionZ, rotation) + + #building = core.objectService.createObject(structureTemplate, actor.getPlanet(), positionX, positionZ, positionY); + #core.simulationService.add(building, building.getPosition().x, building.getPosition().z); + + return \ No newline at end of file diff --git a/scripts/commands/planetchat.py b/scripts/commands/planetchat.py new file mode 100644 index 00000000..827fef78 --- /dev/null +++ b/scripts/commands/planetchat.py @@ -0,0 +1,13 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + room = core.chatService.getChatRoomByAddress('SWG.' + core.getGalaxyName() + '.' + actor.getPlanet().getName() + '.Planet') + + if room is None: + return + + core.chatService.sendChatRoomMessage(actor, room.getRoomId(), 0, commandString) + return \ No newline at end of file diff --git a/scripts/commands/pvp.py b/scripts/commands/pvp.py index 54f1a40c..8fbdc155 100644 --- a/scripts/commands/pvp.py +++ b/scripts/commands/pvp.py @@ -31,6 +31,11 @@ def run(core, actor, target, commandString): actor.setFaction('') actor.sendSystemMessage('@faction_recruiter:resign_complete', 0) + if commandString == 'neutral' or commandString == 'resign': + time.sleep(1) + actor.setFaction('') + actor.sendSystemMessage('@faction_recruiter:resign_complete', 0) + return time.sleep(1) actor.setFaction(commandString) @@ -42,31 +47,32 @@ def run(core, actor, target, commandString): if factionStatus == FactionStatus.OnLeave: actor.sendSystemMessage('@faction_recruiter:on_leave_to_covert', 0) - actor.setPvpStatus(PvpStatus.GoingCovert, True) + #actor.setPvpStatus(PvpStatus.GoingCovert, True) time.sleep(1) actor.setFactionStatus(FactionStatus.Combatant) - actor.setPvpStatus(PvpStatus.GoingCovert, False) - actor.setPvpStatus(PvpStatus.Enemy, True) + #actor.setPvpStatus(PvpStatus.GoingCovert, False) actor.sendSystemMessage('@faction_recruiter:covert_complete', 0) + actor.updatePvpStatus() return if factionStatus == FactionStatus.Combatant: actor.sendSystemMessage('@faction_recruiter:covert_to_overt', 0) - actor.setPvpStatus(PvpStatus.GoingOvert, True) + #actor.setPvpStatus(PvpStatus.GoingOvert, True) time.sleep(30) actor.setFactionStatus(FactionStatus.SpecialForces) - actor.setPvpStatus(PvpStatus.GoingOvert, False) - actor.setPvpStatus(PvpStatus.Overt | PvpStatus.Attackable | PvpStatus.Aggressive, True) + #actor.setPvpStatus(PvpStatus.GoingOvert, False) actor.sendSystemMessage('@faction_recruiter:overt_complete', 0) + actor.updatePvpStatus() return if factionStatus == FactionStatus.SpecialForces: actor.sendSystemMessage('@faction_recruiter:overt_to_covert', 0) - actor.setPvpStatus(PvpStatus.GoingCovert, True) + #actor.setPvpStatus(PvpStatus.GoingCovert, True) time.sleep(300) actor.setFactionStatus(FactionStatus.Combatant) - actor.setPvpStatus(PvpStatus.GoingCovert | PvpStatus.Overt | PvpStatus.Attackable | PvpStatus.Aggressive, False) + #actor.setPvpStatus(PvpStatus.GoingCovert, False) actor.sendSystemMessage('@faction_recruiter:covert_complete', 0) + actor.updatePvpStatus() return return diff --git a/scripts/commands/removeBuff.py b/scripts/commands/removeBuff.py new file mode 100644 index 00000000..cd63145f --- /dev/null +++ b/scripts/commands/removeBuff.py @@ -0,0 +1,15 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + buffObj = actor.getBuffByCRC(int(commandString)) + + if buffObj is None: + return + + if buffObj.isRemovableByPlayer() and buffObj.isDebuff() is False: + core.buffService.removeBuffFromCreature(actor, buffObj) + return \ No newline at end of file diff --git a/scripts/commands/requestbiography.py b/scripts/commands/requestbiography.py new file mode 100644 index 00000000..41ed2382 --- /dev/null +++ b/scripts/commands/requestbiography.py @@ -0,0 +1,24 @@ +import sys +from protocol.swg.objectControllerObjects import BiographyUpdate +from protocol.swg import ObjControllerMessage + + +# Called when open Character tab +def setup(): + return + +def run(core, actor, target, commandString): + + if actor is None: + return + + if target is None: + return + + tGhost = target.getSlottedObject('ghost') + + bioUpdate = BiographyUpdate(actor.getObjectId(), target.getObjectId(), tGhost.getBiography()) + objMsg = ObjControllerMessage(11, bioUpdate) + actor.getClient().getSession().write(objMsg.serialize()) + + return \ No newline at end of file diff --git a/scripts/commands/requestcoresample.py b/scripts/commands/requestcoresample.py new file mode 100644 index 00000000..2931588a --- /dev/null +++ b/scripts/commands/requestcoresample.py @@ -0,0 +1,8 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.surveyService.requestSampling(actor, target, commandString); + return \ No newline at end of file diff --git a/scripts/commands/requestsurvey.py b/scripts/commands/requestsurvey.py new file mode 100644 index 00000000..ccff8b8a --- /dev/null +++ b/scripts/commands/requestsurvey.py @@ -0,0 +1,8 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.surveyService.requestSurvey(actor, target, commandString); + return \ No newline at end of file diff --git a/scripts/commands/resourcecontainersplit.py b/scripts/commands/resourcecontainersplit.py new file mode 100644 index 00000000..ae3869c5 --- /dev/null +++ b/scripts/commands/resourcecontainersplit.py @@ -0,0 +1,8 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + target.splitContainer(actor,target,commandString) + return \ No newline at end of file diff --git a/scripts/commands/resourcecontainertransfer.py b/scripts/commands/resourcecontainertransfer.py new file mode 100644 index 00000000..8a369843 --- /dev/null +++ b/scripts/commands/resourcecontainertransfer.py @@ -0,0 +1,8 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + target.transferContainer(actor,target,commandString) + return \ No newline at end of file diff --git a/scripts/commands/resourceemptyhopper.py b/scripts/commands/resourceemptyhopper.py new file mode 100644 index 00000000..3a225b3f --- /dev/null +++ b/scripts/commands/resourceemptyhopper.py @@ -0,0 +1,10 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.harvesterService.handleHarvesterDeactivateCommand(actor, target, commandString) + return + + \ No newline at end of file diff --git a/scripts/commands/roleplay.py b/scripts/commands/roleplay.py index a862303d..312e93fc 100644 --- a/scripts/commands/roleplay.py +++ b/scripts/commands/roleplay.py @@ -1,5 +1,5 @@ from java.lang import Integer -from resources.common import PlayerFlags +from resources.datatables import PlayerFlags import sys def setup(): diff --git a/scripts/commands/rotatefurniture.py b/scripts/commands/rotatefurniture.py new file mode 100644 index 00000000..9d019d0c --- /dev/null +++ b/scripts/commands/rotatefurniture.py @@ -0,0 +1,29 @@ +import sys +from engine.resources.scene import Point3D + +def setup(): + return + +def run(core, actor, target, commandString): + tarObj = core.objectService.getObject(actor.getTargetId()) + + container = actor.getContainer() + parsedMsg = commandString.split(' ', 2) + + if core.housingService.getPermissions(actor, container): # i should probably relook into my permissions system... it kinda sucks + if parsedMsg[0] == "pitch": + core.simulationService.transform(tarObj, float(parsedMsg[1]), Point3D(1, 0, 0)) # this is messed up ??? + return + elif parsedMsg[0] == "yaw": + core.simulationService.transform(tarObj, float(parsedMsg[1]), Point3D(0, 1, 0)) # this is correct + return + elif parsedMsg[0] == "roll": + core.simulationService.transform(tarObj, float(parsedMsg[1]), Point3D(0, 0, 1)) # this is messed up ??? + return + + elif container.getTemplate() == "object/cell/shared_cell.iff": + actor.sendSystemMessage("You do not have permission to access that container!", 0) + return + + return + \ No newline at end of file diff --git a/scripts/commands/server.py b/scripts/commands/server.py index 946087e3..0514fa98 100644 --- a/scripts/commands/server.py +++ b/scripts/commands/server.py @@ -33,5 +33,8 @@ def run(core, actor, target, commandString): actor.sendSystemMessage(str(core.getActiveZoneClients()) + ' online characters.', 0) if command == 'shutdown': core.initiateShutdown() + if command == 'getheight': + actor.sendSystemMessage(str(core.terrainService.getHeight(actor.getPlanetId(), actor.getWorldPosition().x, actor.getWorldPosition().z)), 0) + return diff --git a/scripts/commands/serverdestroyobject.py b/scripts/commands/serverdestroyobject.py index e3541bce..81c01698 100644 --- a/scripts/commands/serverdestroyobject.py +++ b/scripts/commands/serverdestroyobject.py @@ -22,7 +22,7 @@ def run(core, actor, target, commandString): Console.println("Doesn't have permission!") return - parent.remove(target) + #parent.remove(target) core.objectService.destroyObject(target) return \ No newline at end of file diff --git a/scripts/commands/setbiography.py b/scripts/commands/setbiography.py new file mode 100644 index 00000000..2d113622 --- /dev/null +++ b/scripts/commands/setbiography.py @@ -0,0 +1,25 @@ +import sys +from protocol.swg.objectControllerObjects import BiographyUpdate +from protocol.swg import ObjControllerMessage + +def setup(): + return + +def run(core, actor, target, commandString): + if actor is None: + return + + if len(commandString) > 200: + return + + ghost = actor.getSlottedObject('ghost') + + if ghost is None: + return + + ghost.setBiography(commandString) + + bioUpdate = BiographyUpdate(actor.getObjectId(), actor.getObjectId(), commandString) + objMsg = ObjControllerMessage(11, bioUpdate) + actor.getClient().getSession().write(objMsg.serialize()) + return \ No newline at end of file diff --git a/scripts/commands/setcurrentskilltitle.py b/scripts/commands/setcurrentskilltitle.py index 43e9e5f4..160c9091 100644 --- a/scripts/commands/setcurrentskilltitle.py +++ b/scripts/commands/setcurrentskilltitle.py @@ -11,5 +11,6 @@ def run(core, actor, target, commandString): if playerObject is None: return - playerObject.setTitle(str(commandString)) + if str(commandString) in playerObject.getTitleList() or str(commandString) == "citizenship" or str(commandString) == "": playerObject.setTitle(str(commandString)) + return \ No newline at end of file diff --git a/scripts/commands/setgodmode.py b/scripts/commands/setgodmode.py index 785de8d0..e66d7982 100644 --- a/scripts/commands/setgodmode.py +++ b/scripts/commands/setgodmode.py @@ -1,5 +1,7 @@ import sys from engine.resources.scene import Point3D +from protocol.swg import ObjControllerMessage +from engine.resources.objects import SWGObject def setup(): return @@ -10,7 +12,7 @@ def run(core, actor, target, commandString): if not playerObject: return - + commandArgs = commandString.split(' ') command = commandArgs[0] if len(commandArgs) > 1: @@ -21,12 +23,24 @@ def run(core, actor, target, commandString): arg3 = commandArgs[3] if len(commandArgs) > 4: arg4 = commandArgs[4] + if len(commandArgs) > 5: + arg5 = commandArgs[5] if not command: return + if actor.getClient().isGM() is False: + return + + if playerObject.getGodLevel() == 0: + actor.addAbility("admin") + playerObject.setGodLevel(50) + if command == 'giveExperience' and arg1: core.playerService.giveExperience(actor, int(arg1)) + + if command == 'level' and arg1: + core.playerService.grantLevel(actor, int(arg1)) elif command == 'setSpeed' and arg1: actor.sendSystemMessage('Your speed was ' + str(actor.getSpeedMultiplierBase()) + '. Don\'t forget to set this back or it\'ll permanently imbalance your speed. Default without buffs or mods is 1.', 2) @@ -36,13 +50,69 @@ def run(core, actor, target, commandString): elif command == 'teleport' and arg2 and arg3 and arg4: position = Point3D(float(arg2), float(arg3), float(arg4)) core.simulationService.transferToPlanet(actor, core.terrainService.getPlanetByName(arg1), position, actor.getOrientation(), None) - + + elif command == 'teleportplayer' and arg1 and arg2 and arg3 and arg4 and arg5: + player = core.chatService.getObjectByFirstName(arg1) + if player: + position = Point3D(float(arg3), float(arg4), float(arg5)) + core.simulationService.transferToPlanet(player, core.terrainService.getPlanetByName(arg2), position, player.getOrientation(), None) + elif command == 'credits' and arg1: actor.setCashCredits(actor.getCashCredits() + int(arg1)) actor.sendSystemMessage('The Galactic Empire has transferred ' + arg1 + ' credits to you for your service.', 0) elif command == 'addability' and arg1: actor.addAbility(str(arg1)) - actor.sendSystemMessage('You have learned ' + arg1 + '') + actor.sendSystemMessage('You have learned ' + arg1 + '.', 0) + elif command == 'anim' and arg1: + actor.doSkillAnimation(arg1) + actor.sendSystemMessage('Performed ' + arg1 ,0) + + elif command == 'changeBio' and arg1: + actor.getSlottedObject('ghost').setBiography(arg1) + + elif command == 'spawn' and arg1 and arg2: + pos = actor.getWorldPosition() + core.spawnService.spawnCreature(arg1, actor.getPlanet().getName(), 0, pos.x, pos.y, pos.z, 1, 0, 1, 0, int(arg2)) + + elif command == 'instance' and arg1: + core.instanceService.queue(arg1, actor) + + elif command == 'action' and arg1: + actor.setAction(int(arg1)) + + elif command == 'health' and arg1: + actor.setHealth(int(arg1)) + + elif command == 'id': + actor.sendSystemMessage('Your id is: ' + str(actor.getObjectId()), 0) + + elif command == 'cust' and arg1 and arg2 and arg3: + obj = core.objectService.getObject(long(arg1)) + obj.setCustomizationVariable(str(arg2), int(arg3)) + + elif command == 'buff' and arg1: + core.buffService.addBuffToCreature(actor, str(arg1), actor) + + elif command == 'stealth': + if (actor.isInStealth()): + actor.setInStealth(False) + actor.setRadarVisible(True) + actor.sendSystemMessage('You are now visible to other players.', 0) + else: + actor.setInStealth(True) + actor.setRadarVisible(False) + actor.sendSystemMessage('You are now hidden from players. "Stealth Effect" is not implemented, however players still won\'t be able to see you. Type /setgodmode stealth again to be visible.', 0) + + elif command == 'holoEmote' and arg1: + playerObject.setHoloEmote('holoemote_' + arg1) + playerObject.setHoloEmoteUses(20) + actor.sendSystemMessage('Holo-Emote Generator set to ' + 'holoemote_' + arg1, 0) + + elif command == 'off': + if playerObject.getGodLevel > 0: + actor.removeAbility("admin") + playerObject.setGodLevel(0) + return diff --git a/scripts/commands/setspeed.py b/scripts/commands/setspeed.py index e5929c25..c73266de 100644 --- a/scripts/commands/setspeed.py +++ b/scripts/commands/setspeed.py @@ -5,6 +5,5 @@ def setup(): def run(core, actor, target, commandString): actor.setSpeedMultiplierBase(float(commandString)) - core.buffService.addBuffToCreature(actor, 'bh_prescience') return \ No newline at end of file diff --git a/scripts/commands/sitserver.py b/scripts/commands/sitserver.py index 2641b8a3..9e732988 100644 --- a/scripts/commands/sitserver.py +++ b/scripts/commands/sitserver.py @@ -23,10 +23,9 @@ def run(core, actor, target, commandString): actor.setStateBitmask(32768) actor.setTurnRadius(0) return - + # sit w/o chair actor.setPosture(8) actor.setSpeedMultiplierBase(0) actor.setTurnRadius(0) - return \ No newline at end of file diff --git a/scripts/commands/smokebomb.py b/scripts/commands/smokebomb.py new file mode 100644 index 00000000..a9da5abb --- /dev/null +++ b/scripts/commands/smokebomb.py @@ -0,0 +1,38 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + level = actor.getLevel() + command = 'SmokeBomb1' + effect = 'clienteffect/entertainer_smoke_bomb_level_1.cef' + rLevel = 50 # minimum level to perform this effect + + if commandString is None or commandString == '': + if level >= 90: + command = 'SmokeBomb3' + effect = 'clienteffect/entertainer_smoke_bomb_level_3.cef' + + elif level >= 75: + command = 'SmokeBomb2' + effect = 'clienteffect/entertainer_smoke_bomb_level_2.cef' + + if commandString is not None: + if commandString == '2': + command = 'SmokeBomb2' + effect = 'clienteffect/entertainer_smoke_bomb_level_2.cef' + rLevel = 75 + + elif commandString == '3': + command = 'SmokeBomb3' + effect = 'clienteffect/entertainer_smoke_bomb_level_3.cef' + rLevel = 90 + + if level < rLevel: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, command, effect, target) is True: + actor.sendSystemMessage('@performance:effect_perform_smoke_bomb', 0) + return \ No newline at end of file diff --git a/scripts/commands/spatialchatinternal.py b/scripts/commands/spatialchatinternal.py index 451f6318..3a588dac 100644 --- a/scripts/commands/spatialchatinternal.py +++ b/scripts/commands/spatialchatinternal.py @@ -9,6 +9,7 @@ def run(core, actor, target, commandString): chatMsg = parsedMsg[5] chatType = int(parsedMsg[1]) moodId = int(parsedMsg[2]) - chatService.handleSpatialChat(actor, target, chatMsg, chatType, moodId) + languageId = int(parsedMsg[4]) + chatService.spatialChat(actor, target, chatMsg, chatType, moodId, languageId, None) return \ No newline at end of file diff --git a/scripts/commands/spotlight.py b/scripts/commands/spotlight.py new file mode 100644 index 00000000..204c0017 --- /dev/null +++ b/scripts/commands/spotlight.py @@ -0,0 +1,39 @@ +from protocol.swg import PlayClientEffectObjectMessage +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + level = actor.getLevel() + command = 'SpotLight1' + effect = 'clienteffect/entertainer_spot_light_level_1.cef' + rLevel = 1 # minimum level to perform this effect + + if commandString is None or commandString == '': + if level >= 30: + command = 'SpotLight3' + effect = 'clienteffect/entertainer_spot_light_level_3.cef' + + elif level >= 20: + command = 'SpotLight2' + effect = 'clienteffect/entertainer_spot_light_level_2.cef' + + if commandString is not None: + if commandString == '2': + command = 'SpotLight2' + effect = 'clienteffect/entertainer_spot_light_level_2.cef' + rLevel = 20 + + elif commandString == '3': + command = 'SpotLight3' + effect = 'clienteffect/entertainer_spot_light_level_3.cef' + rLevel = 30 + + if level < rLevel: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, command, effect, None) is True: + actor.sendSystemMessage('@performance:effect_perform_spot_light', 0) + return diff --git a/scripts/commands/startdance.py b/scripts/commands/startdance.py index bae424d8..ce557827 100644 --- a/scripts/commands/startdance.py +++ b/scripts/commands/startdance.py @@ -4,6 +4,7 @@ from services.sui.SUIWindow import Trigger from services.sui.SUIService import ListBoxType from java.util import Vector from java.util import HashMap +from resources.datatables import Posture import sys def setup(): @@ -26,7 +27,6 @@ def run(core, actor, target, commandString): else: availableDances = entSvc.getAvailableDances(actor) - print availableDances suiSvc = core.suiService suiWindow = suiSvc.createListBox(ListBoxType.LIST_BOX_OK_CANCEL, "@performance:select_dance", "@performance:available_dances", availableDances, actor, None, 10) @@ -46,7 +46,7 @@ def handleStartdance(core, owner, eventType, returnList): if not item: return - + #if eventType == 0: startDance(coreObject, actorObject, '', int(item.getObjectId())) return @@ -74,8 +74,12 @@ def startDance(core, actor, danceName, visual): actor.sendSystemMessage('@performance:already_performing_self',0) return - #TODO: check costume, posture, etc? - + #TODO: check costume + + if actor.getPosture() != Posture.Upright: + actor.sendSystemMessage('@performance:dance_fail', 0) + return + actor.sendSystemMessage('@performance:dance_start_self',0); # i'm not sure about this. i think stopping just stopped any watchers anyways # method doesn't exist now. @@ -86,13 +90,13 @@ def startDance(core, actor, danceName, visual): if not actor.getPerformanceWatchee(): #this also notifies the client with a delta4 actor.setPerformanceWatchee(actor) - actor.addAudience(actor) + actor.addSpectator(actor) #this should send a CREO3 actor.setPosture(0x09); playerObject = actor.getSlottedObject('ghost') - if playerObject and playerObject.getProfession() == "entertainer_1a": + if playerObject and playerObject.getProfession() == "entertainer_1a" and actor.getLevel() != 90: entSvc.startPerformanceExperience(actor) dance = entSvc.getDance(visual) diff --git a/scripts/commands/stopdance.py b/scripts/commands/stopdance.py index ed2b7a44..1427496b 100644 --- a/scripts/commands/stopdance.py +++ b/scripts/commands/stopdance.py @@ -11,10 +11,5 @@ def run(core, actor, target, commandString): actor.sendSystemMessage('@performance:dance_not_performing', 0) return - #since we need to stop performance for any posture change, - # all packets are triggered in setPosture. - # this may not be very consistent, but it prevents - # duplicate code. - actor.setPosture(0x00) - + actor.stopPerformance() return diff --git a/scripts/commands/stopwatching.py b/scripts/commands/stopwatching.py index 7dc96fc8..555ee4ab 100644 --- a/scripts/commands/stopwatching.py +++ b/scripts/commands/stopwatching.py @@ -4,12 +4,14 @@ def setup(): return def run(core, actor, target, commandString): - dancer = actor.getPerformanceWatchee() - if not dancer: - return - + performer = target + if commandString is not None and target is None: + performer = core.chatService.getObjectByFirstName(commandString) + + if performer is None: + return + performer.removeSpectator(actor) actor.setPerformanceWatchee(None) - dancer.removeAudience(actor) if not actor.getPerformanceListenee(): actor.setMoodAnimation('') diff --git a/scripts/commands/teleporttarget.py b/scripts/commands/teleporttarget.py new file mode 100644 index 00000000..f497fe25 --- /dev/null +++ b/scripts/commands/teleporttarget.py @@ -0,0 +1,29 @@ +import sys +from engine.resources.scene import Point3D + +def setup(): + return + +def run(core, actor, target, commandString): + + playerObject = actor.getSlottedObject('ghost') + + if not playerObject: + return + + commandArgs = commandString.split(' ') + if len(commandArgs) > 0: + arg1 = commandArgs[0] + if len(commandArgs) > 1: + arg2 = commandArgs[1] + if len(commandArgs) > 2: + arg3 = commandArgs[2] + if len(commandArgs) > 3: + arg4 = commandArgs[3] + + if arg1 and arg2 and arg3 and arg4 target: + position = Point3D(float(arg2), float(arg3), float(arg4)) + core.simulationService.transferToPlanet(target, core.terrainService.getPlanetByName(arg1), position, actor.getOrientation(), None) + + + return diff --git a/scripts/commands/transferitemarmor.py b/scripts/commands/transferitemarmor.py index bfd8486d..2edbec74 100644 --- a/scripts/commands/transferitemarmor.py +++ b/scripts/commands/transferitemarmor.py @@ -5,6 +5,7 @@ def setup(): def run(core, actor, target, commandString): if core.equipmentService.canEquip(actor, target) is False: + actor.sendSystemMessage('@error_message:insufficient_skill', 0) return diff --git a/scripts/commands/transferitemmisc.py b/scripts/commands/transferitemmisc.py index ee205206..e30072ba 100644 --- a/scripts/commands/transferitemmisc.py +++ b/scripts/commands/transferitemmisc.py @@ -1,17 +1,49 @@ import sys - +from engine.resources.scene import Quaternion + def setup(): return def run(core, actor, target, commandString): - if core.equipmentService.canEquip(actor, target) is False: - return - - parsedMsg = commandString.split(' ', 3) objService = core.objectService containerID = long(parsedMsg[1]) container = objService.getObject(containerID) + actorContainer = actor.getContainer() + + if container == None: return + + if target.getTemplate() == 'object/tangible/item/shared_loot_cash.iff': + core.lootService.handleCreditPickUp(actor,target) + core.objectService.destroyObject(target) + return + + if target.isLootItem(): + target.setLootItem(0) + name=target.getCustomName() + if target.getCustomName() == None: + name='@' + target.getStfFilename() + ':' + target.getStfName() + + actor.sendSystemMessage('You looted ' + name + ' from corpse.', 0) + + if actorContainer != None and (container.getTemplate() == "object/cell/shared_cell.iff") & core.housingService.getPermissions(actor, actorContainer): + target.getContainer().transferTo(actor, container, target) + core.simulationService.teleport(target, actor.getPosition(), Quaternion(1,0,0,0), containerID) + return + + elif target.getContainer().getTemplate() == "object/cell/shared_cell.iff" and core.housingService.getPermissions(actor, target.getContainer()): + target.getContainer().transferTo(actor, container, target) + return + + elif actorContainer != None and container.getTemplate() == "object/cell/shared_cell.iff": + actor.sendSystemMessage("You do not have permission to access that container!", 0) + return + + if core.equipmentService.canEquip(actor, target) is False: + actor.sendSystemMessage('@error_message:insufficient_skill', 0) + return + + if target and container and target.getContainer(): oldContainer = target.getContainer() diff --git a/scripts/commands/transferitemweapon.py b/scripts/commands/transferitemweapon.py index 2640ac0c..6e356571 100644 --- a/scripts/commands/transferitemweapon.py +++ b/scripts/commands/transferitemweapon.py @@ -5,6 +5,7 @@ def setup(): def run(core, actor, target, commandString): if core.equipmentService.canEquip(actor, target) is False: + actor.sendSystemMessage('@error_message:insufficient_skill', 0) return diff --git a/scripts/commands/ventriloquism.py b/scripts/commands/ventriloquism.py new file mode 100644 index 00000000..1781fbd1 --- /dev/null +++ b/scripts/commands/ventriloquism.py @@ -0,0 +1,38 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + level = actor.getLevel() + command = 'Ventriloquism1' + effect = 'clienteffect/entertainer_ventriloquism_level_1.cef' + rLevel = 58 # minimum level to perform this effect + + if commandString is None or commandString == '': + if level >= 90: + command = 'Ventriloquism3' + effect = 'clienteffect/entertainer_ventriloquism_level_3.cef' + + elif level >= 75: + command = 'Ventriloquism2' + effect = 'clienteffect/entertainer_ventriloquism_level_2.cef' + + if commandString is not None: + if commandString == '2': + command = 'Ventriloquism2' + effect = 'clienteffect/entertainer_ventriloquism_level_2.cef' + rLevel = 75 + + elif commandString == '3': + command = 'Ventriloquism3' + effect = 'clienteffect/entertainer_ventriloquism_level_3.cef' + rLevel = 90 + + if level < rLevel: + actor.sendSystemMessage('@performance:effect_lack_skill_self', 0) + return + + if core.entertainmentService.performEffect(actor, command, effect, target) is True: + actor.sendSystemMessage('@performance:effect_perform_ventriloquism', 0) + return \ No newline at end of file diff --git a/scripts/commands/watch.py b/scripts/commands/watch.py index 5658d8fb..98627f98 100644 --- a/scripts/commands/watch.py +++ b/scripts/commands/watch.py @@ -4,31 +4,32 @@ def setup(): return def run(core, actor, target, commandString): - if not target: - #FIXME: should accept name as a parameter. - # since that probably needs support in many places, - # best find a generic place for it in the server code - return + entSvc = core.entertainmentService + + if not target and commandString is not None: + target = core.chatService.getObjectByFirstName(commandString) + + if target is None or actor.getPerformanceWatchee(): + return - if not target.isPlayer(): - actor.sendSystemMessage('@performance:dance_watch_npc') - return + if target.getWorldPosition().getDistance2D(actor.getWorldPosition()) > float(20): + actor.sendSystemMessage(target.getCustomName() + ' is too far away to watch.', 0) + return - entSvc = core.entertainmentService - perf = entSvc.getPerformanceByIndex(target.getPerformanceId()) + if not target.isPlayer(): + actor.sendSystemMessage('@performance:dance_watch_npc', 0) + return - if target.getPosture() != 0x09 or not perf or perf.getDanceVisualId() < 0: - actor.sendSystemMessage('@performance:dance_watch_not_dancing',0) - return - - oldWatchee = actor.getPerformanceWatchee() - if oldWatchee and oldWatchee != target: - oldWatchee.removeAudience(actor) - - actor.setPerformanceWatchee(target) - target.addAudience(actor) - actor.setMoodAnimation('entertained') - actor.sendSystemMessage('@performance:dance_watch_self',0) - return + perf = entSvc.getPerformanceByIndex(target.getPerformanceId()) + if target.getPosture() != 0x09 or not perf or perf.getDanceVisualId() < 0: + actor.sendSystemMessage(target.getCustomName() + ' is not dancing.',0) + return + + if target.getCoverCharge() > 0 or target.getCoverCharge() == None: + core.entertainmentService.handleCoverCharge(actor, target) + return + else: + core.entertainmentService.startSpectating(actor, target, True) + return \ No newline at end of file diff --git a/scripts/conversation/demo.py b/scripts/conversation/demo.py new file mode 100644 index 00000000..35ab97b6 --- /dev/null +++ b/scripts/conversation/demo.py @@ -0,0 +1,60 @@ +from resources.common import ConversationOption +from resources.common import OutOfBand +from resources.common import ProsePackage +from java.util import Vector +import sys + +def startConversation(core, actor, npc): + convSvc = core.conversationService + + convSvc.sendConversationMessage(actor, npc, OutOfBand(ProsePackage('conversation/respecseller:s_31'))) + + options = Vector() + options.add(ConversationOption(OutOfBand(ProsePackage('conversation/respecseller:s_32')), 0)) + options.add(ConversationOption(OutOfBand(ProsePackage('conversation/respecseller:s_33')), 1)) + convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen) + + return + +def handleFirstScreen(core, actor, npc, selection): + convSvc = core.conversationService + + # TODO: check for prices + + if selection == 0: # respec + convSvc.sendConversationMessage(actor, npc, OutOfBand(ProsePackage('conversation/respecseller:s_58'))) + + options = Vector() + options.add(ConversationOption(OutOfBand(ProsePackage('conversation/respecseller:s_60')), 0)) + options.add(ConversationOption(OutOfBand(ProsePackage('conversation/respecseller:s_64')), 1)) + convSvc.sendConversationOptions(actor, npc, options, handleRespecScreen) + + if selection == 1: # expertise reset + convSvc.sendConversationMessage(actor, npc, OutOfBand(ProsePackage('conversation/respecseller:s_35'))) + + options = Vector() + options.add(ConversationOption(OutOfBand(ProsePackage('conversation/respecseller:s_71')), 0)) + options.add(ConversationOption(OutOfBand(ProsePackage('conversation/respecseller:s_72')), 1)) + convSvc.sendConversationOptions(actor, npc, options, handleResetScreen) + + return + +def handleRespecScreen(core, actor, npc, selection): + if selection == 0: + core.skillService.sendRespecWindow(actor) + + core.conversationService.handleEndConversation(actor, npc) + + return + +def handleResetScreen(core, actor, npc, selection): + if selection == 0: + core.skillService.resetExpertise(actor) + + core.conversationService.handleEndConversation(actor, npc) + + return + +def endConversation(core, actor, npc): + core.conversationService.sendStopConversation(actor, npc, 'conversation/respecseller', 's_38') + return diff --git a/scripts/conversation/junk_dealer.py b/scripts/conversation/junk_dealer.py new file mode 100644 index 00000000..7c146b0f --- /dev/null +++ b/scripts/conversation/junk_dealer.py @@ -0,0 +1,572 @@ +from resources.common import ConversationOption +from resources.common import OutOfBand +from resources.common import ProsePackage +from resources.common import RadialOptions +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +sellItemListRef = 0 +buyItemListRef = 0 +coreRef = 0 +junkDealerRef = 0 + +def startConversation(core, actor, npc): + #core.lootService.prepInv(actor) + global coreRef + global junkDealerRef + global sellItemListRef + sellItemListRef = core.lootService.getSellableInventoryItems(actor) + coreRef = core + junkDealerRef = npc + convSvc = core.conversationService + prose = ProsePackage('conversation/junk_dealer_generic', 's_bef51e38') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + prose2 = ProsePackage('conversation/junk_dealer_generic', 's_54fab04f') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + prose3 = ProsePackage('conversation/junk_dealer_generic', 's_48') + outOfBand3 = OutOfBand() + outOfBand3.addProsePackage(prose3) + prose4 = ProsePackage('conversation/junk_dealer_generic', 's_3aa18b2d') + outOfBand4 = OutOfBand() + outOfBand4.addProsePackage(prose4) + option1 = ConversationOption(outOfBand2, 0) + option2 = ConversationOption(outOfBand3, 1) + option3 = ConversationOption(outOfBand4, 1) + + options = Vector() + options.add(option1) + options.add(option2) + options.add(option3) + + if len(core.lootService.getBuyHistory(actor,npc))!= 0: + prose5 = ProsePackage('conversation/junk_dealer_generic', 's_43') + outOfBand5 = OutOfBand() + outOfBand5.addProsePackage(prose5) + option4 = ConversationOption(outOfBand5, 1) + options.add(option4) + + convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen) + return + +def handleFirstScreen(core, actor, npc, selection): + + convSvc = core.conversationService + + if selection == 0: + # sell items + + prose = ProsePackage('conversation/junk_dealer_generic', 's_84a67771') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + + sellItemListRef = core.lootService.getSellableInventoryItems(actor) + + if len(sellItemListRef) == 0: + actor.sendSystemMessage('@loot_dealer:no_items', 1) + startConversation(coreRef,actor,junkDealerRef) + return # no point + + window = core.suiService.createSUIWindow('Script.listBox', actor, npc, 0) + window.setProperty('bg.caption.lblTitle:Text', '@loot_dealer:sell_title') + window.setProperty('Prompt.lblPrompt:Text', '@loot_dealer:sell_prompt') + + for item in sellItemListRef: + window.addListBoxMenuItem(item.getCustomName(), 0); + + window.setProperty('btnOther:visible', 'True') + window.setProperty('btnCancel:visible', 'True') + window.setProperty('btnOk:visible', 'True') + window.setProperty('btnOther:Text', '@loot_dealer:examine') + window.setProperty('btnCancel:Text', '@cancel') + window.setProperty('btnOk:Text', '@loot_dealer:btn_sell') + returnList = Vector() + returnList.add('List.lstList:SelectedRow') + + window.addHandler(0, '', Trigger.TRIGGER_OK, returnList, sellWindowCallBack) + window.addHandler(1, '', Trigger.TRIGGER_CANCEL, returnList, sellWindowCallBack) + window.addHandler(2, '', Trigger.TRIGGER_UPDATE, returnList, sellWindowCallBack) + core.suiService.openSUIWindow(window); + + return + + if selection == 1: + # mark items + window = core.suiService.createSUIWindow('Script.listBox', actor, npc, 0) + window.setProperty('bg.caption.lblTitle:Text', '@loot_dealer:junk_no_sell_title') + window.setProperty('Prompt.lblPrompt:Text', '@loot_dealer:junk_no_sell_desc') + + sellItemListRef = core.lootService.getSellableInventoryItems(actor) + + for item in sellItemListRef: + nameString = item.getCustomName() + nameString = 'TestJunkItem' + if item.isNoSell(): + nameString = '[*No Sell*]' + item.getCustomName() + window.addListBoxMenuItem(nameString, 0) + else: + nameString = '[Sellable]' + item.getCustomName() + window.addListBoxMenuItem(nameString, 0) + + window.setProperty('btnOther:visible', 'True') + window.setProperty('btnCancel:visible', 'True') + window.setProperty('btnOk:visible', 'True') + window.setProperty('btnOther:Text', '@loot_dealer:examine') + window.setProperty('btnCancel:Text', '@cancel') + window.setProperty('btnOk:Text', '@loot_dealer:junk_no_sell_button') + returnList = Vector() + returnList.add('List.lstList:SelectedRow') + + #window.addHandler(0, '', Trigger.TRIGGER_OK, returnList, noSellWindowCallBack) + #window.addHandler(1, '', Trigger.TRIGGER_CANCEL, returnList, noSellWindowCallBack) + window.addHandler(0, '',9, returnList, noSellWindowCallBack) + window.addHandler(1, '',10, returnList, noSellWindowCallBack) + window.addHandler(2, '',11, returnList, noSellWindowCallBack) + core.suiService.openSUIWindow(window); + return + + if selection == 2: + lootKitScreen1(core, actor, npc) + + + if selection == 3: + # buy back + + buyHistory = coreRef.lootService.getBuyHistory(actor,npc) + if len(buyHistory) == 0: + actor.sendSystemMessage('@loot_dealer:no_buy_back_items_found', 1) + startConversation(coreRef,actor,npc) + return + + prose = ProsePackage('conversation/junk_dealer_generic', 's_44') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + + window = core.suiService.createSUIWindow('Script.listBox', actor, npc, 0) + window.setProperty('bg.caption.lblTitle:Text', '@loot_dealer:buy_back_title') + window.setProperty('Prompt.lblPrompt:Text', '@loot_dealer:buy_back_prompt') + + buyHistory = core.lootService.getBuyHistory(actor,junkDealerRef) + if buyHistory==None: + return + + + + for item in buyHistory: + junkDealerPrice = item.getJunkDealerPrice() + if junkDealerPrice == 0: + junkDealerPrice = 20 + nameString = '[%s' % junkDealerPrice + ']' + item.getCustomName() #% + window.addListBoxMenuItem(nameString, 0) + + window.setProperty('btnOther:visible', 'True') + window.setProperty('btnCancel:visible', 'True') + window.setProperty('btnOk:visible', 'True') + window.setProperty('btnOther:Text', '@loot_dealer:examine') + window.setProperty('btnCancel:Text', '@cancel') + window.setProperty('btnOk:Text', '@loot_dealer:btn_buy_back') + returnList = Vector() + returnList.add('List.lstList:SelectedRow') + + window.addHandler(0, '', Trigger.TRIGGER_OK, returnList, buyBackWindowCallBack) + window.addHandler(1, '', Trigger.TRIGGER_CANCEL, returnList, buyBackWindowCallBack) + window.addHandler(2, '', Trigger.TRIGGER_UPDATE, returnList, buyBackWindowCallBack) + core.suiService.openSUIWindow(window); + + return + +def handleRespecScreen(core, actor, npc, selection): + + if selection == 0: + core.skillService.sendRespecWindow(actor) + + core.conversationService.handleEndConversation(actor, npc) + + return + + +def handleResetScreen(core, actor, npc, selection): + + if selection == 0: + core.skillService.resetExpertise(actor) + + core.conversationService.handleEndConversation(actor, npc) + + return + +def endConversation(core, actor, npc): + core.conversationService.sendStopConversation(actor, npc, 'conversation/junk_dealer_generic', 's_4bd9d15e') + return + + +def sellWindowCallBack(owner, window, eventType, returnList): + + sellItemListRef = coreRef.lootService.getSellableInventoryItems(owner) + + #sell + if eventType == 0: + + sellItem = sellItemListRef.get(int(returnList.get(0))) + + #if len(sellItemListRef): + #owner.sendSystemMessage('@junk_dealer:no_items', 1) + #return + + if sellItem == None: + owner.sendSystemMessage('@junk_dealer:no_items', 1) + return + + inventory = owner.getSlottedObject('inventory') + + + junkDealerPrice = sellItem.getJunkDealerPrice() + if junkDealerPrice == 0: + junkDealerPrice = 20 + owner.setCashCredits(owner.getCashCredits()+junkDealerPrice) + + # add item to 10-item junk dealer history + coreRef.lootService.addToBuyHistory(owner,junkDealerRef,sellItem) + + owner.sendSystemMessage(OutOfBand.ProsePackage("@junk_dealer:prose_sold_junk", "TT", sellItem.getCustomName(),junkDealerPrice), 0) + + inventory.remove(sellItem) + + coreRef.suiService.closeSUIWindow(owner,window.getWindowId()) + handleFirstScreen(coreRef, owner, junkDealerRef, 0) + return + + #cancel + if eventType == 1: + owner.sendSystemMessage("cancel ", 1) + coreRef.suiService.closeSUIWindow(owner,window.getWindowId()) + startConversation(coreRef,owner,junkDealerRef) + return + + #examine + if eventType == 2: + owner.sendSystemMessage("examine ", 1) + #coreRef.suiService.closeSUIWindow(window,window.getWindowId()) + #startConversation(coreRef,owner,junkDealerRef) + #owner.sendSystemMessage('Examine', 0) + return + + return + +def noSellWindowCallBack(owner, window, eventType, returnList): + + if returnList.get(0) == 0: + startConversation(coreRef,owner,junkDealerRef) + return + + #toggle + if eventType == 0: + owner.sendSystemMessage('Toggle', 0) + toggleItem = sellItemListRef.get(int(returnList.get(0))) + if toggleItem.isNoSell(): + toggleItem.setNoSell(0) + else: + toggleItem.setNoSell(1) + + #core.suiService.closeSUIWindow(window) + handleFirstScreen(coreRef, owner, junkDealerRef, 1) + return + + #cancel + if eventType == 1: + owner.sendSystemMessage('Cancle', 0) + sellItem = returnList.get(0) + startConversation(coreRef,owner,junkDealerRef) + return + + #examine + if eventType == 2: + owner.sendSystemMessage('Ex', 0) + sellItem = returnList.get(0) + startConversation(coreRef,owner,junkDealerRef) + owner.sendSystemMessage('Examine', 0) + return + +def buyBackWindowCallBack(owner, window, eventType, returnList): + + convSvc = coreRef.conversationService + + if returnList.get(0) == 0: + startConversation(coreRef,owner,junkDealerRef) + return + + #buy + if eventType == 0: + index = int(returnList.get(0)) + buyHistory = coreRef.lootService.getBuyHistory(owner,junkDealerRef) + if len(buyHistory) == 0: + owner.sendSystemMessage('@loot_dealer:no_buy_back_items_found', 1) + startConversation(coreRef,owner,junkDealerRef) + return + + buyBackItem = buyHistory.get(index) + + if buyBackItem == None: + owner.sendSystemMessage('@loot_dealer:no_buy_back_items_found', 0) + startConversation(coreRef,owner,junkDealerRef) + return + + if owner.getInventoryItemCount() >= 80: + prose = ProsePackage('conversation/junk_dealer_generic', 's_47') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(owner, junkDealerRef, outOfBand) + return + + junkDealerPrice = buyBackItem.getJunkDealerPrice() + if junkDealerPrice == 0: + junkDealerPrice = 20 + owner.setCashCredits(owner.getCashCredits()+junkDealerPrice) + + if owner.getCashCredits()>=junkDealerPrice: + owner.setCashCredits(owner.getCashCredits()-junkDealerPrice) + inventory = owner.getSlottedObject('inventory') + inventory.add(buyBackItem) + owner.sendSystemMessage('You buy back ' + buyBackItem.getCustomName() + ' for %s' % junkDealerPrice + ' credits.', 0) + # remove from junk dealer history + coreRef.lootService.removeBoughtBackItemFromHistory(owner,junkDealerRef,buyBackItem) + else: + owner.sendSystemMessage('@loot_dealer:prose_no_buy_back', 0) + + coreRef.suiService.closeSUIWindow(owner,window.getWindowId()); + handleFirstScreen(coreRef, owner, junkDealerRef, 3) + return + + #cancel + if eventType == 1: + owner.sendSystemMessage('Cancel', 0) + sellItem = returnList.get(0) + startConversation(coreRef,owner,junkDealerRef) + return + + #examine + if eventType == 2: + owner.sendSystemMessage('Ex', 0) + sellItem = returnList.get(0) + startConversation(coreRef,owner,junkDealerRef) + owner.sendSystemMessage('Examine', 0) + return + +def handleLootScreenSelection1(core, actor, npc, selection): + + convSvc = core.conversationService + if selection == 0: + lootKitScreen1(core, actor, npc) + + return + +def handleLootScreenSelection2(core, actor, npc, selection): + + convSvc = core.conversationService + if selection == 0: + lootKitScreen2(core, actor, npc) + + return + +def handleLootScreenSelection3(core, actor, npc, selection): + + convSvc = core.conversationService + if selection == 0: + lootKitScreen3(core, actor, npc) + + return + +def handleLootScreenSelection4(core, actor, npc, selection): + + convSvc = core.conversationService + if selection == 0: + lootKitScreen4(core, actor, npc) + + return + +def handleLootScreenSelection5(core, actor, npc, selection): + + convSvc = core.conversationService + if selection == 0: + lootKitScreen5a(core, actor, npc) + + if selection == 1: + lootKitScreen5b(core, actor, npc) + + return + +def handleLootScreenSelection6(core, actor, npc, selection): + + convSvc = core.conversationService + prose = ProsePackage('conversation/junk_dealer_generic', 's_14efaaa2') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + if selection == 0: + template = 'object/tangible/loot/collectible/kits/shared_orange_rug_kit.iff' + addLootKit(core, actor, npc,template) + + if selection == 1: + template = 'object/tangible/loot/collectible/kits/shared_blue_rug_kit.iff' + addLootKit(core, actor, npc,template) + + if selection == 2: + template = 'object/tangible/loot/collectible/kits/shared_gong_kit.iff' + addLootKit(core, actor, npc,template) + + if selection == 3: + template = 'object/tangible/loot/collectible/kits/shared_light_table_kit.iff' + addLootKit(core, actor, npc,template) + + if selection == 4: + template = 'object/tangible/loot/collectible/kits/shared_sculpture_kit.iff' + addLootKit(core, actor, npc,template) + + return + +def addLootKit(core, actor, npc,template): + + kit = core.objectService.createObject(template, actor.getPlanet()) + inventory = actor.getSlottedObject('inventory') + inventory.add(kit) + return + +def lootKitScreen1(core, actor, npc): + + convSvc = core.conversationService + prose = ProsePackage('conversation/junk_dealer_generic', 's_d9e6b751') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + + prose2 = ProsePackage('conversation/junk_dealer_generic', 's_6d53d062') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + + option1 = ConversationOption(outOfBand2, 0) + + options = Vector() + options.add(option1) + + convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection2) + + return + +def lootKitScreen2(core, actor, npc): + + convSvc = core.conversationService + prose = ProsePackage('conversation/junk_dealer_generic', 's_e29f48dc') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + + prose2 = ProsePackage('conversation/junk_dealer_generic', 's_324b9b0f') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + + option1 = ConversationOption(outOfBand2, 0) + + options = Vector() + options.add(option1) + + convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection3) + + return + +def lootKitScreen3(core, actor, npc): + + convSvc = core.conversationService + prose = ProsePackage('conversation/junk_dealer_generic', 's_12fe83a6') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + + prose2 = ProsePackage('conversation/junk_dealer_generic', 's_e1a103e5') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + + option1 = ConversationOption(outOfBand2, 0) + + options = Vector() + options.add(option1) + + convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection4) + + return + +def lootKitScreen4(core, actor, npc): + + convSvc = core.conversationService + prose = ProsePackage('conversation/junk_dealer_generic', 's_4d65752') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + + prose2 = ProsePackage('conversation/junk_dealer_generic', 's_d347bee3') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + prose3 = ProsePackage('conversation/junk_dealer_generic', 's_b60b73f8') + outOfBand3 = OutOfBand() + outOfBand3.addProsePackage(prose3) + + option1 = ConversationOption(outOfBand2, 0) + option2 = ConversationOption(outOfBand3, 0) + + options = Vector() + options.add(option1) + options.add(option2) + + convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection5) + + return + +def lootKitScreen5a(core, actor, npc): + + convSvc = core.conversationService + prose = ProsePackage('conversation/junk_dealer_generic', 's_3fc7eb45') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + + prose2 = ProsePackage('conversation/junk_dealer_generic', 's_ee977dee') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + prose3 = ProsePackage('conversation/junk_dealer_generic', 's_8f39769') + outOfBand3 = OutOfBand() + outOfBand3.addProsePackage(prose3) + prose4 = ProsePackage('conversation/junk_dealer_generic', 's_fe657cdd') + outOfBand4 = OutOfBand() + outOfBand4.addProsePackage(prose4) + prose5 = ProsePackage('conversation/junk_dealer_generic', 's_9ede4b84') + outOfBand5 = OutOfBand() + outOfBand5.addProsePackage(prose5) + prose6 = ProsePackage('conversation/junk_dealer_generic', 's_87c5851b') + outOfBand6 = OutOfBand() + outOfBand6.addProsePackage(prose6) + + option1 = ConversationOption(outOfBand2, 0) + option2 = ConversationOption(outOfBand3, 0) + option3 = ConversationOption(outOfBand4, 0) + option4 = ConversationOption(outOfBand5, 0) + option5 = ConversationOption(outOfBand6, 0) + + options = Vector() + options.add(option1) + options.add(option2) + options.add(option3) + options.add(option4) + options.add(option5) + + convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection6) + + return + +def lootKitScreen5b(core, actor, npc): + + startConversation(core,actor,npc) + return \ No newline at end of file diff --git a/scripts/conversation/respec.py b/scripts/conversation/respec.py new file mode 100644 index 00000000..f929002e --- /dev/null +++ b/scripts/conversation/respec.py @@ -0,0 +1,96 @@ +from resources.common import ConversationOption +from resources.common import OutOfBand +from resources.common import ProsePackage +from java.util import Vector +import sys + +def startConversation(core, actor, npc): + convSvc = core.conversationService + prose = ProsePackage('conversation/respecseller', 's_31') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + prose2 = ProsePackage('conversation/respecseller', 's_32') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + prose3 = ProsePackage('conversation/respecseller', 's_33') + outOfBand3 = OutOfBand() + outOfBand3.addProsePackage(prose3) + option1 = ConversationOption(outOfBand2, 0) + option2 = ConversationOption(outOfBand3, 1) + options = Vector() + options.add(option1) + options.add(option2) + convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen) + return + +def handleFirstScreen(core, actor, npc, selection): + + if selection == 0: + # respec + # TODO: check for prices + convSvc = core.conversationService + prose = ProsePackage('conversation/respecseller', 's_58') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + prose2 = ProsePackage('conversation/respecseller', 's_60') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + prose3 = ProsePackage('conversation/respecseller', 's_64') + outOfBand3 = OutOfBand() + outOfBand3.addProsePackage(prose3) + option1 = ConversationOption(outOfBand2, 0) + option2 = ConversationOption(outOfBand3, 1) + options = Vector() + options.add(option1) + options.add(option2) + convSvc.sendConversationOptions(actor, npc, options, handleRespecScreen) + return + if selection == 1: + # expertise reset + # TODO: check for prices + convSvc = core.conversationService + prose = ProsePackage('conversation/respecseller', 's_35') + outOfBand = OutOfBand() + outOfBand.addProsePackage(prose) + convSvc.sendConversationMessage(actor, npc, outOfBand) + prose2 = ProsePackage('conversation/respecseller', 's_71') + outOfBand2 = OutOfBand() + outOfBand2.addProsePackage(prose2) + prose3 = ProsePackage('conversation/respecseller', 's_72') + outOfBand3 = OutOfBand() + outOfBand3.addProsePackage(prose3) + option1 = ConversationOption(outOfBand2, 0) + option2 = ConversationOption(outOfBand3, 1) + options = Vector() + options.add(option1) + options.add(option2) + convSvc.sendConversationOptions(actor, npc, options, handleResetScreen) + + + return + +def handleRespecScreen(core, actor, npc, selection): + + if selection == 0: + core.skillService.sendRespecWindow(actor) + + core.conversationService.handleEndConversation(actor, npc) + + return + + +def handleResetScreen(core, actor, npc, selection): + + if selection == 0: + core.skillService.resetExpertise(actor) + + core.conversationService.handleEndConversation(actor, npc) + + return + +def endConversation(core, actor, npc): + core.conversationService.sendStopConversation(actor, npc, 'conversation/respecseller', 's_38') + return + \ No newline at end of file diff --git a/scripts/demo.py b/scripts/demo.py index 92b340a8..1b5dbf3d 100644 --- a/scripts/demo.py +++ b/scripts/demo.py @@ -2,23 +2,23 @@ import sys def CreateStartingCharacter(core, object): -# testObject = core.objectService.createObject('object/weapon/ranged/rifle/shared_rifle_t21.iff', object.getPlanet()) -# testObject.setCustomName('This is a Jython Rifle') -# testObject.setStringAttribute('crafter', 'Light') -# testObject.setDamageType('@obj_attr_n:armor_eff_energy') -# testObject.setElementalType('@obj_attr_n:elemental_cold') -# testObject.setStringAttribute('cat_wpn_damage.damage', '0-0') -# testObject.setMinDamage(425) -# testObject.setMaxDamage(1150) -# testObject.setElementalDamage(50) -# testObject.setIntAttribute('cat_wpn_damage.weapon_dps', testObject.getDamagePerSecond()) -# testObject.setIntAttribute('cat_skill_mod_bonus.@stat_n:precision_modified', 35) -# object.addSkillMod('kinetic' , 0) -# object.addSkillMod('energy' , 0) -# object.addSkillMod('heat' , 0) -# object.addSkillMod('cold' , 0) -# object.addSkillMod('acid' , 0) -# object.addSkillMod('electricity' , 0) + #testObject = core.objectService.createObject('object/weapon/ranged/rifle/shared_rifle_t21.iff', object.getPlanet()) + #testObject.setCustomName('This is a Jython Rifle') + #testObject.setStringAttribute('crafter', 'Light') + #testObject.setDamageType('@obj_attr_n:armor_eff_energy') + #testObject.setElementalType('@obj_attr_n:elemental_cold') + #testObject.setStringAttribute('cat_wpn_damage.damage', '0-0') + #testObject.setMinDamage(425) + #testObject.setMaxDamage(1150) + #testObject.setElementalDamage(50) + #testObject.setIntAttribute('cat_wpn_damage.weapon_dps', testObject.getDamagePerSecond()) + #testObject.setIntAttribute('cat_skill_mod_bonus.@stat_n:precision_modified', 35) + #object.addSkillMod('kinetic' , 0) + #object.addSkillMod('energy' , 0) + #object.addSkillMod('heat' , 0) + #object.addSkillMod('cold' , 0) + #object.addSkillMod('acid' , 0) + #object.addSkillMod('electricity' , 0) #object.addSkillMod('combat_strikethrough_value' , 50) #object.addSkillMod('display_only_dodge' , 2000) #object.addSkillMod('display_only_parry' , 1000) @@ -29,40 +29,40 @@ def CreateStartingCharacter(core, object): #object.addSkillMod('display_only_block' , 2000) #object.addSkillMod('combat_block_value' , 0) -# inventory = object.getSlottedObject('inventory') -# if not inventory: -# return -# inventory.add(testObject) +# #inventory = object.getSlottedObject('inventory') +# #if not inventory: +# # return +# #inventory.add(testObject) -# testClothing = core.objectService.createObject('object/tangible/wearables/cape/shared_cape_rebel_01.iff', object.getPlanet()) -# testClothing.setCustomName('Test Cape') -# testCloak = core.objectService.createObject('object/tangible/wearables/robe/shared_robe_jedi_dark_s05.iff', object.getPlanet()) -# testCloak.setCustomName('Test Cloak') - -# inventory.add(testClothing) -# inventory.add(testCloak) -# profession = object.getSlottedObject('ghost').getProfession() -# if profession == 'commando_1a': -# object.addSkillMod('expertise_devastation_bonus' , 20) -# testObject2 = core.objectService.createObject('object/weapon/ranged/heavy/shared_heavy_rocket_launcher.iff', object.getPlanet()) -# testObject2.setCustomName('Test Heavy Weapon') -# testObject2.setStringAttribute('crafter', 'Light') -# testObject2.setDamageType('@obj_attr_n:armor_eff_kinetic') -# testObject2.setElementalType('@obj_attr_n:elemental_heat') -# testObject2.setStringAttribute('cat_wpn_damage.damage', '0-0') -# testObject2.setMinDamage(550) -# testObject2.setMaxDamage(1315) -# testObject2.setElementalDamage(216) -# testObject2.setIntAttribute('cat_wpn_damage.weapon_dps', testObject2.getDamagePerSecond()) -# inventory.add(testObject2) +# #testClothing = core.objectService.createObject('object/tangible/wearables/cape/shared_cape_rebel_01.iff', object.getPlanet()) +# #testClothing.setCustomName('Test Cape') +# #testCloak = core.objectService.createObject('object/tangible/wearables/robe/shared_robe_jedi_dark_s05.iff', object.getPlanet()) +# #testCloak.setCustomName('Test Cloak') +# #inventory.add(testClothing) +# #inventory.add(testCloak) +# #profession = object.getSlottedObject('ghost').getProfession() +# #if profession == 'commando_1a': +# # object.addSkillMod('expertise_devastation_bonus' , 20) +# # testObject2 = core.objectService.createObject('object/weapon/ranged/heavy/shared_heavy_rocket_launcher.iff', object.getPlanet()) +# # testObject2.setCustomName('Test Heavy Weapon') +# # testObject2.setStringAttribute('crafter', 'Light') +# # testObject2.setDamageType('@obj_attr_n:armor_eff_kinetic') +# # testObject2.setElementalType('@obj_attr_n:elemental_heat') +# # testObject2.setStringAttribute('cat_wpn_damage.damage', '0-0') +# # testObject2.setMinDamage(550) +# # testObject2.setMaxDamage(1315) +# # testObject2.setElementalDamage(216) +# # testObject2.setIntAttribute('cat_wpn_damage.weapon_dps', testObject2.getDamagePerSecond()) +# # inventory.add(testObject2) +# # addProfessionAbilities(core, object, profession) # heroism1 = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s10.iff', object.getPlanet()) -# heroism1.setStfFilename('static_item_n') -# heroism1.setStfName('item_necklace_set_hero_01_01') -# heroism1.setDetailFilename('static_item_d') -# heroism1.setDetailName('item_necklace_set_hero_01_01') + # heroism1.setStfFilename('static_item_n') + # heroism1.setStfName('item_necklace_set_hero_01_01') + # heroism1.setDetailFilename('static_item_d') + # heroism1.setDetailName('item_necklace_set_hero_01_01') # heroism1.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') # heroism1.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') # heroism1.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') @@ -71,22 +71,22 @@ def CreateStartingCharacter(core, object): # heroism1.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) -# inventory = object.getSlottedObject('inventory') -# if not inventory: -# return -# inventory.add(heroism1) + # inventory = object.getSlottedObject('inventory') + # if not inventory: + # return + # inventory.add(heroism1) -# heroism2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_r.iff', object.getPlanet()) -# heroism2.setStfFilename('static_item_n') -# heroism2.setStfName('item_bracelet_r_set_hero_01_01') -# heroism2.setDetailFilename('static_item_d') -# heroism2.setDetailName('item_bracelet_r_set_hero_01_01') -# heroism2.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') -# heroism2.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') -# heroism2.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') -# heroism2.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) -# heroism2.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) -# heroism2.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) + # heroism2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_r.iff', object.getPlanet()) + # heroism2.setStfFilename('static_item_n') + # heroism2.setStfName('item_bracelet_r_set_hero_01_01') + # heroism2.setDetailFilename('static_item_d') + # heroism2.setDetailName('item_bracelet_r_set_hero_01_01') + # heroism2.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') + # heroism2.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') + # heroism2.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + # heroism2.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) + # heroism2.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) + # heroism2.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) # inventory = object.getSlottedObject('inventory') @@ -102,27 +102,27 @@ def CreateStartingCharacter(core, object): # heroism3.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') # heroism3.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') # heroism3.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') -# heroism3.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) -# heroism3.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) -# heroism3.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) + # heroism3.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) + # heroism3.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) + # heroism3.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) -# inventory = object.getSlottedObject('inventory') -# if not inventory: -# return -# inventory.add(heroism3) + # inventory = object.getSlottedObject('inventory') + # if not inventory: + # return + # inventory.add(heroism3) -# heroism4 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s04.iff', object.getPlanet()) -# heroism4.setStfFilename('static_item_n') -# heroism4.setStfName('item_ring_set_hero_01_01') -# heroism4.setDetailFilename('static_item_d') -# heroism4.setDetailName('item_ring_set_hero_01_01') -# heroism4.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') -# heroism4.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') -# heroism4.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') -# heroism4.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) -# heroism4.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) -# heroism4.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) + # heroism4 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s04.iff', object.getPlanet()) + # heroism4.setStfFilename('static_item_n') + # heroism4.setStfName('item_ring_set_hero_01_01') + # heroism4.setDetailFilename('static_item_d') + # heroism4.setDetailName('item_ring_set_hero_01_01') + # heroism4.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') + # heroism4.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') + # heroism4.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + # heroism4.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) + # heroism4.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) + # heroism4.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) # inventory = object.getSlottedObject('inventory') @@ -130,39 +130,39 @@ def CreateStartingCharacter(core, object): # return # inventory.add(heroism4) -# heroism5 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s02.iff', object.getPlanet()) -# heroism5.setStfFilename('static_item_n') -# heroism5.setStfName('item_ring_a_set_hero') -# heroism5.setDetailFilename('static_item_d') -# heroism5.setDetailName('item_ring_a_set_hero') -# heroism5.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') -# heroism5.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') -# heroism5.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') -# heroism5.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) -# heroism5.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) -# heroism5.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) + # heroism5 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s02.iff', object.getPlanet()) + # heroism5.setStfFilename('static_item_n') + # heroism5.setStfName('item_ring_a_set_hero') + # heroism5.setDetailFilename('static_item_d') + # heroism5.setDetailName('item_ring_a_set_hero') + # heroism5.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1') + # heroism5.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2') + # heroism5.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + # heroism5.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30) + # heroism5.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30) + # heroism5.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30) -# inventory = object.getSlottedObject('inventory') -# if not inventory: -# return -# inventory.add(heroism5) + # inventory = object.getSlottedObject('inventory') + # if not inventory: + # return + # inventory.add(heroism5) return def addProfessionAbilities(core, object, profession): # if profession == 'force_sensitive_1a': # testObject = core.objectService.createObject('object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gcw_s01_gen5.iff', object.getPlanet()) -# testObject.setCustomName('Lightsaber') +# testObject.setCustomName('Lightsaber') # testObject.setStringAttribute('crafter', 'Light') # testObject.setDamageType('@obj_attr_n:armor_eff_energy') -# testObject.setElementalType('@obj_attr_n:elemental_cold') +# testObject.setElementalType('@obj_attr_n:elemental_cold') # testObject.setStringAttribute('cat_wpn_damage.damage', '0-0') # testObject.setMinDamage(600) # testObject.setMaxDamage(1190) -# testObject.setElementalDamage(72) +# testObject.setElementalDamage(72) # testObject.setIntAttribute('cat_wpn_damage.weapon_dps', testObject.getDamagePerSecond()) -# inventory = object.getSlottedObject('inventory') +# inventory = object.getSlottedObject('inventory') # inventory.add(testObject) ##Case Sensitive @@ -203,16 +203,16 @@ def addProfessionAbilities(core, object, profession): # object.addAbility('co_hw_dot') # object.addAbility('co_ae_hw_dot') #elif profession == 'bounty_hunter_1a': - # object.addAbility('bh_shields_1') - # object.addAbility('bh_dm_8') - # object.addAbility('bh_sh_3') - # object.addAbility('bh_armor_sprint_1') - # object.addAbility('bh_prescience') - # object.addAbility('bh_dm_crit_8') - # object.addAbility('crippleShot') - # object.addAbility('bh_fumble_6') - # object.addAbility('bh_intimidate_6') - # object.addAbility('bh_flawless_strike') + #object.addAbility('bh_shields_1') + #object.addAbility('bh_dm_8') + #object.addAbility('bh_sh_3') + #object.addAbility('bh_armor_sprint_1') + #object.addAbility('bh_prescience') + #object.addAbility('bh_dm_crit_8') + #object.addAbility('crippleShot') + #object.addAbility('bh_fumble_6') + #object.addAbility('bh_intimidate_6') + #object.addAbility('bh_flawless_strike') # direfate1 = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s03.iff', object.getPlanet()) # direfate1.setStfFilename('static_item_n') @@ -404,71 +404,71 @@ def addProfessionAbilities(core, object, profession): # enforcer2.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_bh_dps_1') # enforcer2.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_dps_2') # enforcer2.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_dps_3') - # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) - # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) - # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) - # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) - - # inventory = object.getSlottedObject('inventory') - # if not inventory: - # return - # inventory.add(enforcer2) - - # enforcer3 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s02_l.iff', object.getPlanet()) - # enforcer3.setStfFilename('static_item_n') - # enforcer3.setStfName('item_bracelet_l_set_bh_dps_01_01') - # enforcer3.setDetailFilename('static_item_d') - # enforcer3.setDetailName('item_bracelet_l_set_bh_dps_01_01') - # enforcer3.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_bh_dps_1') - # enforcer3.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_dps_2') - # enforcer3.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_dps_3') - # enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) - # enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) - # enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) - # enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) - - # inventory = object.getSlottedObject('inventory') - # if not inventory: - # return - # inventory.add(enforcer3) - - # enforcer4 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s01.iff', object.getPlanet()) - # enforcer4.setStfFilename('static_item_n') - # enforcer4.setStfName('item_ring_set_bh_dps_01_01') - # enforcer4.setDetailFilename('static_item_d') - # enforcer4.setDetailName('item_ring_set_bh_dps_01_01') - # enforcer4.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_bh_dps_1') - # enforcer4.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_dps_2') - # enforcer4.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_dps_3') - # enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) - # enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) - # enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) - # enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) - - # inventory = object.getSlottedObject('inventory') - # if not inventory: - # return - # inventory.add(enforcer4) - - # enforcer5 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s03.iff', object.getPlanet()) - # enforcer5.setStfFilename('static_item_n') - # enforcer5.setStfName('item_ring_a_set_bh_dps') - # enforcer5.setDetailFilename('static_item_d') - # enforcer5.setDetailName('item_ring_a_set_bh_dps') - # enforcer5.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_bh_dps_1') - # enforcer5.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_dps_2') - # enforcer5.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_dps_3') - # enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) - # enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) - # enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) - # enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) - - # inventory = object.getSlottedObject('inventory') - # if not inventory: - # return - # inventory.add(enforcer5) - # return - #return + # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) + # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) + # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) + # enforcer2.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) + + # inventory = object.getSlottedObject('inventory') + # if not inventory: + # return + # inventory.add(enforcer2) + + # enforcer3 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s02_l.iff', object.getPlanet()) + # enforcer3.setStfFilename('static_item_n') + # enforcer3.setStfName('item_bracelet_l_set_bh_dps_01_01') + #enforcer3.setDetailFilename('static_item_d') + # enforcer3.setDetailName('item_bracelet_l_set_bh_dps_01_01') + # enforcer3.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_bh_dps_1') + # enforcer3.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_dps_2') + # enforcer3.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_dps_3') + #enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) + # enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) + # enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) + # enforcer3.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) + + #inventory = object.getSlottedObject('inventory') + #if not inventory: + # return + #inventory.add(enforcer3) + + #enforcer4 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s01.iff', object.getPlanet()) + #enforcer4.setStfFilename('static_item_n') + #enforcer4.setStfName('item_ring_set_bh_dps_01_01') + #enforcer4.setDetailFilename('static_item_d') + #enforcer4.setDetailName('item_ring_set_bh_dps_01_01') + #enforcer4.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_bh_dps_1') + #enforcer4.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_dps_2') + #enforcer4.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_dps_3') + #enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) + #enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) + #enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) + #enforcer4.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) + + #inventory = object.getSlottedObject('inventory') + #if not inventory: + # return + #inventory.add(enforcer4) + + #enforcer5 = core.objectService.createObject('object/tangible/wearables/ring/shared_ring_s03.iff', object.getPlanet()) + #enforcer5.setStfFilename('static_item_n') + #enforcer5.setStfName('item_ring_a_set_bh_dps') + #enforcer5.setDetailFilename('static_item_d') + #enforcer5.setDetailName('item_ring_a_set_bh_dps') + #enforcer5.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_bh_dps_1') + #enforcer5.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_dps_2') + #enforcer5.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_dps_3') + #enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm' , 1) + #enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_action_line_dm_crit' , 1) + #enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_buff_duration_line_bh_return_fire' , 1) + #enforcer5.setIntAttribute('cat_skill_mod_bonus.@stat_n:expertise_cooldown_line_dm' , 1) + + #inventory = object.getSlottedObject('inventory') + #if not inventory: + # return + #inventory.add(enforcer5) + #return + #return - return \ No newline at end of file + return diff --git a/scripts/equipment/bonus_sets/set_bonus_bh_dps.py b/scripts/equipment/bonus_sets/set_bonus_bh_dps.py new file mode 100644 index 00000000..61b48b47 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_bh_dps.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_bh_dps") + + bonusSet.addRequiredItem("item_band_set_bh_dps_01_01") + bonusSet.addRequiredItem("item_ring_set_bh_dps_01_01") + bonusSet.addRequiredItem("item_necklace_set_bh_dps_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_bh_dps_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_bh_dps_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_dps_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_dps_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_dps_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_dps_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_dps_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_dps_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_bh_utility_a.py b/scripts/equipment/bonus_sets/set_bonus_bh_utility_a.py new file mode 100644 index 00000000..609c2d28 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_bh_utility_a.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_bh_utility_a") + + bonusSet.addRequiredItem("item_band_set_bh_utility_a_01_01") + bonusSet.addRequiredItem("item_ring_set_bh_utility_a_01_01") + bonusSet.addRequiredItem("item_necklace_set_bh_utility_a_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_bh_utility_a_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_bh_utility_a_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_utility_a_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_utility_a_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_utility_a_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_utility_a_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_utility_a_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_utility_a_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_bh_utility_b.py b/scripts/equipment/bonus_sets/set_bonus_bh_utility_b.py new file mode 100644 index 00000000..ed612f4e --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_bh_utility_b.py @@ -0,0 +1,31 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_bh_utility_b") + + bonusSet.addRequiredItem("item_band_set_bh_utility_b_01_01") + bonusSet.addRequiredItem("item_ring_set_bh_utility_b_01_01") + bonusSet.addRequiredItem("item_necklace_set_bh_utility_b_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_bh_utility_b_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_bh_utility_b_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_utility_b_1", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_bh_utility_b_1_sys', 0) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_utility_b_2", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_bh_utility_b_2_sys', 0) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_bh_utility_b_3", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_bh_utility_b_3_sys', 0) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_utility_b_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_utility_b_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_bh_utility_b_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_hero.py b/scripts/equipment/bonus_sets/set_bonus_hero.py new file mode 100644 index 00000000..0b1b27c6 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_hero.py @@ -0,0 +1,31 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_hero") + + bonusSet.addRequiredItem("item_band_set_hero_01_01") + bonusSet.addRequiredItem("item_ring_set_hero_01_01") + bonusSet.addRequiredItem("item_necklace_set_hero_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_hero_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_hero_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_hero_1", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_hero_1_sys', 0) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_hero_2", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_hero_2_sys', 0) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_hero_3", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_hero_3_sys', 0) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_hero_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_hero_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_hero_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_imperial_snow_armor.py b/scripts/equipment/bonus_sets/set_bonus_imperial_snow_armor.py new file mode 100644 index 00000000..fc245ba4 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_imperial_snow_armor.py @@ -0,0 +1,45 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_imperial_snow_armor") + + bonusSet.addRequiredItem("backpack_snowtrooper") + bonusSet.addRequiredItem("armor_snowtrooper_belt") + bonusSet.addRequiredItem("armor_snowtrooper_bicep_l") + bonusSet.addRequiredItem("armor_snowtrooper_bicep_r") + bonusSet.addRequiredItem("armor_snowtrooper_boots") + bonusSet.addRequiredItem("armor_snowtrooper_bracer_l") + bonusSet.addRequiredItem("armor_snowtrooper_bracer_r") + bonusSet.addRequiredItem("armor_snowtrooper_chest_plate") + bonusSet.addRequiredItem("armor_snowtrooper_gloves") + bonusSet.addRequiredItem("armor_snowtrooper_helmet") + bonusSet.addRequiredItem("armor_snowtrooper_leggings") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_imperial_snow_armor_3", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_imperial_snow_armor_3_sys', 0) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_imperial_snow_armor_5", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_imperial_snow_armor_5_sys', 0) + elif wornItems == 7: + core.buffService.addBuffToCreature(creature, "set_bonus_imperial_snow_armor_7", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_imperial_snow_armor_7_sys', 0) + elif wornItems == 9: + core.buffService.addBuffToCreature(creature, "set_bonus_imperial_snow_armor_9", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_imperial_snow_armor_9_sys', 0) + elif wornItems == 11: + core.buffService.addBuffToCreature(creature, "set_bonus_imperial_snow_armor_11", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_imperial_snow_armor_11_sys', 0) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_imperial_snow_armor_3") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_imperial_snow_armor_5") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_imperial_snow_armor_7") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_imperial_snow_armor_9") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_imperial_snow_armor_11") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_jedi_robe.py b/scripts/equipment/bonus_sets/set_bonus_jedi_robe.py new file mode 100644 index 00000000..734e9c89 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_jedi_robe.py @@ -0,0 +1,40 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_jedi_robe") + + # Waistpack + bonusSet.addRequiredItem("object/tangible/wearables/backpack/shared_fannypack_s01.iff") + + # Jedi Robes - Light + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_light_s01.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_light_s02.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_light_s03.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_light_s04.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_light_s05.iff") + + # Jedi Robes - Dark + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_dark_s01.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_dark_s02.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_dark_s03.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_dark_s04.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_jedi_dark_s05.iff") + + # Jedi Cloaks + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_s32.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_s32_h1.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_s33.iff") + bonusSet.addRequiredItem("object/tangible/wearables/robe/shared_robe_s33_h1.iff") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 2: + core.buffService.addBuffToCreature(creature, "set_bonus_jedi_robe_1", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_jedi_robe_1_sys', 0) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_jedi_robe_1") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_medic_dps.py b/scripts/equipment/bonus_sets/set_bonus_medic_dps.py new file mode 100644 index 00000000..f1966755 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_medic_dps.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_medic_dps") + + bonusSet.addRequiredItem("item_band_set_medic_dps_01_01") + bonusSet.addRequiredItem("item_ring_set_medic_dps_01_01") + bonusSet.addRequiredItem("item_necklace_set_medic_dps_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_medic_dps_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_medic_dps_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_dps_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_dps_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_dps_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_dps_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_dps_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_dps_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_medic_utility_a.py b/scripts/equipment/bonus_sets/set_bonus_medic_utility_a.py new file mode 100644 index 00000000..c21b2adb --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_medic_utility_a.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_medic_utility_a") + + bonusSet.addRequiredItem("item_band_set_medic_utility_a_01_01") + bonusSet.addRequiredItem("item_ring_set_medic_utility_a_01_01") + bonusSet.addRequiredItem("item_necklace_set_medic_utility_a_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_medic_utility_a_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_medic_utility_a_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_utility_a_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_utility_a_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_utility_a_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_utility_a_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_utility_a_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_utility_a_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_medic_utility_b.py b/scripts/equipment/bonus_sets/set_bonus_medic_utility_b.py new file mode 100644 index 00000000..cc02a043 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_medic_utility_b.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_medic_utility_b") + + bonusSet.addRequiredItem("item_band_set_medic_utility_b_01_01") + bonusSet.addRequiredItem("item_ring_set_medic_utility_b_01_01") + bonusSet.addRequiredItem("item_necklace_set_medic_utility_b_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_medic_utility_b_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_medic_utility_b_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_utility_b_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_utility_b_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_medic_utility_b_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_utility_b_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_utility_b_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_medic_utility_b_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_rebel_snow_armor.py b/scripts/equipment/bonus_sets/set_bonus_rebel_snow_armor.py new file mode 100644 index 00000000..bea743e8 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_rebel_snow_armor.py @@ -0,0 +1,45 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_rebel_snow_armor") + + bonusSet.addRequiredItem("armor_rebel_snow_backpack") + bonusSet.addRequiredItem("armor_rebel_snow_belt") + bonusSet.addRequiredItem("armor_rebel_snow_boots") + bonusSet.addRequiredItem("armor_rebel_snow_chest_plate") + bonusSet.addRequiredItem("armor_rebel_snow_gloves") + bonusSet.addRequiredItem("armor_rebel_snow_helmet") + bonusSet.addRequiredItem("armor_rebel_snow_bicep_l") + bonusSet.addRequiredItem("armor_rebel_snow_bicep_r") + bonusSet.addRequiredItem("armor_rebel_snow_bracer_l") + bonusSet.addRequiredItem("armor_rebel_snow_bracer_r") + bonusSet.addRequiredItem("armor_rebel_snow_leggings") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_rebel_snow_armor_3", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_rebel_snow_armor_3_sys', 0) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_rebel_snow_armor_5", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_imperial_snow_armor_5_sys', 0) + elif wornItems == 7: + core.buffService.addBuffToCreature(creature, "set_bonus_rebel_snow_armor_7", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_rebel_snow_armor_7_sys', 0) + elif wornItems == 9: + core.buffService.addBuffToCreature(creature, "set_bonus_rebel_snow_armor_9", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_rebel_snow_armor_9_sys', 0) + elif wornItems == 11: + core.buffService.addBuffToCreature(creature, "set_bonus_rebel_snow_armor_11", creature) + creature.sendSystemMessage('@set_bonus:set_bonus_rebel_snow_armor_11_sys', 0) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_rebel_snow_armor_3") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_rebel_snow_armor_5") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_rebel_snow_armor_7") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_rebel_snow_armor_9") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_rebel_snow_armor_11") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_spy_dps.py b/scripts/equipment/bonus_sets/set_bonus_spy_dps.py new file mode 100644 index 00000000..0cd1747e --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_spy_dps.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_spy_dps") + + bonusSet.addRequiredItem("item_band_set_spy_dps_01_01") + bonusSet.addRequiredItem("item_ring_set_spy_dps_01_01") + bonusSet.addRequiredItem("item_necklace_set_spy_dps_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_spy_dps_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_spy_dps_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_dps_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_dps_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_dps_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_dps_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_dps_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_dps_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_spy_utility_a.py b/scripts/equipment/bonus_sets/set_bonus_spy_utility_a.py new file mode 100644 index 00000000..7ecc68fa --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_spy_utility_a.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_spy_utility_a") + + bonusSet.addRequiredItem("item_band_set_spy_utility_a_01_01") + bonusSet.addRequiredItem("item_ring_set_spy_utility_a_01_01") + bonusSet.addRequiredItem("item_necklace_set_spy_utility_a_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_spy_utility_a_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_spy_utility_a_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_utility_a_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_utility_a_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_utility_a_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_utility_a_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_utility_a_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_utility_a_3") \ No newline at end of file diff --git a/scripts/equipment/bonus_sets/set_bonus_spy_utility_b.py b/scripts/equipment/bonus_sets/set_bonus_spy_utility_b.py new file mode 100644 index 00000000..09536bd4 --- /dev/null +++ b/scripts/equipment/bonus_sets/set_bonus_spy_utility_b.py @@ -0,0 +1,28 @@ +import sys +from services.equipment import BonusSetTemplate +from java.util import Vector + +def addBonusSet(core): + bonusSet = BonusSetTemplate("set_bonus_spy_utility_b") + + bonusSet.addRequiredItem("item_band_set_spy_utility_b_01_01") + bonusSet.addRequiredItem("item_ring_set_spy_utility_b_01_01") + bonusSet.addRequiredItem("item_necklace_set_spy_utility_b_01_01") + bonusSet.addRequiredItem("item_bracelet_r_set_spy_utility_b_01_01") + bonusSet.addRequiredItem("item_bracelet_l_set_spy_utility_b_01_01") + + core.equipmentService.addBonusSetTemplate(bonusSet) + +def handleChange(core, creature, set): + wornItems = set.getWornTemplateCount(creature) + + if wornItems == 3: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_utility_b_1", creature) + elif wornItems == 4: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_utility_b_2", creature) + elif wornItems == 5: + core.buffService.addBuffToCreature(creature, "set_bonus_spy_utility_b_3", creature) + else: + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_utility_b_1") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_utility_b_2") + core.buffService.removeBuffFromCreatureByName(creature, "set_bonus_spy_utility_b_3") \ No newline at end of file diff --git a/scripts/equipment/force_protection.py b/scripts/equipment/force_protection.py new file mode 100644 index 00000000..c5fd6ce0 --- /dev/null +++ b/scripts/equipment/force_protection.py @@ -0,0 +1,32 @@ +import sys + +def jedi_robe_Faint(): + return 1400 + +def jedi_robe_Weak(): + return 3000 + +def jedi_robe_Lucent(): + return 4000 + +def jedi_robe_Luminous(): + return 5000 + +def jedi_robe_Radiant(): + return 6500 + +def jedi_cloak_Faint(): + return 0 + +def jedi_cloak_Weak(): + return 0 + +def jedi_cloak_Lucent(): + return 4500 + +def jedi_cloak_Luminous(): + return 5600 + +def jedi_cloak_Radiant(): + return 6500 + \ No newline at end of file diff --git a/scripts/equipment/slot_protection.py b/scripts/equipment/slot_protection.py new file mode 100644 index 00000000..e6de1f33 --- /dev/null +++ b/scripts/equipment/slot_protection.py @@ -0,0 +1,23 @@ +import sys + +def chest2(): + return "35.70" + +def pants1(): + return "21.43" + +def hat(): + return "14.27" + +def bracer_upper_l(): + return "7.15" + +def bracer_upper_r(): + return "7.15" + +def bicep_l(): + return "7.15" + +def bicep_r(): + return "7.15" + \ No newline at end of file diff --git a/scripts/equipment/weapon_critical.py b/scripts/equipment/weapon_critical.py new file mode 100644 index 00000000..9f392f34 --- /dev/null +++ b/scripts/equipment/weapon_critical.py @@ -0,0 +1,37 @@ +import sys + +def weap_0(): + return "expertise_critical_rifle" + +def weap_1(): + return "expertise_critical_carbine" + +def weap_2(): + return "expertise_critical_pistol" + +def weap_4(): + return "expertise_critical_1h" + +def weap_5(): + return "expertise_critical_2h" + +def weap_6(): + return "expertise_critical_unarmed" + +def weap_7(): + return "expertise_critical_polearm" + +def weap_9(): + return "" + +def weap_10(): + return "" + +def weap_11(): + return "" + +def weap_12(): + return "expertise_critical_heavy" + +def weap_13(): + return "expertise_critical_heavy" \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_absorbtion_1.py b/scripts/expertise/expertise_bh_absorbtion_1.py index 80b8479e..81963132 100644 --- a/scripts/expertise/expertise_bh_absorbtion_1.py +++ b/scripts/expertise/expertise_bh_absorbtion_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_absorbtion_1') - - actor.addSkillMod('expertise_innate_protection_all', 125) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_absorbtion_1') - - actor.removeSkillMod('expertise_innate_protection_all', 125) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_absorption_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_absorption_1") return diff --git a/scripts/expertise/expertise_bh_absorbtion_2.py b/scripts/expertise/expertise_bh_absorbtion_2.py index 96a6ff72..732e9847 100644 --- a/scripts/expertise/expertise_bh_absorbtion_2.py +++ b/scripts/expertise/expertise_bh_absorbtion_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_absorbtion_2') - - actor.addSkillMod('expertise_innate_protection_all', 125) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_absorbtion_2') - - actor.removeSkillMod('expertise_innate_protection_all', 125) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_absorption_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_absorption_2") return diff --git a/scripts/expertise/expertise_bh_absorbtion_3.py b/scripts/expertise/expertise_bh_absorbtion_3.py index e46daa07..b8d44ab2 100644 --- a/scripts/expertise/expertise_bh_absorbtion_3.py +++ b/scripts/expertise/expertise_bh_absorbtion_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_absorbtion_3') - - actor.addSkillMod('expertise_innate_protection_all', 125) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_absorbtion_3') - - actor.removeSkillMod('expertise_innate_protection_all', 125) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_absorption_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_absorption_3") return diff --git a/scripts/expertise/expertise_bh_absorbtion_4.py b/scripts/expertise/expertise_bh_absorbtion_4.py index f62d4493..3210a0b0 100644 --- a/scripts/expertise/expertise_bh_absorbtion_4.py +++ b/scripts/expertise/expertise_bh_absorbtion_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_absorbtion_4') - - actor.addSkillMod('expertise_innate_protection_all', 125) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_absorbtion_4') - - actor.removeSkillMod('expertise_innate_protection_all', 125) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_absorption_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_absorption_4") return diff --git a/scripts/expertise/expertise_bh_agility_1.py b/scripts/expertise/expertise_bh_agility_1.py index aab87823..007b7232 100644 --- a/scripts/expertise/expertise_bh_agility_1.py +++ b/scripts/expertise/expertise_bh_agility_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_agility_1') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_agility_1') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_agility_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_agility_1") return diff --git a/scripts/expertise/expertise_bh_agility_2.py b/scripts/expertise/expertise_bh_agility_2.py index 2724b112..2d896352 100644 --- a/scripts/expertise/expertise_bh_agility_2.py +++ b/scripts/expertise/expertise_bh_agility_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_agility_2') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_agility_2') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_agility_1") return def removeAbilities(core, actor, player): - - - return + actor.removeAbility("expertise_bh_agility_1") + return \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_agility_3.py b/scripts/expertise/expertise_bh_agility_3.py index d869fbc4..d55eaa3a 100644 --- a/scripts/expertise/expertise_bh_agility_3.py +++ b/scripts/expertise/expertise_bh_agility_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_agility_3') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_agility_3') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_agility_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_agility_3") return diff --git a/scripts/expertise/expertise_bh_agility_4.py b/scripts/expertise/expertise_bh_agility_4.py index 6152ee4b..84d67d3f 100644 --- a/scripts/expertise/expertise_bh_agility_4.py +++ b/scripts/expertise/expertise_bh_agility_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_agility_4') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_agility_4') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_agility_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_agility_4") return diff --git a/scripts/expertise/expertise_bh_amb_act_1.py b/scripts/expertise/expertise_bh_amb_act_1.py index 7a0c4ee0..55a6b1d7 100644 --- a/scripts/expertise/expertise_bh_amb_act_1.py +++ b/scripts/expertise/expertise_bh_amb_act_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_act_1') - - actor.addSkillMod('expertise_action_line_dm_crit', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_act_1') - - actor.removeSkillMod('expertise_action_line_dm_crit', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_amb_act_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_act_1") return diff --git a/scripts/expertise/expertise_bh_amb_act_2.py b/scripts/expertise/expertise_bh_amb_act_2.py index a19f7ba9..e1d3bd74 100644 --- a/scripts/expertise/expertise_bh_amb_act_2.py +++ b/scripts/expertise/expertise_bh_amb_act_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_act_2') - - actor.addSkillMod('expertise_action_line_dm_crit', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_act_2') - - actor.removeSkillMod('expertise_action_line_dm_crit', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_amb_act_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_act_2") return diff --git a/scripts/expertise/expertise_bh_amb_act_3.py b/scripts/expertise/expertise_bh_amb_act_3.py index cb649c64..da81f8ad 100644 --- a/scripts/expertise/expertise_bh_amb_act_3.py +++ b/scripts/expertise/expertise_bh_amb_act_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_act_3') - - actor.addSkillMod('expertise_action_line_dm_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_act_3') - - actor.removeSkillMod('expertise_action_line_dm_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_amb_act_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_act_3") return diff --git a/scripts/expertise/expertise_bh_amb_cool_1.py b/scripts/expertise/expertise_bh_amb_cool_1.py index 8749deaa..6e07401d 100644 --- a/scripts/expertise/expertise_bh_amb_cool_1.py +++ b/scripts/expertise/expertise_bh_amb_cool_1.py @@ -1,48 +1,10 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_cool_1') - - actor.addSkillMod('expertise_cooldown_line_dm_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_cool_1') - - actor.removeSkillMod('expertise_cooldown_line_dm_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_amb_cool_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_cool_1") return + \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_amb_cool_2.py b/scripts/expertise/expertise_bh_amb_cool_2.py index a7a26a52..b1e0427e 100644 --- a/scripts/expertise/expertise_bh_amb_cool_2.py +++ b/scripts/expertise/expertise_bh_amb_cool_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_cool_2') - - actor.addSkillMod('expertise_cooldown_line_dm_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_cool_2') - - actor.removeSkillMod('expertise_cooldown_line_dm_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("bh_amb_cool_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("bh_amb_cool_2") return diff --git a/scripts/expertise/expertise_bh_amb_dam_1.py b/scripts/expertise/expertise_bh_amb_dam_1.py index 7d057532..932bf6e5 100644 --- a/scripts/expertise/expertise_bh_amb_dam_1.py +++ b/scripts/expertise/expertise_bh_amb_dam_1.py @@ -1,48 +1,10 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_dam_1') - - actor.addSkillMod('expertise_damage_line_dm_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_dam_1') - - actor.removeSkillMod('expertise_damage_line_dm_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_amb_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_dam_1") return + \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_amb_dam_2.py b/scripts/expertise/expertise_bh_amb_dam_2.py index df566fbd..53bdcb8a 100644 --- a/scripts/expertise/expertise_bh_amb_dam_2.py +++ b/scripts/expertise/expertise_bh_amb_dam_2.py @@ -1,48 +1,10 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_dam_2') - - actor.addSkillMod('expertise_damage_line_dm_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_dam_2') - - actor.removeSkillMod('expertise_damage_line_dm_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_amb_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_dam_2") return + \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_amb_dam_3.py b/scripts/expertise/expertise_bh_amb_dam_3.py index ba9a05e9..02832491 100644 --- a/scripts/expertise/expertise_bh_amb_dam_3.py +++ b/scripts/expertise/expertise_bh_amb_dam_3.py @@ -1,48 +1,10 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_dam_3') - - actor.addSkillMod('expertise_damage_line_dm_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_dam_3') - - actor.removeSkillMod('expertise_damage_line_dm_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_amb_dam_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_dam_3") return + \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_amb_dam_cool.py b/scripts/expertise/expertise_bh_amb_dam_cool.py index 1f9d3b03..633d3846 100644 --- a/scripts/expertise/expertise_bh_amb_dam_cool.py +++ b/scripts/expertise/expertise_bh_amb_dam_cool.py @@ -1,50 +1,10 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_amb_dam_cool') - - actor.addSkillMod('expertise_dm_crit_advanced', 1) - actor.addSkillMod('expertise_critical_line_dm_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_amb_dam_cool') - - actor.removeSkillMod('expertise_dm_crit_advanced', 1) - actor.removeSkillMod('expertise_critical_line_dm_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_dam_cool") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_amb_dam_cool") return + \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_armor_duelist_1.py b/scripts/expertise/expertise_bh_armor_duelist_1.py index a8955362..c4529a37 100644 --- a/scripts/expertise/expertise_bh_armor_duelist_1.py +++ b/scripts/expertise/expertise_bh_armor_duelist_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_duelist_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_duelist_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_armor_duelist_1') - + if actor.getLevel() >= 26: + actor.addAbility("bh_armor_duelist_1") + if actor.getLevel() >= 34: + actor.addAbility("bh_armor_duelist_2") + if actor.getLevel() >= 48: + actor.addAbility("bh_armor_duelist_3") + if actor.getLevel() >= 62: + actor.addAbility("bh_armor_duelist_4") + if actor.getLevel() >= 76: + actor.addAbility("bh_armor_duelist_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_armor_duelist_1') - + actor.removeAbility("bh_armor_duelist_1") + actor.removeAbility("bh_armor_duelist_2") + actor.removeAbility("bh_armor_duelist_3") + actor.removeAbility("bh_armor_duelist_4") + actor.removeAbility("bh_armor_duelist_5") return diff --git a/scripts/expertise/expertise_bh_armor_eng_1.py b/scripts/expertise/expertise_bh_armor_eng_1.py index dfcf05f9..a67e6dee 100644 --- a/scripts/expertise/expertise_bh_armor_eng_1.py +++ b/scripts/expertise/expertise_bh_armor_eng_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_eng_1') - - actor.addSkillMod('expertise_innate_protection_energy', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_eng_1') - - actor.removeSkillMod('expertise_innate_protection_energy', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_eng_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_eng_1") return diff --git a/scripts/expertise/expertise_bh_armor_eng_2.py b/scripts/expertise/expertise_bh_armor_eng_2.py index c04179da..86521742 100644 --- a/scripts/expertise/expertise_bh_armor_eng_2.py +++ b/scripts/expertise/expertise_bh_armor_eng_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_eng_2') - - actor.addSkillMod('expertise_innate_protection_energy', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_eng_2') - - actor.removeSkillMod('expertise_innate_protection_energy', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_eng_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_eng_2") return diff --git a/scripts/expertise/expertise_bh_armor_eng_3.py b/scripts/expertise/expertise_bh_armor_eng_3.py index a175c1bc..9674d322 100644 --- a/scripts/expertise/expertise_bh_armor_eng_3.py +++ b/scripts/expertise/expertise_bh_armor_eng_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_eng_3') - - actor.addSkillMod('expertise_innate_protection_energy', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_eng_3') - - actor.removeSkillMod('expertise_innate_protection_energy', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_eng_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_eng_3") return diff --git a/scripts/expertise/expertise_bh_armor_eng_4.py b/scripts/expertise/expertise_bh_armor_eng_4.py index 5157fef5..2282200c 100644 --- a/scripts/expertise/expertise_bh_armor_eng_4.py +++ b/scripts/expertise/expertise_bh_armor_eng_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_eng_4') - - actor.addSkillMod('expertise_innate_protection_energy', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_eng_4') - - actor.removeSkillMod('expertise_innate_protection_energy', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_eng_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_eng_4") return diff --git a/scripts/expertise/expertise_bh_armor_kin_1.py b/scripts/expertise/expertise_bh_armor_kin_1.py index 0f0fb7f5..91acd05a 100644 --- a/scripts/expertise/expertise_bh_armor_kin_1.py +++ b/scripts/expertise/expertise_bh_armor_kin_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_kin_1') - - actor.addSkillMod('expertise_innate_protection_kinetic', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_kin_1') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_kin_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_kin_1") return diff --git a/scripts/expertise/expertise_bh_armor_kin_2.py b/scripts/expertise/expertise_bh_armor_kin_2.py index c4897930..8e603d50 100644 --- a/scripts/expertise/expertise_bh_armor_kin_2.py +++ b/scripts/expertise/expertise_bh_armor_kin_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_kin_2') - - actor.addSkillMod('expertise_innate_protection_kinetic', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_kin_2') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_kin_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_kin_2") return diff --git a/scripts/expertise/expertise_bh_armor_kin_3.py b/scripts/expertise/expertise_bh_armor_kin_3.py index 2eacb73d..d54efcba 100644 --- a/scripts/expertise/expertise_bh_armor_kin_3.py +++ b/scripts/expertise/expertise_bh_armor_kin_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_kin_3') - - actor.addSkillMod('expertise_innate_protection_kinetic', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_kin_3') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_kin_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_kin_3") return diff --git a/scripts/expertise/expertise_bh_armor_kin_4.py b/scripts/expertise/expertise_bh_armor_kin_4.py index 7d0980cc..7351a899 100644 --- a/scripts/expertise/expertise_bh_armor_kin_4.py +++ b/scripts/expertise/expertise_bh_armor_kin_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_kin_4') - - actor.addSkillMod('expertise_innate_protection_kinetic', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_kin_4') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_kin_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_kin_4") return diff --git a/scripts/expertise/expertise_bh_armor_mgb_1.py b/scripts/expertise/expertise_bh_armor_mgb_1.py index b96d73ae..f6a10221 100644 --- a/scripts/expertise/expertise_bh_armor_mgb_1.py +++ b/scripts/expertise/expertise_bh_armor_mgb_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_mgb_1') - - actor.addSkillMod('expertise_dodge', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_mgb_1') - - actor.removeSkillMod('expertise_dodge', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_mgb_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_mgb_1") return diff --git a/scripts/expertise/expertise_bh_armor_mgb_2.py b/scripts/expertise/expertise_bh_armor_mgb_2.py index 3712b6e1..b71a226c 100644 --- a/scripts/expertise/expertise_bh_armor_mgb_2.py +++ b/scripts/expertise/expertise_bh_armor_mgb_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_mgb_2') - - actor.addSkillMod('expertise_dodge', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_mgb_2') - - actor.removeSkillMod('expertise_dodge', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_mgb_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_mgb_2") return diff --git a/scripts/expertise/expertise_bh_armor_mgb_3.py b/scripts/expertise/expertise_bh_armor_mgb_3.py index 10a05268..957b4b88 100644 --- a/scripts/expertise/expertise_bh_armor_mgb_3.py +++ b/scripts/expertise/expertise_bh_armor_mgb_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_mgb_3') - - actor.addSkillMod('expertise_dodge', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_mgb_3') - - actor.removeSkillMod('expertise_dodge', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_mgb_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_mgb_3") return diff --git a/scripts/expertise/expertise_bh_armor_rgb_1.py b/scripts/expertise/expertise_bh_armor_rgb_1.py index d529151c..c1d48b96 100644 --- a/scripts/expertise/expertise_bh_armor_rgb_1.py +++ b/scripts/expertise/expertise_bh_armor_rgb_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_rgb_1') - - actor.addSkillMod('expertise_critical_hit_reduction', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_rgb_1') - - actor.removeSkillMod('expertise_critical_hit_reduction', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_rgb_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_rgb_1") return diff --git a/scripts/expertise/expertise_bh_armor_rgb_2.py b/scripts/expertise/expertise_bh_armor_rgb_2.py index 54da7d9e..d0757ff7 100644 --- a/scripts/expertise/expertise_bh_armor_rgb_2.py +++ b/scripts/expertise/expertise_bh_armor_rgb_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_rgb_2') - - actor.addSkillMod('expertise_critical_hit_reduction', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_rgb_2') - - actor.removeSkillMod('expertise_critical_hit_reduction', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_rgb_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_rgb_2") return diff --git a/scripts/expertise/expertise_bh_armor_rgb_3.py b/scripts/expertise/expertise_bh_armor_rgb_3.py index c94386c5..7f8e5879 100644 --- a/scripts/expertise/expertise_bh_armor_rgb_3.py +++ b/scripts/expertise/expertise_bh_armor_rgb_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_rgb_3') - - actor.addSkillMod('expertise_critical_hit_reduction', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_rgb_3') - - actor.removeSkillMod('expertise_critical_hit_reduction', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_armor_rgb_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_armor_rgb_3") return diff --git a/scripts/expertise/expertise_bh_armor_sprint_1.py b/scripts/expertise/expertise_bh_armor_sprint_1.py index 247c23e1..b0ebf1ec 100644 --- a/scripts/expertise/expertise_bh_armor_sprint_1.py +++ b/scripts/expertise/expertise_bh_armor_sprint_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_armor_sprint_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_armor_sprint_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_armor_sprint_1') - + actor.addAbility("bh_armor_sprint_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_armor_sprint_1') - + actor.removeAbility("bh_armor_sprint_1") return diff --git a/scripts/expertise/expertise_bh_ass_act_1.py b/scripts/expertise/expertise_bh_ass_act_1.py index 4b60f445..35100c39 100644 --- a/scripts/expertise/expertise_bh_ass_act_1.py +++ b/scripts/expertise/expertise_bh_ass_act_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_act_1') - - actor.addSkillMod('expertise_action_line_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_act_1') - - actor.removeSkillMod('expertise_action_line_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_act_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_act_1") return diff --git a/scripts/expertise/expertise_bh_ass_act_2.py b/scripts/expertise/expertise_bh_ass_act_2.py index 07f25018..e647dfd4 100644 --- a/scripts/expertise/expertise_bh_ass_act_2.py +++ b/scripts/expertise/expertise_bh_ass_act_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_act_2') - - actor.addSkillMod('expertise_action_line_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_act_2') - - actor.removeSkillMod('expertise_action_line_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_act_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_act_2") return diff --git a/scripts/expertise/expertise_bh_ass_act_3.py b/scripts/expertise/expertise_bh_ass_act_3.py index c24cbdd3..7011247d 100644 --- a/scripts/expertise/expertise_bh_ass_act_3.py +++ b/scripts/expertise/expertise_bh_ass_act_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_act_3') - - actor.addSkillMod('expertise_action_line_dm', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_act_3') - - actor.removeSkillMod('expertise_action_line_dm', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_act_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_act_3") return diff --git a/scripts/expertise/expertise_bh_ass_cool_1.py b/scripts/expertise/expertise_bh_ass_cool_1.py index aaff3675..c9d4f6bf 100644 --- a/scripts/expertise/expertise_bh_ass_cool_1.py +++ b/scripts/expertise/expertise_bh_ass_cool_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_cool_1') - - actor.addSkillMod('expertise_cooldown_line_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_cool_1') - - actor.removeSkillMod('expertise_cooldown_line_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_cool_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_cool_1") return diff --git a/scripts/expertise/expertise_bh_ass_cool_2.py b/scripts/expertise/expertise_bh_ass_cool_2.py index af01e9aa..4532702b 100644 --- a/scripts/expertise/expertise_bh_ass_cool_2.py +++ b/scripts/expertise/expertise_bh_ass_cool_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_cool_2') - - actor.addSkillMod('expertise_cooldown_line_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_cool_2') - - actor.removeSkillMod('expertise_cooldown_line_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_cool_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_cool_2") return diff --git a/scripts/expertise/expertise_bh_ass_dam_1.py b/scripts/expertise/expertise_bh_ass_dam_1.py index 04fb74e7..7d52ed2f 100644 --- a/scripts/expertise/expertise_bh_ass_dam_1.py +++ b/scripts/expertise/expertise_bh_ass_dam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_dam_1') - - actor.addSkillMod('expertise_damage_line_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_dam_1') - - actor.removeSkillMod('expertise_damage_line_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_dam_1") return diff --git a/scripts/expertise/expertise_bh_ass_dam_2.py b/scripts/expertise/expertise_bh_ass_dam_2.py index ea7ec873..a6587bd4 100644 --- a/scripts/expertise/expertise_bh_ass_dam_2.py +++ b/scripts/expertise/expertise_bh_ass_dam_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_dam_2') - - actor.addSkillMod('expertise_damage_line_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_dam_2') - - actor.removeSkillMod('expertise_damage_line_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_dam_2") return diff --git a/scripts/expertise/expertise_bh_ass_dam_3.py b/scripts/expertise/expertise_bh_ass_dam_3.py index 7fce7d94..57e2d7c4 100644 --- a/scripts/expertise/expertise_bh_ass_dam_3.py +++ b/scripts/expertise/expertise_bh_ass_dam_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_ass_dam_3') - - actor.addSkillMod('expertise_damage_line_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_ass_dam_3') - - actor.removeSkillMod('expertise_damage_line_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_ass_dam_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_ass_dam_3") return diff --git a/scripts/expertise/expertise_bh_carbine_act_1.py b/scripts/expertise/expertise_bh_carbine_act_1.py index ce2dd758..bb7e39f3 100644 --- a/scripts/expertise/expertise_bh_carbine_act_1.py +++ b/scripts/expertise/expertise_bh_carbine_act_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_carbine_act_1') - - actor.addSkillMod('expertise_action_weapon_1', 3) - actor.addSkillMod('expertise_action_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_carbine_act_1') - - actor.removeSkillMod('expertise_action_weapon_1', 3) - actor.removeSkillMod('expertise_action_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_carbine_act_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_carbine_act_1") return diff --git a/scripts/expertise/expertise_bh_carbine_act_2.py b/scripts/expertise/expertise_bh_carbine_act_2.py index bb494e3f..c2024eab 100644 --- a/scripts/expertise/expertise_bh_carbine_act_2.py +++ b/scripts/expertise/expertise_bh_carbine_act_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_carbine_act_2') - - actor.addSkillMod('expertise_action_weapon_1', 3) - actor.addSkillMod('expertise_action_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_carbine_act_2') - - actor.removeSkillMod('expertise_action_weapon_1', 3) - actor.removeSkillMod('expertise_action_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_carbine_act_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_carbine_act_2") return diff --git a/scripts/expertise/expertise_bh_carbine_act_3.py b/scripts/expertise/expertise_bh_carbine_act_3.py index 6f07762a..ddb0ac36 100644 --- a/scripts/expertise/expertise_bh_carbine_act_3.py +++ b/scripts/expertise/expertise_bh_carbine_act_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_carbine_act_3') - - actor.addSkillMod('expertise_action_weapon_1', 4) - actor.addSkillMod('expertise_action_weapon_2', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_carbine_act_3') - - actor.removeSkillMod('expertise_action_weapon_1', 4) - actor.removeSkillMod('expertise_action_weapon_2', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_carbine_act_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_carbine_act_3") return diff --git a/scripts/expertise/expertise_bh_carbine_act_4.py b/scripts/expertise/expertise_bh_carbine_act_4.py index 96142cc2..30d33f95 100644 --- a/scripts/expertise/expertise_bh_carbine_act_4.py +++ b/scripts/expertise/expertise_bh_carbine_act_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_carbine_act_4') - - actor.addSkillMod('expertise_action_weapon_1', 5) - actor.addSkillMod('expertise_action_weapon_2', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_carbine_act_4') - - actor.removeSkillMod('expertise_action_weapon_1', 5) - actor.removeSkillMod('expertise_action_weapon_2', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_carbine_act_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_carbine_act_4") return diff --git a/scripts/expertise/expertise_bh_carbine_crit_1.py b/scripts/expertise/expertise_bh_carbine_crit_1.py index 131db4c7..76d07aa9 100644 --- a/scripts/expertise/expertise_bh_carbine_crit_1.py +++ b/scripts/expertise/expertise_bh_carbine_crit_1.py @@ -1,54 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_carbine_crit_1') - - actor.addSkillMod('expertise_range_bonus_carbine', 10) - actor.addSkillMod('expertise_undiminished_critical_carbine', 10) - actor.addSkillMod('expertise_undiminished_critical_pistol', 10) - actor.addSkillMod('expertise_range_bonus_pistol', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_carbine_crit_1') - - actor.removeSkillMod('expertise_range_bonus_carbine', 10) - actor.removeSkillMod('expertise_undiminished_critical_carbine', 10) - actor.removeSkillMod('expertise_undiminished_critical_pistol', 10) - actor.removeSkillMod('expertise_range_bonus_pistol', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_carbine_crit_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_carbine_crit_1") return diff --git a/scripts/expertise/expertise_bh_carbine_dam_1.py b/scripts/expertise/expertise_bh_carbine_dam_1.py index 4681ff5a..101aaaa0 100644 --- a/scripts/expertise/expertise_bh_carbine_dam_1.py +++ b/scripts/expertise/expertise_bh_carbine_dam_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_carbine_dam_1') - - actor.addSkillMod('expertise_damage_weapon_1', 2) - actor.addSkillMod('expertise_damage_weapon_2', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_carbine_dam_1') - - actor.removeSkillMod('expertise_damage_weapon_1', 2) - actor.removeSkillMod('expertise_damage_weapon_2', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_carbine_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_carbine_dam_1") return diff --git a/scripts/expertise/expertise_bh_carbine_dam_2.py b/scripts/expertise/expertise_bh_carbine_dam_2.py index bca390dc..311fdf16 100644 --- a/scripts/expertise/expertise_bh_carbine_dam_2.py +++ b/scripts/expertise/expertise_bh_carbine_dam_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_carbine_dam_2') - - actor.addSkillMod('expertise_damage_weapon_1', 3) - actor.addSkillMod('expertise_damage_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_carbine_dam_2') - - actor.removeSkillMod('expertise_damage_weapon_1', 3) - actor.removeSkillMod('expertise_damage_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_carbine_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_carbine_dam_2") return diff --git a/scripts/expertise/expertise_bh_constitution_1.py b/scripts/expertise/expertise_bh_constitution_1.py index bf9c095e..4311146c 100644 --- a/scripts/expertise/expertise_bh_constitution_1.py +++ b/scripts/expertise/expertise_bh_constitution_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_constitution_1') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_constitution_1') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_constitution_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_constitution_1") return diff --git a/scripts/expertise/expertise_bh_constitution_2.py b/scripts/expertise/expertise_bh_constitution_2.py index a7a36229..b08059f1 100644 --- a/scripts/expertise/expertise_bh_constitution_2.py +++ b/scripts/expertise/expertise_bh_constitution_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_constitution_2') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_constitution_2') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_constitution_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_constitution_2") return diff --git a/scripts/expertise/expertise_bh_constitution_3.py b/scripts/expertise/expertise_bh_constitution_3.py index 4259b57a..3cd7edf6 100644 --- a/scripts/expertise/expertise_bh_constitution_3.py +++ b/scripts/expertise/expertise_bh_constitution_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_constitution_3') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_constitution_3') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_constitution_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_constitution_3") return diff --git a/scripts/expertise/expertise_bh_constitution_4.py b/scripts/expertise/expertise_bh_constitution_4.py index dd89792b..662706cb 100644 --- a/scripts/expertise/expertise_bh_constitution_4.py +++ b/scripts/expertise/expertise_bh_constitution_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_constitution_4') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_constitution_4') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_constitution_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_constitution_4") return diff --git a/scripts/expertise/expertise_bh_cover_1.py b/scripts/expertise/expertise_bh_cover_1.py index 019850cd..b3021ddf 100644 --- a/scripts/expertise/expertise_bh_cover_1.py +++ b/scripts/expertise/expertise_bh_cover_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_cover_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_cover_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_cover_1') - + actor.addAbility("bh_cover_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_cover_1') - + actor.removeAbility("bh_cover_1") return diff --git a/scripts/expertise/expertise_bh_deflection_1.py b/scripts/expertise/expertise_bh_deflection_1.py index ab02e0a6..8ac3bf4c 100644 --- a/scripts/expertise/expertise_bh_deflection_1.py +++ b/scripts/expertise/expertise_bh_deflection_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_deflection_1') - - actor.addSkillMod('expertise_innate_protection_all', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_deflection_1') - - actor.removeSkillMod('expertise_innate_protection_all', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_deflection_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_deflection_1") return diff --git a/scripts/expertise/expertise_bh_deflection_2.py b/scripts/expertise/expertise_bh_deflection_2.py index 33b98bf0..35b2c47e 100644 --- a/scripts/expertise/expertise_bh_deflection_2.py +++ b/scripts/expertise/expertise_bh_deflection_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_deflection_2') - - actor.addSkillMod('expertise_innate_protection_all', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_deflection_2') - - actor.removeSkillMod('expertise_innate_protection_all', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_deflection_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_deflection_2") return diff --git a/scripts/expertise/expertise_bh_deflection_3.py b/scripts/expertise/expertise_bh_deflection_3.py index c408ca42..d1cd6d2d 100644 --- a/scripts/expertise/expertise_bh_deflection_3.py +++ b/scripts/expertise/expertise_bh_deflection_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_deflection_3') - - actor.addSkillMod('expertise_innate_protection_all', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_deflection_3') - - actor.removeSkillMod('expertise_innate_protection_all', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_deflection_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_deflection_3") return diff --git a/scripts/expertise/expertise_bh_deflection_4.py b/scripts/expertise/expertise_bh_deflection_4.py index b5e42e86..fa5ae83f 100644 --- a/scripts/expertise/expertise_bh_deflection_4.py +++ b/scripts/expertise/expertise_bh_deflection_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_deflection_4') - - actor.addSkillMod('expertise_innate_protection_all', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_deflection_4') - - actor.removeSkillMod('expertise_innate_protection_all', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_deflection_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_deflection_4") return diff --git a/scripts/expertise/expertise_bh_dread_strike_1.py b/scripts/expertise/expertise_bh_dread_strike_1.py index f7598134..ae817cd0 100644 --- a/scripts/expertise/expertise_bh_dread_strike_1.py +++ b/scripts/expertise/expertise_bh_dread_strike_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_dread_strike_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_dread_strike_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_dread_strike_1') - + if actor.getLevel() >= 26: + actor.addAbility("bh_dread_strike_1") + if actor.getLevel() >= 34: + actor.addAbility("bh_dread_strike_2") + if actor.getLevel() >= 48: + actor.addAbility("bh_dread_strike_3") + if actor.getLevel() >= 62: + actor.addAbility("bh_dread_strike_4") + if actor.getLevel() >= 76: + actor.addAbility("bh_dread_strike_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_dread_strike_1') - + actor.removeAbility("bh_dread_strike_1") + actor.removeAbility("bh_dread_strike_2") + actor.removeAbility("bh_dread_strike_3") + actor.removeAbility("bh_dread_strike_4") + actor.removeAbility("bh_dread_strike_5") return diff --git a/scripts/expertise/expertise_bh_fumble_1.py b/scripts/expertise/expertise_bh_fumble_1.py index c3863158..c9f10511 100644 --- a/scripts/expertise/expertise_bh_fumble_1.py +++ b/scripts/expertise/expertise_bh_fumble_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_fumble_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_fumble_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_fumble_1') - + if actor.getLevel() >= 26: + actor.addAbility("bh_fumble_1") + if actor.getLevel() >= 34: + actor.addAbility("bh_fumble_2") + if actor.getLevel() >= 48: + actor.addAbility("bh_fumble_3") + if actor.getLevel() >= 62: + actor.addAbility("bh_fumble_4") + if actor.getLevel() >= 76: + actor.addAbility("bh_fumble_5") + if actor.getLevel() >= 90: + actor.addAbility("bh_fumble_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_fumble_1') - + actor.removeAbility("bh_fumble_1") + actor.removeAbility("bh_fumble_2") + actor.removeAbility("bh_fumble_3") + actor.removeAbility("bh_fumble_4") + actor.removeAbility("bh_fumble_5") + actor.removeAbility("bh_fumble_6") return diff --git a/scripts/expertise/expertise_bh_innate_1.py b/scripts/expertise/expertise_bh_innate_1.py index 1f013597..be7b9b38 100644 --- a/scripts/expertise/expertise_bh_innate_1.py +++ b/scripts/expertise/expertise_bh_innate_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_innate_1') - - actor.addSkillMod('expertise_assult_action_buff', 40) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_innate_1') - - actor.removeSkillMod('expertise_assult_action_buff', 40) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_innate_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_innate_1") return diff --git a/scripts/expertise/expertise_bh_intimidate_1.py b/scripts/expertise/expertise_bh_intimidate_1.py index fa501d18..ee0e81ce 100644 --- a/scripts/expertise/expertise_bh_intimidate_1.py +++ b/scripts/expertise/expertise_bh_intimidate_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_intimidate_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_intimidate_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_intimidate_1') - + if actor.getLevel() >= 26: + actor.addAbility("bh_intimidate_1") + if actor.getLevel() >= 34: + actor.addAbility("bh_intimidate_2") + if actor.getLevel() >= 48: + actor.addAbility("bh_intimidate_3") + if actor.getLevel() >= 62: + actor.addAbility("bh_intimidate_4") + if actor.getLevel() >= 76: + actor.addAbility("bh_intimidate_5") + if actor.getLevel() >= 90: + actor.addAbility("bh_intimidate_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_intimidate_1') - + actor.removeAbility("bh_intimidate_1") + actor.removeAbility("bh_intimidate_2") + actor.removeAbility("bh_intimidate_3") + actor.removeAbility("bh_intimidate_4") + actor.removeAbility("bh_intimidate_5") + actor.removeAbility("bh_intimidate_6") return diff --git a/scripts/expertise/expertise_bh_man_crit_1.py b/scripts/expertise/expertise_bh_man_crit_1.py index 834f9dec..39c35cea 100644 --- a/scripts/expertise/expertise_bh_man_crit_1.py +++ b/scripts/expertise/expertise_bh_man_crit_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_man_crit_1') - - actor.addSkillMod('expertise_strikethrough_chance', 2) - actor.addSkillMod('expertise_bh_detect_camo_chance', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_man_crit_1') - - actor.removeSkillMod('expertise_strikethrough_chance', 2) - actor.removeSkillMod('expertise_bh_detect_camo_chance', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_man_crit_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_man_crit_1") return diff --git a/scripts/expertise/expertise_bh_man_crit_2.py b/scripts/expertise/expertise_bh_man_crit_2.py index b9650fe3..f59f750a 100644 --- a/scripts/expertise/expertise_bh_man_crit_2.py +++ b/scripts/expertise/expertise_bh_man_crit_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_man_crit_2') - - actor.addSkillMod('expertise_strikethrough_chance', 2) - actor.addSkillMod('expertise_bh_detect_camo_chance', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_man_crit_2') - - actor.removeSkillMod('expertise_strikethrough_chance', 2) - actor.removeSkillMod('expertise_bh_detect_camo_chance', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_man_crit_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_man_crit_2") return diff --git a/scripts/expertise/expertise_bh_man_crit_3.py b/scripts/expertise/expertise_bh_man_crit_3.py index da3e6f06..cb9d8b76 100644 --- a/scripts/expertise/expertise_bh_man_crit_3.py +++ b/scripts/expertise/expertise_bh_man_crit_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_man_crit_3') - - actor.addSkillMod('expertise_strikethrough_chance', 2) - actor.addSkillMod('expertise_bh_detect_camo_chance', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_man_crit_3') - - actor.removeSkillMod('expertise_strikethrough_chance', 2) - actor.removeSkillMod('expertise_bh_detect_camo_chance', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_man_crit_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_man_crit_3") return diff --git a/scripts/expertise/expertise_bh_precision_1.py b/scripts/expertise/expertise_bh_precision_1.py index 7004f208..f3813dc5 100644 --- a/scripts/expertise/expertise_bh_precision_1.py +++ b/scripts/expertise/expertise_bh_precision_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_precision_1') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_precision_1') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_precision_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_precision_1") return diff --git a/scripts/expertise/expertise_bh_precision_2.py b/scripts/expertise/expertise_bh_precision_2.py index 58cb5095..6207ca53 100644 --- a/scripts/expertise/expertise_bh_precision_2.py +++ b/scripts/expertise/expertise_bh_precision_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_precision_2') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_precision_2') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_precision_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_precision_2") return diff --git a/scripts/expertise/expertise_bh_precision_3.py b/scripts/expertise/expertise_bh_precision_3.py index 32fa6e4c..d872a9f0 100644 --- a/scripts/expertise/expertise_bh_precision_3.py +++ b/scripts/expertise/expertise_bh_precision_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_precision_3') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_precision_3') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_precision_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_precision_3") return diff --git a/scripts/expertise/expertise_bh_precision_4.py b/scripts/expertise/expertise_bh_precision_4.py index 9ff20b56..c23f6372 100644 --- a/scripts/expertise/expertise_bh_precision_4.py +++ b/scripts/expertise/expertise_bh_precision_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_precision_4') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_precision_4') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_precision_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_precision_4") return diff --git a/scripts/expertise/expertise_bh_prescience.py b/scripts/expertise/expertise_bh_prescience.py index 8211d2f6..a0705af9 100644 --- a/scripts/expertise/expertise_bh_prescience.py +++ b/scripts/expertise/expertise_bh_prescience.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_prescience') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_prescience') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_prescience') - + actor.addAbility("bh_prescience") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_prescience') - + actor.removeAbility("bh_prescience") return diff --git a/scripts/expertise/expertise_bh_relentless_1.py b/scripts/expertise/expertise_bh_relentless_1.py index 16584560..d8859773 100644 --- a/scripts/expertise/expertise_bh_relentless_1.py +++ b/scripts/expertise/expertise_bh_relentless_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_relentless_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_relentless_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_relentless_1') - + actor.addAbility("bh_relentless_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_relentless_1') - + actor.removeAbility("bh_relentless_1") return diff --git a/scripts/expertise/expertise_bh_return_fire_1.py b/scripts/expertise/expertise_bh_return_fire_1.py index 27d39f22..322ced20 100644 --- a/scripts/expertise/expertise_bh_return_fire_1.py +++ b/scripts/expertise/expertise_bh_return_fire_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_return_fire_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_return_fire_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_return_fire_command_1') - + actor.addAbility("bh_return_fire_command_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_return_fire_command_1') - + actor.removeAbility("bh_return_fire_command_1") return diff --git a/scripts/expertise/expertise_bh_rifle_act_1.py b/scripts/expertise/expertise_bh_rifle_act_1.py index c64ab6fd..5ab3b5b8 100644 --- a/scripts/expertise/expertise_bh_rifle_act_1.py +++ b/scripts/expertise/expertise_bh_rifle_act_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_rifle_act_1') - - actor.addSkillMod('expertise_action_weapon_0', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_rifle_act_1') - - actor.removeSkillMod('expertise_action_weapon_0', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_rifle_act_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_rifle_act_1") return diff --git a/scripts/expertise/expertise_bh_rifle_act_2.py b/scripts/expertise/expertise_bh_rifle_act_2.py index f1488c3f..1f94991c 100644 --- a/scripts/expertise/expertise_bh_rifle_act_2.py +++ b/scripts/expertise/expertise_bh_rifle_act_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_rifle_act_2') - - actor.addSkillMod('expertise_action_weapon_0', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_rifle_act_2') - - actor.removeSkillMod('expertise_action_weapon_0', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_rifle_act_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_rifle_act_2") return diff --git a/scripts/expertise/expertise_bh_rifle_act_3.py b/scripts/expertise/expertise_bh_rifle_act_3.py index 709fdfec..21f5a7b6 100644 --- a/scripts/expertise/expertise_bh_rifle_act_3.py +++ b/scripts/expertise/expertise_bh_rifle_act_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_rifle_act_3') - - actor.addSkillMod('expertise_action_weapon_0', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_rifle_act_3') - - actor.removeSkillMod('expertise_action_weapon_0', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_rifle_act_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_rifle_act_3") return diff --git a/scripts/expertise/expertise_bh_rifle_act_4.py b/scripts/expertise/expertise_bh_rifle_act_4.py index fc0549fa..cb32b474 100644 --- a/scripts/expertise/expertise_bh_rifle_act_4.py +++ b/scripts/expertise/expertise_bh_rifle_act_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_rifle_act_4') - - actor.addSkillMod('expertise_action_weapon_0', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_rifle_act_4') - - actor.removeSkillMod('expertise_action_weapon_0', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_rifle_act_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_rifle_act_4") return diff --git a/scripts/expertise/expertise_bh_rifle_dam_1.py b/scripts/expertise/expertise_bh_rifle_dam_1.py index 9c3114cc..debb9b31 100644 --- a/scripts/expertise/expertise_bh_rifle_dam_1.py +++ b/scripts/expertise/expertise_bh_rifle_dam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_rifle_dam_1') - - actor.addSkillMod('expertise_damage_weapon_0', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_rifle_dam_1') - - actor.removeSkillMod('expertise_damage_weapon_0', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_rifle_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_rifle_dam_1") return diff --git a/scripts/expertise/expertise_bh_rifle_dam_2.py b/scripts/expertise/expertise_bh_rifle_dam_2.py index 43fa09b4..29f37539 100644 --- a/scripts/expertise/expertise_bh_rifle_dam_2.py +++ b/scripts/expertise/expertise_bh_rifle_dam_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_rifle_dam_2') - - actor.addSkillMod('expertise_damage_weapon_0', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_rifle_dam_2') - - actor.removeSkillMod('expertise_damage_weapon_0', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_rifle_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_rifle_dam_2") return diff --git a/scripts/expertise/expertise_bh_shields_1.py b/scripts/expertise/expertise_bh_shields_1.py index cc0b0b50..ecedc9e6 100644 --- a/scripts/expertise/expertise_bh_shields_1.py +++ b/scripts/expertise/expertise_bh_shields_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_shields_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_shields_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_shields_1') - + actor.addAbility("bh_shields_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_shields_1') - + actor.removeAbility("bh_shields_1") return diff --git a/scripts/expertise/expertise_bh_sniper_1.py b/scripts/expertise/expertise_bh_sniper_1.py index 5d90b6af..b94485a7 100644 --- a/scripts/expertise/expertise_bh_sniper_1.py +++ b/scripts/expertise/expertise_bh_sniper_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_sniper_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_sniper_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_sniper_1') - + if actor.getLevel() >= 26: + actor.addAbility("bh_sniper_1") + if actor.getLevel() >= 34: + actor.addAbility("bh_sniper_2") + if actor.getLevel() >= 48: + actor.addAbility("bh_sniper_3") + if actor.getLevel() >= 62: + actor.addAbility("bh_sniper_4") + if actor.getLevel() >= 76: + actor.addAbility("bh_sniper_5") + if actor.getLevel() >= 90: + actor.addAbility("bh_sniper_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_sniper_1') - + actor.removeAbility("bh_sniper_1") + actor.removeAbility("bh_sniper_2") + actor.removeAbility("bh_sniper_3") + actor.removeAbility("bh_sniper_4") + actor.removeAbility("bh_sniper_5") + actor.removeAbility("bh_sniper_6") return diff --git a/scripts/expertise/expertise_bh_stamina_1.py b/scripts/expertise/expertise_bh_stamina_1.py index 135dfb5a..77903769 100644 --- a/scripts/expertise/expertise_bh_stamina_1.py +++ b/scripts/expertise/expertise_bh_stamina_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_stamina_1') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_stamina_1') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_stamina_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_stamina_1") return diff --git a/scripts/expertise/expertise_bh_stamina_2.py b/scripts/expertise/expertise_bh_stamina_2.py index 82137a73..0deb8459 100644 --- a/scripts/expertise/expertise_bh_stamina_2.py +++ b/scripts/expertise/expertise_bh_stamina_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_stamina_2') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_stamina_2') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_stamina_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_stamina_2") return diff --git a/scripts/expertise/expertise_bh_stamina_3.py b/scripts/expertise/expertise_bh_stamina_3.py index 4a9d9c79..3ec0af04 100644 --- a/scripts/expertise/expertise_bh_stamina_3.py +++ b/scripts/expertise/expertise_bh_stamina_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_stamina_3') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_stamina_3') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_stamina_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_stamina_3") return diff --git a/scripts/expertise/expertise_bh_stamina_4.py b/scripts/expertise/expertise_bh_stamina_4.py index b4bec72c..fd17d13e 100644 --- a/scripts/expertise/expertise_bh_stamina_4.py +++ b/scripts/expertise/expertise_bh_stamina_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_stamina_4') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_stamina_4') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_stamina_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_stamina_4") return diff --git a/scripts/expertise/expertise_bh_stun_1.py b/scripts/expertise/expertise_bh_stun_1.py index 63fbb815..4e9f3633 100644 --- a/scripts/expertise/expertise_bh_stun_1.py +++ b/scripts/expertise/expertise_bh_stun_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_stun_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_stun_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_stun_1') - + if actor.getLevel() >= 26: + actor.addAbility("bh_stun_1") + if actor.getLevel() >= 34: + actor.addAbility("bh_stun_2") + if actor.getLevel() >= 48: + actor.addAbility("bh_stun_3") + if actor.getLevel() >= 62: + actor.addAbility("bh_stun_4") + if actor.getLevel() >= 76: + actor.addAbility("bh_stun_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_stun_1') - + actor.removeAbility("bh_stun_1") + actor.removeAbility("bh_stun_2") + actor.removeAbility("bh_stun_3") + actor.removeAbility("bh_stun_4") + actor.removeAbility("bh_stun_5") return diff --git a/scripts/expertise/expertise_bh_surprise_1.py b/scripts/expertise/expertise_bh_surprise_1.py index 362f3be0..2e23c9bf 100644 --- a/scripts/expertise/expertise_bh_surprise_1.py +++ b/scripts/expertise/expertise_bh_surprise_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_surprise_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_surprise_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_dm_crit_3') - + actor.addAbility("bh_dm_crit_3") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_dm_crit_3') - + actor.removeAbility("bh_dm_crit_3") return diff --git a/scripts/expertise/expertise_bh_survival_instinct_1.py b/scripts/expertise/expertise_bh_survival_instinct_1.py index 720ddfe0..c361bf9b 100644 --- a/scripts/expertise/expertise_bh_survival_instinct_1.py +++ b/scripts/expertise/expertise_bh_survival_instinct_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_survival_instinct_1') - - actor.addSkillMod('expertise_cooldown_line_sh', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_survival_instinct_1') - - actor.removeSkillMod('expertise_cooldown_line_sh', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_survival_instinct_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_survival_instinct_1") return diff --git a/scripts/expertise/expertise_bh_survival_instinct_2.py b/scripts/expertise/expertise_bh_survival_instinct_2.py index 9fbce1d0..6302e5c0 100644 --- a/scripts/expertise/expertise_bh_survival_instinct_2.py +++ b/scripts/expertise/expertise_bh_survival_instinct_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_survival_instinct_2') - - actor.addSkillMod('expertise_cooldown_line_sh', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_survival_instinct_2') - - actor.removeSkillMod('expertise_cooldown_line_sh', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_survival_instinct_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_survival_instinct_2") return diff --git a/scripts/expertise/expertise_bh_taunt_1.py b/scripts/expertise/expertise_bh_taunt_1.py index 9fa48b82..31dc085e 100644 --- a/scripts/expertise/expertise_bh_taunt_1.py +++ b/scripts/expertise/expertise_bh_taunt_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_taunt_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_taunt_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bh_taunt_1') - + if actor.getLevel() >= 26: + actor.addAbility("bh_taunt_1") + if actor.getLevel() >= 34: + actor.addAbility("bh_taunt_2") + if actor.getLevel() >= 48: + actor.addAbility("bh_taunt_3") + if actor.getLevel() >= 62: + actor.addAbility("bh_taunt_4") + if actor.getLevel() >= 76: + actor.addAbility("bh_taunt_5") + if actor.getLevel() >= 90: + actor.addAbility("bh_taunt_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('bh_taunt_1') - + actor.removeAbility("bh_taunt_1") + actor.removeAbility("bh_taunt_2") + actor.removeAbility("bh_taunt_3") + actor.removeAbility("bh_taunt_4") + actor.removeAbility("bh_taunt_5") + actor.removeAbility("bh_taunt_6") return diff --git a/scripts/expertise/expertise_bh_trap_dam_1.py b/scripts/expertise/expertise_bh_trap_dam_1.py index debbc5b2..c3ec4563 100644 --- a/scripts/expertise/expertise_bh_trap_dam_1.py +++ b/scripts/expertise/expertise_bh_trap_dam_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_dam_1') - - actor.addSkillMod('expertise_damage_line_dm_cc', 5) - actor.addSkillMod('expertise_action_line_dm_cc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_dam_1') - - actor.removeSkillMod('expertise_damage_line_dm_cc', 5) - actor.removeSkillMod('expertise_action_line_dm_cc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_dam_1") return diff --git a/scripts/expertise/expertise_bh_trap_dam_2.py b/scripts/expertise/expertise_bh_trap_dam_2.py index 34f1cfa9..7e4066c6 100644 --- a/scripts/expertise/expertise_bh_trap_dam_2.py +++ b/scripts/expertise/expertise_bh_trap_dam_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_dam_2') - - actor.addSkillMod('expertise_damage_line_dm_cc', 5) - actor.addSkillMod('expertise_action_line_dm_cc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_dam_2') - - actor.removeSkillMod('expertise_damage_line_dm_cc', 5) - actor.removeSkillMod('expertise_action_line_dm_cc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_dam_2") return diff --git a/scripts/expertise/expertise_bh_trap_dam_3.py b/scripts/expertise/expertise_bh_trap_dam_3.py index d8df37c2..27207b90 100644 --- a/scripts/expertise/expertise_bh_trap_dam_3.py +++ b/scripts/expertise/expertise_bh_trap_dam_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_dam_3') - - actor.addSkillMod('expertise_damage_line_dm_cc', 5) - actor.addSkillMod('expertise_action_line_dm_cc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_dam_3') - - actor.removeSkillMod('expertise_damage_line_dm_cc', 5) - actor.removeSkillMod('expertise_action_line_dm_cc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_dam_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_dam_3") return diff --git a/scripts/expertise/expertise_bh_trap_dam_4.py b/scripts/expertise/expertise_bh_trap_dam_4.py index 895fa7ed..7caad822 100644 --- a/scripts/expertise/expertise_bh_trap_dam_4.py +++ b/scripts/expertise/expertise_bh_trap_dam_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_dam_4') - - actor.addSkillMod('expertise_damage_line_dm_cc', 5) - actor.addSkillMod('expertise_action_line_dm_cc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_dam_4') - - actor.removeSkillMod('expertise_damage_line_dm_cc', 5) - actor.removeSkillMod('expertise_action_line_dm_cc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_dam_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_dam_4") return diff --git a/scripts/expertise/expertise_bh_trap_duration_1.py b/scripts/expertise/expertise_bh_trap_duration_1.py index a24b5591..77c4e203 100644 --- a/scripts/expertise/expertise_bh_trap_duration_1.py +++ b/scripts/expertise/expertise_bh_trap_duration_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_duration_1') - - actor.addSkillMod('expertise_buff_duration_group_snare', 1) - actor.addSkillMod('expertise_cooldown_line_dm_cc', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_duration_1') - - actor.removeSkillMod('expertise_buff_duration_group_snare', 1) - actor.removeSkillMod('expertise_cooldown_line_dm_cc', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_duration_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_duration_1") return diff --git a/scripts/expertise/expertise_bh_trap_duration_2.py b/scripts/expertise/expertise_bh_trap_duration_2.py index 4c312043..682f7452 100644 --- a/scripts/expertise/expertise_bh_trap_duration_2.py +++ b/scripts/expertise/expertise_bh_trap_duration_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_duration_2') - - actor.addSkillMod('expertise_buff_duration_group_snare', 1) - actor.addSkillMod('expertise_cooldown_line_dm_cc', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_duration_2') - - actor.removeSkillMod('expertise_buff_duration_group_snare', 1) - actor.removeSkillMod('expertise_cooldown_line_dm_cc', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_duration_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_duration_2") return diff --git a/scripts/expertise/expertise_bh_trap_duration_3.py b/scripts/expertise/expertise_bh_trap_duration_3.py index 409ba235..d08b714c 100644 --- a/scripts/expertise/expertise_bh_trap_duration_3.py +++ b/scripts/expertise/expertise_bh_trap_duration_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_duration_3') - - actor.addSkillMod('expertise_buff_duration_group_snare', 1) - actor.addSkillMod('expertise_cooldown_line_dm_cc', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_duration_3') - - actor.removeSkillMod('expertise_buff_duration_group_snare', 1) - actor.removeSkillMod('expertise_cooldown_line_dm_cc', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_duration_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_duration_3") return diff --git a/scripts/expertise/expertise_bh_trap_rng_1.py b/scripts/expertise/expertise_bh_trap_rng_1.py index 3da9ced9..74ce4e28 100644 --- a/scripts/expertise/expertise_bh_trap_rng_1.py +++ b/scripts/expertise/expertise_bh_trap_rng_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_rng_1') - - actor.addSkillMod('expertise_area_size_line_trap', 1) - actor.addSkillMod('expertise_area_size_line_diretrap', 1) - actor.addSkillMod('expertise_action_line_trap', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_rng_1') - - actor.removeSkillMod('expertise_area_size_line_trap', 1) - actor.removeSkillMod('expertise_area_size_line_diretrap', 1) - actor.removeSkillMod('expertise_action_line_trap', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_rng_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_rng_1") return diff --git a/scripts/expertise/expertise_bh_trap_rng_2.py b/scripts/expertise/expertise_bh_trap_rng_2.py index 0d853136..c3508e35 100644 --- a/scripts/expertise/expertise_bh_trap_rng_2.py +++ b/scripts/expertise/expertise_bh_trap_rng_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.addSkill('expertise_bh_trap_rng_2') - - actor.addSkillMod('expertise_area_size_line_trap', 1) - actor.addSkillMod('expertise_area_size_line_diretrap', 1) - actor.addSkillMod('expertise_action_line_trap', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'bounty_hunter_1a': - return - - actor.removeSkill('expertise_bh_trap_rng_2') - - actor.removeSkillMod('expertise_area_size_line_trap', 1) - actor.removeSkillMod('expertise_area_size_line_diretrap', 1) - actor.removeSkillMod('expertise_action_line_trap', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bh_trap_rng_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bh_trap_rng_2") return diff --git a/scripts/expertise/expertise_bm_abilility_aquisition_mod_1.py b/scripts/expertise/expertise_bm_abilility_aquisition_mod_1.py index 5a44b9cb..ad3b81a0 100644 --- a/scripts/expertise/expertise_bm_abilility_aquisition_mod_1.py +++ b/scripts/expertise/expertise_bm_abilility_aquisition_mod_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_abilility_aquisition_mod_1') - - actor.addSkillMod('expertise_bm_enhanced_skill_acquisition', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_abilility_aquisition_mod_1') - - actor.removeSkillMod('expertise_bm_enhanced_skill_acquisition', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_abilility_aquisition_mod_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_abilility_aquisition_mod_1") return diff --git a/scripts/expertise/expertise_bm_add_first_pet_bar_1.py b/scripts/expertise/expertise_bm_add_first_pet_bar_1.py index aca29011..e0653096 100644 --- a/scripts/expertise/expertise_bm_add_first_pet_bar_1.py +++ b/scripts/expertise/expertise_bm_add_first_pet_bar_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_add_first_pet_bar_1') - - actor.addSkillMod('expertise_bm_add_pet_bar', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_add_first_pet_bar_1') - - actor.removeSkillMod('expertise_bm_add_pet_bar', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_add_first_pet_bar_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_add_first_pet_bar_1") return diff --git a/scripts/expertise/expertise_bm_add_second_pet_bar_1.py b/scripts/expertise/expertise_bm_add_second_pet_bar_1.py index 385f1057..374dae76 100644 --- a/scripts/expertise/expertise_bm_add_second_pet_bar_1.py +++ b/scripts/expertise/expertise_bm_add_second_pet_bar_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_add_second_pet_bar_1') - - actor.addSkillMod('expertise_bm_add_pet_bar', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_add_second_pet_bar_1') - - actor.removeSkillMod('expertise_bm_add_pet_bar', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_add_second_pet_bar_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_add_second_pet_bar_1") return diff --git a/scripts/expertise/expertise_bm_add_third_pet_bar_1.py b/scripts/expertise/expertise_bm_add_third_pet_bar_1.py index 607cc8c8..600df6ad 100644 --- a/scripts/expertise/expertise_bm_add_third_pet_bar_1.py +++ b/scripts/expertise/expertise_bm_add_third_pet_bar_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_add_third_pet_bar_1') - - actor.addSkillMod('expertise_bm_add_pet_bar', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_add_third_pet_bar_1') - - actor.removeSkillMod('expertise_bm_add_pet_bar', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_add_third_pet_bar_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_add_third_pet_bar_1") return diff --git a/scripts/expertise/expertise_bm_attack_1.py b/scripts/expertise/expertise_bm_attack_1.py index 8b6f795c..798c38cf 100644 --- a/scripts/expertise/expertise_bm_attack_1.py +++ b/scripts/expertise/expertise_bm_attack_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_attack_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_attack_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bm_pet_attack_1') - + actor.addAbility("bm_pet_attack_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bm_pet_attack_1') - + actor.removeAbility("bm_pet_attack_1") return diff --git a/scripts/expertise/expertise_bm_beast_mastery_1.py b/scripts/expertise/expertise_bm_beast_mastery_1.py index e467a281..b4720a91 100644 --- a/scripts/expertise/expertise_bm_beast_mastery_1.py +++ b/scripts/expertise/expertise_bm_beast_mastery_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_beast_mastery_1') - - actor.addSkillMod('expertise_bm_self_debuff_reduction', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_beast_mastery_1') - - actor.removeSkillMod('expertise_bm_self_debuff_reduction', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_beast_mastery_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_beast_mastery_1") return diff --git a/scripts/expertise/expertise_bm_creature_knowledge_command_1.py b/scripts/expertise/expertise_bm_creature_knowledge_command_1.py index 3f50c6cd..602905fc 100644 --- a/scripts/expertise/expertise_bm_creature_knowledge_command_1.py +++ b/scripts/expertise/expertise_bm_creature_knowledge_command_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_creature_knowledge_command_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_creature_knowledge_command_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bm_creature_knowledge_command_1') - + actor.addAbility("bm_creature_knowledge_command_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bm_creature_knowledge_command_1') - + actor.removeAbility("bm_creature_knowledge_command_1") return diff --git a/scripts/expertise/expertise_bm_dexterity_training_1.py b/scripts/expertise/expertise_bm_dexterity_training_1.py index 4162179d..50a560d4 100644 --- a/scripts/expertise/expertise_bm_dexterity_training_1.py +++ b/scripts/expertise/expertise_bm_dexterity_training_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_dexterity_training_1') - - actor.addSkillMod('expertise_bm_pet_attack_speed', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_dexterity_training_1') - - actor.removeSkillMod('expertise_bm_pet_attack_speed', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_dexterity_training_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_dexterity_training_1") return diff --git a/scripts/expertise/expertise_bm_dexterity_training_2.py b/scripts/expertise/expertise_bm_dexterity_training_2.py index f3c66370..ab2527c4 100644 --- a/scripts/expertise/expertise_bm_dexterity_training_2.py +++ b/scripts/expertise/expertise_bm_dexterity_training_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_dexterity_training_2') - - actor.addSkillMod('expertise_bm_pet_attack_speed', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_dexterity_training_2') - - actor.removeSkillMod('expertise_bm_pet_attack_speed', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_dexterity_training_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_dexterity_training_2") return diff --git a/scripts/expertise/expertise_bm_dna_harvesting_1.py b/scripts/expertise/expertise_bm_dna_harvesting_1.py index ee8aad65..3f9e6c4c 100644 --- a/scripts/expertise/expertise_bm_dna_harvesting_1.py +++ b/scripts/expertise/expertise_bm_dna_harvesting_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_dna_harvesting_1') - - actor.addSkillMod('expertise_bm_dna_harvesting_1', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_dna_harvesting_1') - - actor.removeSkillMod('expertise_bm_dna_harvesting_1', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_dna_harvesting_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_dna_harvesting_1") return diff --git a/scripts/expertise/expertise_bm_dna_harvesting_2.py b/scripts/expertise/expertise_bm_dna_harvesting_2.py index 5c0b2044..0b5cc4fa 100644 --- a/scripts/expertise/expertise_bm_dna_harvesting_2.py +++ b/scripts/expertise/expertise_bm_dna_harvesting_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_dna_harvesting_2') - - actor.addSkillMod('expertise_bm_dna_harvesting_1', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_dna_harvesting_2') - - actor.removeSkillMod('expertise_bm_dna_harvesting_1', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_dna_harvesting_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_dna_harvesting_2") return diff --git a/scripts/expertise/expertise_bm_dna_harvesting_3.py b/scripts/expertise/expertise_bm_dna_harvesting_3.py index 3f287f64..2f6fcdfa 100644 --- a/scripts/expertise/expertise_bm_dna_harvesting_3.py +++ b/scripts/expertise/expertise_bm_dna_harvesting_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_dna_harvesting_3') - - actor.addSkillMod('expertise_bm_dna_harvesting_1', 40) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_dna_harvesting_3') - - actor.removeSkillMod('expertise_bm_dna_harvesting_1', 40) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_dna_harvesting_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_dna_harvesting_3") return diff --git a/scripts/expertise/expertise_bm_erratic_genius_1.py b/scripts/expertise/expertise_bm_erratic_genius_1.py index ab96d82c..d7ed15a7 100644 --- a/scripts/expertise/expertise_bm_erratic_genius_1.py +++ b/scripts/expertise/expertise_bm_erratic_genius_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_erratic_genius_1') - - actor.addSkillMod('bm_mutation_chance_increase', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_erratic_genius_1') - - actor.removeSkillMod('bm_mutation_chance_increase', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_erratic_genius_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_erratic_genius_1") return diff --git a/scripts/expertise/expertise_bm_erratic_genius_2.py b/scripts/expertise/expertise_bm_erratic_genius_2.py index bc4c75ec..6e387fb5 100644 --- a/scripts/expertise/expertise_bm_erratic_genius_2.py +++ b/scripts/expertise/expertise_bm_erratic_genius_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_erratic_genius_2') - - actor.addSkillMod('bm_mutation_chance_increase', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_erratic_genius_2') - - actor.removeSkillMod('bm_mutation_chance_increase', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_erratic_genius_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_erratic_genius_2") return diff --git a/scripts/expertise/expertise_bm_erratic_genius_3.py b/scripts/expertise/expertise_bm_erratic_genius_3.py index a0ece6c0..0ee3e98e 100644 --- a/scripts/expertise/expertise_bm_erratic_genius_3.py +++ b/scripts/expertise/expertise_bm_erratic_genius_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_erratic_genius_3') - - actor.addSkillMod('bm_mutation_chance_increase', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_erratic_genius_3') - - actor.removeSkillMod('bm_mutation_chance_increase', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_erratic_genius_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_erratic_genius_3") return diff --git a/scripts/expertise/expertise_bm_evasion_1.py b/scripts/expertise/expertise_bm_evasion_1.py index 62f8715c..aa280e26 100644 --- a/scripts/expertise/expertise_bm_evasion_1.py +++ b/scripts/expertise/expertise_bm_evasion_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_evasion_1') - - actor.addSkillMod('expertise_bm_pet_evade_chance', 5) - actor.addSkillMod('expertise_bm_pet_evade_value', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_evasion_1') - - actor.removeSkillMod('expertise_bm_pet_evade_chance', 5) - actor.removeSkillMod('expertise_bm_pet_evade_value', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_evasion_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_evasion_1") return diff --git a/scripts/expertise/expertise_bm_evasion_2.py b/scripts/expertise/expertise_bm_evasion_2.py index f05946e2..2b7ceac3 100644 --- a/scripts/expertise/expertise_bm_evasion_2.py +++ b/scripts/expertise/expertise_bm_evasion_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_evasion_2') - - actor.addSkillMod('expertise_bm_pet_evade_chance', 5) - actor.addSkillMod('expertise_bm_pet_evade_value', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_evasion_2') - - actor.removeSkillMod('expertise_bm_pet_evade_chance', 5) - actor.removeSkillMod('expertise_bm_pet_evade_value', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_evasion_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_evasion_2") return diff --git a/scripts/expertise/expertise_bm_evasion_3.py b/scripts/expertise/expertise_bm_evasion_3.py index 84f582e3..6aab14d4 100644 --- a/scripts/expertise/expertise_bm_evasion_3.py +++ b/scripts/expertise/expertise_bm_evasion_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_evasion_3') - - actor.addSkillMod('expertise_bm_pet_evade_chance', 5) - actor.addSkillMod('expertise_bm_pet_evade_value', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_evasion_3') - - actor.removeSkillMod('expertise_bm_pet_evade_chance', 5) - actor.removeSkillMod('expertise_bm_pet_evade_value', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_evasion_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_evasion_3") return diff --git a/scripts/expertise/expertise_bm_exceptional_nutrition_1.py b/scripts/expertise/expertise_bm_exceptional_nutrition_1.py index dce1b89b..e65b9f1b 100644 --- a/scripts/expertise/expertise_bm_exceptional_nutrition_1.py +++ b/scripts/expertise/expertise_bm_exceptional_nutrition_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_exceptional_nutrition_1') - - actor.addSkillMod('expertise_bm_pet_health', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_exceptional_nutrition_1') - - actor.removeSkillMod('expertise_bm_pet_health', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_exceptional_nutrition_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_exceptional_nutrition_1") return diff --git a/scripts/expertise/expertise_bm_exceptional_nutrition_2.py b/scripts/expertise/expertise_bm_exceptional_nutrition_2.py index acd0ed4b..68aa2189 100644 --- a/scripts/expertise/expertise_bm_exceptional_nutrition_2.py +++ b/scripts/expertise/expertise_bm_exceptional_nutrition_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_exceptional_nutrition_2') - - actor.addSkillMod('expertise_bm_pet_health', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_exceptional_nutrition_2') - - actor.removeSkillMod('expertise_bm_pet_health', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_exceptional_nutrition_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_exceptional_nutrition_2") return diff --git a/scripts/expertise/expertise_bm_fortitude_1.py b/scripts/expertise/expertise_bm_fortitude_1.py index bb3c54c6..d1f38de7 100644 --- a/scripts/expertise/expertise_bm_fortitude_1.py +++ b/scripts/expertise/expertise_bm_fortitude_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_fortitude_1') - - actor.addSkillMod('expertise_bm_pet_armor', 40) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_fortitude_1') - - actor.removeSkillMod('expertise_bm_pet_armor', 40) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_fortitude_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_fortitude_1") return diff --git a/scripts/expertise/expertise_bm_fortitude_2.py b/scripts/expertise/expertise_bm_fortitude_2.py index b04ea1e4..a2a6f76e 100644 --- a/scripts/expertise/expertise_bm_fortitude_2.py +++ b/scripts/expertise/expertise_bm_fortitude_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_fortitude_2') - - actor.addSkillMod('expertise_bm_pet_armor', 40) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_fortitude_2') - - actor.removeSkillMod('expertise_bm_pet_armor', 40) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_fortitude_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_fortitude_2") return diff --git a/scripts/expertise/expertise_bm_fortitude_3.py b/scripts/expertise/expertise_bm_fortitude_3.py index 466ebff1..899a6288 100644 --- a/scripts/expertise/expertise_bm_fortitude_3.py +++ b/scripts/expertise/expertise_bm_fortitude_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_fortitude_3') - - actor.addSkillMod('expertise_bm_pet_armor', 40) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_fortitude_3') - - actor.removeSkillMod('expertise_bm_pet_armor', 40) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_fortitude_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_fortitude_3") return diff --git a/scripts/expertise/expertise_bm_genetic_engineering_1.py b/scripts/expertise/expertise_bm_genetic_engineering_1.py index 865d8630..e4efece4 100644 --- a/scripts/expertise/expertise_bm_genetic_engineering_1.py +++ b/scripts/expertise/expertise_bm_genetic_engineering_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_genetic_engineering_1') - - actor.addSkillMod('expertise_bm_genetic_engineering', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_genetic_engineering_1') - - actor.removeSkillMod('expertise_bm_genetic_engineering', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_genetic_engineering_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_genetic_engineering_1") return diff --git a/scripts/expertise/expertise_bm_genetic_engineering_2.py b/scripts/expertise/expertise_bm_genetic_engineering_2.py index f25e5200..92cded50 100644 --- a/scripts/expertise/expertise_bm_genetic_engineering_2.py +++ b/scripts/expertise/expertise_bm_genetic_engineering_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_genetic_engineering_2') - - actor.addSkillMod('expertise_bm_genetic_engineering', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_genetic_engineering_2') - - actor.removeSkillMod('expertise_bm_genetic_engineering', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_genetic_engineering_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_genetic_engineering_2") return diff --git a/scripts/expertise/expertise_bm_genetic_engineering_3.py b/scripts/expertise/expertise_bm_genetic_engineering_3.py index dc3fd5df..a9521b48 100644 --- a/scripts/expertise/expertise_bm_genetic_engineering_3.py +++ b/scripts/expertise/expertise_bm_genetic_engineering_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_genetic_engineering_3') - - actor.addSkillMod('expertise_bm_genetic_engineering', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_genetic_engineering_3') - - actor.removeSkillMod('expertise_bm_genetic_engineering', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_genetic_engineering_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_genetic_engineering_3") return diff --git a/scripts/expertise/expertise_bm_genetic_engineering_4.py b/scripts/expertise/expertise_bm_genetic_engineering_4.py index 283f05f2..22c76382 100644 --- a/scripts/expertise/expertise_bm_genetic_engineering_4.py +++ b/scripts/expertise/expertise_bm_genetic_engineering_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_genetic_engineering_4') - - actor.addSkillMod('expertise_bm_genetic_engineering', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_genetic_engineering_4') - - actor.removeSkillMod('expertise_bm_genetic_engineering', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_genetic_engineering_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_genetic_engineering_4") return diff --git a/scripts/expertise/expertise_bm_improved_healing_1.py b/scripts/expertise/expertise_bm_improved_healing_1.py index 5f173fcb..9ccb8bbf 100644 --- a/scripts/expertise/expertise_bm_improved_healing_1.py +++ b/scripts/expertise/expertise_bm_improved_healing_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_improved_healing_1') - - actor.addSkillMod('expertise_bm_improved_pet_heal', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_improved_healing_1') - - actor.removeSkillMod('expertise_bm_improved_pet_heal', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_improved_healing_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_improved_healing_1") return diff --git a/scripts/expertise/expertise_bm_improved_healing_2.py b/scripts/expertise/expertise_bm_improved_healing_2.py index d93a6af1..3168a225 100644 --- a/scripts/expertise/expertise_bm_improved_healing_2.py +++ b/scripts/expertise/expertise_bm_improved_healing_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_improved_healing_2') - - actor.addSkillMod('expertise_bm_improved_pet_heal', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_improved_healing_2') - - actor.removeSkillMod('expertise_bm_improved_pet_heal', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_improved_healing_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_improved_healing_2") return diff --git a/scripts/expertise/expertise_bm_improved_healing_3.py b/scripts/expertise/expertise_bm_improved_healing_3.py index 3a61f218..c8cd2102 100644 --- a/scripts/expertise/expertise_bm_improved_healing_3.py +++ b/scripts/expertise/expertise_bm_improved_healing_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_improved_healing_3') - - actor.addSkillMod('expertise_bm_improved_pet_heal', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_improved_healing_3') - - actor.removeSkillMod('expertise_bm_improved_pet_heal', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_improved_healing_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_improved_healing_3") return diff --git a/scripts/expertise/expertise_bm_incubation_base_1.py b/scripts/expertise/expertise_bm_incubation_base_1.py index 9b7a89bc..94b0399b 100644 --- a/scripts/expertise/expertise_bm_incubation_base_1.py +++ b/scripts/expertise/expertise_bm_incubation_base_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_incubation_base_1') - - actor.addSkillMod('expertise_bm_base_mod', 100) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_incubation_base_1') - - actor.removeSkillMod('expertise_bm_base_mod', 100) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bm_collect_dna') - + actor.addAbility("bm_collect_dna") return def removeAbilities(core, actor, player): - - actor.removeAbility('bm_collect_dna') - + actor.removeAbility("bm_collect_dna") return diff --git a/scripts/expertise/expertise_bm_incubation_mod_1.py b/scripts/expertise/expertise_bm_incubation_mod_1.py index 5dcf4b16..b99b1518 100644 --- a/scripts/expertise/expertise_bm_incubation_mod_1.py +++ b/scripts/expertise/expertise_bm_incubation_mod_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_incubation_mod_1') - - actor.addSkillMod('expertise_bm_incubation_quality', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_incubation_mod_1') - - actor.removeSkillMod('expertise_bm_incubation_quality', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_incubation_mod_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_incubation_mod_1") return diff --git a/scripts/expertise/expertise_bm_incubation_mod_2.py b/scripts/expertise/expertise_bm_incubation_mod_2.py index 022fdeff..167f2676 100644 --- a/scripts/expertise/expertise_bm_incubation_mod_2.py +++ b/scripts/expertise/expertise_bm_incubation_mod_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_incubation_mod_2') - - actor.addSkillMod('expertise_bm_incubation_quality', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_incubation_mod_2') - - actor.removeSkillMod('expertise_bm_incubation_quality', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_incubation_mod_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_incubation_mod_2") return diff --git a/scripts/expertise/expertise_bm_incubation_mod_3.py b/scripts/expertise/expertise_bm_incubation_mod_3.py index 8460e39e..e90a66ee 100644 --- a/scripts/expertise/expertise_bm_incubation_mod_3.py +++ b/scripts/expertise/expertise_bm_incubation_mod_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_incubation_mod_3') - - actor.addSkillMod('expertise_bm_incubation_quality', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_incubation_mod_3') - - actor.removeSkillMod('expertise_bm_incubation_quality', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_incubation_mod_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_incubation_mod_3") return diff --git a/scripts/expertise/expertise_bm_loyalty_mod_1.py b/scripts/expertise/expertise_bm_loyalty_mod_1.py index 628987a3..e697ccab 100644 --- a/scripts/expertise/expertise_bm_loyalty_mod_1.py +++ b/scripts/expertise/expertise_bm_loyalty_mod_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_loyalty_mod_1') - - actor.addSkillMod('expertise_bm_pet_happiness', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_loyalty_mod_1') - - actor.removeSkillMod('expertise_bm_pet_happiness', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_loyalty_mod_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_loyalty_mod_1") return diff --git a/scripts/expertise/expertise_bm_loyalty_mod_2.py b/scripts/expertise/expertise_bm_loyalty_mod_2.py index f7c57622..94e893a7 100644 --- a/scripts/expertise/expertise_bm_loyalty_mod_2.py +++ b/scripts/expertise/expertise_bm_loyalty_mod_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_loyalty_mod_2') - - actor.addSkillMod('expertise_bm_pet_happiness', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_loyalty_mod_2') - - actor.removeSkillMod('expertise_bm_pet_happiness', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_loyalty_mod_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_loyalty_mod_2") return diff --git a/scripts/expertise/expertise_bm_loyalty_mod_3.py b/scripts/expertise/expertise_bm_loyalty_mod_3.py index 255e4b86..a70c5c6b 100644 --- a/scripts/expertise/expertise_bm_loyalty_mod_3.py +++ b/scripts/expertise/expertise_bm_loyalty_mod_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_loyalty_mod_3') - - actor.addSkillMod('expertise_bm_pet_happiness', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_loyalty_mod_3') - - actor.removeSkillMod('expertise_bm_pet_happiness', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_loyalty_mod_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_loyalty_mod_3") return diff --git a/scripts/expertise/expertise_bm_mending_1.py b/scripts/expertise/expertise_bm_mending_1.py index f659d061..19f68bf5 100644 --- a/scripts/expertise/expertise_bm_mending_1.py +++ b/scripts/expertise/expertise_bm_mending_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_mending_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_mending_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bm_mend_pet_1') - + actor.addAbility("bm_mend_pet_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bm_mend_pet_1') - + actor.removeAbility("bm_mend_pet_1") return diff --git a/scripts/expertise/expertise_bm_metagame_mod_1.py b/scripts/expertise/expertise_bm_metagame_mod_1.py index ad8053c1..310506d4 100644 --- a/scripts/expertise/expertise_bm_metagame_mod_1.py +++ b/scripts/expertise/expertise_bm_metagame_mod_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_metagame_mod_1') - - actor.addSkillMod('expertise_bm_incubation_time', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_metagame_mod_1') - - actor.removeSkillMod('expertise_bm_incubation_time', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_metagame_mod_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_metagame_mod_1") return diff --git a/scripts/expertise/expertise_bm_metagame_mod_2.py b/scripts/expertise/expertise_bm_metagame_mod_2.py index af8ff1d4..e1138649 100644 --- a/scripts/expertise/expertise_bm_metagame_mod_2.py +++ b/scripts/expertise/expertise_bm_metagame_mod_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_metagame_mod_2') - - actor.addSkillMod('expertise_bm_incubation_time', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_metagame_mod_2') - - actor.removeSkillMod('expertise_bm_incubation_time', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_metagame_mod_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_metagame_mod_2") return diff --git a/scripts/expertise/expertise_bm_metagame_mod_3.py b/scripts/expertise/expertise_bm_metagame_mod_3.py index 70409e9c..7b6e0112 100644 --- a/scripts/expertise/expertise_bm_metagame_mod_3.py +++ b/scripts/expertise/expertise_bm_metagame_mod_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_metagame_mod_3') - - actor.addSkillMod('expertise_bm_incubation_time', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_metagame_mod_3') - - actor.removeSkillMod('expertise_bm_incubation_time', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_metagame_mod_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_metagame_mod_3") return diff --git a/scripts/expertise/expertise_bm_metagame_mod_4.py b/scripts/expertise/expertise_bm_metagame_mod_4.py index 1e31b545..ffb8090a 100644 --- a/scripts/expertise/expertise_bm_metagame_mod_4.py +++ b/scripts/expertise/expertise_bm_metagame_mod_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_metagame_mod_4') - - actor.addSkillMod('expertise_bm_incubation_time', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_metagame_mod_4') - - actor.removeSkillMod('expertise_bm_incubation_time', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_metagame_mod_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_metagame_mod_4") return diff --git a/scripts/expertise/expertise_bm_pet_dodge_1.py b/scripts/expertise/expertise_bm_pet_dodge_1.py index 17868349..fc36117c 100644 --- a/scripts/expertise/expertise_bm_pet_dodge_1.py +++ b/scripts/expertise/expertise_bm_pet_dodge_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_pet_dodge_1') - - actor.addSkillMod('expertise_pet_dodge', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_pet_dodge_1') - - actor.removeSkillMod('expertise_pet_dodge', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_pet_dodge_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_pet_dodge_1") return diff --git a/scripts/expertise/expertise_bm_pet_dodge_2.py b/scripts/expertise/expertise_bm_pet_dodge_2.py index 9a6766ad..2341888c 100644 --- a/scripts/expertise/expertise_bm_pet_dodge_2.py +++ b/scripts/expertise/expertise_bm_pet_dodge_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_pet_dodge_2') - - actor.addSkillMod('expertise_pet_dodge', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_pet_dodge_2') - - actor.removeSkillMod('expertise_pet_dodge', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_pet_dodge_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_pet_dodge_2") return diff --git a/scripts/expertise/expertise_bm_pet_dodge_3.py b/scripts/expertise/expertise_bm_pet_dodge_3.py index 6166d92b..c9a97d17 100644 --- a/scripts/expertise/expertise_bm_pet_dodge_3.py +++ b/scripts/expertise/expertise_bm_pet_dodge_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_pet_dodge_3') - - actor.addSkillMod('expertise_pet_dodge', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_pet_dodge_3') - - actor.removeSkillMod('expertise_pet_dodge', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_pet_dodge_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_pet_dodge_3") return diff --git a/scripts/expertise/expertise_bm_pet_recovery_1.py b/scripts/expertise/expertise_bm_pet_recovery_1.py index 5ecf5f40..1a956cf2 100644 --- a/scripts/expertise/expertise_bm_pet_recovery_1.py +++ b/scripts/expertise/expertise_bm_pet_recovery_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_pet_recovery_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_pet_recovery_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_pet_recovery_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_pet_recovery_1") return diff --git a/scripts/expertise/expertise_bm_pet_recovery_2.py b/scripts/expertise/expertise_bm_pet_recovery_2.py index ddbf4dae..41c09b07 100644 --- a/scripts/expertise/expertise_bm_pet_recovery_2.py +++ b/scripts/expertise/expertise_bm_pet_recovery_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_pet_recovery_2') - - actor.addSkillMod('expertise_bm_pet_revive_time', 5) - actor.addSkillMod('expertise_bm_pet_recovery', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_pet_recovery_2') - - actor.removeSkillMod('expertise_bm_pet_revive_time', 5) - actor.removeSkillMod('expertise_bm_pet_recovery', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_pet_recovery_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_pet_recovery_2") return diff --git a/scripts/expertise/expertise_bm_pet_recovery_3.py b/scripts/expertise/expertise_bm_pet_recovery_3.py index 9be05560..36413c3c 100644 --- a/scripts/expertise/expertise_bm_pet_recovery_3.py +++ b/scripts/expertise/expertise_bm_pet_recovery_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_pet_recovery_3') - - actor.addSkillMod('expertise_bm_pet_revive_time', 5) - actor.addSkillMod('expertise_bm_pet_recovery', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_pet_recovery_3') - - actor.removeSkillMod('expertise_bm_pet_revive_time', 5) - actor.removeSkillMod('expertise_bm_pet_recovery', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_pet_recovery_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_pet_recovery_3") return diff --git a/scripts/expertise/expertise_bm_savagery_1.py b/scripts/expertise/expertise_bm_savagery_1.py index 7315df92..27f21562 100644 --- a/scripts/expertise/expertise_bm_savagery_1.py +++ b/scripts/expertise/expertise_bm_savagery_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_savagery_1') - - actor.addSkillMod('expertise_bm_pet_damage', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_savagery_1') - - actor.removeSkillMod('expertise_bm_pet_damage', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_savagery_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_savagery_1") return diff --git a/scripts/expertise/expertise_bm_savagery_2.py b/scripts/expertise/expertise_bm_savagery_2.py index 31e83042..09c606de 100644 --- a/scripts/expertise/expertise_bm_savagery_2.py +++ b/scripts/expertise/expertise_bm_savagery_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_savagery_2') - - actor.addSkillMod('expertise_bm_pet_damage', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_savagery_2') - - actor.removeSkillMod('expertise_bm_pet_damage', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_savagery_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_savagery_2") return diff --git a/scripts/expertise/expertise_bm_savagery_3.py b/scripts/expertise/expertise_bm_savagery_3.py index c5619d8d..775c9484 100644 --- a/scripts/expertise/expertise_bm_savagery_3.py +++ b/scripts/expertise/expertise_bm_savagery_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_savagery_3') - - actor.addSkillMod('expertise_bm_pet_damage', 40) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_savagery_3') - - actor.removeSkillMod('expertise_bm_pet_damage', 40) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_savagery_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_savagery_3") return diff --git a/scripts/expertise/expertise_bm_soothing_comfort_1.py b/scripts/expertise/expertise_bm_soothing_comfort_1.py index 543104f4..53dff95c 100644 --- a/scripts/expertise/expertise_bm_soothing_comfort_1.py +++ b/scripts/expertise/expertise_bm_soothing_comfort_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_soothing_comfort_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_soothing_comfort_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('bm_soothing_comfort_1') - + actor.addAbility("bm_soothing_comfort_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('bm_soothing_comfort_1') - + actor.removeAbility("bm_soothing_comfort_1") return diff --git a/scripts/expertise/expertise_bm_specialized_supplements_1.py b/scripts/expertise/expertise_bm_specialized_supplements_1.py index 4506f29e..0ea96000 100644 --- a/scripts/expertise/expertise_bm_specialized_supplements_1.py +++ b/scripts/expertise/expertise_bm_specialized_supplements_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.addSkill('expertise_bm_specialized_supplements_1') - - actor.addSkillMod('expertise_bm_pet_regen', 100) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'all_1a': - return - - actor.removeSkill('expertise_bm_specialized_supplements_1') - - actor.removeSkillMod('expertise_bm_pet_regen', 100) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_bm_specialized_supplements_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_bm_specialized_supplements_1") return diff --git a/scripts/expertise/expertise_co_angled_shrapnel_1.py b/scripts/expertise/expertise_co_angled_shrapnel_1.py index 0b649f92..c2e3f8ce 100644 --- a/scripts/expertise/expertise_co_angled_shrapnel_1.py +++ b/scripts/expertise/expertise_co_angled_shrapnel_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_angled_shrapnel_1') - - actor.addSkillMod('expertise_area_size_line_co_remote_detonator', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_angled_shrapnel_1') - - actor.removeSkillMod('expertise_area_size_line_co_remote_detonator', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_angled_shrapnel_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_angled_shrapnel_1") return diff --git a/scripts/expertise/expertise_co_angled_shrapnel_2.py b/scripts/expertise/expertise_co_angled_shrapnel_2.py index a8801a55..48f5c250 100644 --- a/scripts/expertise/expertise_co_angled_shrapnel_2.py +++ b/scripts/expertise/expertise_co_angled_shrapnel_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_angled_shrapnel_2') - - actor.addSkillMod('expertise_area_size_line_co_remote_detonator', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_angled_shrapnel_2') - - actor.removeSkillMod('expertise_area_size_line_co_remote_detonator', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_angled_shrapnel_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_angled_shrapnel_2") return diff --git a/scripts/expertise/expertise_co_armor_cracker_1.py b/scripts/expertise/expertise_co_armor_cracker_1.py index fe7606f0..5843c904 100644 --- a/scripts/expertise/expertise_co_armor_cracker_1.py +++ b/scripts/expertise/expertise_co_armor_cracker_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_armor_cracker_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_armor_cracker_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_armor_cracker') - + actor.addAbility("co_armor_cracker") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_armor_cracker') - + actor.removeAbility("co_armor_cracker") return diff --git a/scripts/expertise/expertise_co_base_of_operations_1.py b/scripts/expertise/expertise_co_base_of_operations_1.py index 34f5548a..1e406802 100644 --- a/scripts/expertise/expertise_co_base_of_operations_1.py +++ b/scripts/expertise/expertise_co_base_of_operations_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_base_of_operations_1') - - actor.addSkillMod('expertise_co_pos_secured_line_armor', 1000) - actor.addSkillMod('expertise_co_pos_secured_line_boo_critical', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_base_of_operations_1') - - actor.removeSkillMod('expertise_co_pos_secured_line_armor', 1000) - actor.removeSkillMod('expertise_co_pos_secured_line_boo_critical', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_base_of_operations_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_base_of_operations_1") return diff --git a/scripts/expertise/expertise_co_blast_radius_1.py b/scripts/expertise/expertise_co_blast_radius_1.py index f9c87cc7..1dab9e96 100644 --- a/scripts/expertise/expertise_co_blast_radius_1.py +++ b/scripts/expertise/expertise_co_blast_radius_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_radius_1') - - actor.addSkillMod('expertise_area_size_line_co_grenade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_radius_1') - - actor.removeSkillMod('expertise_area_size_line_co_grenade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_radius_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_radius_1") return diff --git a/scripts/expertise/expertise_co_blast_radius_2.py b/scripts/expertise/expertise_co_blast_radius_2.py index c640ac02..3cc739c8 100644 --- a/scripts/expertise/expertise_co_blast_radius_2.py +++ b/scripts/expertise/expertise_co_blast_radius_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_radius_2') - - actor.addSkillMod('expertise_area_size_line_co_grenade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_radius_2') - - actor.removeSkillMod('expertise_area_size_line_co_grenade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_radius_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_radius_2") return diff --git a/scripts/expertise/expertise_co_blast_radius_3.py b/scripts/expertise/expertise_co_blast_radius_3.py index d4263326..d87f0a4b 100644 --- a/scripts/expertise/expertise_co_blast_radius_3.py +++ b/scripts/expertise/expertise_co_blast_radius_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_radius_3') - - actor.addSkillMod('expertise_area_size_line_co_grenade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_radius_3') - - actor.removeSkillMod('expertise_area_size_line_co_grenade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_radius_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_radius_3") return diff --git a/scripts/expertise/expertise_co_blast_radius_4.py b/scripts/expertise/expertise_co_blast_radius_4.py index 64490261..99d44c0c 100644 --- a/scripts/expertise/expertise_co_blast_radius_4.py +++ b/scripts/expertise/expertise_co_blast_radius_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_radius_4') - - actor.addSkillMod('expertise_area_size_line_co_grenade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_radius_4') - - actor.removeSkillMod('expertise_area_size_line_co_grenade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_radius_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_radius_4") return diff --git a/scripts/expertise/expertise_co_blast_resistance_1.py b/scripts/expertise/expertise_co_blast_resistance_1.py index 8aff3074..d4b76bda 100644 --- a/scripts/expertise/expertise_co_blast_resistance_1.py +++ b/scripts/expertise/expertise_co_blast_resistance_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_resistance_1') - - actor.addSkillMod('area_damage_resist_full_percentage', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_resistance_1') - - actor.removeSkillMod('area_damage_resist_full_percentage', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_resistance_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_resistance_1") return diff --git a/scripts/expertise/expertise_co_blast_resistance_2.py b/scripts/expertise/expertise_co_blast_resistance_2.py index 7efcf286..6596c815 100644 --- a/scripts/expertise/expertise_co_blast_resistance_2.py +++ b/scripts/expertise/expertise_co_blast_resistance_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_resistance_2') - - actor.addSkillMod('area_damage_resist_full_percentage', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_resistance_2') - - actor.removeSkillMod('area_damage_resist_full_percentage', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_resistance_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_resistance_2") return diff --git a/scripts/expertise/expertise_co_blast_resistance_3.py b/scripts/expertise/expertise_co_blast_resistance_3.py index 57b839ca..8a5b7bc9 100644 --- a/scripts/expertise/expertise_co_blast_resistance_3.py +++ b/scripts/expertise/expertise_co_blast_resistance_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_resistance_3') - - actor.addSkillMod('area_damage_resist_full_percentage', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_resistance_3') - - actor.removeSkillMod('area_damage_resist_full_percentage', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_resistance_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_resistance_3") return diff --git a/scripts/expertise/expertise_co_blast_resistance_4.py b/scripts/expertise/expertise_co_blast_resistance_4.py index 08838e5a..c046b643 100644 --- a/scripts/expertise/expertise_co_blast_resistance_4.py +++ b/scripts/expertise/expertise_co_blast_resistance_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blast_resistance_4') - - actor.addSkillMod('area_damage_resist_full_percentage', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blast_resistance_4') - - actor.removeSkillMod('area_damage_resist_full_percentage', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blast_resistance_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blast_resistance_4") return diff --git a/scripts/expertise/expertise_co_blow_em_away_1.py b/scripts/expertise/expertise_co_blow_em_away_1.py index 829d7e74..3880d17d 100644 --- a/scripts/expertise/expertise_co_blow_em_away_1.py +++ b/scripts/expertise/expertise_co_blow_em_away_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blow_em_away_1') - - actor.addSkillMod('expertise_co_cluster_bomblet', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blow_em_away_1') - - actor.removeSkillMod('expertise_co_cluster_bomblet', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blow_em_away_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blow_em_away_1") return diff --git a/scripts/expertise/expertise_co_blow_em_away_2.py b/scripts/expertise/expertise_co_blow_em_away_2.py index 59dc0e4e..11ca839c 100644 --- a/scripts/expertise/expertise_co_blow_em_away_2.py +++ b/scripts/expertise/expertise_co_blow_em_away_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_blow_em_away_2') - - actor.addSkillMod('expertise_co_cluster_bomblet', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_blow_em_away_2') - - actor.removeSkillMod('expertise_co_cluster_bomblet', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_blow_em_away_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_blow_em_away_2") return diff --git a/scripts/expertise/expertise_co_burst_fire_1.py b/scripts/expertise/expertise_co_burst_fire_1.py index f627677e..0522e875 100644 --- a/scripts/expertise/expertise_co_burst_fire_1.py +++ b/scripts/expertise/expertise_co_burst_fire_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_burst_fire_1') - - actor.addSkillMod('expertise_co_pos_secured_line_burst_fire_proc', 10) - actor.addSkillMod('expertise_co_pos_secured_line_burst_fire_devastation_bonus', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_burst_fire_1') - - actor.removeSkillMod('expertise_co_pos_secured_line_burst_fire_proc', 10) - actor.removeSkillMod('expertise_co_pos_secured_line_burst_fire_devastation_bonus', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_burst_fire_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_burst_fire_1") return diff --git a/scripts/expertise/expertise_co_burst_fire_2.py b/scripts/expertise/expertise_co_burst_fire_2.py index ac874237..952ff386 100644 --- a/scripts/expertise/expertise_co_burst_fire_2.py +++ b/scripts/expertise/expertise_co_burst_fire_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_burst_fire_2') - - actor.addSkillMod('expertise_co_pos_secured_line_burst_fire_proc', 10) - actor.addSkillMod('expertise_co_pos_secured_line_burst_fire_devastation_bonus', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_burst_fire_2') - - actor.removeSkillMod('expertise_co_pos_secured_line_burst_fire_proc', 10) - actor.removeSkillMod('expertise_co_pos_secured_line_burst_fire_devastation_bonus', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_burst_fire_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_burst_fire_2") return diff --git a/scripts/expertise/expertise_co_cluster_bomb.py b/scripts/expertise/expertise_co_cluster_bomb.py index 410e0121..5e7a8f05 100644 --- a/scripts/expertise/expertise_co_cluster_bomb.py +++ b/scripts/expertise/expertise_co_cluster_bomb.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_cluster_bomb') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_cluster_bomb') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_cluster_bomb') - + actor.addAbility("co_cluster_bomb") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_cluster_bomb') - + actor.removeAbility("co_cluster_bomb") return diff --git a/scripts/expertise/expertise_co_deflective_armor_1.py b/scripts/expertise/expertise_co_deflective_armor_1.py index 540653a9..52b523c5 100644 --- a/scripts/expertise/expertise_co_deflective_armor_1.py +++ b/scripts/expertise/expertise_co_deflective_armor_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_deflective_armor_1') - - actor.addSkillMod('damage_decrease_percentage', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_deflective_armor_1') - - actor.removeSkillMod('damage_decrease_percentage', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_deflective_armor_1") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_deflective_armor_1") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_deflective_armor_2.py b/scripts/expertise/expertise_co_deflective_armor_2.py index 0204a191..2ece0722 100644 --- a/scripts/expertise/expertise_co_deflective_armor_2.py +++ b/scripts/expertise/expertise_co_deflective_armor_2.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_deflective_armor_2') - - actor.addSkillMod('damage_decrease_percentage', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_deflective_armor_2') - - actor.removeSkillMod('damage_decrease_percentage', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_deflective_armor_2") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_deflective_armor_2") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_deflective_armor_3.py b/scripts/expertise/expertise_co_deflective_armor_3.py index 65870a67..245175f4 100644 --- a/scripts/expertise/expertise_co_deflective_armor_3.py +++ b/scripts/expertise/expertise_co_deflective_armor_3.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_deflective_armor_3') - - actor.addSkillMod('damage_decrease_percentage', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_deflective_armor_3') - - actor.removeSkillMod('damage_decrease_percentage', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_deflective_armor_3") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_deflective_armor_3") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_deflective_armor_4.py b/scripts/expertise/expertise_co_deflective_armor_4.py index 94d853ef..e3e5d15f 100644 --- a/scripts/expertise/expertise_co_deflective_armor_4.py +++ b/scripts/expertise/expertise_co_deflective_armor_4.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_deflective_armor_4') - - actor.addSkillMod('damage_decrease_percentage', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_deflective_armor_4') - - actor.removeSkillMod('damage_decrease_percentage', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_deflective_armor_4") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_deflective_armor_4") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_diagnostic_armor_1.py b/scripts/expertise/expertise_co_diagnostic_armor_1.py index 5eaac3ad..974a3234 100644 --- a/scripts/expertise/expertise_co_diagnostic_armor_1.py +++ b/scripts/expertise/expertise_co_diagnostic_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_diagnostic_armor_1') - - actor.addSkillMod('expertise_dot_absorption_all', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_diagnostic_armor_1') - - actor.removeSkillMod('expertise_dot_absorption_all', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_diagnostic_armor_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_diagnostic_armor_1") return diff --git a/scripts/expertise/expertise_co_enhanced_constitution_1.py b/scripts/expertise/expertise_co_enhanced_constitution_1.py index 8b70e62a..f2320188 100644 --- a/scripts/expertise/expertise_co_enhanced_constitution_1.py +++ b/scripts/expertise/expertise_co_enhanced_constitution_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_constitution_1') - - actor.addSkillMod('constitution_modified', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_constitution_1') - - actor.removeSkillMod('constitution_modified', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_enhanced_constitution_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_enhanced_constitution_1") return - diff --git a/scripts/expertise/expertise_co_enhanced_constitution_2.py b/scripts/expertise/expertise_co_enhanced_constitution_2.py index e6933f70..4afc434d 100644 --- a/scripts/expertise/expertise_co_enhanced_constitution_2.py +++ b/scripts/expertise/expertise_co_enhanced_constitution_2.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_constitution_2') - - actor.addSkillMod('constitution_modified', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_constitution_2') - - actor.removeSkillMod('constitution_modified', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_enhanced_constitution_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_enhanced_constitution_2") return - diff --git a/scripts/expertise/expertise_co_enhanced_fuel_cans_1.py b/scripts/expertise/expertise_co_enhanced_fuel_cans_1.py index a05bf5ea..58cfa70c 100644 --- a/scripts/expertise/expertise_co_enhanced_fuel_cans_1.py +++ b/scripts/expertise/expertise_co_enhanced_fuel_cans_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_fuel_cans_1') - - actor.addSkillMod('expertise_action_weapon_12', 5) - actor.addSkillMod('expertise_action_weapon_13', 5) - actor.addSkillMod('commando_passive_dot', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_fuel_cans_1') - - actor.removeSkillMod('expertise_action_weapon_12', 5) - actor.removeSkillMod('expertise_action_weapon_13', 5) - actor.removeSkillMod('commando_passive_dot', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_enhanced_fuel_cans_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_enhanced_fuel_cans_1") return diff --git a/scripts/expertise/expertise_co_enhanced_fuel_cans_2.py b/scripts/expertise/expertise_co_enhanced_fuel_cans_2.py index 1a4a142d..f4449372 100644 --- a/scripts/expertise/expertise_co_enhanced_fuel_cans_2.py +++ b/scripts/expertise/expertise_co_enhanced_fuel_cans_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_fuel_cans_2') - - actor.addSkillMod('expertise_action_weapon_12', 5) - actor.addSkillMod('expertise_action_weapon_13', 5) - actor.addSkillMod('commando_passive_dot', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_fuel_cans_2') - - actor.removeSkillMod('expertise_action_weapon_12', 5) - actor.removeSkillMod('expertise_action_weapon_13', 5) - actor.removeSkillMod('commando_passive_dot', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_enhanced_fuel_cans_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_enhanced_fuel_cans_2") return diff --git a/scripts/expertise/expertise_co_enhanced_fuel_cans_3.py b/scripts/expertise/expertise_co_enhanced_fuel_cans_3.py index 9b8ca94a..9b4f7cd1 100644 --- a/scripts/expertise/expertise_co_enhanced_fuel_cans_3.py +++ b/scripts/expertise/expertise_co_enhanced_fuel_cans_3.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_fuel_cans_3') - - actor.addSkillMod('expertise_action_weapon_12', 5) - actor.addSkillMod('expertise_action_weapon_13', 5) - actor.addSkillMod('commando_passive_dot', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_fuel_cans_3') - - actor.removeSkillMod('expertise_action_weapon_12', 5) - actor.removeSkillMod('expertise_action_weapon_13', 5) - actor.removeSkillMod('commando_passive_dot', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_enhanced_fuel_cans_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_enhanced_fuel_cans_3") return diff --git a/scripts/expertise/expertise_co_enhanced_fuel_cans_4.py b/scripts/expertise/expertise_co_enhanced_fuel_cans_4.py index df5fd47f..ab78cd77 100644 --- a/scripts/expertise/expertise_co_enhanced_fuel_cans_4.py +++ b/scripts/expertise/expertise_co_enhanced_fuel_cans_4.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_fuel_cans_4') - - actor.addSkillMod('expertise_action_weapon_12', 5) - actor.addSkillMod('expertise_action_weapon_13', 5) - actor.addSkillMod('commando_passive_dot', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_fuel_cans_4') - - actor.removeSkillMod('expertise_action_weapon_12', 5) - actor.removeSkillMod('expertise_action_weapon_13', 5) - actor.removeSkillMod('commando_passive_dot', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_enhanced_fuel_cans_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_enhanced_fuel_cans_4") return diff --git a/scripts/expertise/expertise_co_enhanced_precision_1.py b/scripts/expertise/expertise_co_enhanced_precision_1.py index 8d018a05..250e6d10 100644 --- a/scripts/expertise/expertise_co_enhanced_precision_1.py +++ b/scripts/expertise/expertise_co_enhanced_precision_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_precision_1') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_precision_1') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_enhanced_precision_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_enhanced_precision_1") return - diff --git a/scripts/expertise/expertise_co_enhanced_precision_2.py b/scripts/expertise/expertise_co_enhanced_precision_2.py index d8a8f30b..7d965d8c 100644 --- a/scripts/expertise/expertise_co_enhanced_precision_2.py +++ b/scripts/expertise/expertise_co_enhanced_precision_2.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_precision_2') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_precision_2') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_enhanced_precision_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_enhanced_precision_2") return diff --git a/scripts/expertise/expertise_co_enhanced_stamina_1.py b/scripts/expertise/expertise_co_enhanced_stamina_1.py index 4de92218..cbdb7744 100644 --- a/scripts/expertise/expertise_co_enhanced_stamina_1.py +++ b/scripts/expertise/expertise_co_enhanced_stamina_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_stamina_1') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_stamina_1') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_enhanced_stamina_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_enhanced_stamina_1") return - diff --git a/scripts/expertise/expertise_co_enhanced_stamina_2.py b/scripts/expertise/expertise_co_enhanced_stamina_2.py index 7ab0b25a..5afc8f93 100644 --- a/scripts/expertise/expertise_co_enhanced_stamina_2.py +++ b/scripts/expertise/expertise_co_enhanced_stamina_2.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_enhanced_stamina_2') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_enhanced_stamina_2') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_enhanced_stamina_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_enhanced_stamina_2") return diff --git a/scripts/expertise/expertise_co_flashbang_1.py b/scripts/expertise/expertise_co_flashbang_1.py index 5408fa91..74b642c1 100644 --- a/scripts/expertise/expertise_co_flashbang_1.py +++ b/scripts/expertise/expertise_co_flashbang_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_flashbang_1') - - actor.addSkillMod('expertise_co_flash_bang', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_flashbang_1') - - actor.removeSkillMod('expertise_co_flash_bang', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_flashbang_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_flashbang_1") return diff --git a/scripts/expertise/expertise_co_flashbang_2.py b/scripts/expertise/expertise_co_flashbang_2.py index 806107a1..bad49ff3 100644 --- a/scripts/expertise/expertise_co_flashbang_2.py +++ b/scripts/expertise/expertise_co_flashbang_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_flashbang_2') - - actor.addSkillMod('expertise_co_flash_bang', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_flashbang_2') - - actor.removeSkillMod('expertise_co_flash_bang', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_flashbang_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_flashbang_2") return diff --git a/scripts/expertise/expertise_co_focus_beam_1.py b/scripts/expertise/expertise_co_focus_beam_1.py index b74caea5..0dec8d0a 100644 --- a/scripts/expertise/expertise_co_focus_beam_1.py +++ b/scripts/expertise/expertise_co_focus_beam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_focus_beam_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_focus_beam_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_hw_dm_1') - + actor.addAbility("co_hw_dm_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_hw_dm_1') - + actor.removeAbility("co_hw_dm_1") return diff --git a/scripts/expertise/expertise_co_general_enhanced_luck_1.py b/scripts/expertise/expertise_co_general_enhanced_luck_1.py index 6f6319ab..8f303625 100644 --- a/scripts/expertise/expertise_co_general_enhanced_luck_1.py +++ b/scripts/expertise/expertise_co_general_enhanced_luck_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_general_enhanced_luck_1') - - actor.addSkillMod('luck_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_general_enhanced_luck_1') - - actor.removeSkillMod('luck_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_general_enhanced_luck_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_general_enhanced_luck_1") return - diff --git a/scripts/expertise/expertise_co_general_enhanced_luck_2.py b/scripts/expertise/expertise_co_general_enhanced_luck_2.py index 2e626644..598a9a1d 100644 --- a/scripts/expertise/expertise_co_general_enhanced_luck_2.py +++ b/scripts/expertise/expertise_co_general_enhanced_luck_2.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_general_enhanced_luck_2') - - actor.addSkillMod('luck_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_general_enhanced_luck_2') - - actor.removeSkillMod('luck_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_general_enhanced_luck_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_general_enhanced_luck_2") return - diff --git a/scripts/expertise/expertise_co_heavy_ammunition_1.py b/scripts/expertise/expertise_co_heavy_ammunition_1.py index 86e9e6d5..90f370b1 100644 --- a/scripts/expertise/expertise_co_heavy_ammunition_1.py +++ b/scripts/expertise/expertise_co_heavy_ammunition_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_heavy_ammunition_1') - - actor.addSkillMod('expertise_damage_weapon_0', 2) - actor.addSkillMod('expertise_damage_weapon_1', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_heavy_ammunition_1') - - actor.removeSkillMod('expertise_damage_weapon_0', 2) - actor.removeSkillMod('expertise_damage_weapon_1', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_heavy_ammunition_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_heavy_ammunition_1") return diff --git a/scripts/expertise/expertise_co_heavy_ammunition_2.py b/scripts/expertise/expertise_co_heavy_ammunition_2.py index 82c48ece..cd20a2e4 100644 --- a/scripts/expertise/expertise_co_heavy_ammunition_2.py +++ b/scripts/expertise/expertise_co_heavy_ammunition_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_heavy_ammunition_2') - - actor.addSkillMod('expertise_damage_weapon_0', 2) - actor.addSkillMod('expertise_damage_weapon_1', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_heavy_ammunition_2') - - actor.removeSkillMod('expertise_damage_weapon_0', 2) - actor.removeSkillMod('expertise_damage_weapon_1', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_heavy_ammunition_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_heavy_ammunition_2") return diff --git a/scripts/expertise/expertise_co_heavy_ammunition_3.py b/scripts/expertise/expertise_co_heavy_ammunition_3.py index c87f41dd..07492f2a 100644 --- a/scripts/expertise/expertise_co_heavy_ammunition_3.py +++ b/scripts/expertise/expertise_co_heavy_ammunition_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_heavy_ammunition_3') - - actor.addSkillMod('expertise_damage_weapon_0', 2) - actor.addSkillMod('expertise_damage_weapon_1', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_heavy_ammunition_3') - - actor.removeSkillMod('expertise_damage_weapon_0', 2) - actor.removeSkillMod('expertise_damage_weapon_1', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_heavy_ammunition_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_heavy_ammunition_3") return diff --git a/scripts/expertise/expertise_co_heavy_ammunition_4.py b/scripts/expertise/expertise_co_heavy_ammunition_4.py index 20577637..5bbd826a 100644 --- a/scripts/expertise/expertise_co_heavy_ammunition_4.py +++ b/scripts/expertise/expertise_co_heavy_ammunition_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_heavy_ammunition_4') - - actor.addSkillMod('expertise_damage_weapon_0', 2) - actor.addSkillMod('expertise_damage_weapon_1', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_heavy_ammunition_4') - - actor.removeSkillMod('expertise_damage_weapon_0', 2) - actor.removeSkillMod('expertise_damage_weapon_1', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_heavy_ammunition_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_heavy_ammunition_4") return diff --git a/scripts/expertise/expertise_co_hose_down_1.py b/scripts/expertise/expertise_co_hose_down_1.py index bc6dfcfc..466d938a 100644 --- a/scripts/expertise/expertise_co_hose_down_1.py +++ b/scripts/expertise/expertise_co_hose_down_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_hose_down_1') - - actor.addSkillMod('expertise_action_line_co_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_hose_down_1') - - actor.removeSkillMod('expertise_action_line_co_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_hose_down_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_hose_down_1") return diff --git a/scripts/expertise/expertise_co_hose_down_2.py b/scripts/expertise/expertise_co_hose_down_2.py index e4944ff0..5b631478 100644 --- a/scripts/expertise/expertise_co_hose_down_2.py +++ b/scripts/expertise/expertise_co_hose_down_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_hose_down_2') - - actor.addSkillMod('expertise_action_line_co_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_hose_down_2') - - actor.removeSkillMod('expertise_action_line_co_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_hose_down_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_hose_down_2") return diff --git a/scripts/expertise/expertise_co_imp_position_secured_1.py b/scripts/expertise/expertise_co_imp_position_secured_1.py index 76c5c253..26286412 100644 --- a/scripts/expertise/expertise_co_imp_position_secured_1.py +++ b/scripts/expertise/expertise_co_imp_position_secured_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_position_secured_1') - - actor.addSkillMod('expertise_action_line_co_imp_pos_sec', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_position_secured_1') - - actor.removeSkillMod('expertise_action_line_co_imp_pos_sec', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_position_secured_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_position_secured_1") return diff --git a/scripts/expertise/expertise_co_imp_position_secured_2.py b/scripts/expertise/expertise_co_imp_position_secured_2.py index c4caa65e..2a134cd0 100644 --- a/scripts/expertise/expertise_co_imp_position_secured_2.py +++ b/scripts/expertise/expertise_co_imp_position_secured_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_position_secured_2') - - actor.addSkillMod('expertise_action_line_co_imp_pos_sec', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_position_secured_2') - - actor.removeSkillMod('expertise_action_line_co_imp_pos_sec', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_position_secured_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_position_secured_2") return diff --git a/scripts/expertise/expertise_co_imp_position_secured_3.py b/scripts/expertise/expertise_co_imp_position_secured_3.py index eecc94ca..f18a8164 100644 --- a/scripts/expertise/expertise_co_imp_position_secured_3.py +++ b/scripts/expertise/expertise_co_imp_position_secured_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_position_secured_3') - - actor.addSkillMod('expertise_action_line_co_imp_pos_sec', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_position_secured_3') - - actor.removeSkillMod('expertise_action_line_co_imp_pos_sec', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_position_secured_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_position_secured_3") return diff --git a/scripts/expertise/expertise_co_imp_riddle_armor_1.py b/scripts/expertise/expertise_co_imp_riddle_armor_1.py index e05eaba7..2c83b9e3 100644 --- a/scripts/expertise/expertise_co_imp_riddle_armor_1.py +++ b/scripts/expertise/expertise_co_imp_riddle_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_riddle_armor_1') - - actor.addSkillMod('expertise_cooldown_line_co_riddle_armor', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_riddle_armor_1') - - actor.removeSkillMod('expertise_cooldown_line_co_riddle_armor', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_riddle_armor_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_riddle_armor_1") return diff --git a/scripts/expertise/expertise_co_imp_riddle_armor_2.py b/scripts/expertise/expertise_co_imp_riddle_armor_2.py index a6c99f37..be67095b 100644 --- a/scripts/expertise/expertise_co_imp_riddle_armor_2.py +++ b/scripts/expertise/expertise_co_imp_riddle_armor_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_riddle_armor_2') - - actor.addSkillMod('expertise_cooldown_line_co_riddle_armor', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_riddle_armor_2') - - actor.removeSkillMod('expertise_cooldown_line_co_riddle_armor', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_riddle_armor_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_riddle_armor_2") return diff --git a/scripts/expertise/expertise_co_imp_stand_fast_1.py b/scripts/expertise/expertise_co_imp_stand_fast_1.py index aa2b8fdd..e1c77d58 100644 --- a/scripts/expertise/expertise_co_imp_stand_fast_1.py +++ b/scripts/expertise/expertise_co_imp_stand_fast_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_stand_fast_1') - - actor.addSkillMod('expertise_damage_decrease_percentage', 5) - actor.addSkillMod('expertise_buff_duration_line_co_stand_fast', 2) - actor.addSkillMod('expertise_cooldown_line_co_stand_fast', 120) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_stand_fast_1') - - actor.removeSkillMod('expertise_damage_decrease_percentage', 5) - actor.removeSkillMod('expertise_buff_duration_line_co_stand_fast', 2) - actor.removeSkillMod('expertise_cooldown_line_co_stand_fast', 120) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_stand_fast_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_stand_fast_1") return diff --git a/scripts/expertise/expertise_co_imp_stand_fast_2.py b/scripts/expertise/expertise_co_imp_stand_fast_2.py index d5d1f95e..b4daa5e8 100644 --- a/scripts/expertise/expertise_co_imp_stand_fast_2.py +++ b/scripts/expertise/expertise_co_imp_stand_fast_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_stand_fast_2') - - actor.addSkillMod('expertise_damage_decrease_percentage', 5) - actor.addSkillMod('expertise_buff_duration_line_co_stand_fast', 2) - actor.addSkillMod('expertise_cooldown_line_co_stand_fast', 120) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_stand_fast_2') - - actor.removeSkillMod('expertise_damage_decrease_percentage', 5) - actor.removeSkillMod('expertise_buff_duration_line_co_stand_fast', 2) - actor.removeSkillMod('expertise_cooldown_line_co_stand_fast', 120) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_stand_fast_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_stand_fast_2") return diff --git a/scripts/expertise/expertise_co_imp_stand_fast_3.py b/scripts/expertise/expertise_co_imp_stand_fast_3.py index 1cc88783..9e3ddf52 100644 --- a/scripts/expertise/expertise_co_imp_stand_fast_3.py +++ b/scripts/expertise/expertise_co_imp_stand_fast_3.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_imp_stand_fast_3') - - actor.addSkillMod('expertise_damage_decrease_percentage', 5) - actor.addSkillMod('expertise_buff_duration_line_co_stand_fast', 2) - actor.addSkillMod('expertise_cooldown_line_co_stand_fast', 120) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_imp_stand_fast_3') - - actor.removeSkillMod('expertise_damage_decrease_percentage', 5) - actor.removeSkillMod('expertise_buff_duration_line_co_stand_fast', 2) - actor.removeSkillMod('expertise_cooldown_line_co_stand_fast', 120) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_imp_stand_fast_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_imp_stand_fast_3") return diff --git a/scripts/expertise/expertise_co_improved_explosives_1.py b/scripts/expertise/expertise_co_improved_explosives_1.py index d4c61b00..7479e8d1 100644 --- a/scripts/expertise/expertise_co_improved_explosives_1.py +++ b/scripts/expertise/expertise_co_improved_explosives_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_improved_explosives_1') - - actor.addSkillMod('expertise_damage_line_co_remote_detonator', 75) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_improved_explosives_1') - - actor.removeSkillMod('expertise_damage_line_co_remote_detonator', 75) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_improved_explosives_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_improved_explosives_1") return diff --git a/scripts/expertise/expertise_co_improved_explosives_2.py b/scripts/expertise/expertise_co_improved_explosives_2.py index 088ad931..485df881 100644 --- a/scripts/expertise/expertise_co_improved_explosives_2.py +++ b/scripts/expertise/expertise_co_improved_explosives_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_improved_explosives_2') - - actor.addSkillMod('expertise_damage_line_co_remote_detonator', 75) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_improved_explosives_2') - - actor.removeSkillMod('expertise_damage_line_co_remote_detonator', 75) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_improved_explosives_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_improved_explosives_2") return diff --git a/scripts/expertise/expertise_co_improved_explosives_3.py b/scripts/expertise/expertise_co_improved_explosives_3.py index 36f59b79..3abcab9b 100644 --- a/scripts/expertise/expertise_co_improved_explosives_3.py +++ b/scripts/expertise/expertise_co_improved_explosives_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_improved_explosives_3') - - actor.addSkillMod('expertise_damage_line_co_remote_detonator', 75) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_improved_explosives_3') - - actor.removeSkillMod('expertise_damage_line_co_remote_detonator', 75) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_improved_explosives_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_improved_explosives_3") return diff --git a/scripts/expertise/expertise_co_improved_explosives_4.py b/scripts/expertise/expertise_co_improved_explosives_4.py index 0388018e..99b4e564 100644 --- a/scripts/expertise/expertise_co_improved_explosives_4.py +++ b/scripts/expertise/expertise_co_improved_explosives_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_improved_explosives_4') - - actor.addSkillMod('expertise_damage_line_co_remote_detonator', 75) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_improved_explosives_4') - - actor.removeSkillMod('expertise_damage_line_co_remote_detonator', 75) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_improved_explosives_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_improved_explosives_4") return diff --git a/scripts/expertise/expertise_co_keen_eye_1.py b/scripts/expertise/expertise_co_keen_eye_1.py index 03a62449..b03ebc46 100644 --- a/scripts/expertise/expertise_co_keen_eye_1.py +++ b/scripts/expertise/expertise_co_keen_eye_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_keen_eye_1') - - actor.addSkillMod('expertise_range_bonus_ranged', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_keen_eye_1') - - actor.removeSkillMod('expertise_range_bonus_ranged', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_keen_eye_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_keen_eye_1") return diff --git a/scripts/expertise/expertise_co_keen_eye_2.py b/scripts/expertise/expertise_co_keen_eye_2.py index b5fcd60b..aff4527a 100644 --- a/scripts/expertise/expertise_co_keen_eye_2.py +++ b/scripts/expertise/expertise_co_keen_eye_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_keen_eye_2') - - actor.addSkillMod('expertise_range_bonus_ranged', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_keen_eye_2') - - actor.removeSkillMod('expertise_range_bonus_ranged', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_keen_eye_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_keen_eye_2") return diff --git a/scripts/expertise/expertise_co_killing_grimace_1.py b/scripts/expertise/expertise_co_killing_grimace_1.py index 18b03ffe..091846d5 100644 --- a/scripts/expertise/expertise_co_killing_grimace_1.py +++ b/scripts/expertise/expertise_co_killing_grimace_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_killing_grimace_1') - - actor.addSkillMod('expertise_co_killing_spree_target', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_killing_grimace_1') - - actor.removeSkillMod('expertise_co_killing_spree_target', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_killing_grimace_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_killing_grimace_1") return diff --git a/scripts/expertise/expertise_co_killing_grimace_2.py b/scripts/expertise/expertise_co_killing_grimace_2.py index 0c1ca2e8..ad8ee400 100644 --- a/scripts/expertise/expertise_co_killing_grimace_2.py +++ b/scripts/expertise/expertise_co_killing_grimace_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_killing_grimace_2') - - actor.addSkillMod('expertise_co_killing_spree_target', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_killing_grimace_2') - - actor.removeSkillMod('expertise_co_killing_spree_target', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_killing_grimace_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_killing_grimace_2") return diff --git a/scripts/expertise/expertise_co_killing_spree.py b/scripts/expertise/expertise_co_killing_spree.py index 915251d0..c17421ae 100644 --- a/scripts/expertise/expertise_co_killing_spree.py +++ b/scripts/expertise/expertise_co_killing_spree.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_killing_spree') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_killing_spree') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_killing_spree') - + actor.addAbility("co_killing_spree") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_killing_spree') - + actor.removeAbility("co_killing_spree") return diff --git a/scripts/expertise/expertise_co_lethal_beam_1.py b/scripts/expertise/expertise_co_lethal_beam_1.py index 4a96f6d4..25d0a5a5 100644 --- a/scripts/expertise/expertise_co_lethal_beam_1.py +++ b/scripts/expertise/expertise_co_lethal_beam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_lethal_beam_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_lethal_beam_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_hw_dm_crit_1') - + actor.addAbility("co_hw_dm_crit_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_hw_dm_crit_1') - + actor.removeAbility("co_hw_dm_crit_1") return diff --git a/scripts/expertise/expertise_co_marksman_1.py b/scripts/expertise/expertise_co_marksman_1.py index 431a914c..c57aa617 100644 --- a/scripts/expertise/expertise_co_marksman_1.py +++ b/scripts/expertise/expertise_co_marksman_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_marksman_1') - - actor.addSkillMod('expertise_action_rifle', 4) - actor.addSkillMod('expertise_action_carbine', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_marksman_1') - - actor.removeSkillMod('expertise_action_rifle', 4) - actor.removeSkillMod('expertise_action_carbine', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_marksman_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_marksman_1") return diff --git a/scripts/expertise/expertise_co_marksman_2.py b/scripts/expertise/expertise_co_marksman_2.py index 578f6bfc..7f74b950 100644 --- a/scripts/expertise/expertise_co_marksman_2.py +++ b/scripts/expertise/expertise_co_marksman_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_marksman_2') - - actor.addSkillMod('expertise_action_rifle', 4) - actor.addSkillMod('expertise_action_carbine', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_marksman_2') - - actor.removeSkillMod('expertise_action_rifle', 4) - actor.removeSkillMod('expertise_action_carbine', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_marksman_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_marksman_2") return diff --git a/scripts/expertise/expertise_co_marksman_3.py b/scripts/expertise/expertise_co_marksman_3.py index 39027c30..27c8b759 100644 --- a/scripts/expertise/expertise_co_marksman_3.py +++ b/scripts/expertise/expertise_co_marksman_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_marksman_3') - - actor.addSkillMod('expertise_action_rifle', 4) - actor.addSkillMod('expertise_action_carbine', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_marksman_3') - - actor.removeSkillMod('expertise_action_rifle', 4) - actor.removeSkillMod('expertise_action_carbine', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_marksman_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_marksman_3") return diff --git a/scripts/expertise/expertise_co_mirror_armor_1.py b/scripts/expertise/expertise_co_mirror_armor_1.py index ce6c5cb5..dfb9397d 100644 --- a/scripts/expertise/expertise_co_mirror_armor_1.py +++ b/scripts/expertise/expertise_co_mirror_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_mirror_armor_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_mirror_armor_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_mirror_armor') - + actor.addAbility("co_mirror_armor") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_mirror_armor') - + actor.removeAbility("co_mirror_armor") return diff --git a/scripts/expertise/expertise_co_on_target_1.py b/scripts/expertise/expertise_co_on_target_1.py index 7ed1aa7e..f652cbd2 100644 --- a/scripts/expertise/expertise_co_on_target_1.py +++ b/scripts/expertise/expertise_co_on_target_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_on_target_1') - - actor.addSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.addSkillMod('expertise_co_pos_secured_line_protection', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_on_target_1') - - actor.removeSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.removeSkillMod('expertise_co_pos_secured_line_protection', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_on_target_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_on_target_1") return diff --git a/scripts/expertise/expertise_co_on_target_2.py b/scripts/expertise/expertise_co_on_target_2.py index bf31c706..b51e92a9 100644 --- a/scripts/expertise/expertise_co_on_target_2.py +++ b/scripts/expertise/expertise_co_on_target_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_on_target_2') - - actor.addSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.addSkillMod('expertise_co_pos_secured_line_protection', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_on_target_2') - - actor.removeSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.removeSkillMod('expertise_co_pos_secured_line_protection', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_on_target_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_on_target_2") return diff --git a/scripts/expertise/expertise_co_on_target_3.py b/scripts/expertise/expertise_co_on_target_3.py index 9cca1f5d..5456ca93 100644 --- a/scripts/expertise/expertise_co_on_target_3.py +++ b/scripts/expertise/expertise_co_on_target_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_on_target_3') - - actor.addSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.addSkillMod('expertise_co_pos_secured_line_protection', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_on_target_3') - - actor.removeSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.removeSkillMod('expertise_co_pos_secured_line_protection', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_on_target_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_on_target_3") return diff --git a/scripts/expertise/expertise_co_on_target_4.py b/scripts/expertise/expertise_co_on_target_4.py index e9a0a325..b750b412 100644 --- a/scripts/expertise/expertise_co_on_target_4.py +++ b/scripts/expertise/expertise_co_on_target_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_on_target_4') - - actor.addSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.addSkillMod('expertise_co_pos_secured_line_protection', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_on_target_4') - - actor.removeSkillMod('expertise_co_pos_secured_line_critical', 2) - actor.removeSkillMod('expertise_co_pos_secured_line_protection', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_on_target_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_on_target_4") return diff --git a/scripts/expertise/expertise_co_packed_explosives_1.py b/scripts/expertise/expertise_co_packed_explosives_1.py index da5644ab..fa57097c 100644 --- a/scripts/expertise/expertise_co_packed_explosives_1.py +++ b/scripts/expertise/expertise_co_packed_explosives_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_packed_explosives_1') - - actor.addSkillMod('expertise_damage_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_packed_explosives_1') - - actor.removeSkillMod('expertise_damage_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_packed_explosives_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_packed_explosives_1") return diff --git a/scripts/expertise/expertise_co_packed_explosives_2.py b/scripts/expertise/expertise_co_packed_explosives_2.py index ee0655e3..288e1944 100644 --- a/scripts/expertise/expertise_co_packed_explosives_2.py +++ b/scripts/expertise/expertise_co_packed_explosives_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_packed_explosives_2') - - actor.addSkillMod('expertise_damage_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_packed_explosives_2') - - actor.removeSkillMod('expertise_damage_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_packed_explosives_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_packed_explosives_2") return diff --git a/scripts/expertise/expertise_co_packed_explosives_3.py b/scripts/expertise/expertise_co_packed_explosives_3.py index 0bdf9fde..8f61f39d 100644 --- a/scripts/expertise/expertise_co_packed_explosives_3.py +++ b/scripts/expertise/expertise_co_packed_explosives_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_packed_explosives_3') - - actor.addSkillMod('expertise_damage_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_packed_explosives_3') - - actor.removeSkillMod('expertise_damage_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_packed_explosives_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_packed_explosives_3") return diff --git a/scripts/expertise/expertise_co_packed_explosives_4.py b/scripts/expertise/expertise_co_packed_explosives_4.py index e8ca7037..efd1b2a9 100644 --- a/scripts/expertise/expertise_co_packed_explosives_4.py +++ b/scripts/expertise/expertise_co_packed_explosives_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_packed_explosives_4') - - actor.addSkillMod('expertise_damage_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_packed_explosives_4') - - actor.removeSkillMod('expertise_damage_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_packed_explosives_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_packed_explosives_4") return diff --git a/scripts/expertise/expertise_co_pinpoint_shielding_1.py b/scripts/expertise/expertise_co_pinpoint_shielding_1.py index c8cc7ca7..1937db02 100644 --- a/scripts/expertise/expertise_co_pinpoint_shielding_1.py +++ b/scripts/expertise/expertise_co_pinpoint_shielding_1.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_pinpoint_shielding_1') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_pinpoint_shielding_1') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_pinpoint_shielding_1") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_pinpoint_shielding_1") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_pinpoint_shielding_2.py b/scripts/expertise/expertise_co_pinpoint_shielding_2.py index f311375b..c3ad2200 100644 --- a/scripts/expertise/expertise_co_pinpoint_shielding_2.py +++ b/scripts/expertise/expertise_co_pinpoint_shielding_2.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_pinpoint_shielding_2') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_pinpoint_shielding_2') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_pinpoint_shielding_2") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_pinpoint_shielding_2") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_pinpoint_shielding_3.py b/scripts/expertise/expertise_co_pinpoint_shielding_3.py index e06a60e5..02c5884e 100644 --- a/scripts/expertise/expertise_co_pinpoint_shielding_3.py +++ b/scripts/expertise/expertise_co_pinpoint_shielding_3.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_pinpoint_shielding_3') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_pinpoint_shielding_3') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_pinpoint_shielding_3") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_pinpoint_shielding_3") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_pinpoint_shielding_4.py b/scripts/expertise/expertise_co_pinpoint_shielding_4.py index c910bccb..f85df1de 100644 --- a/scripts/expertise/expertise_co_pinpoint_shielding_4.py +++ b/scripts/expertise/expertise_co_pinpoint_shielding_4.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_pinpoint_shielding_4') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_pinpoint_shielding_4') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_pinpoint_shielding_4") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_pinpoint_shielding_4") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_position_secured_1.py b/scripts/expertise/expertise_co_position_secured_1.py index dfee8b0a..d2427d08 100644 --- a/scripts/expertise/expertise_co_position_secured_1.py +++ b/scripts/expertise/expertise_co_position_secured_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_position_secured_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_position_secured_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_position_secured') - + actor.addAbility("co_position_secured") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_position_secured') - + actor.removeAbility("co_position_secured") return diff --git a/scripts/expertise/expertise_co_powered_armor_1.py b/scripts/expertise/expertise_co_powered_armor_1.py index 0cd9dc3d..58530d57 100644 --- a/scripts/expertise/expertise_co_powered_armor_1.py +++ b/scripts/expertise/expertise_co_powered_armor_1.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_powered_armor_1') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_powered_armor_1') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_powered_armor_1") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_powered_armor_1") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_powered_armor_2.py b/scripts/expertise/expertise_co_powered_armor_2.py index df2d0051..e9ea79e9 100644 --- a/scripts/expertise/expertise_co_powered_armor_2.py +++ b/scripts/expertise/expertise_co_powered_armor_2.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_powered_armor_2') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_powered_armor_2') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_powered_armor_2") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_powered_armor_2") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_powered_armor_3.py b/scripts/expertise/expertise_co_powered_armor_3.py index f0d1fe7f..5cba60e6 100644 --- a/scripts/expertise/expertise_co_powered_armor_3.py +++ b/scripts/expertise/expertise_co_powered_armor_3.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_powered_armor_3') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_powered_armor_3') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_powered_armor_3") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_powered_armor_3") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_powered_armor_4.py b/scripts/expertise/expertise_co_powered_armor_4.py index 9b0e2f44..b10f5264 100644 --- a/scripts/expertise/expertise_co_powered_armor_4.py +++ b/scripts/expertise/expertise_co_powered_armor_4.py @@ -1,57 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_powered_armor_4') - - actor.addSkillMod('energy', 250) - actor.addSkillMod('kinetic', 250) - actor.addSkillMod('acid', 250) - actor.addSkillMod('heat', 250) - actor.addSkillMod('cold', 250) - actor.addSkillMod('electricity', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_powered_armor_4') - - actor.removeSkillMod('energy', 250) - actor.removeSkillMod('kinetic', 250) - actor.removeSkillMod('acid', 250) - actor.removeSkillMod('heat', 250) - actor.removeSkillMod('cold', 250) - actor.removeSkillMod('electricity', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_co_powered_armor_4") return - + def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_co_powered_armor_4") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_remote_detonator_1.py b/scripts/expertise/expertise_co_remote_detonator_1.py index d90c8d4f..fed11c0f 100644 --- a/scripts/expertise/expertise_co_remote_detonator_1.py +++ b/scripts/expertise/expertise_co_remote_detonator_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_remote_detonator_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_remote_detonator_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_remote_detonator_1') - + if actor.getLevel() >= 26: + actor.addAbility("co_remote_detonator_1") + if actor.getLevel() >= 34: + actor.addAbility("co_remote_detonator_2") + if actor.getLevel() >= 48: + actor.addAbility("co_remote_detonator_3") + if actor.getLevel() >= 62: + actor.addAbility("co_remote_detonator_4") + if actor.getLevel() >= 76: + actor.addAbility("co_remote_detonator_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_remote_detonator_1') - + actor.removeAbility("co_remote_detonator_1") + actor.removeAbility("co_remote_detonator_2") + actor.removeAbility("co_remote_detonator_3") + actor.removeAbility("co_remote_detonator_4") + actor.removeAbility("co_remote_detonator_5") return diff --git a/scripts/expertise/expertise_co_riddle_armor_1.py b/scripts/expertise/expertise_co_riddle_armor_1.py index 4e3ebd79..04ea9722 100644 --- a/scripts/expertise/expertise_co_riddle_armor_1.py +++ b/scripts/expertise/expertise_co_riddle_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_riddle_armor_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_riddle_armor_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_riddle_armor') - + actor.addAbility("co_riddle_armor") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_riddle_armor') - + actor.removeAbility("co_riddle_armor") return diff --git a/scripts/expertise/expertise_co_short_fuse_1.py b/scripts/expertise/expertise_co_short_fuse_1.py index 54240603..a5cbad44 100644 --- a/scripts/expertise/expertise_co_short_fuse_1.py +++ b/scripts/expertise/expertise_co_short_fuse_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_short_fuse_1') - - actor.addSkillMod('expertise_delay_reduce_line_co_grenade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_short_fuse_1') - - actor.removeSkillMod('expertise_delay_reduce_line_co_grenade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_short_fuse_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_short_fuse_1") return diff --git a/scripts/expertise/expertise_co_stand_fast_1.py b/scripts/expertise/expertise_co_stand_fast_1.py index 714eb9b6..46127787 100644 --- a/scripts/expertise/expertise_co_stand_fast_1.py +++ b/scripts/expertise/expertise_co_stand_fast_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_stand_fast_1') - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_stand_fast_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_stand_fast') - + actor.addAbility("co_stand_fast") return - + def removeAbilities(core, actor, player): - - actor.removeAbility('co_stand_fast') - + actor.removeAbility("co_stand_fast") return - \ No newline at end of file diff --git a/scripts/expertise/expertise_co_stim_armor_1.py b/scripts/expertise/expertise_co_stim_armor_1.py index abe74611..eb69696b 100644 --- a/scripts/expertise/expertise_co_stim_armor_1.py +++ b/scripts/expertise/expertise_co_stim_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_stim_armor_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_stim_armor_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_stim_armor') - + actor.addAbility("co_stim_armor") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_stim_armor') - + actor.removeAbility("co_stim_armor") return diff --git a/scripts/expertise/expertise_co_strong_arm_1.py b/scripts/expertise/expertise_co_strong_arm_1.py index 03ebed5f..b4e5ab18 100644 --- a/scripts/expertise/expertise_co_strong_arm_1.py +++ b/scripts/expertise/expertise_co_strong_arm_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_strong_arm_1') - - actor.addSkillMod('expertise_action_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_strong_arm_1') - - actor.removeSkillMod('expertise_action_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_strong_arm_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_strong_arm_1") return diff --git a/scripts/expertise/expertise_co_strong_arm_2.py b/scripts/expertise/expertise_co_strong_arm_2.py index 126ff5b7..b0672495 100644 --- a/scripts/expertise/expertise_co_strong_arm_2.py +++ b/scripts/expertise/expertise_co_strong_arm_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_strong_arm_2') - - actor.addSkillMod('expertise_action_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_strong_arm_2') - - actor.removeSkillMod('expertise_action_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_strong_arm_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_strong_arm_2") return diff --git a/scripts/expertise/expertise_co_strong_arm_3.py b/scripts/expertise/expertise_co_strong_arm_3.py index 8ed34544..d69525d7 100644 --- a/scripts/expertise/expertise_co_strong_arm_3.py +++ b/scripts/expertise/expertise_co_strong_arm_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_strong_arm_3') - - actor.addSkillMod('expertise_action_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_strong_arm_3') - - actor.removeSkillMod('expertise_action_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_strong_arm_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_strong_arm_3") return diff --git a/scripts/expertise/expertise_co_strong_arm_4.py b/scripts/expertise/expertise_co_strong_arm_4.py index ea9ec450..dd42b534 100644 --- a/scripts/expertise/expertise_co_strong_arm_4.py +++ b/scripts/expertise/expertise_co_strong_arm_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_strong_arm_4') - - actor.addSkillMod('expertise_action_line_co_grenade', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_strong_arm_4') - - actor.removeSkillMod('expertise_action_line_co_grenade', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_strong_arm_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_strong_arm_4") return diff --git a/scripts/expertise/expertise_co_suppressing_fire_1.py b/scripts/expertise/expertise_co_suppressing_fire_1.py index a9192094..b9181853 100644 --- a/scripts/expertise/expertise_co_suppressing_fire_1.py +++ b/scripts/expertise/expertise_co_suppressing_fire_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_suppressing_fire_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_suppressing_fire_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('co_suppressing_fire') - + actor.addAbility("co_suppressing_fire") return def removeAbilities(core, actor, player): - - actor.removeAbility('co_suppressing_fire') - + actor.removeAbility("co_suppressing_fire") return diff --git a/scripts/expertise/expertise_co_suppression_efficiency_1.py b/scripts/expertise/expertise_co_suppression_efficiency_1.py index 72851743..60950dc4 100644 --- a/scripts/expertise/expertise_co_suppression_efficiency_1.py +++ b/scripts/expertise/expertise_co_suppression_efficiency_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_suppression_efficiency_1') - - actor.addSkillMod('expertise_supression_speed', 10) - actor.addSkillMod('expertise_supression_glance', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_suppression_efficiency_1') - - actor.removeSkillMod('expertise_supression_speed', 10) - actor.removeSkillMod('expertise_supression_glance', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_suppression_efficiency_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_suppression_efficiency_1") return diff --git a/scripts/expertise/expertise_co_suppression_efficiency_2.py b/scripts/expertise/expertise_co_suppression_efficiency_2.py index 97830b16..3ce19870 100644 --- a/scripts/expertise/expertise_co_suppression_efficiency_2.py +++ b/scripts/expertise/expertise_co_suppression_efficiency_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_suppression_efficiency_2') - - actor.addSkillMod('expertise_supression_speed', 10) - actor.addSkillMod('expertise_supression_glance', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_suppression_efficiency_2') - - actor.removeSkillMod('expertise_supression_speed', 10) - actor.removeSkillMod('expertise_supression_glance', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_suppression_efficiency_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_suppression_efficiency_2") return diff --git a/scripts/expertise/expertise_co_suppression_efficiency_3.py b/scripts/expertise/expertise_co_suppression_efficiency_3.py index a0d3e6b6..00e43a22 100644 --- a/scripts/expertise/expertise_co_suppression_efficiency_3.py +++ b/scripts/expertise/expertise_co_suppression_efficiency_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_suppression_efficiency_3') - - actor.addSkillMod('expertise_supression_speed', 10) - actor.addSkillMod('expertise_supression_glance', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_suppression_efficiency_3') - - actor.removeSkillMod('expertise_supression_speed', 10) - actor.removeSkillMod('expertise_supression_glance', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_suppression_efficiency_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_suppression_efficiency_3") return diff --git a/scripts/expertise/expertise_co_suppression_efficiency_4.py b/scripts/expertise/expertise_co_suppression_efficiency_4.py index 3898d8fd..f9c1c3e5 100644 --- a/scripts/expertise/expertise_co_suppression_efficiency_4.py +++ b/scripts/expertise/expertise_co_suppression_efficiency_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_suppression_efficiency_4') - - actor.addSkillMod('expertise_supression_speed', 10) - actor.addSkillMod('expertise_supression_glance', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_suppression_efficiency_4') - - actor.removeSkillMod('expertise_supression_speed', 10) - actor.removeSkillMod('expertise_supression_glance', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_suppression_efficiency_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_suppression_efficiency_4") return diff --git a/scripts/expertise/expertise_co_tibanna_gas_1.py b/scripts/expertise/expertise_co_tibanna_gas_1.py index f3c83322..1c8d5371 100644 --- a/scripts/expertise/expertise_co_tibanna_gas_1.py +++ b/scripts/expertise/expertise_co_tibanna_gas_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_tibanna_gas_1') - - actor.addSkillMod('expertise_damage_weapon_3', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_tibanna_gas_1') - - actor.removeSkillMod('expertise_damage_weapon_3', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_tibanna_gas_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_tibanna_gas_1") return diff --git a/scripts/expertise/expertise_co_tibanna_gas_2.py b/scripts/expertise/expertise_co_tibanna_gas_2.py index ccc62783..f907947a 100644 --- a/scripts/expertise/expertise_co_tibanna_gas_2.py +++ b/scripts/expertise/expertise_co_tibanna_gas_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_tibanna_gas_2') - - actor.addSkillMod('expertise_damage_weapon_3', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_tibanna_gas_2') - - actor.removeSkillMod('expertise_damage_weapon_3', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_tibanna_gas_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_tibanna_gas_2") return diff --git a/scripts/expertise/expertise_co_tibanna_gas_3.py b/scripts/expertise/expertise_co_tibanna_gas_3.py index 49895f55..4b1ac247 100644 --- a/scripts/expertise/expertise_co_tibanna_gas_3.py +++ b/scripts/expertise/expertise_co_tibanna_gas_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_tibanna_gas_3') - - actor.addSkillMod('expertise_damage_weapon_3', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_tibanna_gas_3') - - actor.removeSkillMod('expertise_damage_weapon_3', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_tibanna_gas_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_tibanna_gas_3") return diff --git a/scripts/expertise/expertise_co_tibanna_gas_4.py b/scripts/expertise/expertise_co_tibanna_gas_4.py index 09e23289..67b238f2 100644 --- a/scripts/expertise/expertise_co_tibanna_gas_4.py +++ b/scripts/expertise/expertise_co_tibanna_gas_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_tibanna_gas_4') - - actor.addSkillMod('expertise_damage_weapon_3', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_tibanna_gas_4') - - actor.removeSkillMod('expertise_damage_weapon_3', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_tibanna_gas_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_tibanna_gas_4") return diff --git a/scripts/expertise/expertise_co_timer_reset_1.py b/scripts/expertise/expertise_co_timer_reset_1.py index c1f4cdb0..1b2e232d 100644 --- a/scripts/expertise/expertise_co_timer_reset_1.py +++ b/scripts/expertise/expertise_co_timer_reset_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_timer_reset_1') - - actor.addSkillMod('expertise_delay_line_co_remote_detonator', 240) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_timer_reset_1') - - actor.removeSkillMod('expertise_delay_line_co_remote_detonator', 240) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_timer_reset_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_timer_reset_1") return diff --git a/scripts/expertise/expertise_co_timer_reset_2.py b/scripts/expertise/expertise_co_timer_reset_2.py index 452832a5..9c29a8c9 100644 --- a/scripts/expertise/expertise_co_timer_reset_2.py +++ b/scripts/expertise/expertise_co_timer_reset_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_timer_reset_2') - - actor.addSkillMod('expertise_delay_line_co_remote_detonator', 240) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_timer_reset_2') - - actor.removeSkillMod('expertise_delay_line_co_remote_detonator', 240) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_timer_reset_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_timer_reset_2") return diff --git a/scripts/expertise/expertise_co_youll_regret_that_1.py b/scripts/expertise/expertise_co_youll_regret_that_1.py index eae8c028..a0895f86 100644 --- a/scripts/expertise/expertise_co_youll_regret_that_1.py +++ b/scripts/expertise/expertise_co_youll_regret_that_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_youll_regret_that_1') - - actor.addSkillMod('kill_meter_co_youll_regret_that_reac', 100) - actor.addSkillMod('expertise_youll_regret_that', 1000) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_youll_regret_that_1') - - actor.removeSkillMod('kill_meter_co_youll_regret_that_reac', 100) - actor.removeSkillMod('expertise_youll_regret_that', 1000) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_youll_regret_that_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_youll_regret_that_1") return diff --git a/scripts/expertise/expertise_co_youll_regret_that_2.py b/scripts/expertise/expertise_co_youll_regret_that_2.py index 8075c520..d96de9f4 100644 --- a/scripts/expertise/expertise_co_youll_regret_that_2.py +++ b/scripts/expertise/expertise_co_youll_regret_that_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_youll_regret_that_2') - - actor.addSkillMod('kill_meter_co_youll_regret_that_reac', 0) - actor.addSkillMod('expertise_youll_regret_that', 1000) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_youll_regret_that_2') - - actor.removeSkillMod('kill_meter_co_youll_regret_that_reac', 0) - actor.removeSkillMod('expertise_youll_regret_that', 1000) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_youll_regret_that_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_youll_regret_that_2") return diff --git a/scripts/expertise/expertise_co_youll_regret_that_3.py b/scripts/expertise/expertise_co_youll_regret_that_3.py index e4724ece..0ab9bab3 100644 --- a/scripts/expertise/expertise_co_youll_regret_that_3.py +++ b/scripts/expertise/expertise_co_youll_regret_that_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_youll_regret_that_3') - - actor.addSkillMod('kill_meter_co_youll_regret_that_reac', 0) - actor.addSkillMod('expertise_youll_regret_that', 1000) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_youll_regret_that_3') - - actor.removeSkillMod('kill_meter_co_youll_regret_that_reac', 0) - actor.removeSkillMod('expertise_youll_regret_that', 1000) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_youll_regret_that_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_youll_regret_that_3") return diff --git a/scripts/expertise/expertise_co_youll_regret_that_4.py b/scripts/expertise/expertise_co_youll_regret_that_4.py index b4e02069..95a86d07 100644 --- a/scripts/expertise/expertise_co_youll_regret_that_4.py +++ b/scripts/expertise/expertise_co_youll_regret_that_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.addSkill('expertise_co_youll_regret_that_4') - - actor.addSkillMod('kill_meter_co_youll_regret_that_reac', 0) - actor.addSkillMod('expertise_youll_regret_that', 1000) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'commando_1a': - return - - actor.removeSkill('expertise_co_youll_regret_that_4') - - actor.removeSkillMod('kill_meter_co_youll_regret_that_reac', 0) - actor.removeSkillMod('expertise_youll_regret_that', 1000) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_co_youll_regret_that_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_co_youll_regret_that_4") return diff --git a/scripts/expertise/expertise_cybernetic_dexterity_1.py b/scripts/expertise/expertise_cybernetic_dexterity_1.py index 173aec59..db71010f 100644 --- a/scripts/expertise/expertise_cybernetic_dexterity_1.py +++ b/scripts/expertise/expertise_cybernetic_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_cybernetic_dexterity_1') - - actor.addSkillMod('cybernetic_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_cybernetic_dexterity_1') - - actor.removeSkillMod('cybernetic_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_cybernetic_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_cybernetic_dexterity_1") return diff --git a/scripts/expertise/expertise_cybernetic_dexterity_2.py b/scripts/expertise/expertise_cybernetic_dexterity_2.py index 1627c0f4..40cfd8c9 100644 --- a/scripts/expertise/expertise_cybernetic_dexterity_2.py +++ b/scripts/expertise/expertise_cybernetic_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_cybernetic_dexterity_2') - - actor.addSkillMod('cybernetic_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_cybernetic_dexterity_2') - - actor.removeSkillMod('cybernetic_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_cybernetic_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_cybernetic_dexterity_2") return diff --git a/scripts/expertise/expertise_cybernetic_dexterity_3.py b/scripts/expertise/expertise_cybernetic_dexterity_3.py index e80429b1..de7ea37b 100644 --- a/scripts/expertise/expertise_cybernetic_dexterity_3.py +++ b/scripts/expertise/expertise_cybernetic_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_cybernetic_dexterity_3') - - actor.addSkillMod('cybernetic_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_cybernetic_dexterity_3') - - actor.removeSkillMod('cybernetic_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_cybernetic_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_cybernetic_dexterity_3") return diff --git a/scripts/expertise/expertise_cybernetic_dexterity_4.py b/scripts/expertise/expertise_cybernetic_dexterity_4.py index 9e47bf2b..303f05f7 100644 --- a/scripts/expertise/expertise_cybernetic_dexterity_4.py +++ b/scripts/expertise/expertise_cybernetic_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_cybernetic_dexterity_4') - - actor.addSkillMod('cybernetic_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_cybernetic_dexterity_4') - - actor.removeSkillMod('cybernetic_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_cybernetic_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_cybernetic_dexterity_4") return diff --git a/scripts/expertise/expertise_domestic_artisan_advanced_theory_1.py b/scripts/expertise/expertise_domestic_artisan_advanced_theory_1.py index bd8a80ca..7768503c 100644 --- a/scripts/expertise/expertise_domestic_artisan_advanced_theory_1.py +++ b/scripts/expertise/expertise_domestic_artisan_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_advanced_theory_1') - - actor.addSkillMod('general_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_advanced_theory_1') - - actor.removeSkillMod('general_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_advanced_theory_1") return diff --git a/scripts/expertise/expertise_domestic_artisan_dexterity_1.py b/scripts/expertise/expertise_domestic_artisan_dexterity_1.py index f473579f..558c2105 100644 --- a/scripts/expertise/expertise_domestic_artisan_dexterity_1.py +++ b/scripts/expertise/expertise_domestic_artisan_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_dexterity_1') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_dexterity_1') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_dexterity_1") return diff --git a/scripts/expertise/expertise_domestic_artisan_dexterity_2.py b/scripts/expertise/expertise_domestic_artisan_dexterity_2.py index 913a4d0e..8c7ab6cf 100644 --- a/scripts/expertise/expertise_domestic_artisan_dexterity_2.py +++ b/scripts/expertise/expertise_domestic_artisan_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_dexterity_2') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_dexterity_2') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_dexterity_2") return diff --git a/scripts/expertise/expertise_domestic_artisan_dexterity_3.py b/scripts/expertise/expertise_domestic_artisan_dexterity_3.py index a430b03f..3759a96d 100644 --- a/scripts/expertise/expertise_domestic_artisan_dexterity_3.py +++ b/scripts/expertise/expertise_domestic_artisan_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_dexterity_3') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_dexterity_3') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_dexterity_3") return diff --git a/scripts/expertise/expertise_domestic_artisan_dexterity_4.py b/scripts/expertise/expertise_domestic_artisan_dexterity_4.py index aa5c57b2..4be842ea 100644 --- a/scripts/expertise/expertise_domestic_artisan_dexterity_4.py +++ b/scripts/expertise/expertise_domestic_artisan_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_dexterity_4') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_dexterity_4') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_dexterity_4") return diff --git a/scripts/expertise/expertise_domestic_artisan_hypothesis_1.py b/scripts/expertise/expertise_domestic_artisan_hypothesis_1.py index 00c3dbcb..d8af5dc4 100644 --- a/scripts/expertise/expertise_domestic_artisan_hypothesis_1.py +++ b/scripts/expertise/expertise_domestic_artisan_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_artisan_hypthesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_artisan_hypthesis_1") return diff --git a/scripts/expertise/expertise_domestic_artisan_hypothesis_2.py b/scripts/expertise/expertise_domestic_artisan_hypothesis_2.py index b0e1ffc0..d9a13f59 100644 --- a/scripts/expertise/expertise_domestic_artisan_hypothesis_2.py +++ b/scripts/expertise/expertise_domestic_artisan_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_hypthesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_hypthesis_2") return diff --git a/scripts/expertise/expertise_domestic_artisan_hypothesis_3.py b/scripts/expertise/expertise_domestic_artisan_hypothesis_3.py index e3411464..1ebf788d 100644 --- a/scripts/expertise/expertise_domestic_artisan_hypothesis_3.py +++ b/scripts/expertise/expertise_domestic_artisan_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_hypthesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_hypthesis_3") return diff --git a/scripts/expertise/expertise_domestic_artisan_hypothesis_4.py b/scripts/expertise/expertise_domestic_artisan_hypothesis_4.py index 81e4a849..e0797ccd 100644 --- a/scripts/expertise/expertise_domestic_artisan_hypothesis_4.py +++ b/scripts/expertise/expertise_domestic_artisan_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_artisan_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_artisan_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_artisan_hypthesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_artisan_hypthesis_4") return diff --git a/scripts/expertise/expertise_domestic_chef_advanced_theory_1.py b/scripts/expertise/expertise_domestic_chef_advanced_theory_1.py index e3012ee2..2ee6b7d6 100644 --- a/scripts/expertise/expertise_domestic_chef_advanced_theory_1.py +++ b/scripts/expertise/expertise_domestic_chef_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_advanced_theory_1') - - actor.addSkillMod('food_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_advanced_theory_1') - - actor.removeSkillMod('food_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_advanced_theory_1") return diff --git a/scripts/expertise/expertise_domestic_chef_dexterity_1.py b/scripts/expertise/expertise_domestic_chef_dexterity_1.py index 0a8f7fdd..f3edfc97 100644 --- a/scripts/expertise/expertise_domestic_chef_dexterity_1.py +++ b/scripts/expertise/expertise_domestic_chef_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_dexterity_1') - - actor.addSkillMod('food_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_dexterity_1') - - actor.removeSkillMod('food_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_dexterity_1") return diff --git a/scripts/expertise/expertise_domestic_chef_dexterity_2.py b/scripts/expertise/expertise_domestic_chef_dexterity_2.py index b5430961..006997ac 100644 --- a/scripts/expertise/expertise_domestic_chef_dexterity_2.py +++ b/scripts/expertise/expertise_domestic_chef_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_dexterity_2') - - actor.addSkillMod('food_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_dexterity_2') - - actor.removeSkillMod('food_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_dexterity_2") return diff --git a/scripts/expertise/expertise_domestic_chef_dexterity_3.py b/scripts/expertise/expertise_domestic_chef_dexterity_3.py index f2e888a5..f35f9cad 100644 --- a/scripts/expertise/expertise_domestic_chef_dexterity_3.py +++ b/scripts/expertise/expertise_domestic_chef_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_dexterity_3') - - actor.addSkillMod('food_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_dexterity_3') - - actor.removeSkillMod('food_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_dexterity_3") return diff --git a/scripts/expertise/expertise_domestic_chef_dexterity_4.py b/scripts/expertise/expertise_domestic_chef_dexterity_4.py index 0c8c273e..257e22e5 100644 --- a/scripts/expertise/expertise_domestic_chef_dexterity_4.py +++ b/scripts/expertise/expertise_domestic_chef_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_dexterity_4') - - actor.addSkillMod('food_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_dexterity_4') - - actor.removeSkillMod('food_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_dexterity_4") return diff --git a/scripts/expertise/expertise_domestic_chef_hypothesis_1.py b/scripts/expertise/expertise_domestic_chef_hypothesis_1.py index 4d0ef1b3..ce68731f 100644 --- a/scripts/expertise/expertise_domestic_chef_hypothesis_1.py +++ b/scripts/expertise/expertise_domestic_chef_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_chef', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_chef', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_hypothesis_1") return diff --git a/scripts/expertise/expertise_domestic_chef_hypothesis_2.py b/scripts/expertise/expertise_domestic_chef_hypothesis_2.py index 2203b3f4..e27b783b 100644 --- a/scripts/expertise/expertise_domestic_chef_hypothesis_2.py +++ b/scripts/expertise/expertise_domestic_chef_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_chef', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_chef', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_hypothesis_2") return diff --git a/scripts/expertise/expertise_domestic_chef_hypothesis_3.py b/scripts/expertise/expertise_domestic_chef_hypothesis_3.py index b82e5505..578de3e8 100644 --- a/scripts/expertise/expertise_domestic_chef_hypothesis_3.py +++ b/scripts/expertise/expertise_domestic_chef_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_chef', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_chef', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_hypothesis_3") return diff --git a/scripts/expertise/expertise_domestic_chef_hypothesis_4.py b/scripts/expertise/expertise_domestic_chef_hypothesis_4.py index 53e10ab3..65d4a9d4 100644 --- a/scripts/expertise/expertise_domestic_chef_hypothesis_4.py +++ b/scripts/expertise/expertise_domestic_chef_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_chef', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_chef', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_hypothesis_4") return diff --git a/scripts/expertise/expertise_domestic_chef_insight_1.py b/scripts/expertise/expertise_domestic_chef_insight_1.py index 1e07a424..620ede83 100644 --- a/scripts/expertise/expertise_domestic_chef_insight_1.py +++ b/scripts/expertise/expertise_domestic_chef_insight_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_insight_1') - - actor.addSkillMod('expertise_complexity_decrease_chef', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_insight_1') - - actor.removeSkillMod('expertise_complexity_decrease_chef', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_insight_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_insight_1") return diff --git a/scripts/expertise/expertise_domestic_chef_insight_2.py b/scripts/expertise/expertise_domestic_chef_insight_2.py index b3c8a9b9..1b3cfd75 100644 --- a/scripts/expertise/expertise_domestic_chef_insight_2.py +++ b/scripts/expertise/expertise_domestic_chef_insight_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_insight_2') - - actor.addSkillMod('expertise_complexity_decrease_chef', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_insight_2') - - actor.removeSkillMod('expertise_complexity_decrease_chef', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_insight_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_insight_2") return diff --git a/scripts/expertise/expertise_domestic_chef_keen_understanding_1.py b/scripts/expertise/expertise_domestic_chef_keen_understanding_1.py index 4449c44c..2d6a9548 100644 --- a/scripts/expertise/expertise_domestic_chef_keen_understanding_1.py +++ b/scripts/expertise/expertise_domestic_chef_keen_understanding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_keen_understanding_1') - - actor.addSkillMod('expertise_complexity_decrease_chef', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_keen_understanding_1') - - actor.removeSkillMod('expertise_complexity_decrease_chef', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_keen_understanding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_keen_understanding_1") return diff --git a/scripts/expertise/expertise_domestic_chef_keen_understanding_2.py b/scripts/expertise/expertise_domestic_chef_keen_understanding_2.py index 3fdc103f..1a8fef1f 100644 --- a/scripts/expertise/expertise_domestic_chef_keen_understanding_2.py +++ b/scripts/expertise/expertise_domestic_chef_keen_understanding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_keen_understanding_2') - - actor.addSkillMod('expertise_complexity_decrease_chef', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_keen_understanding_2') - - actor.removeSkillMod('expertise_complexity_decrease_chef', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_keen_understanding_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_keen_understanding_2") return diff --git a/scripts/expertise/expertise_domestic_chef_schematic_1_1.py b/scripts/expertise/expertise_domestic_chef_schematic_1_1.py index 47138106..8da9070b 100644 --- a/scripts/expertise/expertise_domestic_chef_schematic_1_1.py +++ b/scripts/expertise/expertise_domestic_chef_schematic_1_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_schematic_1_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_schematic_1_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_schematic_1_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_schematic_1_1") return diff --git a/scripts/expertise/expertise_domestic_chef_schematic_2_1.py b/scripts/expertise/expertise_domestic_chef_schematic_2_1.py index 1ec86323..ec21ccbf 100644 --- a/scripts/expertise/expertise_domestic_chef_schematic_2_1.py +++ b/scripts/expertise/expertise_domestic_chef_schematic_2_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_chef_schematic_2_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_chef_schematic_2_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_chef_schematic_2_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_chef_schematic_2_1") return diff --git a/scripts/expertise/expertise_domestic_resource_processing_1.py b/scripts/expertise/expertise_domestic_resource_processing_1.py index 62a2adf5..7fa9d660 100644 --- a/scripts/expertise/expertise_domestic_resource_processing_1.py +++ b/scripts/expertise/expertise_domestic_resource_processing_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_resource_processing_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_resource_processing_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_resource_processing_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_resource_processing_1") return diff --git a/scripts/expertise/expertise_domestic_resource_processing_2.py b/scripts/expertise/expertise_domestic_resource_processing_2.py index ccd73bd5..8e6e3a11 100644 --- a/scripts/expertise/expertise_domestic_resource_processing_2.py +++ b/scripts/expertise/expertise_domestic_resource_processing_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_resource_processing_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_resource_processing_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_resource_processing_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_resource_processing_2") return diff --git a/scripts/expertise/expertise_domestic_resource_refinement_1.py b/scripts/expertise/expertise_domestic_resource_refinement_1.py index fd3e810f..b0352b8e 100644 --- a/scripts/expertise/expertise_domestic_resource_refinement_1.py +++ b/scripts/expertise/expertise_domestic_resource_refinement_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_resource_refinement_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_resource_refinement_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_resource_refinement_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_resource_refinement_1") return diff --git a/scripts/expertise/expertise_domestic_resource_refinement_2.py b/scripts/expertise/expertise_domestic_resource_refinement_2.py index 9dfedf70..74913100 100644 --- a/scripts/expertise/expertise_domestic_resource_refinement_2.py +++ b/scripts/expertise/expertise_domestic_resource_refinement_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_resource_refinement_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_resource_refinement_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_resource_refinement_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_resource_refinement_2") return diff --git a/scripts/expertise/expertise_domestic_tailor_advanced_theory_1.py b/scripts/expertise/expertise_domestic_tailor_advanced_theory_1.py index 2a84d182..46aa159d 100644 --- a/scripts/expertise/expertise_domestic_tailor_advanced_theory_1.py +++ b/scripts/expertise/expertise_domestic_tailor_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_advanced_theory_1') - - actor.addSkillMod('clothing_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_advanced_theory_1') - - actor.removeSkillMod('clothing_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_advanced_theory_1") return diff --git a/scripts/expertise/expertise_domestic_tailor_attachment_upgrade_1.py b/scripts/expertise/expertise_domestic_tailor_attachment_upgrade_1.py index c3be240b..d10933fb 100644 --- a/scripts/expertise/expertise_domestic_tailor_attachment_upgrade_1.py +++ b/scripts/expertise/expertise_domestic_tailor_attachment_upgrade_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_attachment_upgrade_1') - - actor.addSkillMod('expertise_attachment_upgrade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_attachment_upgrade_1') - - actor.removeSkillMod('expertise_attachment_upgrade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_attachment_upgrade_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_attachment_upgrade_1") return diff --git a/scripts/expertise/expertise_domestic_tailor_dexterity_1.py b/scripts/expertise/expertise_domestic_tailor_dexterity_1.py index c0c3c0bb..7b05bf09 100644 --- a/scripts/expertise/expertise_domestic_tailor_dexterity_1.py +++ b/scripts/expertise/expertise_domestic_tailor_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_dexterity_1') - - actor.addSkillMod('clothing_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_dexterity_1') - - actor.removeSkillMod('clothing_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_dexterity_1") return diff --git a/scripts/expertise/expertise_domestic_tailor_dexterity_2.py b/scripts/expertise/expertise_domestic_tailor_dexterity_2.py index 24fb5fc8..16c9b28e 100644 --- a/scripts/expertise/expertise_domestic_tailor_dexterity_2.py +++ b/scripts/expertise/expertise_domestic_tailor_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_dexterity_2') - - actor.addSkillMod('clothing_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_dexterity_2') - - actor.removeSkillMod('clothing_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_dexterity_2") return diff --git a/scripts/expertise/expertise_domestic_tailor_dexterity_3.py b/scripts/expertise/expertise_domestic_tailor_dexterity_3.py index 8bee3264..0f4697c9 100644 --- a/scripts/expertise/expertise_domestic_tailor_dexterity_3.py +++ b/scripts/expertise/expertise_domestic_tailor_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_dexterity_3') - - actor.addSkillMod('clothing_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_dexterity_3') - - actor.removeSkillMod('clothing_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_dexterity_3") return diff --git a/scripts/expertise/expertise_domestic_tailor_dexterity_4.py b/scripts/expertise/expertise_domestic_tailor_dexterity_4.py index 828adfd1..8ef125c7 100644 --- a/scripts/expertise/expertise_domestic_tailor_dexterity_4.py +++ b/scripts/expertise/expertise_domestic_tailor_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_dexterity_4') - - actor.addSkillMod('clothing_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_dexterity_4') - - actor.removeSkillMod('clothing_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_dexterity_4") return diff --git a/scripts/expertise/expertise_domestic_tailor_hypothesis_1.py b/scripts/expertise/expertise_domestic_tailor_hypothesis_1.py index d384d0ea..e9e14164 100644 --- a/scripts/expertise/expertise_domestic_tailor_hypothesis_1.py +++ b/scripts/expertise/expertise_domestic_tailor_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_tailor', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_tailor', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_hypothesis_1") return diff --git a/scripts/expertise/expertise_domestic_tailor_hypothesis_2.py b/scripts/expertise/expertise_domestic_tailor_hypothesis_2.py index dc25b650..0dad6f4d 100644 --- a/scripts/expertise/expertise_domestic_tailor_hypothesis_2.py +++ b/scripts/expertise/expertise_domestic_tailor_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_tailor', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_tailor', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_hypothesis_2") return diff --git a/scripts/expertise/expertise_domestic_tailor_hypothesis_3.py b/scripts/expertise/expertise_domestic_tailor_hypothesis_3.py index 41572d81..70d55b5c 100644 --- a/scripts/expertise/expertise_domestic_tailor_hypothesis_3.py +++ b/scripts/expertise/expertise_domestic_tailor_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_tailor', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_tailor', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_hypothesis_3") return diff --git a/scripts/expertise/expertise_domestic_tailor_hypothesis_4.py b/scripts/expertise/expertise_domestic_tailor_hypothesis_4.py index 2009c763..c9a25d1c 100644 --- a/scripts/expertise/expertise_domestic_tailor_hypothesis_4.py +++ b/scripts/expertise/expertise_domestic_tailor_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_tailor', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_tailor', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_hypothesis_4") return diff --git a/scripts/expertise/expertise_domestic_tailor_insight_1.py b/scripts/expertise/expertise_domestic_tailor_insight_1.py index 1734ab71..dcafb9f2 100644 --- a/scripts/expertise/expertise_domestic_tailor_insight_1.py +++ b/scripts/expertise/expertise_domestic_tailor_insight_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_insight_1') - - actor.addSkillMod('expertise_complexity_decrease_tailor', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_insight_1') - - actor.removeSkillMod('expertise_complexity_decrease_tailor', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_insight_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_insight_1") return diff --git a/scripts/expertise/expertise_domestic_tailor_insight_2.py b/scripts/expertise/expertise_domestic_tailor_insight_2.py index e65231bd..cd307c4c 100644 --- a/scripts/expertise/expertise_domestic_tailor_insight_2.py +++ b/scripts/expertise/expertise_domestic_tailor_insight_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_insight_2') - - actor.addSkillMod('expertise_complexity_decrease_tailor', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_insight_2') - - actor.removeSkillMod('expertise_complexity_decrease_tailor', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_insight_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_insight_2") return diff --git a/scripts/expertise/expertise_domestic_tailor_keen_understanding_1.py b/scripts/expertise/expertise_domestic_tailor_keen_understanding_1.py index 59a274ff..e4c2ab72 100644 --- a/scripts/expertise/expertise_domestic_tailor_keen_understanding_1.py +++ b/scripts/expertise/expertise_domestic_tailor_keen_understanding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_keen_understanding_1') - - actor.addSkillMod('expertise_complexity_decrease_tailor', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_keen_understanding_1') - - actor.removeSkillMod('expertise_complexity_decrease_tailor', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_keen_understanding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_keen_understanding_1") return diff --git a/scripts/expertise/expertise_domestic_tailor_keen_understanding_2.py b/scripts/expertise/expertise_domestic_tailor_keen_understanding_2.py index 1504d0e2..b866a83f 100644 --- a/scripts/expertise/expertise_domestic_tailor_keen_understanding_2.py +++ b/scripts/expertise/expertise_domestic_tailor_keen_understanding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_keen_understanding_2') - - actor.addSkillMod('expertise_complexity_decrease_tailor', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_keen_understanding_2') - - actor.removeSkillMod('expertise_complexity_decrease_tailor', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_keen_understanding_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_keen_understanding_2") return diff --git a/scripts/expertise/expertise_domestic_tailor_socket_bonus_1.py b/scripts/expertise/expertise_domestic_tailor_socket_bonus_1.py index 9c86c720..4cac0dfc 100644 --- a/scripts/expertise/expertise_domestic_tailor_socket_bonus_1.py +++ b/scripts/expertise/expertise_domestic_tailor_socket_bonus_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.addSkill('expertise_domestic_tailor_socket_bonus_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_dom_1a': - return - - actor.removeSkill('expertise_domestic_tailor_socket_bonus_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_domestic_tailor_socket_bonus_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_domestic_tailor_socket_bonus_1") return diff --git a/scripts/expertise/expertise_en_affability_1.py b/scripts/expertise/expertise_en_affability_1.py index 7a5f2735..35dfd326 100644 --- a/scripts/expertise/expertise_en_affability_1.py +++ b/scripts/expertise/expertise_en_affability_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_affability_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_affability_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_affability_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_affability_1") + return diff --git a/scripts/expertise/expertise_en_affability_2.py b/scripts/expertise/expertise_en_affability_2.py index 7bce595d..38b336df 100644 --- a/scripts/expertise/expertise_en_affability_2.py +++ b/scripts/expertise/expertise_en_affability_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_affability_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_affability_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_affability_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_affability_2") + return diff --git a/scripts/expertise/expertise_en_affability_3.py b/scripts/expertise/expertise_en_affability_3.py index c9ec177b..0a2cf7fc 100644 --- a/scripts/expertise/expertise_en_affability_3.py +++ b/scripts/expertise/expertise_en_affability_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_affability_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_affability_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_affability_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_affability_3") + return diff --git a/scripts/expertise/expertise_en_affability_4.py b/scripts/expertise/expertise_en_affability_4.py index 33d4eebe..3949d215 100644 --- a/scripts/expertise/expertise_en_affability_4.py +++ b/scripts/expertise/expertise_en_affability_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_affability_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_affability_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_affability_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_affability_4") + return diff --git a/scripts/expertise/expertise_en_allure_1.py b/scripts/expertise/expertise_en_allure_1.py index dde55739..9448b911 100644 --- a/scripts/expertise/expertise_en_allure_1.py +++ b/scripts/expertise/expertise_en_allure_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_allure_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_allure_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_allure_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_allure_1") + return diff --git a/scripts/expertise/expertise_en_allure_2.py b/scripts/expertise/expertise_en_allure_2.py index 737c85bd..831a7c36 100644 --- a/scripts/expertise/expertise_en_allure_2.py +++ b/scripts/expertise/expertise_en_allure_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_allure_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_allure_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_allure_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_allure_2") + return diff --git a/scripts/expertise/expertise_en_allure_3.py b/scripts/expertise/expertise_en_allure_3.py index 271fc696..f896a1d2 100644 --- a/scripts/expertise/expertise_en_allure_3.py +++ b/scripts/expertise/expertise_en_allure_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_allure_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_allure_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_allure_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_allure_3") + return diff --git a/scripts/expertise/expertise_en_annulling_1.py b/scripts/expertise/expertise_en_annulling_1.py index 719ec07e..6055557a 100644 --- a/scripts/expertise/expertise_en_annulling_1.py +++ b/scripts/expertise/expertise_en_annulling_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_annulling_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_annulling_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_annulling_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_annulling_1") + return diff --git a/scripts/expertise/expertise_en_annulling_2.py b/scripts/expertise/expertise_en_annulling_2.py index 6dd3e00c..e06fc2ef 100644 --- a/scripts/expertise/expertise_en_annulling_2.py +++ b/scripts/expertise/expertise_en_annulling_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_annulling_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_annulling_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_annulling_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_annulling_2") + return diff --git a/scripts/expertise/expertise_en_annulling_3.py b/scripts/expertise/expertise_en_annulling_3.py index 423efeee..b26f4814 100644 --- a/scripts/expertise/expertise_en_annulling_3.py +++ b/scripts/expertise/expertise_en_annulling_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_annulling_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_annulling_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_annulling_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_annulling_3") + return diff --git a/scripts/expertise/expertise_en_conditioned_vessel_1.py b/scripts/expertise/expertise_en_conditioned_vessel_1.py index f902b662..896a8752 100644 --- a/scripts/expertise/expertise_en_conditioned_vessel_1.py +++ b/scripts/expertise/expertise_en_conditioned_vessel_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_conditioned_vessel_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_conditioned_vessel_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_conditioned_vessel_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_conditioned_vessel_1") + return diff --git a/scripts/expertise/expertise_en_conditioned_vessel_2.py b/scripts/expertise/expertise_en_conditioned_vessel_2.py index d58db7c8..e7123ab7 100644 --- a/scripts/expertise/expertise_en_conditioned_vessel_2.py +++ b/scripts/expertise/expertise_en_conditioned_vessel_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_conditioned_vessel_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_conditioned_vessel_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_conditioned_vessel_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_conditioned_vessel_2") + return diff --git a/scripts/expertise/expertise_en_conditioned_vessel_3.py b/scripts/expertise/expertise_en_conditioned_vessel_3.py index 72a80217..e0292169 100644 --- a/scripts/expertise/expertise_en_conditioned_vessel_3.py +++ b/scripts/expertise/expertise_en_conditioned_vessel_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_conditioned_vessel_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_conditioned_vessel_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_conditioned_vessel_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_conditioned_vessel_3") + return diff --git a/scripts/expertise/expertise_en_conditioned_vessel_4.py b/scripts/expertise/expertise_en_conditioned_vessel_4.py index fff13364..f0d7b6e7 100644 --- a/scripts/expertise/expertise_en_conditioned_vessel_4.py +++ b/scripts/expertise/expertise_en_conditioned_vessel_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_conditioned_vessel_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_conditioned_vessel_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_conditioned_vessel_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_conditioned_vessel_4") + return diff --git a/scripts/expertise/expertise_en_controlled_spin_1.py b/scripts/expertise/expertise_en_controlled_spin_1.py index 71236177..dc088a17 100644 --- a/scripts/expertise/expertise_en_controlled_spin_1.py +++ b/scripts/expertise/expertise_en_controlled_spin_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_controlled_spin_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_controlled_spin_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_controlled_spin_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_controlled_spin_1") + return diff --git a/scripts/expertise/expertise_en_controlled_spin_2.py b/scripts/expertise/expertise_en_controlled_spin_2.py index 782621db..018aae71 100644 --- a/scripts/expertise/expertise_en_controlled_spin_2.py +++ b/scripts/expertise/expertise_en_controlled_spin_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_controlled_spin_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_controlled_spin_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_controlled_spin_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_controlled_spin_2") + return diff --git a/scripts/expertise/expertise_en_controlled_spin_3.py b/scripts/expertise/expertise_en_controlled_spin_3.py index 657fa429..4850d8cc 100644 --- a/scripts/expertise/expertise_en_controlled_spin_3.py +++ b/scripts/expertise/expertise_en_controlled_spin_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_controlled_spin_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_controlled_spin_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_controlled_spin_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_controlled_spin_3") + return diff --git a/scripts/expertise/expertise_en_creativity_1.py b/scripts/expertise/expertise_en_creativity_1.py index e0b3ead8..ec5120d4 100644 --- a/scripts/expertise/expertise_en_creativity_1.py +++ b/scripts/expertise/expertise_en_creativity_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_creativity_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_creativity_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_creativity_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_creativity_1") + return diff --git a/scripts/expertise/expertise_en_creativity_2.py b/scripts/expertise/expertise_en_creativity_2.py index b00bf0e0..9e919439 100644 --- a/scripts/expertise/expertise_en_creativity_2.py +++ b/scripts/expertise/expertise_en_creativity_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_creativity_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_creativity_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_creativity_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_creativity_2") + return diff --git a/scripts/expertise/expertise_en_creativity_3.py b/scripts/expertise/expertise_en_creativity_3.py index a0dc7c5d..a4e8153f 100644 --- a/scripts/expertise/expertise_en_creativity_3.py +++ b/scripts/expertise/expertise_en_creativity_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_creativity_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_creativity_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_creativity_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_creativity_3") + return diff --git a/scripts/expertise/expertise_en_creativity_4.py b/scripts/expertise/expertise_en_creativity_4.py index 3d753096..f743578d 100644 --- a/scripts/expertise/expertise_en_creativity_4.py +++ b/scripts/expertise/expertise_en_creativity_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_creativity_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_creativity_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_creativity_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_creativity_4") + return diff --git a/scripts/expertise/expertise_en_dramatic_flair_1.py b/scripts/expertise/expertise_en_dramatic_flair_1.py index e9c2f3ec..bd280ed0 100644 --- a/scripts/expertise/expertise_en_dramatic_flair_1.py +++ b/scripts/expertise/expertise_en_dramatic_flair_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_dramatic_flair_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_dramatic_flair_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_dramatic_flair_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_dramatic_flair_1") + return diff --git a/scripts/expertise/expertise_en_dramatic_flair_2.py b/scripts/expertise/expertise_en_dramatic_flair_2.py index 34897265..7d32d156 100644 --- a/scripts/expertise/expertise_en_dramatic_flair_2.py +++ b/scripts/expertise/expertise_en_dramatic_flair_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_dramatic_flair_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_dramatic_flair_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_dramatic_flair_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_dramatic_flair_2") + return diff --git a/scripts/expertise/expertise_en_dramatic_flair_3.py b/scripts/expertise/expertise_en_dramatic_flair_3.py index 5c9c5ba6..16533340 100644 --- a/scripts/expertise/expertise_en_dramatic_flair_3.py +++ b/scripts/expertise/expertise_en_dramatic_flair_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_dramatic_flair_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_dramatic_flair_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_dramatic_flair_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_dramatic_flair_3") + return diff --git a/scripts/expertise/expertise_en_dramatic_flair_4.py b/scripts/expertise/expertise_en_dramatic_flair_4.py index 921c72d2..ccb52574 100644 --- a/scripts/expertise/expertise_en_dramatic_flair_4.py +++ b/scripts/expertise/expertise_en_dramatic_flair_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_dramatic_flair_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_dramatic_flair_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_dramatic_flair_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_dramatic_flair_4") + return diff --git a/scripts/expertise/expertise_en_emotional_prescience_1.py b/scripts/expertise/expertise_en_emotional_prescience_1.py index c3c07285..f9177d7c 100644 --- a/scripts/expertise/expertise_en_emotional_prescience_1.py +++ b/scripts/expertise/expertise_en_emotional_prescience_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_emotional_prescience_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_emotional_prescience_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_emotional_prescience_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_emotional_prescience_1") + return diff --git a/scripts/expertise/expertise_en_emotional_prescience_2.py b/scripts/expertise/expertise_en_emotional_prescience_2.py index 54062a47..5afb81a1 100644 --- a/scripts/expertise/expertise_en_emotional_prescience_2.py +++ b/scripts/expertise/expertise_en_emotional_prescience_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_emotional_prescience_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_emotional_prescience_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_emotional_prescience_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_emotional_prescience_2") + return diff --git a/scripts/expertise/expertise_en_emotional_prescience_3.py b/scripts/expertise/expertise_en_emotional_prescience_3.py index efbbf6fa..8f5b2500 100644 --- a/scripts/expertise/expertise_en_emotional_prescience_3.py +++ b/scripts/expertise/expertise_en_emotional_prescience_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_emotional_prescience_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_emotional_prescience_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_emotional_prescience_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_emotional_prescience_3") + return diff --git a/scripts/expertise/expertise_en_emotional_prescience_4.py b/scripts/expertise/expertise_en_emotional_prescience_4.py index ebb28e19..1a2ce7e1 100644 --- a/scripts/expertise/expertise_en_emotional_prescience_4.py +++ b/scripts/expertise/expertise_en_emotional_prescience_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_emotional_prescience_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_emotional_prescience_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_emotional_prescience_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_emotional_prescience_4") + return diff --git a/scripts/expertise/expertise_en_encore_heal_1.py b/scripts/expertise/expertise_en_encore_heal_1.py index f8dfb71c..14d899a0 100644 --- a/scripts/expertise/expertise_en_encore_heal_1.py +++ b/scripts/expertise/expertise_en_encore_heal_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_encore_heal_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_encore_heal_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_encore_heal_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_encore_heal_1") + return diff --git a/scripts/expertise/expertise_en_encore_heal_2.py b/scripts/expertise/expertise_en_encore_heal_2.py index e625e800..1ac0eb53 100644 --- a/scripts/expertise/expertise_en_encore_heal_2.py +++ b/scripts/expertise/expertise_en_encore_heal_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_encore_heal_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_encore_heal_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_encore_heal_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_encore_heal_2") + return diff --git a/scripts/expertise/expertise_en_encore_heal_3.py b/scripts/expertise/expertise_en_encore_heal_3.py index f409d34a..348742d1 100644 --- a/scripts/expertise/expertise_en_encore_heal_3.py +++ b/scripts/expertise/expertise_en_encore_heal_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_encore_heal_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_encore_heal_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_encore_heal_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_encore_heal_3") + return diff --git a/scripts/expertise/expertise_en_flush_with_success_1.py b/scripts/expertise/expertise_en_flush_with_success_1.py index 561871be..b25fc909 100644 --- a/scripts/expertise/expertise_en_flush_with_success_1.py +++ b/scripts/expertise/expertise_en_flush_with_success_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_flush_with_success_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_flush_with_success_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_flush_with_success_buff_package") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_flush_with_success_buff_package") + return diff --git a/scripts/expertise/expertise_en_focused_control_1.py b/scripts/expertise/expertise_en_focused_control_1.py index fb59c24b..99d0436a 100644 --- a/scripts/expertise/expertise_en_focused_control_1.py +++ b/scripts/expertise/expertise_en_focused_control_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_focused_control_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_focused_control_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_focused_control_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_focused_control_1") + return diff --git a/scripts/expertise/expertise_en_focused_control_2.py b/scripts/expertise/expertise_en_focused_control_2.py index 75e3342d..2b81f293 100644 --- a/scripts/expertise/expertise_en_focused_control_2.py +++ b/scripts/expertise/expertise_en_focused_control_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_focused_control_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_focused_control_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_focused_control_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_focused_control_2") + return diff --git a/scripts/expertise/expertise_en_focused_control_3.py b/scripts/expertise/expertise_en_focused_control_3.py index 508a3655..b256a48d 100644 --- a/scripts/expertise/expertise_en_focused_control_3.py +++ b/scripts/expertise/expertise_en_focused_control_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_focused_control_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_focused_control_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_focused_control_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_focused_control_3") + return diff --git a/scripts/expertise/expertise_en_focused_control_4.py b/scripts/expertise/expertise_en_focused_control_4.py index ff0055e7..f3ec007f 100644 --- a/scripts/expertise/expertise_en_focused_control_4.py +++ b/scripts/expertise/expertise_en_focused_control_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_focused_control_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_focused_control_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_focused_control_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_focused_control_4") + return diff --git a/scripts/expertise/expertise_en_folded_inward_1.py b/scripts/expertise/expertise_en_folded_inward_1.py index 92081f72..142d632c 100644 --- a/scripts/expertise/expertise_en_folded_inward_1.py +++ b/scripts/expertise/expertise_en_folded_inward_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_folded_inward_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_folded_inward_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_folded_inward_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_folded_inward_1") + return diff --git a/scripts/expertise/expertise_en_folded_inward_2.py b/scripts/expertise/expertise_en_folded_inward_2.py index dd0e1a76..3c56cd2c 100644 --- a/scripts/expertise/expertise_en_folded_inward_2.py +++ b/scripts/expertise/expertise_en_folded_inward_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_folded_inward_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_folded_inward_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_folded_inward_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_folded_inward_2") + return diff --git a/scripts/expertise/expertise_en_folded_inward_3.py b/scripts/expertise/expertise_en_folded_inward_3.py index e267f43a..40b26c21 100644 --- a/scripts/expertise/expertise_en_folded_inward_3.py +++ b/scripts/expertise/expertise_en_folded_inward_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_folded_inward_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_folded_inward_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_folded_inward_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_folded_inward_3") + return diff --git a/scripts/expertise/expertise_en_folded_inward_4.py b/scripts/expertise/expertise_en_folded_inward_4.py index 8b9f04ea..94c18354 100644 --- a/scripts/expertise/expertise_en_folded_inward_4.py +++ b/scripts/expertise/expertise_en_folded_inward_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_folded_inward_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_folded_inward_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_folded_inward_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_folded_inward_4") + return diff --git a/scripts/expertise/expertise_en_go_with_the_flow_1.py b/scripts/expertise/expertise_en_go_with_the_flow_1.py index cafced83..e51fdee5 100644 --- a/scripts/expertise/expertise_en_go_with_the_flow_1.py +++ b/scripts/expertise/expertise_en_go_with_the_flow_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_go_with_the_flow_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_go_with_the_flow_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_go_with_the_flow_buff_package") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_go_with_the_flow_buff_package") + return diff --git a/scripts/expertise/expertise_en_harvest_faire_1.py b/scripts/expertise/expertise_en_harvest_faire_1.py index aa8c759a..21238bc0 100644 --- a/scripts/expertise/expertise_en_harvest_faire_1.py +++ b/scripts/expertise/expertise_en_harvest_faire_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_harvest_faire_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_harvest_faire_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_harvest_fair_buff_package") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_harvest_fair_buff_package") + return diff --git a/scripts/expertise/expertise_en_heal_1.py b/scripts/expertise/expertise_en_heal_1.py index dc58a76f..d4e3d669 100644 --- a/scripts/expertise/expertise_en_heal_1.py +++ b/scripts/expertise/expertise_en_heal_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_heal_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_heal_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_heal_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_heal_1") + return diff --git a/scripts/expertise/expertise_en_holism_1.py b/scripts/expertise/expertise_en_holism_1.py index b2dc30fc..af3b40a1 100644 --- a/scripts/expertise/expertise_en_holism_1.py +++ b/scripts/expertise/expertise_en_holism_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_holism_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_holism_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_healer_buff_package") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_healer_buff_package") + return diff --git a/scripts/expertise/expertise_en_holographic_duration_1.py b/scripts/expertise/expertise_en_holographic_duration_1.py index 25e56ae7..04ec0485 100644 --- a/scripts/expertise/expertise_en_holographic_duration_1.py +++ b/scripts/expertise/expertise_en_holographic_duration_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_holographic_duration_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_holographic_duration_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_holographic_duration_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_holographic_duration_1") + return diff --git a/scripts/expertise/expertise_en_holographic_mastery_1.py b/scripts/expertise/expertise_en_holographic_mastery_1.py index 59a4c40a..cb7f5424 100644 --- a/scripts/expertise/expertise_en_holographic_mastery_1.py +++ b/scripts/expertise/expertise_en_holographic_mastery_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_holographic_mastery_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_holographic_mastery_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_holographic_mastery_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_holographic_mastery_1") + return diff --git a/scripts/expertise/expertise_en_holographic_mastery_2.py b/scripts/expertise/expertise_en_holographic_mastery_2.py index 72a8e391..6fc49ee0 100644 --- a/scripts/expertise/expertise_en_holographic_mastery_2.py +++ b/scripts/expertise/expertise_en_holographic_mastery_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_holographic_mastery_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_holographic_mastery_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_holographic_mastery_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_holographic_mastery_2") + return diff --git a/scripts/expertise/expertise_en_improv_1.py b/scripts/expertise/expertise_en_improv_1.py index 14987c0c..b2b0352b 100644 --- a/scripts/expertise/expertise_en_improv_1.py +++ b/scripts/expertise/expertise_en_improv_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_improv_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_improv_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_improv_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_improv_1") + return diff --git a/scripts/expertise/expertise_en_inspired_fitness_1.py b/scripts/expertise/expertise_en_inspired_fitness_1.py index bd4ddb5f..1c557c8d 100644 --- a/scripts/expertise/expertise_en_inspired_fitness_1.py +++ b/scripts/expertise/expertise_en_inspired_fitness_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_fitness_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_fitness_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_fitness_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_fitness_1") + return diff --git a/scripts/expertise/expertise_en_inspired_fitness_2.py b/scripts/expertise/expertise_en_inspired_fitness_2.py index 1c971df3..92101da2 100644 --- a/scripts/expertise/expertise_en_inspired_fitness_2.py +++ b/scripts/expertise/expertise_en_inspired_fitness_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_fitness_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_fitness_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_fitness_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_fitness_2") + return diff --git a/scripts/expertise/expertise_en_inspired_fitness_3.py b/scripts/expertise/expertise_en_inspired_fitness_3.py index 1a6d4126..91839161 100644 --- a/scripts/expertise/expertise_en_inspired_fitness_3.py +++ b/scripts/expertise/expertise_en_inspired_fitness_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_fitness_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_fitness_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_fitness_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_fitness_3") + return diff --git a/scripts/expertise/expertise_en_inspired_fitness_4.py b/scripts/expertise/expertise_en_inspired_fitness_4.py index fb5e209a..649ae342 100644 --- a/scripts/expertise/expertise_en_inspired_fitness_4.py +++ b/scripts/expertise/expertise_en_inspired_fitness_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_fitness_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_fitness_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_fitness_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_fitness_4") + return diff --git a/scripts/expertise/expertise_en_inspired_industry_1.py b/scripts/expertise/expertise_en_inspired_industry_1.py index ba69a11b..f544cc87 100644 --- a/scripts/expertise/expertise_en_inspired_industry_1.py +++ b/scripts/expertise/expertise_en_inspired_industry_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_industry_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_industry_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_industry_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_industry_1") + return diff --git a/scripts/expertise/expertise_en_inspired_industry_2.py b/scripts/expertise/expertise_en_inspired_industry_2.py index 31428c4d..4c0f93d3 100644 --- a/scripts/expertise/expertise_en_inspired_industry_2.py +++ b/scripts/expertise/expertise_en_inspired_industry_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_industry_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_industry_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_industry_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_industry_2") + return diff --git a/scripts/expertise/expertise_en_inspired_industry_3.py b/scripts/expertise/expertise_en_inspired_industry_3.py index b72c1a8a..619e0efa 100644 --- a/scripts/expertise/expertise_en_inspired_industry_3.py +++ b/scripts/expertise/expertise_en_inspired_industry_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_industry_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_industry_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_industry_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_industry_3") + return diff --git a/scripts/expertise/expertise_en_inspired_industry_4.py b/scripts/expertise/expertise_en_inspired_industry_4.py index 8a704e6c..8a99a16c 100644 --- a/scripts/expertise/expertise_en_inspired_industry_4.py +++ b/scripts/expertise/expertise_en_inspired_industry_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_industry_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_industry_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_industry_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_industry_4") + return diff --git a/scripts/expertise/expertise_en_inspired_reactions_1.py b/scripts/expertise/expertise_en_inspired_reactions_1.py index e2dee785..90e56a58 100644 --- a/scripts/expertise/expertise_en_inspired_reactions_1.py +++ b/scripts/expertise/expertise_en_inspired_reactions_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_reactions_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_reactions_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_reactions_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_reactions_1") + return diff --git a/scripts/expertise/expertise_en_inspired_reactions_2.py b/scripts/expertise/expertise_en_inspired_reactions_2.py index 91330683..9fb0f596 100644 --- a/scripts/expertise/expertise_en_inspired_reactions_2.py +++ b/scripts/expertise/expertise_en_inspired_reactions_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_reactions_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_reactions_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_reactions_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_reactions_2") + return diff --git a/scripts/expertise/expertise_en_inspired_reactions_3.py b/scripts/expertise/expertise_en_inspired_reactions_3.py index e3f05658..0ae224f0 100644 --- a/scripts/expertise/expertise_en_inspired_reactions_3.py +++ b/scripts/expertise/expertise_en_inspired_reactions_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_reactions_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_reactions_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_reactions_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_reactions_3") + return diff --git a/scripts/expertise/expertise_en_inspired_reactions_4.py b/scripts/expertise/expertise_en_inspired_reactions_4.py index dee2ec04..c3818211 100644 --- a/scripts/expertise/expertise_en_inspired_reactions_4.py +++ b/scripts/expertise/expertise_en_inspired_reactions_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_reactions_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_reactions_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_reactions_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_reactions_4") + return diff --git a/scripts/expertise/expertise_en_inspired_resilience_1.py b/scripts/expertise/expertise_en_inspired_resilience_1.py index 34398163..c62a7767 100644 --- a/scripts/expertise/expertise_en_inspired_resilience_1.py +++ b/scripts/expertise/expertise_en_inspired_resilience_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_resilience_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_resilience_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_resilience_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_resilience_1") + return diff --git a/scripts/expertise/expertise_en_inspired_resilience_2.py b/scripts/expertise/expertise_en_inspired_resilience_2.py index b10be5d6..fe23ae90 100644 --- a/scripts/expertise/expertise_en_inspired_resilience_2.py +++ b/scripts/expertise/expertise_en_inspired_resilience_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_resilience_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_resilience_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_resilience_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_resilience_2") + return diff --git a/scripts/expertise/expertise_en_inspired_resilience_3.py b/scripts/expertise/expertise_en_inspired_resilience_3.py index 549ed60d..1506e79b 100644 --- a/scripts/expertise/expertise_en_inspired_resilience_3.py +++ b/scripts/expertise/expertise_en_inspired_resilience_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_resilience_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_resilience_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_resilience_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_resilience_3") + return diff --git a/scripts/expertise/expertise_en_inspired_resilience_4.py b/scripts/expertise/expertise_en_inspired_resilience_4.py index ecf70c6c..f6db50ad 100644 --- a/scripts/expertise/expertise_en_inspired_resilience_4.py +++ b/scripts/expertise/expertise_en_inspired_resilience_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_resilience_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_resilience_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_resilience_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_resilience_4") + return diff --git a/scripts/expertise/expertise_en_inspired_warfare_1.py b/scripts/expertise/expertise_en_inspired_warfare_1.py index 144e1e9c..f1f8049e 100644 --- a/scripts/expertise/expertise_en_inspired_warfare_1.py +++ b/scripts/expertise/expertise_en_inspired_warfare_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_warfare_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_warfare_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_warfare_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_warfare_1") + return diff --git a/scripts/expertise/expertise_en_inspired_warfare_2.py b/scripts/expertise/expertise_en_inspired_warfare_2.py index f1cc6d25..541c27f1 100644 --- a/scripts/expertise/expertise_en_inspired_warfare_2.py +++ b/scripts/expertise/expertise_en_inspired_warfare_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_warfare_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_warfare_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_warfare_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_warfare_2") + return diff --git a/scripts/expertise/expertise_en_inspired_warfare_3.py b/scripts/expertise/expertise_en_inspired_warfare_3.py index 8430aecf..00781c96 100644 --- a/scripts/expertise/expertise_en_inspired_warfare_3.py +++ b/scripts/expertise/expertise_en_inspired_warfare_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_warfare_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_warfare_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_warfare_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_warfare_3") + return diff --git a/scripts/expertise/expertise_en_inspired_warfare_4.py b/scripts/expertise/expertise_en_inspired_warfare_4.py index 4c030c0c..159615a1 100644 --- a/scripts/expertise/expertise_en_inspired_warfare_4.py +++ b/scripts/expertise/expertise_en_inspired_warfare_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_inspired_warfare_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_inspired_warfare_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_inspired_warfare_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_inspired_warfare_4") + return diff --git a/scripts/expertise/expertise_en_intense_performer_1.py b/scripts/expertise/expertise_en_intense_performer_1.py index cf9f9699..4a064e58 100644 --- a/scripts/expertise/expertise_en_intense_performer_1.py +++ b/scripts/expertise/expertise_en_intense_performer_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_intense_performer_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_intense_performer_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_intense_performer_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_intense_performer_1") + return diff --git a/scripts/expertise/expertise_en_intense_performer_2.py b/scripts/expertise/expertise_en_intense_performer_2.py index 0582a021..6650519c 100644 --- a/scripts/expertise/expertise_en_intense_performer_2.py +++ b/scripts/expertise/expertise_en_intense_performer_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_intense_performer_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_intense_performer_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_intense_performer_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_intense_performer_2") + return diff --git a/scripts/expertise/expertise_en_intense_performer_3.py b/scripts/expertise/expertise_en_intense_performer_3.py index 5ee49acf..0c213a0d 100644 --- a/scripts/expertise/expertise_en_intense_performer_3.py +++ b/scripts/expertise/expertise_en_intense_performer_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_intense_performer_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_intense_performer_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_intense_performer_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_intense_performer_3") + return diff --git a/scripts/expertise/expertise_en_intense_performer_4.py b/scripts/expertise/expertise_en_intense_performer_4.py index 29b5eb73..82cf75e6 100644 --- a/scripts/expertise/expertise_en_intense_performer_4.py +++ b/scripts/expertise/expertise_en_intense_performer_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_intense_performer_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_intense_performer_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_intense_performer_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_intense_performer_4") + return diff --git a/scripts/expertise/expertise_en_lasting_impression_1.py b/scripts/expertise/expertise_en_lasting_impression_1.py index 960c9b75..cd2f80fe 100644 --- a/scripts/expertise/expertise_en_lasting_impression_1.py +++ b/scripts/expertise/expertise_en_lasting_impression_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_lasting_impression_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_lasting_impression_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_lasting_impression_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_lasting_impression_1") + return diff --git a/scripts/expertise/expertise_en_lasting_impression_2.py b/scripts/expertise/expertise_en_lasting_impression_2.py index 0ef56c25..2c17365a 100644 --- a/scripts/expertise/expertise_en_lasting_impression_2.py +++ b/scripts/expertise/expertise_en_lasting_impression_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_lasting_impression_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_lasting_impression_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_lasting_impression_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_lasting_impression_2") + return diff --git a/scripts/expertise/expertise_en_lasting_impression_3.py b/scripts/expertise/expertise_en_lasting_impression_3.py index 74107ef2..2012d616 100644 --- a/scripts/expertise/expertise_en_lasting_impression_3.py +++ b/scripts/expertise/expertise_en_lasting_impression_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_lasting_impression_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_lasting_impression_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_lasting_impression_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_lasting_impression_3") + return diff --git a/scripts/expertise/expertise_en_lasting_impression_4.py b/scripts/expertise/expertise_en_lasting_impression_4.py index b71d1b91..c90caf25 100644 --- a/scripts/expertise/expertise_en_lasting_impression_4.py +++ b/scripts/expertise/expertise_en_lasting_impression_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_lasting_impression_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_lasting_impression_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_lasting_impression_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_lasting_impression_4") + return diff --git a/scripts/expertise/expertise_en_project_will_1.py b/scripts/expertise/expertise_en_project_will_1.py index fca5a471..c1a2a52a 100644 --- a/scripts/expertise/expertise_en_project_will_1.py +++ b/scripts/expertise/expertise_en_project_will_1.py @@ -1,42 +1,28 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_project_will_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_project_will_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + if actor.getLevel() >= 18: + actor.addAbility("en_project_will_0") + if actor.getLevel() >= 30: + actor.addAbility("en_project_will_1") + if actor.getLevel() >= 42: + actor.addAbility("en_project_will_2") + if actor.getLevel() >= 54: + actor.addAbility("en_project_will_3") + if actor.getLevel() >= 66: + actor.addAbility("en_project_will_4") + if actor.getLevel() >= 78: + actor.addAbility("en_project_will_5") + if actor.getLevel() >= 90: + actor.addAbility("en_project_will_6") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_project_will_0") + actor.removeAbility("en_project_will_1") + actor.removeAbility("en_project_will_2") + actor.removeAbility("en_project_will_3") + actor.removeAbility("en_project_will_4") + actor.removeAbility("en_project_will_5") + actor.removeAbility("en_project_will_6") + return diff --git a/scripts/expertise/expertise_en_rising_spirit_1.py b/scripts/expertise/expertise_en_rising_spirit_1.py index d98b7f8f..a2fda212 100644 --- a/scripts/expertise/expertise_en_rising_spirit_1.py +++ b/scripts/expertise/expertise_en_rising_spirit_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_rising_spirit_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_rising_spirit_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_rising_spirit_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_rising_spirit_1") + return diff --git a/scripts/expertise/expertise_en_rising_spirit_2.py b/scripts/expertise/expertise_en_rising_spirit_2.py index fa2aa7ce..c7bafd45 100644 --- a/scripts/expertise/expertise_en_rising_spirit_2.py +++ b/scripts/expertise/expertise_en_rising_spirit_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_rising_spirit_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_rising_spirit_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_rising_spirit_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_rising_spirit_2") + return diff --git a/scripts/expertise/expertise_en_rising_spirit_3.py b/scripts/expertise/expertise_en_rising_spirit_3.py index d0a67d1a..05f1324e 100644 --- a/scripts/expertise/expertise_en_rising_spirit_3.py +++ b/scripts/expertise/expertise_en_rising_spirit_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_rising_spirit_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_rising_spirit_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_rising_spirit_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_rising_spirit_3") + return diff --git a/scripts/expertise/expertise_en_rising_spirit_4.py b/scripts/expertise/expertise_en_rising_spirit_4.py index 6ba514c8..3deb8a46 100644 --- a/scripts/expertise/expertise_en_rising_spirit_4.py +++ b/scripts/expertise/expertise_en_rising_spirit_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_rising_spirit_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_rising_spirit_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_rising_spirit_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_rising_spirit_4") + return diff --git a/scripts/expertise/expertise_en_second_chance_1.py b/scripts/expertise/expertise_en_second_chance_1.py index d2b9b7a8..ae7e08ae 100644 --- a/scripts/expertise/expertise_en_second_chance_1.py +++ b/scripts/expertise/expertise_en_second_chance_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_second_chance_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_second_chance_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_second_chance_buff_package") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_second_chance_buff_package") + return diff --git a/scripts/expertise/expertise_en_show_stopper_1.py b/scripts/expertise/expertise_en_show_stopper_1.py index d16d5dd9..bb347a8e 100644 --- a/scripts/expertise/expertise_en_show_stopper_1.py +++ b/scripts/expertise/expertise_en_show_stopper_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_show_stopper_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_show_stopper_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_show_stopper_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_show_stopper_1") + return diff --git a/scripts/expertise/expertise_en_show_stopper_2.py b/scripts/expertise/expertise_en_show_stopper_2.py index 7995274e..99493ec7 100644 --- a/scripts/expertise/expertise_en_show_stopper_2.py +++ b/scripts/expertise/expertise_en_show_stopper_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_show_stopper_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_show_stopper_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_show_stopper_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_show_stopper_2") + return diff --git a/scripts/expertise/expertise_en_show_stopper_3.py b/scripts/expertise/expertise_en_show_stopper_3.py index cde9ac57..4f70ff63 100644 --- a/scripts/expertise/expertise_en_show_stopper_3.py +++ b/scripts/expertise/expertise_en_show_stopper_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_show_stopper_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_show_stopper_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_show_stopper_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_show_stopper_3") + return diff --git a/scripts/expertise/expertise_en_spiral_kick_1.py b/scripts/expertise/expertise_en_spiral_kick_1.py index 57b6f98a..f369c1c0 100644 --- a/scripts/expertise/expertise_en_spiral_kick_1.py +++ b/scripts/expertise/expertise_en_spiral_kick_1.py @@ -1,42 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_spiral_kick_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_spiral_kick_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + if actor.getLevel() >= 34: + actor.addAbility("en_spiral_kick_0") + if actor.getLevel() >= 48: + actor.addAbility("en_spiral_kick_1") + if actor.getLevel() >= 62: + actor.addAbility("en_spiral_kick_2") + if actor.getLevel() >= 76: + actor.addAbility("en_spiral_kick_3") + if actor.getLevel() >= 90: + actor.addAbility("en_spiral_kick_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_spiral_kick_0") + actor.removeAbility("en_spiral_kick_1") + actor.removeAbility("en_spiral_kick_2") + actor.removeAbility("en_spiral_kick_3") + actor.removeAbility("en_spiral_kick_4") + return diff --git a/scripts/expertise/expertise_en_sprint_1.py b/scripts/expertise/expertise_en_sprint_1.py index 58f386ae..130650ef 100644 --- a/scripts/expertise/expertise_en_sprint_1.py +++ b/scripts/expertise/expertise_en_sprint_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_sprint_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_sprint_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_sprint_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_sprint_1") + return diff --git a/scripts/expertise/expertise_en_stage_presence_1.py b/scripts/expertise/expertise_en_stage_presence_1.py index 943fb62a..073086aa 100644 --- a/scripts/expertise/expertise_en_stage_presence_1.py +++ b/scripts/expertise/expertise_en_stage_presence_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_stage_presence_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_stage_presence_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_stage_presence_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_stage_presence_1") + return diff --git a/scripts/expertise/expertise_en_stage_presence_2.py b/scripts/expertise/expertise_en_stage_presence_2.py index 2e862dc8..95a28985 100644 --- a/scripts/expertise/expertise_en_stage_presence_2.py +++ b/scripts/expertise/expertise_en_stage_presence_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_stage_presence_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_stage_presence_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_stage_presence_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_stage_presence_2") + return diff --git a/scripts/expertise/expertise_en_stage_presence_3.py b/scripts/expertise/expertise_en_stage_presence_3.py index 39e69a2b..827f44ea 100644 --- a/scripts/expertise/expertise_en_stage_presence_3.py +++ b/scripts/expertise/expertise_en_stage_presence_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_stage_presence_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_stage_presence_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_stage_presence_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_stage_presence_3") + return diff --git a/scripts/expertise/expertise_en_strike_1.py b/scripts/expertise/expertise_en_strike_1.py index e50b3c7f..6e76a074 100644 --- a/scripts/expertise/expertise_en_strike_1.py +++ b/scripts/expertise/expertise_en_strike_1.py @@ -1,42 +1,28 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_strike_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_strike_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + if actor.getLevel() >= 10: + actor.addAbility("en_strike_0") + if actor.getLevel() >= 22: + actor.addAbility("en_strike_1") + if actor.getLevel() >= 34: + actor.addAbility("en_strike_2") + if actor.getLevel() >= 46: + actor.addAbility("en_strike_3") + if actor.getLevel() >= 58: + actor.addAbility("en_strike_4") + if actor.getLevel() >= 70: + actor.addAbility("en_strike_5") + if actor.getLevel() >= 82: + actor.addAbility("en_strike_6") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_strike_0") + actor.removeAbility("en_strike_1") + actor.removeAbility("en_strike_2") + actor.removeAbility("en_strike_3") + actor.removeAbility("en_strike_4") + actor.removeAbility("en_strike_5") + actor.removeAbility("en_strike_6") + return diff --git a/scripts/expertise/expertise_en_sweeping_pirouette_1.py b/scripts/expertise/expertise_en_sweeping_pirouette_1.py index a3d54841..906f27d2 100644 --- a/scripts/expertise/expertise_en_sweeping_pirouette_1.py +++ b/scripts/expertise/expertise_en_sweeping_pirouette_1.py @@ -1,42 +1,20 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_sweeping_pirouette_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_sweeping_pirouette_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + if actor.getLevel() >= 26: + actor.addAbility("en_sweeping_pirouette_0") + if actor.getLevel() >= 38: + actor.addAbility("en_sweeping_pirouette_1") + if actor.getLevel() >= 50: + actor.addAbility("en_sweeping_pirouette_2") + if actor.getLevel() >= 62: + actor.addAbility("en_sweeping_pirouette_3") + if actor.getLevel() >= 74: + actor.addAbility("en_sweeping_pirouette_4") + if actor.getLevel() >= 86: + actor.addAbility("en_sweeping_pirouette_5") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_sweeping_pirouette_0") + return diff --git a/scripts/expertise/expertise_en_thought_as_action_1.py b/scripts/expertise/expertise_en_thought_as_action_1.py index 4fb5717b..8d109903 100644 --- a/scripts/expertise/expertise_en_thought_as_action_1.py +++ b/scripts/expertise/expertise_en_thought_as_action_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_thought_as_action_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_thought_as_action_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_thought_as_action_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_thought_as_action_1") + return diff --git a/scripts/expertise/expertise_en_thought_as_action_2.py b/scripts/expertise/expertise_en_thought_as_action_2.py index f61ce96a..bd397576 100644 --- a/scripts/expertise/expertise_en_thought_as_action_2.py +++ b/scripts/expertise/expertise_en_thought_as_action_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_thought_as_action_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_thought_as_action_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_thought_as_action_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_thought_as_action_2") + return diff --git a/scripts/expertise/expertise_en_thought_as_action_3.py b/scripts/expertise/expertise_en_thought_as_action_3.py index a137de8c..abbee833 100644 --- a/scripts/expertise/expertise_en_thought_as_action_3.py +++ b/scripts/expertise/expertise_en_thought_as_action_3.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_thought_as_action_3') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_thought_as_action_3') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_thought_as_action_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_thought_as_action_3") + return diff --git a/scripts/expertise/expertise_en_thought_as_action_4.py b/scripts/expertise/expertise_en_thought_as_action_4.py index 4ff868cc..76958de5 100644 --- a/scripts/expertise/expertise_en_thought_as_action_4.py +++ b/scripts/expertise/expertise_en_thought_as_action_4.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_thought_as_action_4') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_thought_as_action_4') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_thought_as_action_4") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_thought_as_action_4") + return diff --git a/scripts/expertise/expertise_en_thrill_1.py b/scripts/expertise/expertise_en_thrill_1.py index cfd2e37d..82c68807 100644 --- a/scripts/expertise/expertise_en_thrill_1.py +++ b/scripts/expertise/expertise_en_thrill_1.py @@ -1,42 +1,16 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_thrill_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_thrill_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + if actor.getLevel() >= 10: + actor.addAbility("en_thrill") + if actor.getLevel() >= 34: + actor.addAbility("en_thrill_1") + if actor.getLevel() >= 62: + actor.addAbility("en_thrill_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_thrill") + actor.removeAbility("en_thrill_1") + actor.removeAbility("en_thrill_2") + return diff --git a/scripts/expertise/expertise_en_to_the_hilt_1.py b/scripts/expertise/expertise_en_to_the_hilt_1.py index 7c6c8b8c..18db5e7d 100644 --- a/scripts/expertise/expertise_en_to_the_hilt_1.py +++ b/scripts/expertise/expertise_en_to_the_hilt_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_to_the_hilt_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_to_the_hilt_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_to_the_hilt_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_to_the_hilt_1") + return diff --git a/scripts/expertise/expertise_en_to_the_hilt_2.py b/scripts/expertise/expertise_en_to_the_hilt_2.py index 6cf27a28..5546a211 100644 --- a/scripts/expertise/expertise_en_to_the_hilt_2.py +++ b/scripts/expertise/expertise_en_to_the_hilt_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_to_the_hilt_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_to_the_hilt_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_to_the_hilt_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_to_the_hilt_2") + return diff --git a/scripts/expertise/expertise_en_unhealthy_fixation_1.py b/scripts/expertise/expertise_en_unhealthy_fixation_1.py index d3b59676..2e2a2f30 100644 --- a/scripts/expertise/expertise_en_unhealthy_fixation_1.py +++ b/scripts/expertise/expertise_en_unhealthy_fixation_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_unhealthy_fixation_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_unhealthy_fixation_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("en_unhealthy_fixation") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_unhealthy_fixation") + return diff --git a/scripts/expertise/expertise_en_uprising_1.py b/scripts/expertise/expertise_en_uprising_1.py index 1094d783..dc55de01 100644 --- a/scripts/expertise/expertise_en_uprising_1.py +++ b/scripts/expertise/expertise_en_uprising_1.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_uprising_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_uprising_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_uprising_1") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_uprising_1") + return diff --git a/scripts/expertise/expertise_en_uprising_2.py b/scripts/expertise/expertise_en_uprising_2.py index e20bc8e6..5540f85b 100644 --- a/scripts/expertise/expertise_en_uprising_2.py +++ b/scripts/expertise/expertise_en_uprising_2.py @@ -1,42 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_uprising_2') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_uprising_2') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + actor.addAbility("expertise_en_uprising_2") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("expertise_en_uprising_2") + return diff --git a/scripts/expertise/expertise_en_void_dance_1.py b/scripts/expertise/expertise_en_void_dance_1.py index bbd46c9c..7127a2c4 100644 --- a/scripts/expertise/expertise_en_void_dance_1.py +++ b/scripts/expertise/expertise_en_void_dance_1.py @@ -1,42 +1,16 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.addSkill('expertise_en_void_dance_1') - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'entertainer_1a': - return - - actor.removeSkill('expertise_en_void_dance_1') - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - return + if actor.getLevel() >= 10: + actor.addAbility("en_void_dance_1") + if actor.getLevel() >= 34: + actor.addAbility("en_void_dance_2") + if actor.getLevel() >= 62: + actor.addAbility("en_void_dance_3") + return def removeAbilities(core, actor, player): - - return - + actor.removeAbility("en_void_dance_1") + actor.removeAbility("en_void_dance_2") + actor.removeAbility("en_void_dance_3") + return diff --git a/scripts/expertise/expertise_engineering_artisan_advanced_theory_1.py b/scripts/expertise/expertise_engineering_artisan_advanced_theory_1.py index aaf17d68..bd6b7454 100644 --- a/scripts/expertise/expertise_engineering_artisan_advanced_theory_1.py +++ b/scripts/expertise/expertise_engineering_artisan_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_advanced_theory_1') - - actor.addSkillMod('general_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_advanced_theory_1') - - actor.removeSkillMod('general_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_advanced_theory_1") return diff --git a/scripts/expertise/expertise_engineering_artisan_dexterity_1.py b/scripts/expertise/expertise_engineering_artisan_dexterity_1.py index 1f4d7860..3e103c16 100644 --- a/scripts/expertise/expertise_engineering_artisan_dexterity_1.py +++ b/scripts/expertise/expertise_engineering_artisan_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_dexterity_1') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_dexterity_1') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_dexterity_1") return diff --git a/scripts/expertise/expertise_engineering_artisan_dexterity_2.py b/scripts/expertise/expertise_engineering_artisan_dexterity_2.py index 28cff05e..50edc60b 100644 --- a/scripts/expertise/expertise_engineering_artisan_dexterity_2.py +++ b/scripts/expertise/expertise_engineering_artisan_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_dexterity_2') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_dexterity_2') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_dexterity_2") return diff --git a/scripts/expertise/expertise_engineering_artisan_dexterity_3.py b/scripts/expertise/expertise_engineering_artisan_dexterity_3.py index 11e3b091..0cd8c37e 100644 --- a/scripts/expertise/expertise_engineering_artisan_dexterity_3.py +++ b/scripts/expertise/expertise_engineering_artisan_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_dexterity_3') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_dexterity_3') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_dexterity_3") return diff --git a/scripts/expertise/expertise_engineering_artisan_dexterity_4.py b/scripts/expertise/expertise_engineering_artisan_dexterity_4.py index ae8bab3f..34c64977 100644 --- a/scripts/expertise/expertise_engineering_artisan_dexterity_4.py +++ b/scripts/expertise/expertise_engineering_artisan_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_dexterity_4') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_dexterity_4') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_dexterity_4") return diff --git a/scripts/expertise/expertise_engineering_artisan_hypothesis_1.py b/scripts/expertise/expertise_engineering_artisan_hypothesis_1.py index eb7b0aa0..c2daa093 100644 --- a/scripts/expertise/expertise_engineering_artisan_hypothesis_1.py +++ b/scripts/expertise/expertise_engineering_artisan_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_hypothesis_1") return diff --git a/scripts/expertise/expertise_engineering_artisan_hypothesis_2.py b/scripts/expertise/expertise_engineering_artisan_hypothesis_2.py index 14e79abd..96592a1b 100644 --- a/scripts/expertise/expertise_engineering_artisan_hypothesis_2.py +++ b/scripts/expertise/expertise_engineering_artisan_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_hypothesis_2") return diff --git a/scripts/expertise/expertise_engineering_artisan_hypothesis_3.py b/scripts/expertise/expertise_engineering_artisan_hypothesis_3.py index 29b90722..e4f6a8b1 100644 --- a/scripts/expertise/expertise_engineering_artisan_hypothesis_3.py +++ b/scripts/expertise/expertise_engineering_artisan_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_hypothesis_3") return diff --git a/scripts/expertise/expertise_engineering_artisan_hypothesis_4.py b/scripts/expertise/expertise_engineering_artisan_hypothesis_4.py index 1ffb1f9a..95f93fbd 100644 --- a/scripts/expertise/expertise_engineering_artisan_hypothesis_4.py +++ b/scripts/expertise/expertise_engineering_artisan_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_artisan_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_artisan_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_artisan_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_artisan_hypothesis_4") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_advanced_theory_1.py b/scripts/expertise/expertise_engineering_cybernetic_advanced_theory_1.py index 2a99c79f..e7cf240d 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_advanced_theory_1.py +++ b/scripts/expertise/expertise_engineering_cybernetic_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_advanced_theory_1') - - actor.addSkillMod('cybernetic_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_advanced_theory_1') - - actor.removeSkillMod('cybernetic_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_advanced_theory_1") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_1.py b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_1.py index a23e203d..bbf9682e 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_1.py +++ b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_cybernetic', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_cybernetic', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_hypothesis_1") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_2.py b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_2.py index 017890cd..6c7d6b20 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_2.py +++ b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_cybernetic', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_cybernetic', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_hypothesis_2") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_3.py b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_3.py index adef4cc9..fc963038 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_3.py +++ b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_cybernetic', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_cybernetic', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_hypothesis_3") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_4.py b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_4.py index 85aab1da..4f15a6d8 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_hypothesis_4.py +++ b/scripts/expertise/expertise_engineering_cybernetic_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_cybernetic', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_cybernetic', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_hypothesis_4") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_1.py b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_1.py index 1a6c2b4e..658dd7df 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_1.py +++ b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_negative_effects_reduction_1') - - actor.addSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_negative_effects_reduction_1') - - actor.removeSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_negative_effects_reduction_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_negative_effects_reduction_1") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_2.py b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_2.py index 52dfd22b..d04160b0 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_2.py +++ b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_negative_effects_reduction_2') - - actor.addSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_negative_effects_reduction_2') - - actor.removeSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_negative_effects_reduction_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_negative_effects_reduction_2") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_3.py b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_3.py index eb2c7532..9c98e65b 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_3.py +++ b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_negative_effects_reduction_3') - - actor.addSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_negative_effects_reduction_3') - - actor.removeSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_negative_effects_reduction_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_negative_effects_reduction_3") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_4.py b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_4.py index da6d8d56..93bd0c81 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_4.py +++ b/scripts/expertise/expertise_engineering_cybernetic_negative_effects_reduction_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_negative_effects_reduction_4') - - actor.addSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_negative_effects_reduction_4') - - actor.removeSkillMod('expertise_cybernetic_negative_effects_reduction', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_negative_effects_reduction_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_negative_effects_reduction_4") return diff --git a/scripts/expertise/expertise_engineering_cybernetic_s03_schematics_1.py b/scripts/expertise/expertise_engineering_cybernetic_s03_schematics_1.py index f20459ec..59dacda7 100644 --- a/scripts/expertise/expertise_engineering_cybernetic_s03_schematics_1.py +++ b/scripts/expertise/expertise_engineering_cybernetic_s03_schematics_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_cybernetic_s03_schematics_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_cybernetic_s03_schematics_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_cybernetic_s03_schematics_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_cybernetic_s03_schematics_1") return diff --git a/scripts/expertise/expertise_engineering_droid_advanced_theory_1.py b/scripts/expertise/expertise_engineering_droid_advanced_theory_1.py index 36c97c2d..8435fcae 100644 --- a/scripts/expertise/expertise_engineering_droid_advanced_theory_1.py +++ b/scripts/expertise/expertise_engineering_droid_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_advanced_theory_1') - - actor.addSkillMod('droid_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_advanced_theory_1') - - actor.removeSkillMod('droid_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_advanced_theory_1") return diff --git a/scripts/expertise/expertise_engineering_droid_dexterity_1.py b/scripts/expertise/expertise_engineering_droid_dexterity_1.py index 4195d6b0..58da3ce9 100644 --- a/scripts/expertise/expertise_engineering_droid_dexterity_1.py +++ b/scripts/expertise/expertise_engineering_droid_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_dexterity_1') - - actor.addSkillMod('droid_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_dexterity_1') - - actor.removeSkillMod('droid_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_dexterity_1") return diff --git a/scripts/expertise/expertise_engineering_droid_dexterity_2.py b/scripts/expertise/expertise_engineering_droid_dexterity_2.py index 53052f6a..5608862f 100644 --- a/scripts/expertise/expertise_engineering_droid_dexterity_2.py +++ b/scripts/expertise/expertise_engineering_droid_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_dexterity_2') - - actor.addSkillMod('droid_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_dexterity_2') - - actor.removeSkillMod('droid_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_dexterity_2") return diff --git a/scripts/expertise/expertise_engineering_droid_dexterity_3.py b/scripts/expertise/expertise_engineering_droid_dexterity_3.py index 438fbf7c..a5f8e6df 100644 --- a/scripts/expertise/expertise_engineering_droid_dexterity_3.py +++ b/scripts/expertise/expertise_engineering_droid_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_dexterity_3') - - actor.addSkillMod('droid_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_dexterity_3') - - actor.removeSkillMod('droid_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_dexterity_3") return diff --git a/scripts/expertise/expertise_engineering_droid_dexterity_4.py b/scripts/expertise/expertise_engineering_droid_dexterity_4.py index 6547a684..ce65339b 100644 --- a/scripts/expertise/expertise_engineering_droid_dexterity_4.py +++ b/scripts/expertise/expertise_engineering_droid_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_dexterity_4') - - actor.addSkillMod('droid_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_dexterity_4') - - actor.removeSkillMod('droid_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_dexterity_4") return diff --git a/scripts/expertise/expertise_engineering_droid_hypothesis_1.py b/scripts/expertise/expertise_engineering_droid_hypothesis_1.py index a57e47ed..71ad763c 100644 --- a/scripts/expertise/expertise_engineering_droid_hypothesis_1.py +++ b/scripts/expertise/expertise_engineering_droid_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_droid', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_droid', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_hypothesis_1") return diff --git a/scripts/expertise/expertise_engineering_droid_hypothesis_2.py b/scripts/expertise/expertise_engineering_droid_hypothesis_2.py index 4658c156..56645f9b 100644 --- a/scripts/expertise/expertise_engineering_droid_hypothesis_2.py +++ b/scripts/expertise/expertise_engineering_droid_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_droid', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_droid', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_hypothesis_2") return diff --git a/scripts/expertise/expertise_engineering_droid_hypothesis_3.py b/scripts/expertise/expertise_engineering_droid_hypothesis_3.py index 3f8a59a1..dc413239 100644 --- a/scripts/expertise/expertise_engineering_droid_hypothesis_3.py +++ b/scripts/expertise/expertise_engineering_droid_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_droid', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_droid', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_hypothesis_3") return diff --git a/scripts/expertise/expertise_engineering_droid_hypothesis_4.py b/scripts/expertise/expertise_engineering_droid_hypothesis_4.py index fc794c58..7b5af620 100644 --- a/scripts/expertise/expertise_engineering_droid_hypothesis_4.py +++ b/scripts/expertise/expertise_engineering_droid_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_droid', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_droid', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_hypothesis_4") return diff --git a/scripts/expertise/expertise_engineering_droid_insight_1.py b/scripts/expertise/expertise_engineering_droid_insight_1.py index afb13261..6209cf4e 100644 --- a/scripts/expertise/expertise_engineering_droid_insight_1.py +++ b/scripts/expertise/expertise_engineering_droid_insight_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_insight_1') - - actor.addSkillMod('expertise_complexity_decrease_droid', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_insight_1') - - actor.removeSkillMod('expertise_complexity_decrease_droid', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_insight_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_insight_1") return diff --git a/scripts/expertise/expertise_engineering_droid_insight_2.py b/scripts/expertise/expertise_engineering_droid_insight_2.py index 9a3ccca5..cfd7d326 100644 --- a/scripts/expertise/expertise_engineering_droid_insight_2.py +++ b/scripts/expertise/expertise_engineering_droid_insight_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_insight_2') - - actor.addSkillMod('expertise_complexity_decrease_droid', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_insight_2') - - actor.removeSkillMod('expertise_complexity_decrease_droid', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_insight_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_insight_2") return diff --git a/scripts/expertise/expertise_engineering_droid_keen_understanding_1.py b/scripts/expertise/expertise_engineering_droid_keen_understanding_1.py index e47da182..471b9cf0 100644 --- a/scripts/expertise/expertise_engineering_droid_keen_understanding_1.py +++ b/scripts/expertise/expertise_engineering_droid_keen_understanding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_keen_understanding_1') - - actor.addSkillMod('expertise_complexity_decrease_droid', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_keen_understanding_1') - - actor.removeSkillMod('expertise_complexity_decrease_droid', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_keen_understanding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_keen_understanding_1") return diff --git a/scripts/expertise/expertise_engineering_droid_keen_understanding_2.py b/scripts/expertise/expertise_engineering_droid_keen_understanding_2.py index 5cd3dd65..c7bd1ede 100644 --- a/scripts/expertise/expertise_engineering_droid_keen_understanding_2.py +++ b/scripts/expertise/expertise_engineering_droid_keen_understanding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_keen_understanding_2') - - actor.addSkillMod('expertise_complexity_decrease_droid', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_keen_understanding_2') - - actor.removeSkillMod('expertise_complexity_decrease_droid', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_keen_understanding_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_keen_understanding_2") return diff --git a/scripts/expertise/expertise_engineering_droid_schematic_1_1.py b/scripts/expertise/expertise_engineering_droid_schematic_1_1.py index 6340cdd7..c9a0234c 100644 --- a/scripts/expertise/expertise_engineering_droid_schematic_1_1.py +++ b/scripts/expertise/expertise_engineering_droid_schematic_1_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_schematic_1_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_schematic_1_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_schematic_1_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_schematic_1_1") return diff --git a/scripts/expertise/expertise_engineering_droid_schematic_2_1.py b/scripts/expertise/expertise_engineering_droid_schematic_2_1.py index 9ade7f61..c7e1a68f 100644 --- a/scripts/expertise/expertise_engineering_droid_schematic_2_1.py +++ b/scripts/expertise/expertise_engineering_droid_schematic_2_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_droid_schematic_2_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_droid_schematic_2_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_droid_schematic_2_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_droid_schematic_2_1") return diff --git a/scripts/expertise/expertise_engineering_resource_processing_1.py b/scripts/expertise/expertise_engineering_resource_processing_1.py index 6c8953a7..38aa0595 100644 --- a/scripts/expertise/expertise_engineering_resource_processing_1.py +++ b/scripts/expertise/expertise_engineering_resource_processing_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_resource_processing_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_resource_processing_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_resource_processing_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_resource_processing_1") return diff --git a/scripts/expertise/expertise_engineering_resource_processing_2.py b/scripts/expertise/expertise_engineering_resource_processing_2.py index e0d9b8cf..0e561add 100644 --- a/scripts/expertise/expertise_engineering_resource_processing_2.py +++ b/scripts/expertise/expertise_engineering_resource_processing_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_resource_processing_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_resource_processing_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_resource_processing_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_resource_processing_2") return diff --git a/scripts/expertise/expertise_engineering_resource_refinement_1.py b/scripts/expertise/expertise_engineering_resource_refinement_1.py index 635c1e44..476a968e 100644 --- a/scripts/expertise/expertise_engineering_resource_refinement_1.py +++ b/scripts/expertise/expertise_engineering_resource_refinement_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_resource_refinement_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_resource_refinement_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_resource_refinement_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_resource_refinement_1") return diff --git a/scripts/expertise/expertise_engineering_resource_refinement_2.py b/scripts/expertise/expertise_engineering_resource_refinement_2.py index 0246b71c..80b22ec3 100644 --- a/scripts/expertise/expertise_engineering_resource_refinement_2.py +++ b/scripts/expertise/expertise_engineering_resource_refinement_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_resource_refinement_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_resource_refinement_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_resource_refinement_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_resource_refinement_2") return diff --git a/scripts/expertise/expertise_engineering_weaponsmith_attachment_upgrade_1.py b/scripts/expertise/expertise_engineering_weaponsmith_attachment_upgrade_1.py index 8f59c85c..8045a598 100644 --- a/scripts/expertise/expertise_engineering_weaponsmith_attachment_upgrade_1.py +++ b/scripts/expertise/expertise_engineering_weaponsmith_attachment_upgrade_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_weaponsmith_attachment_upgrade_1') - - actor.addSkillMod('expertise_attachment_upgrade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_weaponsmith_attachment_upgrade_1') - - actor.removeSkillMod('expertise_attachment_upgrade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_weaponsmith_attachment_upgrade_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_weaponsmith_attachment_upgrade_1") return diff --git a/scripts/expertise/expertise_engineering_weaponsmith_socket_bonus_1.py b/scripts/expertise/expertise_engineering_weaponsmith_socket_bonus_1.py index ea4bbe96..7fbbb3d1 100644 --- a/scripts/expertise/expertise_engineering_weaponsmith_socket_bonus_1.py +++ b/scripts/expertise/expertise_engineering_weaponsmith_socket_bonus_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.addSkill('expertise_engineering_weaponsmith_socket_bonus_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_eng_1a': - return - - actor.removeSkill('expertise_engineering_weaponsmith_socket_bonus_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_engineering_weaponsmith_socket_bonus_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_engineering_weaponsmith_socket_bonus_1") return diff --git a/scripts/expertise/expertise_fs_general_alacrity_1.py b/scripts/expertise/expertise_fs_general_alacrity_1.py index b9f17633..b69a7bc6 100644 --- a/scripts/expertise/expertise_fs_general_alacrity_1.py +++ b/scripts/expertise/expertise_fs_general_alacrity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_alacrity_1') - - core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_alacrity_1') - - core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_alacrity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_alacrity_1") return diff --git a/scripts/expertise/expertise_fs_general_alacrity_2.py b/scripts/expertise/expertise_fs_general_alacrity_2.py index c1a3f4b0..3c5d3f66 100644 --- a/scripts/expertise/expertise_fs_general_alacrity_2.py +++ b/scripts/expertise/expertise_fs_general_alacrity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_alacrity_2') - - core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_alacrity_2') - - core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_alacrity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_alacrity_2") return diff --git a/scripts/expertise/expertise_fs_general_alacrity_3.py b/scripts/expertise/expertise_fs_general_alacrity_3.py index bf182038..58282db9 100644 --- a/scripts/expertise/expertise_fs_general_alacrity_3.py +++ b/scripts/expertise/expertise_fs_general_alacrity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_alacrity_3') - - core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_alacrity_3') - - core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_alacrity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_alacrity_3") return diff --git a/scripts/expertise/expertise_fs_general_alacrity_4.py b/scripts/expertise/expertise_fs_general_alacrity_4.py index 1c89b7dc..641990c1 100644 --- a/scripts/expertise/expertise_fs_general_alacrity_4.py +++ b/scripts/expertise/expertise_fs_general_alacrity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_alacrity_4') - - core.skillModService.addSkillMod(actor, 'expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_alacrity_4') - - core.skillModService.deductSkillMod(actor, 'expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_alacrity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_alacrity_4") return diff --git a/scripts/expertise/expertise_fs_general_enhanced_agility_1.py b/scripts/expertise/expertise_fs_general_enhanced_agility_1.py index 1ed244d3..b4133b1b 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_agility_1.py +++ b/scripts/expertise/expertise_fs_general_enhanced_agility_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_agility_1') - - core.skillModService.addSkillMod(actor, 'agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_agility_1') - - core.skillModService.deductSkillMod(actor, 'agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_agility_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_agility_1") return - diff --git a/scripts/expertise/expertise_fs_general_enhanced_agility_2.py b/scripts/expertise/expertise_fs_general_enhanced_agility_2.py index e9e90307..48301d52 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_agility_2.py +++ b/scripts/expertise/expertise_fs_general_enhanced_agility_2.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_agility_2') - - core.skillModService.addSkillMod(actor, 'agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_agility_2') - - core.skillModService.deductSkillMod(actor, 'agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_agility_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_agility_2") return - diff --git a/scripts/expertise/expertise_fs_general_enhanced_constitution_1.py b/scripts/expertise/expertise_fs_general_enhanced_constitution_1.py index 9db9e638..5521929c 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_constitution_1.py +++ b/scripts/expertise/expertise_fs_general_enhanced_constitution_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_constitution_1') - - core.skillModService.addSkillMod(actor, 'constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_constitution_1') - - core.skillModService.deductSkillMod(actor, 'constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_constitution_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_constitution_1") return - diff --git a/scripts/expertise/expertise_fs_general_enhanced_constitution_2.py b/scripts/expertise/expertise_fs_general_enhanced_constitution_2.py index 7dad3160..f800a526 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_constitution_2.py +++ b/scripts/expertise/expertise_fs_general_enhanced_constitution_2.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_constitution_2') - - core.skillModService.addSkillMod(actor, 'constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_constitution_2') - - core.skillModService.addSkillMod(actor, 'constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_constitution_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_constitution_2") return - diff --git a/scripts/expertise/expertise_fs_general_enhanced_stamina_1.py b/scripts/expertise/expertise_fs_general_enhanced_stamina_1.py index 7c760888..28be7fc3 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_stamina_1.py +++ b/scripts/expertise/expertise_fs_general_enhanced_stamina_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_stamina_1') - - core.skillModService.addSkillMod(actor, 'stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_stamina_1') - - core.skillModService.deductSkillMod(actor, 'stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_stamina_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_stamina_1") return - diff --git a/scripts/expertise/expertise_fs_general_enhanced_stamina_2.py b/scripts/expertise/expertise_fs_general_enhanced_stamina_2.py index 1dc31c3d..57ad1cd6 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_stamina_2.py +++ b/scripts/expertise/expertise_fs_general_enhanced_stamina_2.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_stamina_2') - - core.skillModService.addSkillMod(actor, 'stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_stamina_2') - - core.skillModService.deductSkillMod(actor, 'stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_stamina_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_stamina_2") return - diff --git a/scripts/expertise/expertise_fs_general_enhanced_strength_1.py b/scripts/expertise/expertise_fs_general_enhanced_strength_1.py index e4419423..881f9819 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_strength_1.py +++ b/scripts/expertise/expertise_fs_general_enhanced_strength_1.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_strength_1') - - core.skillModService.addSkillMod(actor, 'strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_strength_1') - - core.skillModService.deductSkillMod(actor, 'strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_strength_1") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_strength_1") return - diff --git a/scripts/expertise/expertise_fs_general_enhanced_strength_2.py b/scripts/expertise/expertise_fs_general_enhanced_strength_2.py index b5193a5f..fed1b59a 100644 --- a/scripts/expertise/expertise_fs_general_enhanced_strength_2.py +++ b/scripts/expertise/expertise_fs_general_enhanced_strength_2.py @@ -1,47 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_enhanced_strength_2') - - core.skillModService.addSkillMod(actor, 'strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_enhanced_strength_2') - - core.skillModService.deductSkillMod(actor, 'strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("expertise_fs_general_enhanced_strength_2") return def removeAbilities(core, actor, player): - + actor.removeAbility("expertise_fs_general_enhanced_strength_2") return - diff --git a/scripts/expertise/expertise_fs_general_exacting_strikes_1.py b/scripts/expertise/expertise_fs_general_exacting_strikes_1.py index 2236311e..91ea8275 100644 --- a/scripts/expertise/expertise_fs_general_exacting_strikes_1.py +++ b/scripts/expertise/expertise_fs_general_exacting_strikes_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_exacting_strikes_1') - - actor.addSkillMod('expertise_damage_line_fs_sweep', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_exacting_strikes_1') - - actor.removeSkillMod('expertise_damage_line_fs_sweep', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_exacting_strike_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_exacting_strike_1") return diff --git a/scripts/expertise/expertise_fs_general_exacting_strikes_2.py b/scripts/expertise/expertise_fs_general_exacting_strikes_2.py index 2b4161b2..c28e666c 100644 --- a/scripts/expertise/expertise_fs_general_exacting_strikes_2.py +++ b/scripts/expertise/expertise_fs_general_exacting_strikes_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_exacting_strikes_2') - - actor.addSkillMod('expertise_damage_line_fs_sweep', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_exacting_strikes_2') - - actor.removeSkillMod('expertise_damage_line_fs_sweep', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_exacting_strike_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_exacting_strike_2") return diff --git a/scripts/expertise/expertise_fs_general_exacting_strikes_3.py b/scripts/expertise/expertise_fs_general_exacting_strikes_3.py index cc542875..5e711192 100644 --- a/scripts/expertise/expertise_fs_general_exacting_strikes_3.py +++ b/scripts/expertise/expertise_fs_general_exacting_strikes_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_exacting_strikes_3') - - actor.addSkillMod('expertise_damage_line_fs_sweep', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_exacting_strikes_3') - - actor.removeSkillMod('expertise_damage_line_fs_sweep', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_exacting_strike_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_exacting_strike_3") return diff --git a/scripts/expertise/expertise_fs_general_exacting_strikes_4.py b/scripts/expertise/expertise_fs_general_exacting_strikes_4.py index 448389c0..86f573c0 100644 --- a/scripts/expertise/expertise_fs_general_exacting_strikes_4.py +++ b/scripts/expertise/expertise_fs_general_exacting_strikes_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_exacting_strikes_4') - - actor.addSkillMod('expertise_damage_line_fs_sweep', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_exacting_strikes_4') - - actor.removeSkillMod('expertise_damage_line_fs_sweep', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_exacting_strike_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_exacting_strike_4") return diff --git a/scripts/expertise/expertise_fs_general_fidelity_1.py b/scripts/expertise/expertise_fs_general_fidelity_1.py index 7e78aef6..9817071f 100644 --- a/scripts/expertise/expertise_fs_general_fidelity_1.py +++ b/scripts/expertise/expertise_fs_general_fidelity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_fidelity_1') - - core.skillModService.addSkillMod(actor, 'expertise_damage_melee', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_fidelity_1') - - core.skillModService.deductSkillMod(actor, 'expertise_damage_melee', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_fidelity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_fidelity_1") return diff --git a/scripts/expertise/expertise_fs_general_fidelity_2.py b/scripts/expertise/expertise_fs_general_fidelity_2.py index db68b4f5..19abb94c 100644 --- a/scripts/expertise/expertise_fs_general_fidelity_2.py +++ b/scripts/expertise/expertise_fs_general_fidelity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_fidelity_2') - - core.skillModService.addSkillMod(actor, 'expertise_damage_melee', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_fidelity_2') - - core.skillModService.deductSkillMod(actor, 'expertise_damage_melee', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_fidelity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_fidelity_2") return diff --git a/scripts/expertise/expertise_fs_general_force_cloak_1.py b/scripts/expertise/expertise_fs_general_force_cloak_1.py index fd748f6d..5f9fc9d4 100644 --- a/scripts/expertise/expertise_fs_general_force_cloak_1.py +++ b/scripts/expertise/expertise_fs_general_force_cloak_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_force_cloak_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_force_cloak_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_buff_invis_1') - + actor.addAbility("fs_buff_invis_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_buff_invis_1') - + actor.removeAbility("fs_buff_invis_1") return diff --git a/scripts/expertise/expertise_fs_general_force_shockwave_1.py b/scripts/expertise/expertise_fs_general_force_shockwave_1.py index 05f5873a..a17dbe47 100644 --- a/scripts/expertise/expertise_fs_general_force_shockwave_1.py +++ b/scripts/expertise/expertise_fs_general_force_shockwave_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_force_shockwave_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_force_shockwave_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_dm_cc_crit_1') - + if actor.getLevel() >= 26: + actor.addAbility("fs_dm_cc_crit_1") + if actor.getLevel() >= 34: + actor.addAbility("fs_dm_cc_crit_2") + if actor.getLevel() >= 48: + actor.addAbility("fs_dm_cc_crit_3") + if actor.getLevel() >= 62: + actor.addAbility("fs_dm_cc_crit_4") + if actor.getLevel() >= 76: + actor.addAbility("fs_dm_cc_crit_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_dm_cc_crit_1') - + actor.removeAbility("fs_dm_cc_crit_1") + actor.removeAbility("fs_dm_cc_crit_2") + actor.removeAbility("fs_dm_cc_crit_3") + actor.removeAbility("fs_dm_cc_crit_4") + actor.removeAbility("fs_dm_cc_crit_5") return diff --git a/scripts/expertise/expertise_fs_general_grace_in_motion_1.py b/scripts/expertise/expertise_fs_general_grace_in_motion_1.py index e2207030..1bc3e355 100644 --- a/scripts/expertise/expertise_fs_general_grace_in_motion_1.py +++ b/scripts/expertise/expertise_fs_general_grace_in_motion_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_grace_in_motion_1') - - actor.addSkillMod('expertise_action_lightsaber', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_grace_in_motion_1') - - actor.removeSkillMod('expertise_action_lightsaber', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_grace_in_motion_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_grace_in_motion_1") return diff --git a/scripts/expertise/expertise_fs_general_grace_in_motion_2.py b/scripts/expertise/expertise_fs_general_grace_in_motion_2.py index 9b520c39..fa2a708a 100644 --- a/scripts/expertise/expertise_fs_general_grace_in_motion_2.py +++ b/scripts/expertise/expertise_fs_general_grace_in_motion_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_grace_in_motion_2') - - actor.addSkillMod('expertise_action_lightsaber', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_grace_in_motion_2') - - actor.removeSkillMod('expertise_action_lightsaber', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_grace_in_motion_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_grace_in_motion_2") return diff --git a/scripts/expertise/expertise_fs_general_grace_in_motion_3.py b/scripts/expertise/expertise_fs_general_grace_in_motion_3.py index acedaa7a..ea60fbe1 100644 --- a/scripts/expertise/expertise_fs_general_grace_in_motion_3.py +++ b/scripts/expertise/expertise_fs_general_grace_in_motion_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_grace_in_motion_3') - - actor.addSkillMod('expertise_action_lightsaber', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_grace_in_motion_3') - - actor.removeSkillMod('expertise_action_lightsaber', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_grace_in_motion_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_grace_in_motion_3") return diff --git a/scripts/expertise/expertise_fs_general_heightened_speed_1.py b/scripts/expertise/expertise_fs_general_heightened_speed_1.py index 1f410c98..aa3be1b3 100644 --- a/scripts/expertise/expertise_fs_general_heightened_speed_1.py +++ b/scripts/expertise/expertise_fs_general_heightened_speed_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_heightened_speed_1') - - actor.addSkillMod('expertise_movement_buff_fs_force_run', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_heightened_speed_1') - - actor.removeSkillMod('expertise_movement_buff_fs_force_run', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_heightened_speed_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_heightened_speed_1") return diff --git a/scripts/expertise/expertise_fs_general_heightened_speed_2.py b/scripts/expertise/expertise_fs_general_heightened_speed_2.py index 7aed8948..245c3478 100644 --- a/scripts/expertise/expertise_fs_general_heightened_speed_2.py +++ b/scripts/expertise/expertise_fs_general_heightened_speed_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_heightened_speed_2') - - actor.addSkillMod('expertise_movement_buff_fs_force_run', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_heightened_speed_2') - - actor.removeSkillMod('expertise_movement_buff_fs_force_run', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_heightened_speed_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_heightened_speed_2") return diff --git a/scripts/expertise/expertise_fs_general_heightened_speed_3.py b/scripts/expertise/expertise_fs_general_heightened_speed_3.py index 847e3c06..e5517964 100644 --- a/scripts/expertise/expertise_fs_general_heightened_speed_3.py +++ b/scripts/expertise/expertise_fs_general_heightened_speed_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_heightened_speed_3') - - actor.addSkillMod('expertise_movement_buff_fs_force_run', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_heightened_speed_3') - - actor.removeSkillMod('expertise_movement_buff_fs_force_run', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_heightened_speed_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_heightened_speed_3") return diff --git a/scripts/expertise/expertise_fs_general_heightened_speed_4.py b/scripts/expertise/expertise_fs_general_heightened_speed_4.py index 878c1750..e49ae9b4 100644 --- a/scripts/expertise/expertise_fs_general_heightened_speed_4.py +++ b/scripts/expertise/expertise_fs_general_heightened_speed_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_heightened_speed_4') - - actor.addSkillMod('expertise_movement_buff_fs_force_run', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_heightened_speed_4') - - actor.removeSkillMod('expertise_movement_buff_fs_force_run', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_heightened_speed_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_heightened_speed_4") return diff --git a/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_1.py b/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_1.py index 7339e6cf..16c4a122 100644 --- a/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_1.py +++ b/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_crippling_accuracy_1') - - actor.addSkillMod('expertise_buff_duration_line_fs_force_throw', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_crippling_accuracy_1') - - actor.removeSkillMod('expertise_buff_duration_line_fs_force_throw', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_crippling_accuracy_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_crippling_accuracy_1") return diff --git a/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_2.py b/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_2.py index 1535e2c6..1ca0b65b 100644 --- a/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_2.py +++ b/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_crippling_accuracy_2') - - actor.addSkillMod('expertise_buff_duration_line_fs_force_throw', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_crippling_accuracy_2') - - actor.removeSkillMod('expertise_buff_duration_line_fs_force_throw', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_crippling_accuracy_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_crippling_accuracy_2") return diff --git a/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_3.py b/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_3.py index fb5ffa62..51018497 100644 --- a/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_3.py +++ b/scripts/expertise/expertise_fs_general_improved_crippling_accuracy_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_crippling_accuracy_3') - - actor.addSkillMod('expertise_buff_duration_line_fs_force_throw', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_crippling_accuracy_3') - - actor.removeSkillMod('expertise_buff_duration_line_fs_force_throw', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_crippling_accuracy_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_crippling_accuracy_3") return diff --git a/scripts/expertise/expertise_fs_general_improved_force_cloak_1.py b/scripts/expertise/expertise_fs_general_improved_force_cloak_1.py index 29eb5f11..bd140591 100644 --- a/scripts/expertise/expertise_fs_general_improved_force_cloak_1.py +++ b/scripts/expertise/expertise_fs_general_improved_force_cloak_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_force_cloak_1') - - actor.addSkillMod('expertise_force_cloak_combat_escape', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_force_cloak_1') - - actor.removeSkillMod('expertise_force_cloak_combat_escape', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_force_cloak_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_force_cloak_1") return diff --git a/scripts/expertise/expertise_fs_general_improved_force_shockwave_1.py b/scripts/expertise/expertise_fs_general_improved_force_shockwave_1.py index 9eab98c3..0c675358 100644 --- a/scripts/expertise/expertise_fs_general_improved_force_shockwave_1.py +++ b/scripts/expertise/expertise_fs_general_improved_force_shockwave_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_force_shockwave_1') - - actor.addSkillMod('expertise_damage_line_fs_cc_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_force_shockwave_1') - - actor.removeSkillMod('expertise_damage_line_fs_cc_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_force_shockwave_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_force_shockwave_1") return diff --git a/scripts/expertise/expertise_fs_general_improved_force_shockwave_2.py b/scripts/expertise/expertise_fs_general_improved_force_shockwave_2.py index f51b5f9e..e47b87b3 100644 --- a/scripts/expertise/expertise_fs_general_improved_force_shockwave_2.py +++ b/scripts/expertise/expertise_fs_general_improved_force_shockwave_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_force_shockwave_2') - - actor.addSkillMod('expertise_damage_line_fs_cc_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_force_shockwave_2') - - actor.removeSkillMod('expertise_damage_line_fs_cc_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_force_shockwave_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_force_shockwave_2") return diff --git a/scripts/expertise/expertise_fs_general_improved_force_shockwave_3.py b/scripts/expertise/expertise_fs_general_improved_force_shockwave_3.py index 85d26f98..c7293502 100644 --- a/scripts/expertise/expertise_fs_general_improved_force_shockwave_3.py +++ b/scripts/expertise/expertise_fs_general_improved_force_shockwave_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_force_shockwave_3') - - actor.addSkillMod('expertise_damage_line_fs_cc_crit', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_force_shockwave_3') - - actor.removeSkillMod('expertise_damage_line_fs_cc_crit', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_force_shockwave_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_force_shockwave_3") return diff --git a/scripts/expertise/expertise_fs_general_improved_force_throw_1.py b/scripts/expertise/expertise_fs_general_improved_force_throw_1.py index 982a4921..07264c82 100644 --- a/scripts/expertise/expertise_fs_general_improved_force_throw_1.py +++ b/scripts/expertise/expertise_fs_general_improved_force_throw_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_force_throw_1') - - actor.addSkillMod('expertise_damage_line_fs_force_throw', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_force_throw_1') - - actor.removeSkillMod('expertise_damage_line_fs_force_throw', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_force_throw_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_force_throw_1") return diff --git a/scripts/expertise/expertise_fs_general_improved_force_throw_2.py b/scripts/expertise/expertise_fs_general_improved_force_throw_2.py index 303292ef..1d5d428b 100644 --- a/scripts/expertise/expertise_fs_general_improved_force_throw_2.py +++ b/scripts/expertise/expertise_fs_general_improved_force_throw_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_force_throw_2') - - actor.addSkillMod('expertise_damage_line_fs_force_throw', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_force_throw_2') - - actor.removeSkillMod('expertise_damage_line_fs_force_throw', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_force_throw_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_force_throw_2") return diff --git a/scripts/expertise/expertise_fs_general_improved_saber_block_1.py b/scripts/expertise/expertise_fs_general_improved_saber_block_1.py index 25d545c9..41596ad9 100644 --- a/scripts/expertise/expertise_fs_general_improved_saber_block_1.py +++ b/scripts/expertise/expertise_fs_general_improved_saber_block_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_saber_block_1') - - actor.addSkillMod('expertise_saber_block', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_saber_block_1') - - actor.removeSkillMod('expertise_saber_block', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_saber_block_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_saber_block_1") return diff --git a/scripts/expertise/expertise_fs_general_improved_saber_block_2.py b/scripts/expertise/expertise_fs_general_improved_saber_block_2.py index 066a2128..abc2f012 100644 --- a/scripts/expertise/expertise_fs_general_improved_saber_block_2.py +++ b/scripts/expertise/expertise_fs_general_improved_saber_block_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_saber_block_2') - - actor.addSkillMod('expertise_saber_block', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_saber_block_2') - - actor.removeSkillMod('expertise_saber_block', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_saber_block_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_saber_block_2") return diff --git a/scripts/expertise/expertise_fs_general_improved_saber_block_3.py b/scripts/expertise/expertise_fs_general_improved_saber_block_3.py index 75e6e32b..37892890 100644 --- a/scripts/expertise/expertise_fs_general_improved_saber_block_3.py +++ b/scripts/expertise/expertise_fs_general_improved_saber_block_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_improved_saber_block_3') - - actor.addSkillMod('expertise_saber_block', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_improved_saber_block_3') - - actor.removeSkillMod('expertise_saber_block', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_improved_saber_block_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_improved_saber_block_3") return diff --git a/scripts/expertise/expertise_fs_general_incisiveness_1.py b/scripts/expertise/expertise_fs_general_incisiveness_1.py index 9e171eca..b872f06e 100644 --- a/scripts/expertise/expertise_fs_general_incisiveness_1.py +++ b/scripts/expertise/expertise_fs_general_incisiveness_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_incisiveness_1') - - core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_incisiveness_1') - - core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_incisiveness_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_incisiveness_1") return diff --git a/scripts/expertise/expertise_fs_general_incisiveness_2.py b/scripts/expertise/expertise_fs_general_incisiveness_2.py index 97a54475..7d397ae3 100644 --- a/scripts/expertise/expertise_fs_general_incisiveness_2.py +++ b/scripts/expertise/expertise_fs_general_incisiveness_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_incisiveness_2') - - core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_incisiveness_2') - - core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_incisiveness_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_incisiveness_2") return diff --git a/scripts/expertise/expertise_fs_general_incisiveness_3.py b/scripts/expertise/expertise_fs_general_incisiveness_3.py index 773b7bee..58ea449d 100644 --- a/scripts/expertise/expertise_fs_general_incisiveness_3.py +++ b/scripts/expertise/expertise_fs_general_incisiveness_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_incisiveness_3') - - core.skillModService.addSkillMod(actor, 'expertise_critical_niche_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_incisiveness_3') - - core.skillModService.deductSkillMod(actor, 'expertise_critical_niche_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_incisiveness_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_incisiveness_3") return diff --git a/scripts/expertise/expertise_fs_general_premonition_1.py b/scripts/expertise/expertise_fs_general_premonition_1.py index 95553815..c5510629 100644 --- a/scripts/expertise/expertise_fs_general_premonition_1.py +++ b/scripts/expertise/expertise_fs_general_premonition_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_premonition_1') - - core.skillModService.addSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.addSkillMod(actor, 'expertise_evasion_value', 8) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_premonition_1') - - core.skillModService.deductSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.deductSkillMod(actor, 'expertise_evasion_value', 8) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_premonition_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_premonition_1") return diff --git a/scripts/expertise/expertise_fs_general_premonition_2.py b/scripts/expertise/expertise_fs_general_premonition_2.py index 329f1496..ac6cbe24 100644 --- a/scripts/expertise/expertise_fs_general_premonition_2.py +++ b/scripts/expertise/expertise_fs_general_premonition_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_premonition_2') - - core.skillModService.addSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.addSkillMod(actor, 'expertise_evasion_value', 8) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_premonition_2') - - core.skillModService.deductSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.deductSkillMod(actor, 'expertise_evasion_value', 8) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_premonition_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_premonition_2") return diff --git a/scripts/expertise/expertise_fs_general_premonition_3.py b/scripts/expertise/expertise_fs_general_premonition_3.py index 7c1ae35e..4bfaf6eb 100644 --- a/scripts/expertise/expertise_fs_general_premonition_3.py +++ b/scripts/expertise/expertise_fs_general_premonition_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_premonition_3') - - core.skillModService.addSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.addSkillMod(actor, 'expertise_evasion_value', 8) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_premonition_3') - - core.skillModService.deductSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.deductSkillMod(actor, 'expertise_evasion_value', 8) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_premonition_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_premonition_3") return diff --git a/scripts/expertise/expertise_fs_general_premonition_4.py b/scripts/expertise/expertise_fs_general_premonition_4.py index ffc6fe53..751255e1 100644 --- a/scripts/expertise/expertise_fs_general_premonition_4.py +++ b/scripts/expertise/expertise_fs_general_premonition_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_premonition_4') - - core.skillModService.addSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.addSkillMod(actor, 'expertise_evasion_value', 8) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_premonition_4') - - core.skillModService.deductSkillMod(actor, 'expertise_evasion_chance', 2) - core.skillModService.deductSkillMod(actor, 'expertise_evasion_value', 8) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_premonition_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_premonition_4") return diff --git a/scripts/expertise/expertise_fs_general_second_wind_1.py b/scripts/expertise/expertise_fs_general_second_wind_1.py index e2bf66c3..90120855 100644 --- a/scripts/expertise/expertise_fs_general_second_wind_1.py +++ b/scripts/expertise/expertise_fs_general_second_wind_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_second_wind_1') - - actor.addSkillMod('expertise_buff_duration_line_fs_force_run', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_second_wind_1') - - actor.removeSkillMod('expertise_buff_duration_line_fs_force_run', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_second_wind_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_second_wind_1") return diff --git a/scripts/expertise/expertise_fs_general_second_wind_2.py b/scripts/expertise/expertise_fs_general_second_wind_2.py index ed634e1a..5dc1cf7a 100644 --- a/scripts/expertise/expertise_fs_general_second_wind_2.py +++ b/scripts/expertise/expertise_fs_general_second_wind_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_second_wind_2') - - actor.addSkillMod('expertise_buff_duration_line_fs_force_run', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_second_wind_2') - - actor.removeSkillMod('expertise_buff_duration_line_fs_force_run', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_general_second_wind_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_general_second_wind_2") return diff --git a/scripts/expertise/expertise_fs_general_stance_saber_block_1.py b/scripts/expertise/expertise_fs_general_stance_saber_block_1.py index 15799877..01313e59 100644 --- a/scripts/expertise/expertise_fs_general_stance_saber_block_1.py +++ b/scripts/expertise/expertise_fs_general_stance_saber_block_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_general_stance_saber_block_1') - - actor.addSkillMod('display_only_parry', 1000) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_general_stance_saber_block_1') - - actor.removeSkillMod('display_only_parry', 1000) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + actor.addAbility("saberBlock") return def removeAbilities(core, actor, player): - + actor.removeAbility("saberBlock") return diff --git a/scripts/expertise/expertise_fs_path_anticipate_aggression_1.py b/scripts/expertise/expertise_fs_path_anticipate_aggression_1.py index ab29d84c..ac447738 100644 --- a/scripts/expertise/expertise_fs_path_anticipate_aggression_1.py +++ b/scripts/expertise/expertise_fs_path_anticipate_aggression_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_anticipate_aggression_1') - - actor.addSkillMod('expertise_stance_anticipate_aggression', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_anticipate_aggression_1') - - actor.removeSkillMod('expertise_stance_anticipate_aggression', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_anticipate_aggression_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_anticipate_aggression_1") return diff --git a/scripts/expertise/expertise_fs_path_anticipate_aggression_2.py b/scripts/expertise/expertise_fs_path_anticipate_aggression_2.py index 89805eca..da421e8b 100644 --- a/scripts/expertise/expertise_fs_path_anticipate_aggression_2.py +++ b/scripts/expertise/expertise_fs_path_anticipate_aggression_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_anticipate_aggression_2') - - actor.addSkillMod('expertise_stance_anticipate_aggression', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_anticipate_aggression_2') - - actor.removeSkillMod('expertise_stance_anticipate_aggression', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_anticipate_aggression_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_anticipate_aggression_2") return diff --git a/scripts/expertise/expertise_fs_path_brutality_1.py b/scripts/expertise/expertise_fs_path_brutality_1.py index 2bddedf4..b583d402 100644 --- a/scripts/expertise/expertise_fs_path_brutality_1.py +++ b/scripts/expertise/expertise_fs_path_brutality_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_brutality_1') - - core.skillModService.addSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_brutality_1') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_brutality_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_brutality_1") return diff --git a/scripts/expertise/expertise_fs_path_brutality_2.py b/scripts/expertise/expertise_fs_path_brutality_2.py index 56aa4679..06c05ccd 100644 --- a/scripts/expertise/expertise_fs_path_brutality_2.py +++ b/scripts/expertise/expertise_fs_path_brutality_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_brutality_2') - - core.skillModService.addSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_brutality_2') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_brutality_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_brutality_2") return diff --git a/scripts/expertise/expertise_fs_path_brutality_3.py b/scripts/expertise/expertise_fs_path_brutality_3.py index ae385f2c..63954836 100644 --- a/scripts/expertise/expertise_fs_path_brutality_3.py +++ b/scripts/expertise/expertise_fs_path_brutality_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_brutality_3') - - core.skillModService.addSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_brutality_3') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_brutality_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_brutality_3") return diff --git a/scripts/expertise/expertise_fs_path_brutality_4.py b/scripts/expertise/expertise_fs_path_brutality_4.py index 7170710f..c922074e 100644 --- a/scripts/expertise/expertise_fs_path_brutality_4.py +++ b/scripts/expertise/expertise_fs_path_brutality_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_brutality_4') - - core.skillModService.addSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_brutality_4') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_critical_buff_line', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_brutality_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_brutality_4") return diff --git a/scripts/expertise/expertise_fs_path_cautious_nature_1.py b/scripts/expertise/expertise_fs_path_cautious_nature_1.py index 84c462c0..d4d90133 100644 --- a/scripts/expertise/expertise_fs_path_cautious_nature_1.py +++ b/scripts/expertise/expertise_fs_path_cautious_nature_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_cautious_nature_1') - - core.skillModService.addSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.addSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.addSkillMod(actor, 'expertise_stance_evasion', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_cautious_nature_1') - - core.skillModService.deductSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.deductSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.deductSkillMod(actor, 'expertise_stance_evasion', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_cautious_nature_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_cautious_nature_1") return diff --git a/scripts/expertise/expertise_fs_path_cautious_nature_2.py b/scripts/expertise/expertise_fs_path_cautious_nature_2.py index 42d67d98..112514fd 100644 --- a/scripts/expertise/expertise_fs_path_cautious_nature_2.py +++ b/scripts/expertise/expertise_fs_path_cautious_nature_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_cautious_nature_2') - - core.skillModService.addSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.addSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.addSkillMod(actor, 'expertise_stance_evasion', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_cautious_nature_2') - - core.skillModService.deductSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.deductSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.deductSkillMod(actor, 'expertise_stance_evasion', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_cautious_nature_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_cautious_nature_2") return diff --git a/scripts/expertise/expertise_fs_path_cautious_nature_3.py b/scripts/expertise/expertise_fs_path_cautious_nature_3.py index dfcc3c24..05183a16 100644 --- a/scripts/expertise/expertise_fs_path_cautious_nature_3.py +++ b/scripts/expertise/expertise_fs_path_cautious_nature_3.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_cautious_nature_3') - - core.skillModService.addSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.addSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.addSkillMod(actor, 'expertise_stance_evasion', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_cautious_nature_3') - - core.skillModService.deductSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.deductSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.deductSkillMod(actor, 'expertise_stance_evasion', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_cautious_nature_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_cautious_nature_3") return diff --git a/scripts/expertise/expertise_fs_path_cautious_nature_4.py b/scripts/expertise/expertise_fs_path_cautious_nature_4.py index fa3a2980..d5f122dd 100644 --- a/scripts/expertise/expertise_fs_path_cautious_nature_4.py +++ b/scripts/expertise/expertise_fs_path_cautious_nature_4.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_cautious_nature_4') - - core.skillModService.addSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.addSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.addSkillMod(actor, 'expertise_stance_evasion', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_cautious_nature_4') - - core.skillModService.deductSkillMod(actor, 'expertise_stance_constitution', 10) - core.skillModService.deductSkillMod(actor, 'expertise_stance_parry', 1) - core.skillModService.deductSkillMod(actor, 'expertise_stance_evasion', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_cautious_nature_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_cautious_nature_4") return diff --git a/scripts/expertise/expertise_fs_path_cloud_minds_1.py b/scripts/expertise/expertise_fs_path_cloud_minds_1.py index 6fa583aa..7b839729 100644 --- a/scripts/expertise/expertise_fs_path_cloud_minds_1.py +++ b/scripts/expertise/expertise_fs_path_cloud_minds_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_cloud_minds_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_cloud_minds_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_mind_trick_2') - + actor.addAbility("fs_mind_trick_2") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_mind_trick_2') - + actor.removeAbility("fs_mind_trick_2") return diff --git a/scripts/expertise/expertise_fs_path_dark_lightning_1.py b/scripts/expertise/expertise_fs_path_dark_lightning_1.py index 6bea7d3e..bd222493 100644 --- a/scripts/expertise/expertise_fs_path_dark_lightning_1.py +++ b/scripts/expertise/expertise_fs_path_dark_lightning_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_dark_lightning_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_dark_lightning_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_ae_dm_cc_1') - + if actor.getLevel() >= 26: + actor.addAbility("fs_ae_dm_cc_1") + if actor.getLevel() >= 34: + actor.addAbility("fs_ae_dm_cc_2") + if actor.getLevel() >= 48: + actor.addAbility("fs_ae_dm_cc_3") + if actor.getLevel() >= 62: + actor.addAbility("fs_ae_dm_cc_4") + if actor.getLevel() >= 76: + actor.addAbility("fs_ae_dm_cc_5") + if actor.getLevel() >= 90: + actor.addAbility("fs_ae_dm_cc_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_ae_dm_cc_1') - + actor.removeAbility("fs_ae_dm_cc_1") + actor.removeAbility("fs_ae_dm_cc_2") + actor.removeAbility("fs_ae_dm_cc_3") + actor.removeAbility("fs_ae_dm_cc_4") + actor.removeAbility("fs_ae_dm_cc_5") + actor.removeAbility("fs_ae_dm_cc_6") return diff --git a/scripts/expertise/expertise_fs_path_expansive_trickery_1.py b/scripts/expertise/expertise_fs_path_expansive_trickery_1.py index 4e48ff9c..f58232ed 100644 --- a/scripts/expertise/expertise_fs_path_expansive_trickery_1.py +++ b/scripts/expertise/expertise_fs_path_expansive_trickery_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_expansive_trickery_1') - - actor.addSkillMod('expertise_area_size_single_fs_mind_trick_2', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_expansive_trickery_1') - - actor.removeSkillMod('expertise_area_size_single_fs_mind_trick_2', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_expensive_trickery_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_expensive_trickery_2") return diff --git a/scripts/expertise/expertise_fs_path_flurry.py b/scripts/expertise/expertise_fs_path_flurry.py index 0c9dbb88..1fc0486f 100644 --- a/scripts/expertise/expertise_fs_path_flurry.py +++ b/scripts/expertise/expertise_fs_path_flurry.py @@ -1,48 +1,29 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_flurry') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_flurry') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_flurry_1') - + if actor.getLevel() >= 4: + actor.addAbility("fs_flurry_1") + if actor.getLevel() >= 12: + actor.addAbility("fs_flurry_2") + if actor.getLevel() >= 20: + actor.addAbility("fs_flurry_3") + if actor.getLevel() >= 30: + actor.addAbility("fs_flurry_4") + if actor.getLevel() >= 38: + actor.addAbility("fs_flurry_5") + if actor.getLevel() >= 52: + actor.addAbility("fs_flurry_6") + if actor.getLevel() >= 62: + actor.addAbility("fs_flurry_7") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_flurry_1') + actor.removeAbility("fs_flurry_1") + actor.removeAbility("fs_flurry_2") + actor.removeAbility("fs_flurry_3") + actor.removeAbility("fs_flurry_4") + actor.removeAbility("fs_flurry_5") + actor.removeAbility("fs_flurry_6") + actor.removeAbility("fs_flurry_7") return diff --git a/scripts/expertise/expertise_fs_path_force_choke_1.py b/scripts/expertise/expertise_fs_path_force_choke_1.py index b38da3a8..ad9a5d82 100644 --- a/scripts/expertise/expertise_fs_path_force_choke_1.py +++ b/scripts/expertise/expertise_fs_path_force_choke_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_force_choke_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_force_choke_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_dm_cc_1') - + if actor.getLevel() >= 26: + actor.addAbility("fs_dm_cc_1") + if actor.getLevel() >= 34: + actor.addAbility("fs_dm_cc_2") + if actor.getLevel() >= 48: + actor.addAbility("fs_dm_cc_3") + if actor.getLevel() >= 62: + actor.addAbility("fs_dm_cc_4") + if actor.getLevel() >= 76: + actor.addAbility("fs_dm_cc_5") + if actor.getLevel() >= 90: + actor.addAbility("fs_dm_cc_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_dm_cc_1') - + actor.removeAbility("fs_dm_cc_1") + actor.removeAbility("fs_dm_cc_2") + actor.removeAbility("fs_dm_cc_3") + actor.removeAbility("fs_dm_cc_4") + actor.removeAbility("fs_dm_cc_5") + actor.removeAbility("fs_dm_cc_6") return diff --git a/scripts/expertise/expertise_fs_path_force_clarity_1.py b/scripts/expertise/expertise_fs_path_force_clarity_1.py index 651153f9..f511c020 100644 --- a/scripts/expertise/expertise_fs_path_force_clarity_1.py +++ b/scripts/expertise/expertise_fs_path_force_clarity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_force_clarity_1') - - actor.addSkillMod('expertise_stance_fs_force_clarity', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_force_clarity_1') - - actor.removeSkillMod('expertise_stance_fs_force_clarity', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_force_clarity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_force_clarity_1") return diff --git a/scripts/expertise/expertise_fs_path_force_drain_1.py b/scripts/expertise/expertise_fs_path_force_drain_1.py index e8c5fee3..6d310e3a 100644 --- a/scripts/expertise/expertise_fs_path_force_drain_1.py +++ b/scripts/expertise/expertise_fs_path_force_drain_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_force_drain_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_force_drain_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_drain_1') - + if actor.getLevel() >= 26: + actor.addAbility("fs_drain_1") + if actor.getLevel() >= 34: + actor.addAbility("fs_drain_2") + if actor.getLevel() >= 48: + actor.addAbility("fs_drain_3") + if actor.getLevel() >= 62: + actor.addAbility("fs_drain_4") + if actor.getLevel() >= 76: + actor.addAbility("fs_drain_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_drain_1') - + actor.removeAbility("fs_drain_1") + actor.removeAbility("fs_drain_2") + actor.removeAbility("fs_drain_3") + actor.removeAbility("fs_drain_4") + actor.removeAbility("fs_drain_5") return diff --git a/scripts/expertise/expertise_fs_path_forsake_fear_1.py b/scripts/expertise/expertise_fs_path_forsake_fear_1.py index 6ef13e11..8ef08232 100644 --- a/scripts/expertise/expertise_fs_path_forsake_fear_1.py +++ b/scripts/expertise/expertise_fs_path_forsake_fear_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_forsake_fear_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_forsake_fear_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_forsake_fear') - + actor.addAbility("fs_forsake_fear") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_forsake_fear') - + actor.removeAbility("fs_forsake_fear") return diff --git a/scripts/expertise/expertise_fs_path_hermetic_touch_1.py b/scripts/expertise/expertise_fs_path_hermetic_touch_1.py index 8361fe7d..4e681b4e 100644 --- a/scripts/expertise/expertise_fs_path_hermetic_touch_1.py +++ b/scripts/expertise/expertise_fs_path_hermetic_touch_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_hermetic_touch_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_hermetic_touch_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_hermetic_touch') - + actor.addAbility("fs_hermetic_touch") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_hermetic_touch') - + actor.removeAbility("fs_hermetic_touch") return diff --git a/scripts/expertise/expertise_fs_path_improved_force_choke_1.py b/scripts/expertise/expertise_fs_path_improved_force_choke_1.py index e01d7586..6aef5ed0 100644 --- a/scripts/expertise/expertise_fs_path_improved_force_choke_1.py +++ b/scripts/expertise/expertise_fs_path_improved_force_choke_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_improved_force_choke_1') - - actor.addSkillMod('expertise_damage_line_fs_dm_cc', 10) - actor.addSkillMod('expertise_dot_damage_line_fs_dm_cc', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_improved_force_choke_1') - - actor.removeSkillMod('expertise_damage_line_fs_dm_cc', 10) - actor.removeSkillMod('expertise_dot_damage_line_fs_dm_cc', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_improved_force_choke_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_improved_force_choke_1") return diff --git a/scripts/expertise/expertise_fs_path_improved_force_choke_2.py b/scripts/expertise/expertise_fs_path_improved_force_choke_2.py index 53971b85..dc0cb249 100644 --- a/scripts/expertise/expertise_fs_path_improved_force_choke_2.py +++ b/scripts/expertise/expertise_fs_path_improved_force_choke_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_improved_force_choke_2') - - actor.addSkillMod('expertise_damage_line_fs_dm_cc', 10) - actor.addSkillMod('expertise_dot_damage_line_fs_dm_cc', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_improved_force_choke_2') - - actor.removeSkillMod('expertise_damage_line_fs_dm_cc', 10) - actor.removeSkillMod('expertise_dot_damage_line_fs_dm_cc', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_improved_force_choke_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_improved_force_choke_2") return diff --git a/scripts/expertise/expertise_fs_path_improved_force_drain_1.py b/scripts/expertise/expertise_fs_path_improved_force_drain_1.py index 2665853a..425f98c3 100644 --- a/scripts/expertise/expertise_fs_path_improved_force_drain_1.py +++ b/scripts/expertise/expertise_fs_path_improved_force_drain_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_improved_force_drain_1') - - actor.addSkillMod('expertise_fs_imp_drain', 33) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_improved_force_drain_1') - - actor.removeSkillMod('expertise_fs_imp_drain', 33) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_improved_force_drain_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_improved_force_drain_1") return diff --git a/scripts/expertise/expertise_fs_path_improved_force_drain_2.py b/scripts/expertise/expertise_fs_path_improved_force_drain_2.py index 61d92bb5..a155578f 100644 --- a/scripts/expertise/expertise_fs_path_improved_force_drain_2.py +++ b/scripts/expertise/expertise_fs_path_improved_force_drain_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_improved_force_drain_2') - - actor.addSkillMod('expertise_fs_imp_drain', 33) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_improved_force_drain_2') - - actor.removeSkillMod('expertise_fs_imp_drain', 33) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_improved_force_drain_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_improved_force_drain_2") return diff --git a/scripts/expertise/expertise_fs_path_improved_force_drain_3.py b/scripts/expertise/expertise_fs_path_improved_force_drain_3.py index 4ecb65bf..9fc7a049 100644 --- a/scripts/expertise/expertise_fs_path_improved_force_drain_3.py +++ b/scripts/expertise/expertise_fs_path_improved_force_drain_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_improved_force_drain_3') - - actor.addSkillMod('expertise_fs_imp_drain', 34) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_improved_force_drain_3') - - actor.removeSkillMod('expertise_fs_imp_drain', 34) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_improved_force_drain_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_improved_force_drain_3") return diff --git a/scripts/expertise/expertise_fs_path_improved_saber_reflect_1.py b/scripts/expertise/expertise_fs_path_improved_saber_reflect_1.py index f68eb3ae..fcd8dab3 100644 --- a/scripts/expertise/expertise_fs_path_improved_saber_reflect_1.py +++ b/scripts/expertise/expertise_fs_path_improved_saber_reflect_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_improved_saber_reflect_1') - - actor.addSkillMod('expertise_damage_line_fs_saber_reflect', 50) - actor.addSkillMod('expertise_force_alacrity', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_improved_saber_reflect_1') - - actor.removeSkillMod('expertise_damage_line_fs_saber_reflect', 50) - actor.removeSkillMod('expertise_force_alacrity', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_improved_saber_reflect_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_improved_saber_reflect_1") return diff --git a/scripts/expertise/expertise_fs_path_improved_saber_reflect_2.py b/scripts/expertise/expertise_fs_path_improved_saber_reflect_2.py index 6d95b6e7..dc7a3f46 100644 --- a/scripts/expertise/expertise_fs_path_improved_saber_reflect_2.py +++ b/scripts/expertise/expertise_fs_path_improved_saber_reflect_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_improved_saber_reflect_2') - - actor.addSkillMod('expertise_damage_line_fs_saber_reflect', 50) - actor.addSkillMod('expertise_force_alacrity', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_improved_saber_reflect_2') - - actor.removeSkillMod('expertise_damage_line_fs_saber_reflect', 50) - actor.removeSkillMod('expertise_force_alacrity', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_improved_saber_reflect_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_improved_saber_reflect_2") return diff --git a/scripts/expertise/expertise_fs_path_lethargy_1.py b/scripts/expertise/expertise_fs_path_lethargy_1.py index 7039b6d8..a214883f 100644 --- a/scripts/expertise/expertise_fs_path_lethargy_1.py +++ b/scripts/expertise/expertise_fs_path_lethargy_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_lethargy_1') - - actor.addSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.addSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_lethargy_1') - - actor.removeSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.removeSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_lethargy_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_lethargy_1") return diff --git a/scripts/expertise/expertise_fs_path_lethargy_2.py b/scripts/expertise/expertise_fs_path_lethargy_2.py index 6b294600..b3191ac1 100644 --- a/scripts/expertise/expertise_fs_path_lethargy_2.py +++ b/scripts/expertise/expertise_fs_path_lethargy_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_lethargy_2') - - actor.addSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.addSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_lethargy_2') - - actor.removeSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.removeSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_lethargy_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_lethargy_2") return diff --git a/scripts/expertise/expertise_fs_path_lethargy_3.py b/scripts/expertise/expertise_fs_path_lethargy_3.py index 9966bbad..833037e2 100644 --- a/scripts/expertise/expertise_fs_path_lethargy_3.py +++ b/scripts/expertise/expertise_fs_path_lethargy_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_lethargy_3') - - actor.addSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.addSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_lethargy_3') - - actor.removeSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.removeSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_lethargy_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_lethargy_3") return diff --git a/scripts/expertise/expertise_fs_path_lethargy_4.py b/scripts/expertise/expertise_fs_path_lethargy_4.py index ca3b2e10..6fb09b25 100644 --- a/scripts/expertise/expertise_fs_path_lethargy_4.py +++ b/scripts/expertise/expertise_fs_path_lethargy_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_lethargy_4') - - actor.addSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.addSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_lethargy_4') - - actor.removeSkillMod('expertise_buff_duration_line_fs_mind_trick', 2) - actor.removeSkillMod('expertise_action_damage_line_fs_mind_trick', 250) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_lethargy_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_lethargy_4") return diff --git a/scripts/expertise/expertise_fs_path_maelstrom_1.py b/scripts/expertise/expertise_fs_path_maelstrom_1.py index 39b07550..84a05ef5 100644 --- a/scripts/expertise/expertise_fs_path_maelstrom_1.py +++ b/scripts/expertise/expertise_fs_path_maelstrom_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_maelstrom_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_maelstrom_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_maelstrom_1') - + if actor.getLevel() >= 26: + actor.addAbility("fs_maelstrom_1") + if actor.getLevel() >= 34: + actor.addAbility("fs_maelstrom_2") + if actor.getLevel() >= 48: + actor.addAbility("fs_maelstrom_3") + if actor.getLevel() >= 62: + actor.addAbility("fs_maelstrom_4") + if actor.getLevel() >= 76: + actor.addAbility("fs_maelstrom_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_maelstrom_1') - + actor.removeAbility("fs_maelstrom_1") + actor.removeAbility("fs_maelstrom_2") + actor.removeAbility("fs_maelstrom_3") + actor.removeAbility("fs_maelstrom_4") + actor.removeAbility("fs_maelstrom_5") return diff --git a/scripts/expertise/expertise_fs_path_perceptive_sentinel_1.py b/scripts/expertise/expertise_fs_path_perceptive_sentinel_1.py index 3803bf98..c2bb199d 100644 --- a/scripts/expertise/expertise_fs_path_perceptive_sentinel_1.py +++ b/scripts/expertise/expertise_fs_path_perceptive_sentinel_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_perceptive_sentinel_1') - - actor.addSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.addSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_perceptive_sentinel_1') - - actor.removeSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.removeSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_perceptive_sentinel_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_perceptive_sentinel_1") return diff --git a/scripts/expertise/expertise_fs_path_perceptive_sentinel_2.py b/scripts/expertise/expertise_fs_path_perceptive_sentinel_2.py index e8944848..04c69b17 100644 --- a/scripts/expertise/expertise_fs_path_perceptive_sentinel_2.py +++ b/scripts/expertise/expertise_fs_path_perceptive_sentinel_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_perceptive_sentinel_2') - - actor.addSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.addSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_perceptive_sentinel_2') - - actor.removeSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.removeSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_perceptive_sentinel_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_perceptive_sentinel_2") return diff --git a/scripts/expertise/expertise_fs_path_perceptive_sentinel_3.py b/scripts/expertise/expertise_fs_path_perceptive_sentinel_3.py index a4bd42b0..83c4131f 100644 --- a/scripts/expertise/expertise_fs_path_perceptive_sentinel_3.py +++ b/scripts/expertise/expertise_fs_path_perceptive_sentinel_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_perceptive_sentinel_3') - - actor.addSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.addSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_perceptive_sentinel_3') - - actor.removeSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.removeSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_perceptive_sentinel_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_perceptive_sentinel_3") return diff --git a/scripts/expertise/expertise_fs_path_perceptive_sentinel_4.py b/scripts/expertise/expertise_fs_path_perceptive_sentinel_4.py index f3a94bb6..0f6276dc 100644 --- a/scripts/expertise/expertise_fs_path_perceptive_sentinel_4.py +++ b/scripts/expertise/expertise_fs_path_perceptive_sentinel_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_perceptive_sentinel_4') - - actor.addSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.addSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_perceptive_sentinel_4') - - actor.removeSkillMod('expertise_stance_perceptive_sentinel', 1) - actor.removeSkillMod('expertise_stance_perceptive_sentinel_pvp', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_perceptive_sentinel_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_perceptive_sentinel_4") return diff --git a/scripts/expertise/expertise_fs_path_reactive_response_1.py b/scripts/expertise/expertise_fs_path_reactive_response_1.py index 7742793f..816c657d 100644 --- a/scripts/expertise/expertise_fs_path_reactive_response_1.py +++ b/scripts/expertise/expertise_fs_path_reactive_response_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_reactive_response_1') - - actor.addSkillMod('expertise_stance_damage_add_to_action', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_reactive_response_1') - - actor.removeSkillMod('expertise_stance_damage_add_to_action', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_reactive_response_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_reactive_response_1") return diff --git a/scripts/expertise/expertise_fs_path_reactive_response_2.py b/scripts/expertise/expertise_fs_path_reactive_response_2.py index a46db04e..3a79b265 100644 --- a/scripts/expertise/expertise_fs_path_reactive_response_2.py +++ b/scripts/expertise/expertise_fs_path_reactive_response_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_reactive_response_2') - - actor.addSkillMod('expertise_stance_damage_add_to_action', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_reactive_response_2') - - actor.removeSkillMod('expertise_stance_damage_add_to_action', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_reactive_response_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_reactive_response_2") return diff --git a/scripts/expertise/expertise_fs_path_remorseless_nature_1.py b/scripts/expertise/expertise_fs_path_remorseless_nature_1.py index a155f97c..1c4bee8a 100644 --- a/scripts/expertise/expertise_fs_path_remorseless_nature_1.py +++ b/scripts/expertise/expertise_fs_path_remorseless_nature_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_remorseless_nature_1') - - actor.addSkillMod('expertise_focus_stamina', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_remorseless_nature_1') - - actor.removeSkillMod('expertise_focus_stamina', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_remorseless_nature_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_remorseless_nature_1") return diff --git a/scripts/expertise/expertise_fs_path_remorseless_nature_2.py b/scripts/expertise/expertise_fs_path_remorseless_nature_2.py index 28db8826..85d986d8 100644 --- a/scripts/expertise/expertise_fs_path_remorseless_nature_2.py +++ b/scripts/expertise/expertise_fs_path_remorseless_nature_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_remorseless_nature_2') - - actor.addSkillMod('expertise_focus_stamina', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_remorseless_nature_2') - - actor.removeSkillMod('expertise_focus_stamina', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_remorseless_nature_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_remorseless_nature_2") return diff --git a/scripts/expertise/expertise_fs_path_remorseless_nature_3.py b/scripts/expertise/expertise_fs_path_remorseless_nature_3.py index 7089a65c..19dfa6fd 100644 --- a/scripts/expertise/expertise_fs_path_remorseless_nature_3.py +++ b/scripts/expertise/expertise_fs_path_remorseless_nature_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_remorseless_nature_3') - - actor.addSkillMod('expertise_focus_stamina', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_remorseless_nature_3') - - actor.removeSkillMod('expertise_focus_stamina', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_remorseless_nature_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_remorseless_nature_3") return diff --git a/scripts/expertise/expertise_fs_path_remorseless_nature_4.py b/scripts/expertise/expertise_fs_path_remorseless_nature_4.py index 49440a2d..8d505b2f 100644 --- a/scripts/expertise/expertise_fs_path_remorseless_nature_4.py +++ b/scripts/expertise/expertise_fs_path_remorseless_nature_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_remorseless_nature_4') - - actor.addSkillMod('expertise_focus_stamina', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_remorseless_nature_4') - - actor.removeSkillMod('expertise_focus_stamina', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_remorseless_nature_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_remorseless_nature_4") return diff --git a/scripts/expertise/expertise_fs_path_riposte_1.py b/scripts/expertise/expertise_fs_path_riposte_1.py index b7470a65..5ffa3594 100644 --- a/scripts/expertise/expertise_fs_path_riposte_1.py +++ b/scripts/expertise/expertise_fs_path_riposte_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_riposte_1') - - actor.addSkillMod('expertise_stance_riposte', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_riposte_1') - - actor.removeSkillMod('expertise_stance_riposte', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_riposte_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_riposte_1") return diff --git a/scripts/expertise/expertise_fs_path_riposte_2.py b/scripts/expertise/expertise_fs_path_riposte_2.py index de7b4623..7704424c 100644 --- a/scripts/expertise/expertise_fs_path_riposte_2.py +++ b/scripts/expertise/expertise_fs_path_riposte_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_riposte_2') - - actor.addSkillMod('expertise_stance_riposte', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_riposte_2') - - actor.removeSkillMod('expertise_stance_riposte', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_riposte_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_riposte_2") return diff --git a/scripts/expertise/expertise_fs_path_ruthless_precision_1.py b/scripts/expertise/expertise_fs_path_ruthless_precision_1.py index c90c209a..ad47cf20 100644 --- a/scripts/expertise/expertise_fs_path_ruthless_precision_1.py +++ b/scripts/expertise/expertise_fs_path_ruthless_precision_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_ruthless_precision_1') - - core.skillModService.addSkillMod(actor, 'expertise_focus_damage_increase', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_ruthless_precision_1') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_damage_increase', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_ruthless_precision_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_ruthless_precision_1") return diff --git a/scripts/expertise/expertise_fs_path_ruthless_precision_2.py b/scripts/expertise/expertise_fs_path_ruthless_precision_2.py index 87ad2d2d..c4ccc5ae 100644 --- a/scripts/expertise/expertise_fs_path_ruthless_precision_2.py +++ b/scripts/expertise/expertise_fs_path_ruthless_precision_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_ruthless_precision_2') - - core.skillModService.addSkillMod(actor, 'expertise_focus_damage_increase', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_ruthless_precision_2') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_damage_increase', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_ruthless_precision_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_ruthless_precision_2") return diff --git a/scripts/expertise/expertise_fs_path_ruthless_precision_3.py b/scripts/expertise/expertise_fs_path_ruthless_precision_3.py index b802e602..01546884 100644 --- a/scripts/expertise/expertise_fs_path_ruthless_precision_3.py +++ b/scripts/expertise/expertise_fs_path_ruthless_precision_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_ruthless_precision_3') - - core.skillModService.addSkillMod(actor, 'expertise_focus_damage_increase', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_ruthless_precision_3') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_damage_increase', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_ruthless_precision_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_ruthless_precision_3") return diff --git a/scripts/expertise/expertise_fs_path_ruthless_precision_4.py b/scripts/expertise/expertise_fs_path_ruthless_precision_4.py index f0f94fe5..6292bfe5 100644 --- a/scripts/expertise/expertise_fs_path_ruthless_precision_4.py +++ b/scripts/expertise/expertise_fs_path_ruthless_precision_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_ruthless_precision_4') - - core.skillModService.addSkillMod(actor, 'expertise_focus_damage_increase', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_ruthless_precision_4') - - core.skillModService.deductSkillMod(actor, 'expertise_focus_damage_increase', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_ruthless_precision_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_ruthless_precision_4") return diff --git a/scripts/expertise/expertise_fs_path_saber_reflect_1.py b/scripts/expertise/expertise_fs_path_saber_reflect_1.py index 2895ccac..ff019b2d 100644 --- a/scripts/expertise/expertise_fs_path_saber_reflect_1.py +++ b/scripts/expertise/expertise_fs_path_saber_reflect_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_saber_reflect_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_saber_reflect_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('fs_saber_reflect_buff') - + actor.addAbility("fs_saber_reflect_buff") return def removeAbilities(core, actor, player): - - actor.removeAbility('fs_saber_reflect_buff') - + actor.removeAbility("fs_saber_reflect_buff") return diff --git a/scripts/expertise/expertise_fs_path_saber_shackle_1.py b/scripts/expertise/expertise_fs_path_saber_shackle_1.py index 9f2fe63f..e7115fa0 100644 --- a/scripts/expertise/expertise_fs_path_saber_shackle_1.py +++ b/scripts/expertise/expertise_fs_path_saber_shackle_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_saber_shackle_1') - - actor.addSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.addSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_saber_shackle_1') - - actor.removeSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.removeSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_saber_shackle_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_saber_shackle_1") return diff --git a/scripts/expertise/expertise_fs_path_saber_shackle_2.py b/scripts/expertise/expertise_fs_path_saber_shackle_2.py index 76d3d5fa..cc2cdab9 100644 --- a/scripts/expertise/expertise_fs_path_saber_shackle_2.py +++ b/scripts/expertise/expertise_fs_path_saber_shackle_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_saber_shackle_2') - - actor.addSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.addSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_saber_shackle_2') - - actor.removeSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.removeSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_saber_shackle_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_saber_shackle_2") return diff --git a/scripts/expertise/expertise_fs_path_saber_shackle_3.py b/scripts/expertise/expertise_fs_path_saber_shackle_3.py index 7c4b0c3e..426199d1 100644 --- a/scripts/expertise/expertise_fs_path_saber_shackle_3.py +++ b/scripts/expertise/expertise_fs_path_saber_shackle_3.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_saber_shackle_3') - - actor.addSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.addSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_saber_shackle_3') - - actor.removeSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.removeSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_saber_shackle_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_saber_shackle_3") return diff --git a/scripts/expertise/expertise_fs_path_saber_shackle_4.py b/scripts/expertise/expertise_fs_path_saber_shackle_4.py index 889e106d..a20668d8 100644 --- a/scripts/expertise/expertise_fs_path_saber_shackle_4.py +++ b/scripts/expertise/expertise_fs_path_saber_shackle_4.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_saber_shackle_4') - - actor.addSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.addSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.addSkillMod('expertise_damage_line_fs_dm', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_saber_shackle_4') - - actor.removeSkillMod('expertise_stance_saber_throw_snare_chance', 25) - actor.removeSkillMod('expertise_stance_saber_throw_root_chance', 2) - actor.removeSkillMod('expertise_damage_line_fs_dm', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_saber_shackle_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_saber_shackle_4") return diff --git a/scripts/expertise/expertise_fs_path_soothing_aura_1.py b/scripts/expertise/expertise_fs_path_soothing_aura_1.py index d2ce8171..ab8c5c6b 100644 --- a/scripts/expertise/expertise_fs_path_soothing_aura_1.py +++ b/scripts/expertise/expertise_fs_path_soothing_aura_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_soothing_aura_1') - - actor.addSkillMod('expertise_stance_healing_line_fs_heal', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_soothing_aura_1') - - actor.removeSkillMod('expertise_stance_healing_line_fs_heal', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_soothing_aura_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_soothing_aura_1") return diff --git a/scripts/expertise/expertise_fs_path_soothing_aura_2.py b/scripts/expertise/expertise_fs_path_soothing_aura_2.py index eb134506..e04ed993 100644 --- a/scripts/expertise/expertise_fs_path_soothing_aura_2.py +++ b/scripts/expertise/expertise_fs_path_soothing_aura_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_soothing_aura_2') - - actor.addSkillMod('expertise_stance_healing_line_fs_heal', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_soothing_aura_2') - - actor.removeSkillMod('expertise_stance_healing_line_fs_heal', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_soothing_aura_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_soothing_aura_2") return diff --git a/scripts/expertise/expertise_fs_path_soothing_aura_3.py b/scripts/expertise/expertise_fs_path_soothing_aura_3.py index ea794b23..c7ec3e0b 100644 --- a/scripts/expertise/expertise_fs_path_soothing_aura_3.py +++ b/scripts/expertise/expertise_fs_path_soothing_aura_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_soothing_aura_3') - - actor.addSkillMod('expertise_stance_healing_line_fs_heal', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_soothing_aura_3') - - actor.removeSkillMod('expertise_stance_healing_line_fs_heal', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_soothing_aura_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_soothing_aura_3") return diff --git a/scripts/expertise/expertise_fs_path_soothing_aura_4.py b/scripts/expertise/expertise_fs_path_soothing_aura_4.py index b209ea53..0e3bc9a1 100644 --- a/scripts/expertise/expertise_fs_path_soothing_aura_4.py +++ b/scripts/expertise/expertise_fs_path_soothing_aura_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_soothing_aura_4') - - actor.addSkillMod('expertise_stance_healing_line_fs_heal', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_soothing_aura_4') - - actor.removeSkillMod('expertise_stance_healing_line_fs_heal', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_soothing_aura_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_soothing_aura_4") return diff --git a/scripts/expertise/expertise_fs_path_strangulation_1.py b/scripts/expertise/expertise_fs_path_strangulation_1.py index 7e57f9af..b1db621b 100644 --- a/scripts/expertise/expertise_fs_path_strangulation_1.py +++ b/scripts/expertise/expertise_fs_path_strangulation_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_strangulation_1') - - actor.addSkillMod('expertise_fs_imp_choke', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_strangulation_1') - - actor.removeSkillMod('expertise_fs_imp_choke', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_strangulation_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_strangulation_1") return diff --git a/scripts/expertise/expertise_fs_path_strangulation_2.py b/scripts/expertise/expertise_fs_path_strangulation_2.py index 40534bff..43c05ab8 100644 --- a/scripts/expertise/expertise_fs_path_strangulation_2.py +++ b/scripts/expertise/expertise_fs_path_strangulation_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_strangulation_2') - - actor.addSkillMod('expertise_fs_imp_choke', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_strangulation_2') - - actor.removeSkillMod('expertise_fs_imp_choke', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_strangulation_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_strangulation_2") return diff --git a/scripts/expertise/expertise_fs_path_tempt_hatred_1.py b/scripts/expertise/expertise_fs_path_tempt_hatred_1.py index 7bf99377..c8260021 100644 --- a/scripts/expertise/expertise_fs_path_tempt_hatred_1.py +++ b/scripts/expertise/expertise_fs_path_tempt_hatred_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_tempt_hatred_1') - - actor.addSkillMod('expertise_focus_damage_add_to_action', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_tempt_hatred_1') - - actor.removeSkillMod('expertise_focus_damage_add_to_action', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_tempt_hatred_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_tempt_hatred_1") return diff --git a/scripts/expertise/expertise_fs_path_tempt_hatred_2.py b/scripts/expertise/expertise_fs_path_tempt_hatred_2.py index 9abf4c24..cced0afd 100644 --- a/scripts/expertise/expertise_fs_path_tempt_hatred_2.py +++ b/scripts/expertise/expertise_fs_path_tempt_hatred_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_tempt_hatred_2') - - actor.addSkillMod('expertise_focus_damage_add_to_action', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_tempt_hatred_2') - - actor.removeSkillMod('expertise_focus_damage_add_to_action', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_tempt_hatred_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_tempt_hatred_2") return diff --git a/scripts/expertise/expertise_fs_path_wracking_energy_1.py b/scripts/expertise/expertise_fs_path_wracking_energy_1.py index 425b7931..25e70e11 100644 --- a/scripts/expertise/expertise_fs_path_wracking_energy_1.py +++ b/scripts/expertise/expertise_fs_path_wracking_energy_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_wracking_energy_1') - - actor.addSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.addSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - actor.addSkillMod('expertise_buff_chance_line_fs_ae_dm_cc', 100) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_wracking_energy_1') - - actor.removeSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.removeSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - actor.removeSkillMod('expertise_buff_chance_line_fs_ae_dm_cc', 100) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_wracking_energy_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_wracking_energy_1") return diff --git a/scripts/expertise/expertise_fs_path_wracking_energy_2.py b/scripts/expertise/expertise_fs_path_wracking_energy_2.py index 298130bc..cd1ed137 100644 --- a/scripts/expertise/expertise_fs_path_wracking_energy_2.py +++ b/scripts/expertise/expertise_fs_path_wracking_energy_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_wracking_energy_2') - - actor.addSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.addSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_wracking_energy_2') - - actor.removeSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.removeSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_wracking_energy_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_wracking_energy_2") return diff --git a/scripts/expertise/expertise_fs_path_wracking_energy_3.py b/scripts/expertise/expertise_fs_path_wracking_energy_3.py index 7ebb9e6a..00b73ffc 100644 --- a/scripts/expertise/expertise_fs_path_wracking_energy_3.py +++ b/scripts/expertise/expertise_fs_path_wracking_energy_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_wracking_energy_3') - - actor.addSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.addSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_wracking_energy_3') - - actor.removeSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.removeSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_wracking_energy_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_wracking_energy_3") return diff --git a/scripts/expertise/expertise_fs_path_wracking_energy_4.py b/scripts/expertise/expertise_fs_path_wracking_energy_4.py index 6818335f..86641a26 100644 --- a/scripts/expertise/expertise_fs_path_wracking_energy_4.py +++ b/scripts/expertise/expertise_fs_path_wracking_energy_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.addSkill('expertise_fs_path_wracking_energy_4') - - actor.addSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.addSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'force_sensitive_1a': - return - - actor.removeSkill('expertise_fs_path_wracking_energy_4') - - actor.removeSkillMod('expertise_fs_dm_armor_bypass', 25) - actor.removeSkillMod('expertise_buff_duration_line_fs_ae_dm_cc', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_fs_path_wracking_energy_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_fs_path_wracking_energy_4") return diff --git a/scripts/expertise/expertise_me_agility_1.py b/scripts/expertise/expertise_me_agility_1.py index 29ea50ff..62abf270 100644 --- a/scripts/expertise/expertise_me_agility_1.py +++ b/scripts/expertise/expertise_me_agility_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_agility_1') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_agility_1') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_agility_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_agility_1") return diff --git a/scripts/expertise/expertise_me_agility_2.py b/scripts/expertise/expertise_me_agility_2.py index f92f5a4b..d9f1bc7b 100644 --- a/scripts/expertise/expertise_me_agility_2.py +++ b/scripts/expertise/expertise_me_agility_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_agility_2') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_agility_2') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_agility_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_agility_2") return diff --git a/scripts/expertise/expertise_me_agility_3.py b/scripts/expertise/expertise_me_agility_3.py index 7441af33..1d58506f 100644 --- a/scripts/expertise/expertise_me_agility_3.py +++ b/scripts/expertise/expertise_me_agility_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_agility_3') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_agility_3') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_agility_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_agility_3") return diff --git a/scripts/expertise/expertise_me_agility_4.py b/scripts/expertise/expertise_me_agility_4.py index 89603b75..ab6d2201 100644 --- a/scripts/expertise/expertise_me_agility_4.py +++ b/scripts/expertise/expertise_me_agility_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_agility_4') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_agility_4') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_agility_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_agility_4") return diff --git a/scripts/expertise/expertise_me_agro_healing_1.py b/scripts/expertise/expertise_me_agro_healing_1.py index 5e44ee56..35bcdccc 100644 --- a/scripts/expertise/expertise_me_agro_healing_1.py +++ b/scripts/expertise/expertise_me_agro_healing_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_agro_healing_1') - - actor.addSkillMod('expertise_agro_healing', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_agro_healing_1') - - actor.removeSkillMod('expertise_agro_healing', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_agro_healing_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_agro_healing_1") return diff --git a/scripts/expertise/expertise_me_agro_healing_2.py b/scripts/expertise/expertise_me_agro_healing_2.py index 454ce643..40fbc169 100644 --- a/scripts/expertise/expertise_me_agro_healing_2.py +++ b/scripts/expertise/expertise_me_agro_healing_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_agro_healing_2') - - actor.addSkillMod('expertise_agro_healing', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_agro_healing_2') - - actor.removeSkillMod('expertise_agro_healing', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_agro_healing_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_agro_healing_2") return diff --git a/scripts/expertise/expertise_me_agro_healing_3.py b/scripts/expertise/expertise_me_agro_healing_3.py index b795406e..4deaea9a 100644 --- a/scripts/expertise/expertise_me_agro_healing_3.py +++ b/scripts/expertise/expertise_me_agro_healing_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_agro_healing_3') - - actor.addSkillMod('expertise_agro_healing', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_agro_healing_3') - - actor.removeSkillMod('expertise_agro_healing', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_agro_healing_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_agro_healing_3") return diff --git a/scripts/expertise/expertise_me_bacta_bomb_1.py b/scripts/expertise/expertise_me_bacta_bomb_1.py index 64d190c5..40336997 100644 --- a/scripts/expertise/expertise_me_bacta_bomb_1.py +++ b/scripts/expertise/expertise_me_bacta_bomb_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_bacta_bomb_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_bacta_bomb_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_bacta_bomb_1') - + if actor.getLevel() >= 26: + actor.addAbility("me_bacta_bomb_1") + if actor.getLevel() >= 34: + actor.addAbility("me_bacta_bomb_2") + if actor.getLevel() >= 48: + actor.addAbility("me_bacta_bomb_3") + if actor.getLevel() >= 62: + actor.addAbility("me_bacta_bomb_4") + if actor.getLevel() >= 76: + actor.addAbility("me_bacta_bomb_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_bacta_bomb_1') - + actor.removeAbility("me_bacta_bomb_1") + actor.removeAbility("me_bacta_bomb_2") + actor.removeAbility("me_bacta_bomb_3") + actor.removeAbility("me_bacta_bomb_4") + actor.removeAbility("me_bacta_bomb_5") return diff --git a/scripts/expertise/expertise_me_bacta_grenade_1.py b/scripts/expertise/expertise_me_bacta_grenade_1.py index 2f16ef84..762bbabc 100644 --- a/scripts/expertise/expertise_me_bacta_grenade_1.py +++ b/scripts/expertise/expertise_me_bacta_grenade_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_bacta_grenade_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_bacta_grenade_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_bacta_grenade_1') - + if actor.getLevel() >= 26: + actor.addAbility("me_bacta_grenade_1") + if actor.getLevel() >= 34: + actor.addAbility("me_bacta_grenade_2") + if actor.getLevel() >= 48: + actor.addAbility("me_bacta_grenade_3") + if actor.getLevel() >= 62: + actor.addAbility("me_bacta_grenade_4") + if actor.getLevel() >= 76: + actor.addAbility("me_bacta_grenade_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_bacta_grenade_1') - + actor.removeAbility("me_bacta_grenade_1") + actor.removeAbility("me_bacta_grenade_2") + actor.removeAbility("me_bacta_grenade_3") + actor.removeAbility("me_bacta_grenade_4") + actor.removeAbility("me_bacta_grenade_5") return diff --git a/scripts/expertise/expertise_me_bacta_resistance_1.py b/scripts/expertise/expertise_me_bacta_resistance_1.py index 1c26ade5..f35efe8f 100644 --- a/scripts/expertise/expertise_me_bacta_resistance_1.py +++ b/scripts/expertise/expertise_me_bacta_resistance_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_bacta_resistance_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_bacta_resistance_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_bacta_resistance_1') - + actor.addAbility("me_bacta_resistance_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_bacta_resistance_1') - + actor.removeAbility("me_bacta_resistance_1") return diff --git a/scripts/expertise/expertise_me_blood_cleaners_1.py b/scripts/expertise/expertise_me_blood_cleaners_1.py index b4de82c1..7405f78d 100644 --- a/scripts/expertise/expertise_me_blood_cleaners_1.py +++ b/scripts/expertise/expertise_me_blood_cleaners_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_blood_cleaners_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_blood_cleaners_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_blood_cleaners_1') - + actor.addAbility("me_blood_cleaners_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_blood_cleaners_1') - + actor.removeAbility("me_blood_clearners_1") return diff --git a/scripts/expertise/expertise_me_burst_1.py b/scripts/expertise/expertise_me_burst_1.py index f9b65f16..2fff6848 100644 --- a/scripts/expertise/expertise_me_burst_1.py +++ b/scripts/expertise/expertise_me_burst_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_burst_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_burst_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_burst_1') - + if actor.getLevel() >= 26: + actor.addAbility("me_burst_1") + if actor.getLevel() >= 34: + actor.addAbility("me_burst_2") + if actor.getLevel() >= 48: + actor.addAbility("me_burst_3") + if actor.getLevel() >= 62: + actor.addAbility("me_burst_4") + if actor.getLevel() >= 76: + actor.addAbility("me_burst_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_burst_1') - + actor.removeAbility("me_burst_1") + actor.removeAbility("me_burst_2") + actor.removeAbility("me_burst_3") + actor.removeAbility("me_burst_4") + actor.removeAbility("me_burst_5") return diff --git a/scripts/expertise/expertise_me_carbine_damage_1.py b/scripts/expertise/expertise_me_carbine_damage_1.py index ae18ecf9..4cdfd0d0 100644 --- a/scripts/expertise/expertise_me_carbine_damage_1.py +++ b/scripts/expertise/expertise_me_carbine_damage_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_carbine_damage_1') - - actor.addSkillMod('expertise_damage_weapon_1', 2) - actor.addSkillMod('expertise_damage_weapon_2', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_carbine_damage_1') - - actor.removeSkillMod('expertise_damage_weapon_1', 2) - actor.removeSkillMod('expertise_damage_weapon_2', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_carbine_damage_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_carbine_damage_1") return diff --git a/scripts/expertise/expertise_me_carbine_damage_2.py b/scripts/expertise/expertise_me_carbine_damage_2.py index 50bd5fa2..2ca975d7 100644 --- a/scripts/expertise/expertise_me_carbine_damage_2.py +++ b/scripts/expertise/expertise_me_carbine_damage_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_carbine_damage_2') - - actor.addSkillMod('expertise_damage_weapon_1', 2) - actor.addSkillMod('expertise_damage_weapon_2', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_carbine_damage_2') - - actor.removeSkillMod('expertise_damage_weapon_1', 2) - actor.removeSkillMod('expertise_damage_weapon_2', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_carbine_damage_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_carbine_damage_2") return diff --git a/scripts/expertise/expertise_me_carbine_damage_3.py b/scripts/expertise/expertise_me_carbine_damage_3.py index 8a65e510..0fec9aac 100644 --- a/scripts/expertise/expertise_me_carbine_damage_3.py +++ b/scripts/expertise/expertise_me_carbine_damage_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_carbine_damage_3') - - actor.addSkillMod('expertise_damage_weapon_1', 3) - actor.addSkillMod('expertise_damage_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_carbine_damage_3') - - actor.removeSkillMod('expertise_damage_weapon_1', 3) - actor.removeSkillMod('expertise_damage_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_carbine_damage_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_carbine_damage_3") return diff --git a/scripts/expertise/expertise_me_carbine_damage_4.py b/scripts/expertise/expertise_me_carbine_damage_4.py index ddd1ca17..23dd0479 100644 --- a/scripts/expertise/expertise_me_carbine_damage_4.py +++ b/scripts/expertise/expertise_me_carbine_damage_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_carbine_damage_4') - - actor.addSkillMod('expertise_damage_weapon_1', 3) - actor.addSkillMod('expertise_damage_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_carbine_damage_4') - - actor.removeSkillMod('expertise_damage_weapon_1', 3) - actor.removeSkillMod('expertise_damage_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_carbine_damage_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_carbine_damage_4") return diff --git a/scripts/expertise/expertise_me_cranial_smash_1.py b/scripts/expertise/expertise_me_cranial_smash_1.py index 98d77547..220198de 100644 --- a/scripts/expertise/expertise_me_cranial_smash_1.py +++ b/scripts/expertise/expertise_me_cranial_smash_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_cranial_smash_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_cranial_smash_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_cranial_smash_1') - + if actor.getLevel() >= 26: + actor.addAbility("me_cranial_smash_1") + if actor.getLevel() >= 34: + actor.addAbility("me_cranial_smash_2") + if actor.getLevel() >= 48: + actor.addAbility("me_cranial_smash_3) + if actor.getLevel() >= 62: + actor.addAbility("me_cranial_smash_4") + if actor.getLevel() >= 76: + actor.addAbility("me_cranial_smash_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_cranial_smash_1') - + actor.removeAbility("me_cranial_smash_1") + actor.removeAbility("me_cranial_smash_2") + actor.removeAbility("me_cranial_smash_3") + actor.removeAbility("me_cranial_smash_4") + actor.removeAbility("me_cranial_smash_5") return diff --git a/scripts/expertise/expertise_me_cure_affliction_1.py b/scripts/expertise/expertise_me_cure_affliction_1.py index 6a794b64..7a783eea 100644 --- a/scripts/expertise/expertise_me_cure_affliction_1.py +++ b/scripts/expertise/expertise_me_cure_affliction_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_cure_affliction_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_cure_affliction_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_cure_affliction_1') - + actor.addAbility("me_cure_affliction_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_cure_affliction_1') - + actor.removeAbility("me_cure_affliction_1") return diff --git a/scripts/expertise/expertise_me_dot_damage_1.py b/scripts/expertise/expertise_me_dot_damage_1.py index 3251e445..163a8d86 100644 --- a/scripts/expertise/expertise_me_dot_damage_1.py +++ b/scripts/expertise/expertise_me_dot_damage_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_dot_damage_1') - - actor.addSkillMod('expertise_dot_increase', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_dot_damage_1') - - actor.removeSkillMod('expertise_dot_increase', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_dot_damage_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_dot_damage_1") return diff --git a/scripts/expertise/expertise_me_dot_damage_2.py b/scripts/expertise/expertise_me_dot_damage_2.py index 4c361396..0deae54e 100644 --- a/scripts/expertise/expertise_me_dot_damage_2.py +++ b/scripts/expertise/expertise_me_dot_damage_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_dot_damage_2') - - actor.addSkillMod('expertise_dot_increase', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_dot_damage_2') - - actor.removeSkillMod('expertise_dot_increase', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_dot_damage_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_dot_damage_2") return diff --git a/scripts/expertise/expertise_me_dot_damage_3.py b/scripts/expertise/expertise_me_dot_damage_3.py index 84865714..11ff1f05 100644 --- a/scripts/expertise/expertise_me_dot_damage_3.py +++ b/scripts/expertise/expertise_me_dot_damage_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_dot_damage_3') - - actor.addSkillMod('expertise_dot_increase', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_dot_damage_3') - - actor.removeSkillMod('expertise_dot_increase', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_dot_damage_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_dot_damage_3") return diff --git a/scripts/expertise/expertise_me_dot_duration_1.py b/scripts/expertise/expertise_me_dot_duration_1.py index b7962f70..c3a9b6a5 100644 --- a/scripts/expertise/expertise_me_dot_duration_1.py +++ b/scripts/expertise/expertise_me_dot_duration_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_dot_duration_1') - - actor.addSkillMod('expertise_dot_duration_line_me_dot', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_dot_duration_1') - - actor.removeSkillMod('expertise_dot_duration_line_me_dot', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_dot_duration_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_dot_duration_1") return diff --git a/scripts/expertise/expertise_me_dot_duration_2.py b/scripts/expertise/expertise_me_dot_duration_2.py index 7a514071..61309ba1 100644 --- a/scripts/expertise/expertise_me_dot_duration_2.py +++ b/scripts/expertise/expertise_me_dot_duration_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_dot_duration_2') - - actor.addSkillMod('expertise_dot_duration_line_me_dot', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_dot_duration_2') - - actor.removeSkillMod('expertise_dot_duration_line_me_dot', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_dot_duration_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_dot_duration_2") return diff --git a/scripts/expertise/expertise_me_dot_duration_3.py b/scripts/expertise/expertise_me_dot_duration_3.py index 8b2bb169..6f7b45eb 100644 --- a/scripts/expertise/expertise_me_dot_duration_3.py +++ b/scripts/expertise/expertise_me_dot_duration_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_dot_duration_3') - - actor.addSkillMod('expertise_dot_duration_line_me_dot', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_dot_duration_3') - - actor.removeSkillMod('expertise_dot_duration_line_me_dot', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_dot_duration_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_dot_duration_3") return diff --git a/scripts/expertise/expertise_me_dueterium_rounds_1.py b/scripts/expertise/expertise_me_dueterium_rounds_1.py index b7d57e44..ed57795c 100644 --- a/scripts/expertise/expertise_me_dueterium_rounds_1.py +++ b/scripts/expertise/expertise_me_dueterium_rounds_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_dueterium_rounds_1') - - actor.addSkillMod('expertise_dueterium_rounds_proc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_dueterium_rounds_1') - - actor.removeSkillMod('expertise_dueterium_rounds_proc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_dueterium_rounds_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_dueterium_rounds_1") return diff --git a/scripts/expertise/expertise_me_electrolyte_drain_1.py b/scripts/expertise/expertise_me_electrolyte_drain_1.py index d7eb33ac..1daa98a3 100644 --- a/scripts/expertise/expertise_me_electrolyte_drain_1.py +++ b/scripts/expertise/expertise_me_electrolyte_drain_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_electrolyte_drain_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_electrolyte_drain_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_electrolyte_drain_1') - + actor.addAbility("me_electrolyte_drain_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_electrolyte_drain_1') - + actor.removeAbility("me_electrolyte_drain_1") return diff --git a/scripts/expertise/expertise_me_energy_armor_1.py b/scripts/expertise/expertise_me_energy_armor_1.py index 2fc984be..fd7c40f9 100644 --- a/scripts/expertise/expertise_me_energy_armor_1.py +++ b/scripts/expertise/expertise_me_energy_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_energy_armor_1') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_energy_armor_1') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_energy_armor_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_energy_armor_1") return diff --git a/scripts/expertise/expertise_me_energy_armor_2.py b/scripts/expertise/expertise_me_energy_armor_2.py index 0d02a8a1..ace09ed5 100644 --- a/scripts/expertise/expertise_me_energy_armor_2.py +++ b/scripts/expertise/expertise_me_energy_armor_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_energy_armor_2') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_energy_armor_2') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_energy_armor_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_energy_armor_2") return diff --git a/scripts/expertise/expertise_me_energy_armor_3.py b/scripts/expertise/expertise_me_energy_armor_3.py index cfc6f250..1d161f38 100644 --- a/scripts/expertise/expertise_me_energy_armor_3.py +++ b/scripts/expertise/expertise_me_energy_armor_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_energy_armor_3') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_energy_armor_3') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_energy_armor_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_energy_armor_3") return diff --git a/scripts/expertise/expertise_me_energy_armor_4.py b/scripts/expertise/expertise_me_energy_armor_4.py index 76181747..84fad199 100644 --- a/scripts/expertise/expertise_me_energy_armor_4.py +++ b/scripts/expertise/expertise_me_energy_armor_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_energy_armor_4') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_energy_armor_4') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_energy_armor_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_energy_armor_4") return diff --git a/scripts/expertise/expertise_me_enhance_agility_1.py b/scripts/expertise/expertise_me_enhance_agility_1.py index fd112eb9..4b49ecc9 100644 --- a/scripts/expertise/expertise_me_enhance_agility_1.py +++ b/scripts/expertise/expertise_me_enhance_agility_1.py @@ -1,48 +1,16 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_agility_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_agility_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_enhance_agility_1') - + if actor.getLevel() >= 10: + actor.addAbility("me_enhance_agility_1") + if actor.getLevel() >= 34: + actor.addAbility("me_enhance_agility_2") + if actor.getLevel() >= 62: + actor.addAbility("me_enhance_agility_3") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_enhance_agility_1') - + actor.removeAbility("me_enhance_agility_1") + actor.removeAbility("me_enhance_agility_2") + actor.removeAbility("me_enhance_agility_3") return diff --git a/scripts/expertise/expertise_me_enhance_block_1.py b/scripts/expertise/expertise_me_enhance_block_1.py index 962c59d5..e6d4a3c6 100644 --- a/scripts/expertise/expertise_me_enhance_block_1.py +++ b/scripts/expertise/expertise_me_enhance_block_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_block_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_block_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_enhance_block_1') - + actor.addAbility("me_enhance_block_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_enhance_block_1') - + actor.removeAbility("me_enhance_block_1") return diff --git a/scripts/expertise/expertise_me_enhance_dodge_1.py b/scripts/expertise/expertise_me_enhance_dodge_1.py index 60af46b2..60b97cd6 100644 --- a/scripts/expertise/expertise_me_enhance_dodge_1.py +++ b/scripts/expertise/expertise_me_enhance_dodge_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_dodge_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_dodge_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_enhance_dodge_1') - + actor.addAbility("me_enhance_dodge_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_enhance_dodge_1') - + actor.removeAbility("me_enhance_dodge_1") return diff --git a/scripts/expertise/expertise_me_enhance_duration_1.py b/scripts/expertise/expertise_me_enhance_duration_1.py index 9b54c0a7..85c5c455 100644 --- a/scripts/expertise/expertise_me_enhance_duration_1.py +++ b/scripts/expertise/expertise_me_enhance_duration_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_duration_1') - - actor.addSkillMod('expertise_buff_duration_line_me_enhance', 300) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_duration_1') - - actor.removeSkillMod('expertise_buff_duration_line_me_enhance', 300) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_enhance_duration_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_enhance_duration_1") return diff --git a/scripts/expertise/expertise_me_enhance_duration_2.py b/scripts/expertise/expertise_me_enhance_duration_2.py index 4b66e476..ffb8e438 100644 --- a/scripts/expertise/expertise_me_enhance_duration_2.py +++ b/scripts/expertise/expertise_me_enhance_duration_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_duration_2') - - actor.addSkillMod('expertise_buff_duration_line_me_enhance', 300) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_duration_2') - - actor.removeSkillMod('expertise_buff_duration_line_me_enhance', 300) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_enhance_duration_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_enhance_duration_2") return diff --git a/scripts/expertise/expertise_me_enhance_duration_3.py b/scripts/expertise/expertise_me_enhance_duration_3.py index 336b9d27..53442947 100644 --- a/scripts/expertise/expertise_me_enhance_duration_3.py +++ b/scripts/expertise/expertise_me_enhance_duration_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_duration_3') - - actor.addSkillMod('expertise_buff_duration_line_me_enhance', 600) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_duration_3') - - actor.removeSkillMod('expertise_buff_duration_line_me_enhance', 600) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_enhance_duration_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_enhance_duration_3") return diff --git a/scripts/expertise/expertise_me_enhance_precision_1.py b/scripts/expertise/expertise_me_enhance_precision_1.py index f12da671..c099937d 100644 --- a/scripts/expertise/expertise_me_enhance_precision_1.py +++ b/scripts/expertise/expertise_me_enhance_precision_1.py @@ -1,48 +1,16 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_precision_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_precision_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_enhance_precision_1') - + if actor.getLevel() >= 10: + actor.addAbility("me_enhance_precision_1") + if actor.getLevel() >= 34: + actor.addAbility("me_enhance_precision_2") + if actor.getLevel() >= 62: + actor.addAbility("me_enhance_precision_3") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_enhance_precision_1') - + actor.removeAbility("me_enhance_precision_1") + actor.removeAbility("me_enhance_precision_2") + actor.removeAbility("me_enhance_precision_3") return diff --git a/scripts/expertise/expertise_me_enhance_strength_1.py b/scripts/expertise/expertise_me_enhance_strength_1.py index 29bab818..693b0121 100644 --- a/scripts/expertise/expertise_me_enhance_strength_1.py +++ b/scripts/expertise/expertise_me_enhance_strength_1.py @@ -1,48 +1,16 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhance_strength_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhance_strength_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_enhance_strength_1') - + if actor.getLevel() >= 10: + actor.addAbility("me_enhance_strength_1") + if actor.getLevel() >= 34: + actor.addAbility("me_enhance_strength_2") + if actor.getLevel() >= 62: + actor.addAbility("me_enhance_strength_3") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_enhance_strength_1') - + actor.removeAbility("me_enhance_strength_1") + actor.removeAbility("me_enhance_strength_2") + actor.removeAbility("me_enhance_strength_3") return diff --git a/scripts/expertise/expertise_me_enhancement_specialist_1.py b/scripts/expertise/expertise_me_enhancement_specialist_1.py index 145b50e9..ebf28d79 100644 --- a/scripts/expertise/expertise_me_enhancement_specialist_1.py +++ b/scripts/expertise/expertise_me_enhancement_specialist_1.py @@ -1,48 +1,24 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_enhancement_specialist_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_enhancement_specialist_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_enhance_action_1') - + if actor.getLevel() >= 10: + actor.addAbility("me_enhance_action_1") + if actor.getLevel() >= 34: + actor.addAbility("me_enhance_action_2") + if actor.getLevel() >= 62: + actor.addAbility("me_enhance_action_3") + + if actor.getLevel() >= 48: + actor.addAbility("me_buff_health_2") + if actor.getLevel() >= 76: + actor.addAbility("me_buff_health_3") return def removeAbilities(core, actor, player): + actor.removeAbility("me_enhance_action_1") + actor.removeAbility("me_enhance_action_2") + actor.removeAbility("me_enhance_action_3") - actor.removeAbility('me_enhance_action_1') - + actor.removeAbility("me_buff_health_2") + actor.removeAbility("me_buff_health_3") return diff --git a/scripts/expertise/expertise_me_evasion_1.py b/scripts/expertise/expertise_me_evasion_1.py index 7e62f496..2bbcfee2 100644 --- a/scripts/expertise/expertise_me_evasion_1.py +++ b/scripts/expertise/expertise_me_evasion_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_evasion_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_evasion_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_evasion_1') - + actor.addAbility("me_evasion_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_evasion_1') - + actor.removeAbility("me_evasion_1") return diff --git a/scripts/expertise/expertise_me_heal_action_1.py b/scripts/expertise/expertise_me_heal_action_1.py index 984b1b6e..33f3254f 100644 --- a/scripts/expertise/expertise_me_heal_action_1.py +++ b/scripts/expertise/expertise_me_heal_action_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_heal_action_1') - - actor.addSkillMod('expertise_action_line_me_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_heal_action_1') - - actor.removeSkillMod('expertise_action_line_me_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_heal_action_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_heal_action_1") return diff --git a/scripts/expertise/expertise_me_heal_action_2.py b/scripts/expertise/expertise_me_heal_action_2.py index e650d1e5..b10d3548 100644 --- a/scripts/expertise/expertise_me_heal_action_2.py +++ b/scripts/expertise/expertise_me_heal_action_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_heal_action_2') - - actor.addSkillMod('expertise_action_line_me_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_heal_action_2') - - actor.removeSkillMod('expertise_action_line_me_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_heal_action_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_heal_action_2") return diff --git a/scripts/expertise/expertise_me_heal_action_3.py b/scripts/expertise/expertise_me_heal_action_3.py index a5457655..c009d1ae 100644 --- a/scripts/expertise/expertise_me_heal_action_3.py +++ b/scripts/expertise/expertise_me_heal_action_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_heal_action_3') - - actor.addSkillMod('expertise_action_line_me_heal', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_heal_action_3') - - actor.removeSkillMod('expertise_action_line_me_heal', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_heal_action_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_heal_action_3") return diff --git a/scripts/expertise/expertise_me_heal_damage_1.py b/scripts/expertise/expertise_me_heal_damage_1.py index 59b07cdf..ba2a72a5 100644 --- a/scripts/expertise/expertise_me_heal_damage_1.py +++ b/scripts/expertise/expertise_me_heal_damage_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_heal_damage_1') - - actor.addSkillMod('expertise_healing_line_me_heal', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_heal_damage_1') - - actor.removeSkillMod('expertise_healing_line_me_heal', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_heal_damage_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_heal_damage_1") return diff --git a/scripts/expertise/expertise_me_heal_damage_2.py b/scripts/expertise/expertise_me_heal_damage_2.py index c059fc9b..050ba76f 100644 --- a/scripts/expertise/expertise_me_heal_damage_2.py +++ b/scripts/expertise/expertise_me_heal_damage_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_heal_damage_2') - - actor.addSkillMod('expertise_healing_line_me_heal', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_heal_damage_2') - - actor.removeSkillMod('expertise_healing_line_me_heal', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_heal_damage_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_heal_damage_2") return diff --git a/scripts/expertise/expertise_me_heal_damage_3.py b/scripts/expertise/expertise_me_heal_damage_3.py index 94eb5732..3b85bde4 100644 --- a/scripts/expertise/expertise_me_heal_damage_3.py +++ b/scripts/expertise/expertise_me_heal_damage_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_heal_damage_3') - - actor.addSkillMod('expertise_healing_line_me_heal', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_heal_damage_3') - - actor.removeSkillMod('expertise_healing_line_me_heal', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_heal_damage_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_heal_damage_3") return diff --git a/scripts/expertise/expertise_me_heal_damage_4.py b/scripts/expertise/expertise_me_heal_damage_4.py index 85a946e6..e58ddb1a 100644 --- a/scripts/expertise/expertise_me_heal_damage_4.py +++ b/scripts/expertise/expertise_me_heal_damage_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_heal_damage_4') - - actor.addSkillMod('expertise_healing_line_me_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_heal_damage_4') - - actor.removeSkillMod('expertise_healing_line_me_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_heal_damage_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_heal_damage_4") return diff --git a/scripts/expertise/expertise_me_hot_duration_1.py b/scripts/expertise/expertise_me_hot_duration_1.py index dcdd6ac2..c18a4e36 100644 --- a/scripts/expertise/expertise_me_hot_duration_1.py +++ b/scripts/expertise/expertise_me_hot_duration_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_hot_duration_1') - - actor.addSkillMod('expertise_healing_line_me_hot', 10) - actor.addSkillMod('expertise_healing_line_me_hot_ae', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_hot_duration_1') - - actor.removeSkillMod('expertise_healing_line_me_hot', 10) - actor.removeSkillMod('expertise_healing_line_me_hot_ae', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_hot_duration_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_hot_duration_1") return diff --git a/scripts/expertise/expertise_me_hot_duration_2.py b/scripts/expertise/expertise_me_hot_duration_2.py index dccbe005..e89e515c 100644 --- a/scripts/expertise/expertise_me_hot_duration_2.py +++ b/scripts/expertise/expertise_me_hot_duration_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_hot_duration_2') - - actor.addSkillMod('expertise_healing_line_me_hot', 10) - actor.addSkillMod('expertise_healing_line_me_hot_ae', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_hot_duration_2') - - actor.removeSkillMod('expertise_healing_line_me_hot', 10) - actor.removeSkillMod('expertise_healing_line_me_hot_ae', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_hot_duration_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_hot_duration_2") return diff --git a/scripts/expertise/expertise_me_hot_duration_3.py b/scripts/expertise/expertise_me_hot_duration_3.py index 558430c1..ef238d8d 100644 --- a/scripts/expertise/expertise_me_hot_duration_3.py +++ b/scripts/expertise/expertise_me_hot_duration_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_hot_duration_3') - - actor.addSkillMod('expertise_healing_line_me_hot', 15) - actor.addSkillMod('expertise_healing_line_me_hot_ae', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_hot_duration_3') - - actor.removeSkillMod('expertise_healing_line_me_hot', 15) - actor.removeSkillMod('expertise_healing_line_me_hot_ae', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_hot_duration_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_hot_duration_3") return diff --git a/scripts/expertise/expertise_me_hot_duration_4.py b/scripts/expertise/expertise_me_hot_duration_4.py index 9783531f..16368742 100644 --- a/scripts/expertise/expertise_me_hot_duration_4.py +++ b/scripts/expertise/expertise_me_hot_duration_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_hot_duration_4') - - actor.addSkillMod('expertise_healing_line_me_hot', 15) - actor.addSkillMod('expertise_healing_line_me_hot_ae', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_hot_duration_4') - - actor.removeSkillMod('expertise_healing_line_me_hot', 15) - actor.removeSkillMod('expertise_healing_line_me_hot_ae', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_hot_duration_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_hot_duration_4") return diff --git a/scripts/expertise/expertise_me_humanoid_crits_1.py b/scripts/expertise/expertise_me_humanoid_crits_1.py index 4176b559..482342f3 100644 --- a/scripts/expertise/expertise_me_humanoid_crits_1.py +++ b/scripts/expertise/expertise_me_humanoid_crits_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_humanoid_crits_1') - - actor.addSkillMod('expertise_critical_niche_pvp', 1) - actor.addSkillMod('expertise_critical_niche_npc', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_humanoid_crits_1') - - actor.removeSkillMod('expertise_critical_niche_pvp', 1) - actor.removeSkillMod('expertise_critical_niche_npc', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_humanoid_crits_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_humanoid_crits_1") return diff --git a/scripts/expertise/expertise_me_humanoid_crits_2.py b/scripts/expertise/expertise_me_humanoid_crits_2.py index dd7995cb..085396cc 100644 --- a/scripts/expertise/expertise_me_humanoid_crits_2.py +++ b/scripts/expertise/expertise_me_humanoid_crits_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_humanoid_crits_2') - - actor.addSkillMod('expertise_critical_niche_pvp', 2) - actor.addSkillMod('expertise_critical_niche_npc', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_humanoid_crits_2') - - actor.removeSkillMod('expertise_critical_niche_pvp', 2) - actor.removeSkillMod('expertise_critical_niche_npc', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_humanoid_crits_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_humanoid_crits_2") return diff --git a/scripts/expertise/expertise_me_humanoid_crits_3.py b/scripts/expertise/expertise_me_humanoid_crits_3.py index 2351be93..7392d917 100644 --- a/scripts/expertise/expertise_me_humanoid_crits_3.py +++ b/scripts/expertise/expertise_me_humanoid_crits_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_humanoid_crits_3') - - actor.addSkillMod('expertise_critical_niche_pvp', 2) - actor.addSkillMod('expertise_critical_niche_npc', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_humanoid_crits_3') - - actor.removeSkillMod('expertise_critical_niche_pvp', 2) - actor.removeSkillMod('expertise_critical_niche_npc', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_humanoid_crits_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_humanoid_crits_3") return diff --git a/scripts/expertise/expertise_me_induce_insanity_1.py b/scripts/expertise/expertise_me_induce_insanity_1.py index 10f45c55..2817bc0a 100644 --- a/scripts/expertise/expertise_me_induce_insanity_1.py +++ b/scripts/expertise/expertise_me_induce_insanity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_induce_insanity_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_induce_insanity_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_induce_insanity_1') - + actor.addAbility("me_induce_insanity_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_induce_insanity_1') - + actor.removeAbility("me_induce_insanity_1") return diff --git a/scripts/expertise/expertise_me_kinetic_armor_1.py b/scripts/expertise/expertise_me_kinetic_armor_1.py index 26b5dea7..8d78e253 100644 --- a/scripts/expertise/expertise_me_kinetic_armor_1.py +++ b/scripts/expertise/expertise_me_kinetic_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_kinetic_armor_1') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_kinetic_armor_1') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_kinetic_armor_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_kinetic_armor_1") return diff --git a/scripts/expertise/expertise_me_kinetic_armor_2.py b/scripts/expertise/expertise_me_kinetic_armor_2.py index 72f3ba66..ab5c5e71 100644 --- a/scripts/expertise/expertise_me_kinetic_armor_2.py +++ b/scripts/expertise/expertise_me_kinetic_armor_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_kinetic_armor_2') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_kinetic_armor_2') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_kinetic_armor_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_kinetic_armor_2") return diff --git a/scripts/expertise/expertise_me_kinetic_armor_3.py b/scripts/expertise/expertise_me_kinetic_armor_3.py index 794c9185..dcdb9751 100644 --- a/scripts/expertise/expertise_me_kinetic_armor_3.py +++ b/scripts/expertise/expertise_me_kinetic_armor_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_kinetic_armor_3') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_kinetic_armor_3') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_kinetic_armor_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_kinetic_armor_3") return diff --git a/scripts/expertise/expertise_me_kinetic_armor_4.py b/scripts/expertise/expertise_me_kinetic_armor_4.py index 722e4b58..1982a785 100644 --- a/scripts/expertise/expertise_me_kinetic_armor_4.py +++ b/scripts/expertise/expertise_me_kinetic_armor_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_kinetic_armor_4') - - actor.addSkillMod('expertise_innate_protection_all', 225) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_kinetic_armor_4') - - actor.removeSkillMod('expertise_innate_protection_all', 225) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_kinetic_armor_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_kinetic_armor_4") return diff --git a/scripts/expertise/expertise_me_poison_knuckle_1.py b/scripts/expertise/expertise_me_poison_knuckle_1.py index 2b6b617e..7b436d7b 100644 --- a/scripts/expertise/expertise_me_poison_knuckle_1.py +++ b/scripts/expertise/expertise_me_poison_knuckle_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_poison_knuckle_1') - - actor.addSkillMod('expertise_poison_knuckle_proc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_poison_knuckle_1') - - actor.removeSkillMod('expertise_poison_knuckle_proc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_poison_knuckle_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_poison_knuckle_1") return diff --git a/scripts/expertise/expertise_me_precision_1.py b/scripts/expertise/expertise_me_precision_1.py index 8c6f96ed..0d344061 100644 --- a/scripts/expertise/expertise_me_precision_1.py +++ b/scripts/expertise/expertise_me_precision_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_precision_1') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_precision_1') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_precision_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_precision_1") return diff --git a/scripts/expertise/expertise_me_precision_2.py b/scripts/expertise/expertise_me_precision_2.py index 2873f46c..6857d3a2 100644 --- a/scripts/expertise/expertise_me_precision_2.py +++ b/scripts/expertise/expertise_me_precision_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_precision_2') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_precision_2') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_precision_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_precision_2") return diff --git a/scripts/expertise/expertise_me_precision_3.py b/scripts/expertise/expertise_me_precision_3.py index d8996229..bb36eea4 100644 --- a/scripts/expertise/expertise_me_precision_3.py +++ b/scripts/expertise/expertise_me_precision_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_precision_3') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_precision_3') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_precision_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_precision_3") return diff --git a/scripts/expertise/expertise_me_precision_4.py b/scripts/expertise/expertise_me_precision_4.py index 2a2643bb..c32b63ff 100644 --- a/scripts/expertise/expertise_me_precision_4.py +++ b/scripts/expertise/expertise_me_precision_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_precision_4') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_precision_4') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_precision_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_precision_4") return diff --git a/scripts/expertise/expertise_me_reckless_stimulation_1.py b/scripts/expertise/expertise_me_reckless_stimulation_1.py index d8085f3b..0be74ed4 100644 --- a/scripts/expertise/expertise_me_reckless_stimulation_1.py +++ b/scripts/expertise/expertise_me_reckless_stimulation_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_reckless_stimulation_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_reckless_stimulation_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_reckless_stimulation_1') - + actor.addAbility("me_reckless_stimulation_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_reckless_stimulation_1') - + actor.removeAbility("me_reckless_stimulation_1") return diff --git a/scripts/expertise/expertise_me_revive_duration_1.py b/scripts/expertise/expertise_me_revive_duration_1.py index 17a19551..d2bcc4ba 100644 --- a/scripts/expertise/expertise_me_revive_duration_1.py +++ b/scripts/expertise/expertise_me_revive_duration_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_revive_duration_1') - - actor.addSkillMod('expertise_cooldown_line_me_revive', 5) - actor.addSkillMod('expertise_cooldown_line_me_aoe_revive', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_revive_duration_1') - - actor.removeSkillMod('expertise_cooldown_line_me_revive', 5) - actor.removeSkillMod('expertise_cooldown_line_me_aoe_revive', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_revive_duration_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_revive_duration_1") return diff --git a/scripts/expertise/expertise_me_revive_duration_2.py b/scripts/expertise/expertise_me_revive_duration_2.py index ffe5144d..5c8a9035 100644 --- a/scripts/expertise/expertise_me_revive_duration_2.py +++ b/scripts/expertise/expertise_me_revive_duration_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_revive_duration_2') - - actor.addSkillMod('expertise_cooldown_line_me_revive', 5) - actor.addSkillMod('expertise_cooldown_line_me_aoe_revive', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_revive_duration_2') - - actor.removeSkillMod('expertise_cooldown_line_me_revive', 5) - actor.removeSkillMod('expertise_cooldown_line_me_aoe_revive', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_revive_duration_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_revive_duration_2") return diff --git a/scripts/expertise/expertise_me_revive_duration_3.py b/scripts/expertise/expertise_me_revive_duration_3.py index 4d89125e..0ed33a9b 100644 --- a/scripts/expertise/expertise_me_revive_duration_3.py +++ b/scripts/expertise/expertise_me_revive_duration_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_revive_duration_3') - - actor.addSkillMod('expertise_cooldown_line_me_revive', 5) - actor.addSkillMod('expertise_cooldown_line_me_aoe_revive', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_revive_duration_3') - - actor.removeSkillMod('expertise_cooldown_line_me_revive', 5) - actor.removeSkillMod('expertise_cooldown_line_me_aoe_revive', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_revive_duration_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_revive_duration_3") return diff --git a/scripts/expertise/expertise_me_serotonin_boost_1.py b/scripts/expertise/expertise_me_serotonin_boost_1.py index be920b81..13420734 100644 --- a/scripts/expertise/expertise_me_serotonin_boost_1.py +++ b/scripts/expertise/expertise_me_serotonin_boost_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_serotonin_boost_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_serotonin_boost_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_serotonin_boost_1') - + actor.addAbility("me_serotonin_boost_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_serotonin_boost_1') - + actor.removeAbility("me_serotonin_boost_1") return diff --git a/scripts/expertise/expertise_me_serotonin_purge_1.py b/scripts/expertise/expertise_me_serotonin_purge_1.py index 34a60137..54972a5b 100644 --- a/scripts/expertise/expertise_me_serotonin_purge_1.py +++ b/scripts/expertise/expertise_me_serotonin_purge_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_serotonin_purge_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_serotonin_purge_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_serotonin_purge_1') - + actor.addAbility("me_serotonin_purge_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_serotonin_purge_1') - + actor.removeAbility("me_serotonin_purge_1") return diff --git a/scripts/expertise/expertise_me_stasis_1.py b/scripts/expertise/expertise_me_stasis_1.py index f174c539..746687ba 100644 --- a/scripts/expertise/expertise_me_stasis_1.py +++ b/scripts/expertise/expertise_me_stasis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_stasis_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_stasis_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_stasis_1') - + actor.addAbility("me_stasis_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_stasis_1') - + actor.removeAbility("me_stasis_1") return diff --git a/scripts/expertise/expertise_me_strength_1.py b/scripts/expertise/expertise_me_strength_1.py index b266ed84..9c3faac3 100644 --- a/scripts/expertise/expertise_me_strength_1.py +++ b/scripts/expertise/expertise_me_strength_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_strength_1') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_strength_1') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_strength_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_strength_1") return diff --git a/scripts/expertise/expertise_me_strength_2.py b/scripts/expertise/expertise_me_strength_2.py index 99f72bb5..fa2bc7b7 100644 --- a/scripts/expertise/expertise_me_strength_2.py +++ b/scripts/expertise/expertise_me_strength_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_strength_2') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_strength_2') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_strength_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_strength_2") return diff --git a/scripts/expertise/expertise_me_strength_3.py b/scripts/expertise/expertise_me_strength_3.py index f677cd7e..89f7a7a1 100644 --- a/scripts/expertise/expertise_me_strength_3.py +++ b/scripts/expertise/expertise_me_strength_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_strength_3') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_strength_3') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_strength_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_strength_3") return diff --git a/scripts/expertise/expertise_me_strength_4.py b/scripts/expertise/expertise_me_strength_4.py index 6da9d910..d3e48b21 100644 --- a/scripts/expertise/expertise_me_strength_4.py +++ b/scripts/expertise/expertise_me_strength_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_strength_4') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_strength_4') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_strength_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_strength_4") return diff --git a/scripts/expertise/expertise_me_thyroid_rupture_1.py b/scripts/expertise/expertise_me_thyroid_rupture_1.py index 229a2796..895d8882 100644 --- a/scripts/expertise/expertise_me_thyroid_rupture_1.py +++ b/scripts/expertise/expertise_me_thyroid_rupture_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_thyroid_rupture_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_thyroid_rupture_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_thyroid_rupture_1') - + actor.addAbility("me_thyroid_rupture_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_thyroid_rupture_1') - + actor.removeAbility("me_thyroid_rupture_1") return diff --git a/scripts/expertise/expertise_me_traumatize_1.py b/scripts/expertise/expertise_me_traumatize_1.py index 69856b36..4269ec8e 100644 --- a/scripts/expertise/expertise_me_traumatize_1.py +++ b/scripts/expertise/expertise_me_traumatize_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_traumatize_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_traumatize_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('me_traumatize_1') - + actor.addAbility("me_traumatize_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('me_traumatize_1') - + actor.removeAbility("me_traumatize_1") return diff --git a/scripts/expertise/expertise_me_unarmed_crit_1.py b/scripts/expertise/expertise_me_unarmed_crit_1.py index 77d9b653..529ff739 100644 --- a/scripts/expertise/expertise_me_unarmed_crit_1.py +++ b/scripts/expertise/expertise_me_unarmed_crit_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_unarmed_crit_1') - - actor.addSkillMod('expertise_undiminished_critical_melee', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_unarmed_crit_1') - - actor.removeSkillMod('expertise_undiminished_critical_melee', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_unarmed_crit_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_unarmed_crit_1") return diff --git a/scripts/expertise/expertise_me_unarmed_crit_2.py b/scripts/expertise/expertise_me_unarmed_crit_2.py index 5a6bb469..4b18402e 100644 --- a/scripts/expertise/expertise_me_unarmed_crit_2.py +++ b/scripts/expertise/expertise_me_unarmed_crit_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_unarmed_crit_2') - - actor.addSkillMod('expertise_undiminished_critical_melee', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_unarmed_crit_2') - - actor.removeSkillMod('expertise_undiminished_critical_melee', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_unarmed_crit_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_unarmed_crit_2") return diff --git a/scripts/expertise/expertise_me_unarmed_crit_3.py b/scripts/expertise/expertise_me_unarmed_crit_3.py index f5c332ea..8ba3de99 100644 --- a/scripts/expertise/expertise_me_unarmed_crit_3.py +++ b/scripts/expertise/expertise_me_unarmed_crit_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_unarmed_crit_3') - - actor.addSkillMod('expertise_undiminished_critical_melee', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_unarmed_crit_3') - - actor.removeSkillMod('expertise_undiminished_critical_melee', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_unarmed_crit_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_unarmed_crit_3") return diff --git a/scripts/expertise/expertise_me_unarmed_damage_1.py b/scripts/expertise/expertise_me_unarmed_damage_1.py index aa61fb7e..6b81c0bb 100644 --- a/scripts/expertise/expertise_me_unarmed_damage_1.py +++ b/scripts/expertise/expertise_me_unarmed_damage_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_unarmed_damage_1') - - actor.addSkillMod('expertise_damage_melee', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_unarmed_damage_1') - - actor.removeSkillMod('expertise_damage_melee', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_unarmed_damage_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_unarmed_damage_1") return diff --git a/scripts/expertise/expertise_me_unarmed_damage_2.py b/scripts/expertise/expertise_me_unarmed_damage_2.py index 7a11aedc..9bb4a83d 100644 --- a/scripts/expertise/expertise_me_unarmed_damage_2.py +++ b/scripts/expertise/expertise_me_unarmed_damage_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_unarmed_damage_2') - - actor.addSkillMod('expertise_damage_melee', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_unarmed_damage_2') - - actor.removeSkillMod('expertise_damage_melee', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_unarmed_damage_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_unarmed_damage_2") return diff --git a/scripts/expertise/expertise_me_unarmed_damage_3.py b/scripts/expertise/expertise_me_unarmed_damage_3.py index 9ca773ae..cd4660fa 100644 --- a/scripts/expertise/expertise_me_unarmed_damage_3.py +++ b/scripts/expertise/expertise_me_unarmed_damage_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_unarmed_damage_3') - - actor.addSkillMod('expertise_damage_melee', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_unarmed_damage_3') - - actor.removeSkillMod('expertise_damage_melee', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_unarmed_damage_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_unarmed_damage_3") return diff --git a/scripts/expertise/expertise_me_unarmed_damage_4.py b/scripts/expertise/expertise_me_unarmed_damage_4.py index 8164d9c5..8df37d4d 100644 --- a/scripts/expertise/expertise_me_unarmed_damage_4.py +++ b/scripts/expertise/expertise_me_unarmed_damage_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_unarmed_damage_4') - - actor.addSkillMod('expertise_damage_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_unarmed_damage_4') - - actor.removeSkillMod('expertise_damage_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_unarmed_damage_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_unarmed_damage_4") return diff --git a/scripts/expertise/expertise_me_vital_action_1.py b/scripts/expertise/expertise_me_vital_action_1.py index ac935c5d..60a8e9e4 100644 --- a/scripts/expertise/expertise_me_vital_action_1.py +++ b/scripts/expertise/expertise_me_vital_action_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_action_1') - - actor.addSkillMod('expertise_action_line_me_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_action_1') - - actor.removeSkillMod('expertise_action_line_me_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_action_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_action_1") return diff --git a/scripts/expertise/expertise_me_vital_action_2.py b/scripts/expertise/expertise_me_vital_action_2.py index a3614ac8..a8d0ea03 100644 --- a/scripts/expertise/expertise_me_vital_action_2.py +++ b/scripts/expertise/expertise_me_vital_action_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_action_2') - - actor.addSkillMod('expertise_action_line_me_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_action_2') - - actor.removeSkillMod('expertise_action_line_me_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_action_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_action_2") return diff --git a/scripts/expertise/expertise_me_vital_action_3.py b/scripts/expertise/expertise_me_vital_action_3.py index cfdcac09..bd0965c7 100644 --- a/scripts/expertise/expertise_me_vital_action_3.py +++ b/scripts/expertise/expertise_me_vital_action_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_action_3') - - actor.addSkillMod('expertise_action_line_me_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_action_3') - - actor.removeSkillMod('expertise_action_line_me_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_action_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_action_3") return diff --git a/scripts/expertise/expertise_me_vital_action_4.py b/scripts/expertise/expertise_me_vital_action_4.py index df14ebf9..ffcab6ff 100644 --- a/scripts/expertise/expertise_me_vital_action_4.py +++ b/scripts/expertise/expertise_me_vital_action_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_action_4') - - actor.addSkillMod('expertise_action_line_me_dm', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_action_4') - - actor.removeSkillMod('expertise_action_line_me_dm', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_action_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_action_4") return diff --git a/scripts/expertise/expertise_me_vital_damage_1.py b/scripts/expertise/expertise_me_vital_damage_1.py index a3b86e64..8783041a 100644 --- a/scripts/expertise/expertise_me_vital_damage_1.py +++ b/scripts/expertise/expertise_me_vital_damage_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_damage_1') - - actor.addSkillMod('expertise_damage_line_me_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_damage_1') - - actor.removeSkillMod('expertise_damage_line_me_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_damage_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_damage_1") return diff --git a/scripts/expertise/expertise_me_vital_damage_2.py b/scripts/expertise/expertise_me_vital_damage_2.py index 425891d3..727ee2fd 100644 --- a/scripts/expertise/expertise_me_vital_damage_2.py +++ b/scripts/expertise/expertise_me_vital_damage_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_damage_2') - - actor.addSkillMod('expertise_damage_line_me_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_damage_2') - - actor.removeSkillMod('expertise_damage_line_me_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_damage_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_damage_2") return diff --git a/scripts/expertise/expertise_me_vital_damage_3.py b/scripts/expertise/expertise_me_vital_damage_3.py index d1c6b17d..0e35314c 100644 --- a/scripts/expertise/expertise_me_vital_damage_3.py +++ b/scripts/expertise/expertise_me_vital_damage_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_damage_3') - - actor.addSkillMod('expertise_damage_line_me_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_damage_3') - - actor.removeSkillMod('expertise_damage_line_me_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_damage_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_damage_3") return diff --git a/scripts/expertise/expertise_me_vital_damage_4.py b/scripts/expertise/expertise_me_vital_damage_4.py index fbeb571c..bb634713 100644 --- a/scripts/expertise/expertise_me_vital_damage_4.py +++ b/scripts/expertise/expertise_me_vital_damage_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.addSkill('expertise_me_vital_damage_4') - - actor.addSkillMod('expertise_damage_line_me_dm', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'medic_1a': - return - - actor.removeSkill('expertise_me_vital_damage_4') - - actor.removeSkillMod('expertise_damage_line_me_dm', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_me_vital_damage_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_me_vital_damage_4") return diff --git a/scripts/expertise/expertise_munition_armorsmith_advanced_theory_1.py b/scripts/expertise/expertise_munition_armorsmith_advanced_theory_1.py index c7b03de3..dd347899 100644 --- a/scripts/expertise/expertise_munition_armorsmith_advanced_theory_1.py +++ b/scripts/expertise/expertise_munition_armorsmith_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_advanced_theory_1') - - actor.addSkillMod('armor_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_advanced_theory_1') - - actor.removeSkillMod('armor_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_advanced_theory_1") return diff --git a/scripts/expertise/expertise_munition_armorsmith_attachment_upgrade_1.py b/scripts/expertise/expertise_munition_armorsmith_attachment_upgrade_1.py index 00e4e545..4f4ae755 100644 --- a/scripts/expertise/expertise_munition_armorsmith_attachment_upgrade_1.py +++ b/scripts/expertise/expertise_munition_armorsmith_attachment_upgrade_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_attachment_upgrade_1') - - actor.addSkillMod('expertise_attachment_upgrade', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_attachment_upgrade_1') - - actor.removeSkillMod('expertise_attachment_upgrade', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_attachment_upgrade_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_attachment_upgrade_1") return diff --git a/scripts/expertise/expertise_munition_armorsmith_dexterity_1.py b/scripts/expertise/expertise_munition_armorsmith_dexterity_1.py index 81d08c77..60cea356 100644 --- a/scripts/expertise/expertise_munition_armorsmith_dexterity_1.py +++ b/scripts/expertise/expertise_munition_armorsmith_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_dexterity_1') - - actor.addSkillMod('armor_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_dexterity_1') - - actor.removeSkillMod('armor_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_dexterity_1") return diff --git a/scripts/expertise/expertise_munition_armorsmith_dexterity_2.py b/scripts/expertise/expertise_munition_armorsmith_dexterity_2.py index 9c217bba..1cfed98e 100644 --- a/scripts/expertise/expertise_munition_armorsmith_dexterity_2.py +++ b/scripts/expertise/expertise_munition_armorsmith_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_dexterity_2') - - actor.addSkillMod('armor_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_dexterity_2') - - actor.removeSkillMod('armor_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_dexterity_2") return diff --git a/scripts/expertise/expertise_munition_armorsmith_dexterity_3.py b/scripts/expertise/expertise_munition_armorsmith_dexterity_3.py index e26013a5..550545ec 100644 --- a/scripts/expertise/expertise_munition_armorsmith_dexterity_3.py +++ b/scripts/expertise/expertise_munition_armorsmith_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_dexterity_3') - - actor.addSkillMod('armor_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_dexterity_3') - - actor.removeSkillMod('armor_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_dexterity_3") return diff --git a/scripts/expertise/expertise_munition_armorsmith_dexterity_4.py b/scripts/expertise/expertise_munition_armorsmith_dexterity_4.py index 96c50f98..0467db0c 100644 --- a/scripts/expertise/expertise_munition_armorsmith_dexterity_4.py +++ b/scripts/expertise/expertise_munition_armorsmith_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_dexterity_4') - - actor.addSkillMod('armor_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_dexterity_4') - - actor.removeSkillMod('armor_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_dexterity_4") return diff --git a/scripts/expertise/expertise_munition_armorsmith_hypothesis_1.py b/scripts/expertise/expertise_munition_armorsmith_hypothesis_1.py index df25bf70..a813988d 100644 --- a/scripts/expertise/expertise_munition_armorsmith_hypothesis_1.py +++ b/scripts/expertise/expertise_munition_armorsmith_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_armorsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_armorsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_hypothesis_1") return diff --git a/scripts/expertise/expertise_munition_armorsmith_hypothesis_2.py b/scripts/expertise/expertise_munition_armorsmith_hypothesis_2.py index 03d1cd9e..3e1df126 100644 --- a/scripts/expertise/expertise_munition_armorsmith_hypothesis_2.py +++ b/scripts/expertise/expertise_munition_armorsmith_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_armorsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_armorsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_hypothesis_2") return diff --git a/scripts/expertise/expertise_munition_armorsmith_hypothesis_3.py b/scripts/expertise/expertise_munition_armorsmith_hypothesis_3.py index 31e3d0a5..641c52c8 100644 --- a/scripts/expertise/expertise_munition_armorsmith_hypothesis_3.py +++ b/scripts/expertise/expertise_munition_armorsmith_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_armorsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_armorsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_hypothesis_3") return diff --git a/scripts/expertise/expertise_munition_armorsmith_hypothesis_4.py b/scripts/expertise/expertise_munition_armorsmith_hypothesis_4.py index 3aaf3ca5..94bf9c1e 100644 --- a/scripts/expertise/expertise_munition_armorsmith_hypothesis_4.py +++ b/scripts/expertise/expertise_munition_armorsmith_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_armorsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_armorsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_hypothesis_4") return diff --git a/scripts/expertise/expertise_munition_armorsmith_insight_1.py b/scripts/expertise/expertise_munition_armorsmith_insight_1.py index f4836dd3..682413ee 100644 --- a/scripts/expertise/expertise_munition_armorsmith_insight_1.py +++ b/scripts/expertise/expertise_munition_armorsmith_insight_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_insight_1') - - actor.addSkillMod('expertise_complexity_decrease_armorsmith', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_insight_1') - - actor.removeSkillMod('expertise_complexity_decrease_armorsmith', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_insight_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_insight_1") return diff --git a/scripts/expertise/expertise_munition_armorsmith_insight_2.py b/scripts/expertise/expertise_munition_armorsmith_insight_2.py index d0b5d3b0..a1ddebae 100644 --- a/scripts/expertise/expertise_munition_armorsmith_insight_2.py +++ b/scripts/expertise/expertise_munition_armorsmith_insight_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_insight_2') - - actor.addSkillMod('expertise_complexity_decrease_armorsmith', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_insight_2') - - actor.removeSkillMod('expertise_complexity_decrease_armorsmith', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_insight_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_insight_2") return diff --git a/scripts/expertise/expertise_munition_armorsmith_keen_understanding_1.py b/scripts/expertise/expertise_munition_armorsmith_keen_understanding_1.py index 9b7863bb..4b919776 100644 --- a/scripts/expertise/expertise_munition_armorsmith_keen_understanding_1.py +++ b/scripts/expertise/expertise_munition_armorsmith_keen_understanding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_keen_understanding_1') - - actor.addSkillMod('expertise_complexity_decrease_armorsmith', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_keen_understanding_1') - - actor.removeSkillMod('expertise_complexity_decrease_armorsmith', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_keen_understanding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_keen_understanding_1") return diff --git a/scripts/expertise/expertise_munition_armorsmith_keen_understanding_2.py b/scripts/expertise/expertise_munition_armorsmith_keen_understanding_2.py index 9671c726..68063fba 100644 --- a/scripts/expertise/expertise_munition_armorsmith_keen_understanding_2.py +++ b/scripts/expertise/expertise_munition_armorsmith_keen_understanding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_keen_understanding_2') - - actor.addSkillMod('expertise_complexity_decrease_armorsmith', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_keen_understanding_2') - - actor.removeSkillMod('expertise_complexity_decrease_armorsmith', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_keen_understand_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_keen_understand_2") return diff --git a/scripts/expertise/expertise_munition_armorsmith_socket_bonus_1.py b/scripts/expertise/expertise_munition_armorsmith_socket_bonus_1.py index 31a4bf81..87f97e77 100644 --- a/scripts/expertise/expertise_munition_armorsmith_socket_bonus_1.py +++ b/scripts/expertise/expertise_munition_armorsmith_socket_bonus_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_armorsmith_socket_bonus_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_armorsmith_socket_bonus_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_armorsmith_socket_bonus_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_armorsmith_socket_bonus_1") return diff --git a/scripts/expertise/expertise_munition_artisan_advanced_theory_1.py b/scripts/expertise/expertise_munition_artisan_advanced_theory_1.py index 1e5fe723..52843271 100644 --- a/scripts/expertise/expertise_munition_artisan_advanced_theory_1.py +++ b/scripts/expertise/expertise_munition_artisan_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_advanced_theory_1') - - actor.addSkillMod('general_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_advanced_theory_1') - - actor.removeSkillMod('general_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_advanced_theory_1") return diff --git a/scripts/expertise/expertise_munition_artisan_dexterity_1.py b/scripts/expertise/expertise_munition_artisan_dexterity_1.py index 638088a7..3c7654c3 100644 --- a/scripts/expertise/expertise_munition_artisan_dexterity_1.py +++ b/scripts/expertise/expertise_munition_artisan_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_dexterity_1') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_dexterity_1') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_dexterity_1") return diff --git a/scripts/expertise/expertise_munition_artisan_dexterity_2.py b/scripts/expertise/expertise_munition_artisan_dexterity_2.py index 447143e8..100dd414 100644 --- a/scripts/expertise/expertise_munition_artisan_dexterity_2.py +++ b/scripts/expertise/expertise_munition_artisan_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_dexterity_2') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_dexterity_2') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_dexterity_2") return diff --git a/scripts/expertise/expertise_munition_artisan_dexterity_3.py b/scripts/expertise/expertise_munition_artisan_dexterity_3.py index 2100f2c7..aa5cdd64 100644 --- a/scripts/expertise/expertise_munition_artisan_dexterity_3.py +++ b/scripts/expertise/expertise_munition_artisan_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_dexterity_3') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_dexterity_3') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_dexterity_3") return diff --git a/scripts/expertise/expertise_munition_artisan_dexterity_4.py b/scripts/expertise/expertise_munition_artisan_dexterity_4.py index 4442f4d5..4dd8ecbb 100644 --- a/scripts/expertise/expertise_munition_artisan_dexterity_4.py +++ b/scripts/expertise/expertise_munition_artisan_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_dexterity_4') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_dexterity_4') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_dexterity_4") return diff --git a/scripts/expertise/expertise_munition_artisan_hypothesis_1.py b/scripts/expertise/expertise_munition_artisan_hypothesis_1.py index 80d37471..24cb3aae 100644 --- a/scripts/expertise/expertise_munition_artisan_hypothesis_1.py +++ b/scripts/expertise/expertise_munition_artisan_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_hypothesis_1") return diff --git a/scripts/expertise/expertise_munition_artisan_hypothesis_2.py b/scripts/expertise/expertise_munition_artisan_hypothesis_2.py index d842f507..99447075 100644 --- a/scripts/expertise/expertise_munition_artisan_hypothesis_2.py +++ b/scripts/expertise/expertise_munition_artisan_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_hypothesis_2") return diff --git a/scripts/expertise/expertise_munition_artisan_hypothesis_3.py b/scripts/expertise/expertise_munition_artisan_hypothesis_3.py index c4498501..a18d8365 100644 --- a/scripts/expertise/expertise_munition_artisan_hypothesis_3.py +++ b/scripts/expertise/expertise_munition_artisan_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_hypothesis_3") return diff --git a/scripts/expertise/expertise_munition_artisan_hypothesis_4.py b/scripts/expertise/expertise_munition_artisan_hypothesis_4.py index 9e217fe9..35ee3e44 100644 --- a/scripts/expertise/expertise_munition_artisan_hypothesis_4.py +++ b/scripts/expertise/expertise_munition_artisan_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_artisan_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_artisan_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_artisan_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_artisan_hypothesis_4") return diff --git a/scripts/expertise/expertise_munition_resource_processing_1.py b/scripts/expertise/expertise_munition_resource_processing_1.py index cbbef8f6..46b265dc 100644 --- a/scripts/expertise/expertise_munition_resource_processing_1.py +++ b/scripts/expertise/expertise_munition_resource_processing_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_resource_processing_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_resource_processing_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_resource_processing_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_resource_processing_1") return diff --git a/scripts/expertise/expertise_munition_resource_processing_2.py b/scripts/expertise/expertise_munition_resource_processing_2.py index 02eed65b..f188f336 100644 --- a/scripts/expertise/expertise_munition_resource_processing_2.py +++ b/scripts/expertise/expertise_munition_resource_processing_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_resource_processing_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_resource_processing_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_resource_processing_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_resource_processing_2") return diff --git a/scripts/expertise/expertise_munition_resource_refinement_1.py b/scripts/expertise/expertise_munition_resource_refinement_1.py index 0d500f72..855d585b 100644 --- a/scripts/expertise/expertise_munition_resource_refinement_1.py +++ b/scripts/expertise/expertise_munition_resource_refinement_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_resource_refinement_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_resource_refinement_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_resource_refinement_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_resource_refinement_1") return diff --git a/scripts/expertise/expertise_munition_resource_refinement_2.py b/scripts/expertise/expertise_munition_resource_refinement_2.py index 5b794681..e4536a48 100644 --- a/scripts/expertise/expertise_munition_resource_refinement_2.py +++ b/scripts/expertise/expertise_munition_resource_refinement_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_resource_refinement_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_resource_refinement_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_resource_refinement_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_resource_refinement_2") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_advanced_theory_1.py b/scripts/expertise/expertise_munition_weaponsmith_advanced_theory_1.py index bfd79df3..6b248343 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_advanced_theory_1.py +++ b/scripts/expertise/expertise_munition_weaponsmith_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_advanced_theory_1') - - actor.addSkillMod('weapon_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_advanced_theory_1') - - actor.removeSkillMod('weapon_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_advanced_theory_1") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_dexterity_1.py b/scripts/expertise/expertise_munition_weaponsmith_dexterity_1.py index fd035fd8..78a141b6 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_dexterity_1.py +++ b/scripts/expertise/expertise_munition_weaponsmith_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_dexterity_1') - - actor.addSkillMod('weapon_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_dexterity_1') - - actor.removeSkillMod('weapon_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_dexterity_1") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_dexterity_2.py b/scripts/expertise/expertise_munition_weaponsmith_dexterity_2.py index 6e0ace46..978ba95f 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_dexterity_2.py +++ b/scripts/expertise/expertise_munition_weaponsmith_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_dexterity_2') - - actor.addSkillMod('weapon_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_dexterity_2') - - actor.removeSkillMod('weapon_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_dexterity_2") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_dexterity_3.py b/scripts/expertise/expertise_munition_weaponsmith_dexterity_3.py index 7ca11203..c386a1ac 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_dexterity_3.py +++ b/scripts/expertise/expertise_munition_weaponsmith_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_dexterity_3') - - actor.addSkillMod('weapon_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_dexterity_3') - - actor.removeSkillMod('weapon_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_dexterity_3") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_dexterity_4.py b/scripts/expertise/expertise_munition_weaponsmith_dexterity_4.py index 492a2b7f..22d08692 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_dexterity_4.py +++ b/scripts/expertise/expertise_munition_weaponsmith_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_dexterity_4') - - actor.addSkillMod('weapon_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_dexterity_4') - - actor.removeSkillMod('weapon_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_dexterity_4") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_1.py b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_1.py index 01a84b79..33a64c97 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_1.py +++ b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_hypothesis_1") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_2.py b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_2.py index c55b807d..a38da0d9 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_2.py +++ b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_hypothesis_2") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_3.py b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_3.py index 1236e5a7..a6ecbf5a 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_3.py +++ b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_hypothesis_3") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_4.py b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_4.py index 233610d9..08e1855e 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_hypothesis_4.py +++ b/scripts/expertise/expertise_munition_weaponsmith_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_weaponsmith', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_hypothesis_4") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_insight_1.py b/scripts/expertise/expertise_munition_weaponsmith_insight_1.py index f4775f7e..02ae306a 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_insight_1.py +++ b/scripts/expertise/expertise_munition_weaponsmith_insight_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_insight_1') - - actor.addSkillMod('expertise_complexity_decrease_weaponsmith', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_insight_1') - - actor.removeSkillMod('expertise_complexity_decrease_weaponsmith', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_insight_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_insight_1") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_insight_2.py b/scripts/expertise/expertise_munition_weaponsmith_insight_2.py index 0bd0d617..fd8846c4 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_insight_2.py +++ b/scripts/expertise/expertise_munition_weaponsmith_insight_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_insight_2') - - actor.addSkillMod('expertise_complexity_decrease_weaponsmith', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_insight_2') - - actor.removeSkillMod('expertise_complexity_decrease_weaponsmith', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_insight_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_insight_2") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_1.py b/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_1.py index bf78a146..3a4b9071 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_1.py +++ b/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_keen_understanding_1') - - actor.addSkillMod('expertise_complexity_decrease_weaponsmith', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_keen_understanding_1') - - actor.removeSkillMod('expertise_complexity_decrease_weaponsmith', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_keen_understanding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_keen_understanding_1") return diff --git a/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_2.py b/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_2.py index 7bf75f62..14a0134d 100644 --- a/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_2.py +++ b/scripts/expertise/expertise_munition_weaponsmith_keen_understanding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.addSkill('expertise_munition_weaponsmith_keen_understanding_2') - - actor.addSkillMod('expertise_complexity_decrease_weaponsmith', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_mun_1a': - return - - actor.removeSkill('expertise_munition_weaponsmith_keen_understanding_2') - - actor.removeSkillMod('expertise_complexity_decrease_weaponsmith', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_munition_weaponsmith_keen_understanding_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_munition_weaponsmith_keen_understanding_2") return diff --git a/scripts/expertise/expertise_of_1h_crit_1.py b/scripts/expertise/expertise_of_1h_crit_1.py index 461ff94d..5b1de38a 100644 --- a/scripts/expertise/expertise_of_1h_crit_1.py +++ b/scripts/expertise/expertise_of_1h_crit_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_1h_crit_1') - - actor.addSkillMod('expertise_undiminished_critical_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_1h_crit_1') - - actor.removeSkillMod('expertise_undiminished_critical_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_1h_crit_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_1h_crit_1") return diff --git a/scripts/expertise/expertise_of_1h_crit_2.py b/scripts/expertise/expertise_of_1h_crit_2.py index 60a05278..6f5fa016 100644 --- a/scripts/expertise/expertise_of_1h_crit_2.py +++ b/scripts/expertise/expertise_of_1h_crit_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_1h_crit_2') - - actor.addSkillMod('expertise_undiminished_critical_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_1h_crit_2') - - actor.removeSkillMod('expertise_undiminished_critical_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_1h_crit_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_1h_crit_2") return diff --git a/scripts/expertise/expertise_of_1h_dam_1.py b/scripts/expertise/expertise_of_1h_dam_1.py index b8be4494..f143981d 100644 --- a/scripts/expertise/expertise_of_1h_dam_1.py +++ b/scripts/expertise/expertise_of_1h_dam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_1h_dam_1') - - actor.addSkillMod('expertise_damage_melee', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_1h_dam_1') - - actor.removeSkillMod('expertise_damage_melee', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_1h_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_1h_dam_1") return diff --git a/scripts/expertise/expertise_of_1h_dam_2.py b/scripts/expertise/expertise_of_1h_dam_2.py index e4edd536..65802383 100644 --- a/scripts/expertise/expertise_of_1h_dam_2.py +++ b/scripts/expertise/expertise_of_1h_dam_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_1h_dam_2') - - actor.addSkillMod('expertise_damage_melee', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_1h_dam_2') - - actor.removeSkillMod('expertise_damage_melee', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_1h_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_1h_dam_2") return diff --git a/scripts/expertise/expertise_of_1h_dam_3.py b/scripts/expertise/expertise_of_1h_dam_3.py index aa845e86..e1a3c0ad 100644 --- a/scripts/expertise/expertise_of_1h_dam_3.py +++ b/scripts/expertise/expertise_of_1h_dam_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_1h_dam_3') - - actor.addSkillMod('expertise_damage_melee', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_1h_dam_3') - - actor.removeSkillMod('expertise_damage_melee', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_1h_dam_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_1h_dam_3") return diff --git a/scripts/expertise/expertise_of_1h_dam_4.py b/scripts/expertise/expertise_of_1h_dam_4.py index 8041c7e1..10539dc5 100644 --- a/scripts/expertise/expertise_of_1h_dam_4.py +++ b/scripts/expertise/expertise_of_1h_dam_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_1h_dam_4') - - actor.addSkillMod('expertise_damage_melee', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_1h_dam_4') - - actor.removeSkillMod('expertise_damage_melee', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_1h_dam_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_1h_dam_4") return diff --git a/scripts/expertise/expertise_of_advanced_paint_1.py b/scripts/expertise/expertise_of_advanced_paint_1.py index 3174e3a1..aab196f3 100644 --- a/scripts/expertise/expertise_of_advanced_paint_1.py +++ b/scripts/expertise/expertise_of_advanced_paint_1.py @@ -1,48 +1,31 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_advanced_paint_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_advanced_paint_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_deb_def_4') - + if actor.getLevel() >= 4: + actor.addAbility("of_deb_def_1") + if actor.getLevel() >= 12: + actor.addAbility("of_deb_def_2") + if actor.getLevel() >= 20: + actor.addAbility("of_deb_def_3") + if actor.getLevel() >= 30: + actor.addAbility("of_deb_def_4") + if actor.getLevel() >= 38: + actor.addAbility("of_deb_def_5") + if actor.getLevel() >= 52: + actor.addAbility("of_deb_def_6") + if actor.getLevel() >= 62: + actor.addAbility("of_deb_def_7") + if actor.getLevel() >= 72: + actor.addAbility("of_deb_def_8") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_deb_def_4') - + actor.removeAbility("of_deb_def_1") + actor.removeAbility("of_deb_def_2") + actor.removeAbility("of_deb_def_3") + actor.removeAbility("of_deb_def_4") + actor.removeAbility("of_deb_def_5") + actor.removeAbility("of_deb_def_6") + actor.removeAbility("of_deb_def_7") + actor.removeAbility("of_deb_def_8") return diff --git a/scripts/expertise/expertise_of_advanced_tactics_1.py b/scripts/expertise/expertise_of_advanced_tactics_1.py index 1bbd138c..6a976e84 100644 --- a/scripts/expertise/expertise_of_advanced_tactics_1.py +++ b/scripts/expertise/expertise_of_advanced_tactics_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_advanced_tactics_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_advanced_tactics_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_buff_def_4') - + actor.addAbility("of_buff_def_4") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_buff_def_4') - + actor.removeAbility("of_buff_def_4") return diff --git a/scripts/expertise/expertise_of_aggro_channel_1.py b/scripts/expertise/expertise_of_aggro_channel_1.py index 854b3726..912c1b43 100644 --- a/scripts/expertise/expertise_of_aggro_channel_1.py +++ b/scripts/expertise/expertise_of_aggro_channel_1.py @@ -1,50 +1,11 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aggro_channel_1') - - actor.addSkillMod('expertise_aggro_channel', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aggro_channel_1') - - actor.removeSkillMod('expertise_aggro_channel', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_aggro_channel') - + actor.addAbility("of_aggro_channel") + actor.addAbility("expertise_of_aggro_channel_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_aggro_channel') - + actor.removeAbility("of_aggro_channel") + actor.removeAbility("expertise_of_aggro_channel_1") return diff --git a/scripts/expertise/expertise_of_aggro_channel_2.py b/scripts/expertise/expertise_of_aggro_channel_2.py new file mode 100644 index 00000000..69b37a58 --- /dev/null +++ b/scripts/expertise/expertise_of_aggro_channel_2.py @@ -0,0 +1,9 @@ +import sys + +def addAbilities(core, actor, player): + actor.addAbility("expertise_of_aggro_channel_2") + return + +def removeAbilities(core, actor, player): + actor.removeAbility("expertise_of_aggro_channel_2") + return diff --git a/scripts/expertise/expertise_of_aggro_channel_3.py b/scripts/expertise/expertise_of_aggro_channel_3.py new file mode 100644 index 00000000..59bb6863 --- /dev/null +++ b/scripts/expertise/expertise_of_aggro_channel_3.py @@ -0,0 +1,9 @@ +import sys + +def addAbilities(core, actor, player): + actor.addAbility("expertise_of_aggro_channel_3") + return + +def removeAbilities(core, actor, player): + actor.removeAbility("expertise_of_aggro_channel_3") + return diff --git a/scripts/expertise/expertise_of_aoe_act_1.py b/scripts/expertise/expertise_of_aoe_act_1.py index ca6b47a6..674c7d3a 100644 --- a/scripts/expertise/expertise_of_aoe_act_1.py +++ b/scripts/expertise/expertise_of_aoe_act_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_act_1') - - actor.addSkillMod('expertise_action_line_of_aoe', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_act_1') - - actor.removeSkillMod('expertise_action_line_of_aoe', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_act_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_act_1") return diff --git a/scripts/expertise/expertise_of_aoe_act_2.py b/scripts/expertise/expertise_of_aoe_act_2.py index 7d2e2aaf..97120f62 100644 --- a/scripts/expertise/expertise_of_aoe_act_2.py +++ b/scripts/expertise/expertise_of_aoe_act_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_act_2') - - actor.addSkillMod('expertise_action_line_of_aoe', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_act_2') - - actor.removeSkillMod('expertise_action_line_of_aoe', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_act_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_act_2") return diff --git a/scripts/expertise/expertise_of_aoe_act_3.py b/scripts/expertise/expertise_of_aoe_act_3.py index a07c0839..509996aa 100644 --- a/scripts/expertise/expertise_of_aoe_act_3.py +++ b/scripts/expertise/expertise_of_aoe_act_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_act_3') - - actor.addSkillMod('expertise_action_line_of_aoe', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_act_3') - - actor.removeSkillMod('expertise_action_line_of_aoe', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_act_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_act_3") return diff --git a/scripts/expertise/expertise_of_aoe_act_4.py b/scripts/expertise/expertise_of_aoe_act_4.py index 221991d5..d6d15040 100644 --- a/scripts/expertise/expertise_of_aoe_act_4.py +++ b/scripts/expertise/expertise_of_aoe_act_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_act_4') - - actor.addSkillMod('expertise_action_line_of_aoe', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_act_4') - - actor.removeSkillMod('expertise_action_line_of_aoe', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_act_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_act_4") return diff --git a/scripts/expertise/expertise_of_aoe_crit_1.py b/scripts/expertise/expertise_of_aoe_crit_1.py index f099eb09..f87e35f3 100644 --- a/scripts/expertise/expertise_of_aoe_crit_1.py +++ b/scripts/expertise/expertise_of_aoe_crit_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_crit_1') - - actor.addSkillMod('expertise_critical_line_of_aoe', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_crit_1') - - actor.removeSkillMod('expertise_critical_line_of_aoe', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_crit_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_crit_1") return diff --git a/scripts/expertise/expertise_of_aoe_crit_2.py b/scripts/expertise/expertise_of_aoe_crit_2.py index 9c9f80e4..66c7da61 100644 --- a/scripts/expertise/expertise_of_aoe_crit_2.py +++ b/scripts/expertise/expertise_of_aoe_crit_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_crit_2') - - actor.addSkillMod('expertise_critical_line_of_aoe', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_crit_2') - - actor.removeSkillMod('expertise_critical_line_of_aoe', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_crit_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_crit_2") return diff --git a/scripts/expertise/expertise_of_aoe_crit_3.py b/scripts/expertise/expertise_of_aoe_crit_3.py index e8c9cfaf..500ec01d 100644 --- a/scripts/expertise/expertise_of_aoe_crit_3.py +++ b/scripts/expertise/expertise_of_aoe_crit_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_crit_3') - - actor.addSkillMod('expertise_critical_line_of_aoe', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_crit_3') - - actor.removeSkillMod('expertise_critical_line_of_aoe', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_crit_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_crit_3") return diff --git a/scripts/expertise/expertise_of_aoe_dam_1.py b/scripts/expertise/expertise_of_aoe_dam_1.py index aecafb91..89e60747 100644 --- a/scripts/expertise/expertise_of_aoe_dam_1.py +++ b/scripts/expertise/expertise_of_aoe_dam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_dam_1') - - actor.addSkillMod('expertise_damage_line_of_aoe', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_dam_1') - - actor.removeSkillMod('expertise_damage_line_of_aoe', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_dam_1") return diff --git a/scripts/expertise/expertise_of_aoe_dam_2.py b/scripts/expertise/expertise_of_aoe_dam_2.py index b4051206..67ec6994 100644 --- a/scripts/expertise/expertise_of_aoe_dam_2.py +++ b/scripts/expertise/expertise_of_aoe_dam_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_aoe_dam_2') - - actor.addSkillMod('expertise_damage_line_of_aoe', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_aoe_dam_2') - - actor.removeSkillMod('expertise_damage_line_of_aoe', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_aoe_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_aoe_dam_2") return diff --git a/scripts/expertise/expertise_of_armor_eng_1.py b/scripts/expertise/expertise_of_armor_eng_1.py index bbcb6419..c5d4960e 100644 --- a/scripts/expertise/expertise_of_armor_eng_1.py +++ b/scripts/expertise/expertise_of_armor_eng_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_armor_eng_1') - - actor.addSkillMod('expertise_innate_protection_energy', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_armor_eng_1') - - actor.removeSkillMod('expertise_innate_protection_energy', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_armor_eng_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_armor_eng_1") return diff --git a/scripts/expertise/expertise_of_armor_eng_2.py b/scripts/expertise/expertise_of_armor_eng_2.py index a3384177..ae551145 100644 --- a/scripts/expertise/expertise_of_armor_eng_2.py +++ b/scripts/expertise/expertise_of_armor_eng_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_armor_eng_2') - - actor.addSkillMod('expertise_innate_protection_energy', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_armor_eng_2') - - actor.removeSkillMod('expertise_innate_protection_energy', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_armor_eng_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_armor_eng_2") return diff --git a/scripts/expertise/expertise_of_armor_kin_1.py b/scripts/expertise/expertise_of_armor_kin_1.py index 06713c28..98f1e9e7 100644 --- a/scripts/expertise/expertise_of_armor_kin_1.py +++ b/scripts/expertise/expertise_of_armor_kin_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_armor_kin_1') - - actor.addSkillMod('expertise_innate_protection_kinetic', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_armor_kin_1') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_armor_kin_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_armor_kin_1") return diff --git a/scripts/expertise/expertise_of_armor_kin_2.py b/scripts/expertise/expertise_of_armor_kin_2.py index b1654a38..a67cdba1 100644 --- a/scripts/expertise/expertise_of_armor_kin_2.py +++ b/scripts/expertise/expertise_of_armor_kin_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_armor_kin_2') - - actor.addSkillMod('expertise_innate_protection_kinetic', 500) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_armor_kin_2') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 500) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_armor_kin_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_armor_kin_2") return diff --git a/scripts/expertise/expertise_of_charge_1.py b/scripts/expertise/expertise_of_charge_1.py index 14086fb6..5667cd17 100644 --- a/scripts/expertise/expertise_of_charge_1.py +++ b/scripts/expertise/expertise_of_charge_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_charge_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_charge_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_charge_1') - + actor.addAbility("of_charge_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_charge_1') - + actor.removeAbility("of_charge_1") return diff --git a/scripts/expertise/expertise_of_constitution_1.py b/scripts/expertise/expertise_of_constitution_1.py index 0e6e578c..33d66895 100644 --- a/scripts/expertise/expertise_of_constitution_1.py +++ b/scripts/expertise/expertise_of_constitution_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_constitution_1') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_constitution_1') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_constution_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_constution_1") return diff --git a/scripts/expertise/expertise_of_constitution_2.py b/scripts/expertise/expertise_of_constitution_2.py index 7332ea67..5afec279 100644 --- a/scripts/expertise/expertise_of_constitution_2.py +++ b/scripts/expertise/expertise_of_constitution_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_constitution_2') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_constitution_2') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_constution_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_constution_2") return diff --git a/scripts/expertise/expertise_of_constitution_3.py b/scripts/expertise/expertise_of_constitution_3.py index 96cb9137..eb215ec3 100644 --- a/scripts/expertise/expertise_of_constitution_3.py +++ b/scripts/expertise/expertise_of_constitution_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_constitution_3') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_constitution_3') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_constution_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_constution_3") return diff --git a/scripts/expertise/expertise_of_constitution_4.py b/scripts/expertise/expertise_of_constitution_4.py index 0ba009e9..75679a92 100644 --- a/scripts/expertise/expertise_of_constitution_4.py +++ b/scripts/expertise/expertise_of_constitution_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_constitution_4') - - actor.addSkillMod('constitution_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_constitution_4') - - actor.removeSkillMod('constitution_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_constution_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_constution_4") return diff --git a/scripts/expertise/expertise_of_decapitate_1.py b/scripts/expertise/expertise_of_decapitate_1.py index 5cfb1494..1c6cc6ee 100644 --- a/scripts/expertise/expertise_of_decapitate_1.py +++ b/scripts/expertise/expertise_of_decapitate_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_decapitate_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_decapitate_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_decapitate_1') - + if actor.getLevel() >= 26: + actor.addAbility("of_decapitate_1") + if actor.getLevel() >= 34: + actor.addAbility("of_decapitate_2") + if actor.getLevel() >= 48: + actor.addAbility("of_decapitate_3") + if actor.getLevel() >= 62: + actor.addAbility("of_decapitate_4") + if actor.getLevel() >= 76: + actor.addAbility("of_decapitate_5") + if actor.getLevel() >= 90: + actor.addAbility("of_decapitate_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_decapitate_1') - + actor.removeAbility("of_decapitate_1") + actor.removeAbility("of_decapitate_2") + actor.removeAbility("of_decapitate_3") + actor.removeAbility("of_decapitate_4") + actor.removeAbility("of_decapitate_5") + actor.removeAbility("of_decapitate_6") return diff --git a/scripts/expertise/expertise_of_dm_1.py b/scripts/expertise/expertise_of_dm_1.py index 165617c2..22659ae7 100644 --- a/scripts/expertise/expertise_of_dm_1.py +++ b/scripts/expertise/expertise_of_dm_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_dm_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_dm_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_pistol_dm') - + actor.addAbility("of_pistol_dm") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_pistol_dm') - + actor.removeAbility("of_pistol_dm") return diff --git a/scripts/expertise/expertise_of_drillmaster_1.py b/scripts/expertise/expertise_of_drillmaster_1.py index 1216d427..1ffea25f 100644 --- a/scripts/expertise/expertise_of_drillmaster_1.py +++ b/scripts/expertise/expertise_of_drillmaster_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_drillmaster_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_drillmaster_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_drillmaster_1') - + actor.addAbility("of_drillmaster_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_drillmaster_1') - + actor.removeAbility("of_drillmaster_1") return diff --git a/scripts/expertise/expertise_of_emergency_shield.py b/scripts/expertise/expertise_of_emergency_shield.py index e3a8b519..c29afc3f 100644 --- a/scripts/expertise/expertise_of_emergency_shield.py +++ b/scripts/expertise/expertise_of_emergency_shield.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_emergency_shield') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_emergency_shield') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_emergency_shield') - + actor.addAbility("of_emergency_shield") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_emergency_shield') - + actor.removeAbility("of_emergency_shield") return diff --git a/scripts/expertise/expertise_of_firepower_1.py b/scripts/expertise/expertise_of_firepower_1.py index ff310741..ebdd34a9 100644 --- a/scripts/expertise/expertise_of_firepower_1.py +++ b/scripts/expertise/expertise_of_firepower_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_firepower_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_firepower_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_firepower_1') - + actor.addAbility("of_firepower_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_firepower_1') - + actor.removeAbility("of_firepower_1") return diff --git a/scripts/expertise/expertise_of_firepower_cool_1.py b/scripts/expertise/expertise_of_firepower_cool_1.py index d844f5f4..028ad25c 100644 --- a/scripts/expertise/expertise_of_firepower_cool_1.py +++ b/scripts/expertise/expertise_of_firepower_cool_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_firepower_cool_1') - - actor.addSkillMod('expertise_cooldown_line_of_firepower', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_firepower_cool_1') - - actor.removeSkillMod('expertise_cooldown_line_of_firepower', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_firepower_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_firepower_1") return diff --git a/scripts/expertise/expertise_of_firepower_cool_2.py b/scripts/expertise/expertise_of_firepower_cool_2.py index b0fab74f..fdfcbaba 100644 --- a/scripts/expertise/expertise_of_firepower_cool_2.py +++ b/scripts/expertise/expertise_of_firepower_cool_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_firepower_cool_2') - - actor.addSkillMod('expertise_cooldown_line_of_firepower', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_firepower_cool_2') - - actor.removeSkillMod('expertise_cooldown_line_of_firepower', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_firepower_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_firepower_2") return diff --git a/scripts/expertise/expertise_of_firepower_cool_3.py b/scripts/expertise/expertise_of_firepower_cool_3.py index 666c9647..28c63b2a 100644 --- a/scripts/expertise/expertise_of_firepower_cool_3.py +++ b/scripts/expertise/expertise_of_firepower_cool_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_firepower_cool_3') - - actor.addSkillMod('expertise_cooldown_line_of_firepower', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_firepower_cool_3') - - actor.removeSkillMod('expertise_cooldown_line_of_firepower', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_firepower_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_firepower_3") return diff --git a/scripts/expertise/expertise_of_focus_fire_1.py b/scripts/expertise/expertise_of_focus_fire_1.py index 7b0cbaff..0dfc30c4 100644 --- a/scripts/expertise/expertise_of_focus_fire_1.py +++ b/scripts/expertise/expertise_of_focus_fire_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_focus_fire_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_focus_fire_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_focus_fire_1') - + if actor.getLevel() >= 26: + actor.addAbility("of_focus_fire_1") + if actor.getLevel() >= 34: + actor.addAbility("of_focus_fire_2") + if actor.getLevel() >= 48: + actor.addAbility("of_focus_fire_3") + if actor.getLevel() >= 62: + actor.addAbility("of_focus_fire_4") + if actor.getLevel() >= 76: + actor.addAbility("of_focus_fire_5") + if actor.getLevel() >= 90: + actor.addAbility("of_focus_fire_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_focus_fire_1') - + actor.removeAbility("of_focus_fire_1") + actor.removeAbility("of_focus_fire_2") + actor.removeAbility("of_focus_fire_3") + actor.removeAbility("of_focus_fire_4") + actor.removeAbility("of_focus_fire_5") + actor.removeAbility("of_focus_fire_6") return diff --git a/scripts/expertise/expertise_of_group_buff_duration_1.py b/scripts/expertise/expertise_of_group_buff_duration_1.py index 363bd385..dd53fe02 100644 --- a/scripts/expertise/expertise_of_group_buff_duration_1.py +++ b/scripts/expertise/expertise_of_group_buff_duration_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_group_buff_duration_1') - - actor.addSkillMod('expertise_buff_duration_line_of_group_buff', 15) - actor.addSkillMod('expertise_aura_maintain', 1) - actor.addSkillMod('expertise_action_line_of_group_buff', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_group_buff_duration_1') - - actor.removeSkillMod('expertise_buff_duration_line_of_group_buff', 15) - actor.removeSkillMod('expertise_aura_maintain', 1) - actor.removeSkillMod('expertise_action_line_of_group_buff', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_group_buff_duration_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_group_buff_duration_1") return diff --git a/scripts/expertise/expertise_of_group_buff_duration_2.py b/scripts/expertise/expertise_of_group_buff_duration_2.py index a8e441bc..3414a208 100644 --- a/scripts/expertise/expertise_of_group_buff_duration_2.py +++ b/scripts/expertise/expertise_of_group_buff_duration_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_group_buff_duration_2') - - actor.addSkillMod('expertise_buff_duration_line_of_group_buff', 15) - actor.addSkillMod('expertise_aura_maintain', 1) - actor.addSkillMod('expertise_action_line_of_group_buff', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_group_buff_duration_2') - - actor.removeSkillMod('expertise_buff_duration_line_of_group_buff', 15) - actor.removeSkillMod('expertise_aura_maintain', 1) - actor.removeSkillMod('expertise_action_line_of_group_buff', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_group_buff_duration_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_group_buff_duration_2") return diff --git a/scripts/expertise/expertise_of_heal_cool_1.py b/scripts/expertise/expertise_of_heal_cool_1.py index fe729bcf..9f3a849f 100644 --- a/scripts/expertise/expertise_of_heal_cool_1.py +++ b/scripts/expertise/expertise_of_heal_cool_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_heal_cool_1') - - actor.addSkillMod('expertise_cooldown_line_of_heal', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_heal_cool_1') - - actor.removeSkillMod('expertise_cooldown_line_of_heal', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_heal_cool_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_heal_cool_1") return diff --git a/scripts/expertise/expertise_of_heal_cool_2.py b/scripts/expertise/expertise_of_heal_cool_2.py index 93d3f257..2f5a04ad 100644 --- a/scripts/expertise/expertise_of_heal_cool_2.py +++ b/scripts/expertise/expertise_of_heal_cool_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_heal_cool_2') - - actor.addSkillMod('expertise_cooldown_line_of_heal', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_heal_cool_2') - - actor.removeSkillMod('expertise_cooldown_line_of_heal', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_heal_cool_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_heal_cool_2") return diff --git a/scripts/expertise/expertise_of_heal_dam_1.py b/scripts/expertise/expertise_of_heal_dam_1.py index 5040250a..b9263761 100644 --- a/scripts/expertise/expertise_of_heal_dam_1.py +++ b/scripts/expertise/expertise_of_heal_dam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_heal_dam_1') - - actor.addSkillMod('expertise_healing_line_of_heal', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_heal_dam_1') - - actor.removeSkillMod('expertise_healing_line_of_heal', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_heal_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_heal_dam_1") return diff --git a/scripts/expertise/expertise_of_heal_dam_2.py b/scripts/expertise/expertise_of_heal_dam_2.py index 40917e3b..2975d55f 100644 --- a/scripts/expertise/expertise_of_heal_dam_2.py +++ b/scripts/expertise/expertise_of_heal_dam_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_heal_dam_2') - - actor.addSkillMod('expertise_healing_line_of_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_heal_dam_2') - - actor.removeSkillMod('expertise_healing_line_of_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_heal_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_heal_dam_2") return diff --git a/scripts/expertise/expertise_of_inspiration_1.py b/scripts/expertise/expertise_of_inspiration_1.py index 8905b42d..201c93dd 100644 --- a/scripts/expertise/expertise_of_inspiration_1.py +++ b/scripts/expertise/expertise_of_inspiration_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_inspiration_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_inspiration_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_inspiration_1') - + if actor.getLevel() >= 26: + actor.addAbility("of_inspiration_1") + if actor.getLevel() >= 34: + actor.addAbility("of_inspiration_2") + if actor.getLevel() >= 48: + actor.addAbility("of_inspiration_3") + if actor.getLevel() >= 62: + actor.addAbility("of_inspiration_4") + if actor.getLevel() >= 76: + actor.addAbility("of_inspiration_5") + if actor.getLevel() >= 90: + actor.addAbility("of_inspiration_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_inspiration_1') - + actor.removeAbility("of_inspiration_1") + actor.removeAbility("of_inspiration_2") + actor.removeAbility("of_inspiration_3") + actor.removeAbility("of_inspiration_4") + actor.removeAbility("of_inspiration_5") + actor.removeAbility("of_inspiration_6") return diff --git a/scripts/expertise/expertise_of_last_words_1.py b/scripts/expertise/expertise_of_last_words_1.py index 540a29c7..688c8727 100644 --- a/scripts/expertise/expertise_of_last_words_1.py +++ b/scripts/expertise/expertise_of_last_words_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_last_words_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_last_words_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - return def removeAbilities(core, actor, player): - return diff --git a/scripts/expertise/expertise_of_leg_strike_1.py b/scripts/expertise/expertise_of_leg_strike_1.py index 3eb59a01..30612f01 100644 --- a/scripts/expertise/expertise_of_leg_strike_1.py +++ b/scripts/expertise/expertise_of_leg_strike_1.py @@ -1,48 +1,28 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_leg_strike_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_leg_strike_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_leg_strike_1') - + if actor.getLevel() >= 4: + actor.addAbility("of_leg_strike_1") + if actor.getLevel() >= 12: + actor.addAbility("of_leg_strike_2") + if actor.getLevel() >= 20: + actor.addAbility("of_leg_strike_3") + if actor.getLevel() >= 30: + actor.addAbility("of_leg_strike_4") + if actor.getLevel() >= 38: + actor.addAbility("of_leg_strike_5") + if actor.getLevel() >= 52: + actor.addAbility("of_leg_strike_6") + if actor.getLevel() >= 62: + actor.addAbility("of_leg_strike_7") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_leg_strike_1') - + actor.removeAbility("of_leg_strike_1") + actor.removeAbility("of_leg_strike_2") + actor.removeAbility("of_leg_strike_3") + actor.removeAbility("of_leg_strike_4") + actor.removeAbility("of_leg_strike_5") + actor.removeAbility("of_leg_strike_6") + actor.removeAbility("of_leg_strike_7") return diff --git a/scripts/expertise/expertise_of_medical_sup_1.py b/scripts/expertise/expertise_of_medical_sup_1.py index 06c7287d..fe15a79d 100644 --- a/scripts/expertise/expertise_of_medical_sup_1.py +++ b/scripts/expertise/expertise_of_medical_sup_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_medical_sup_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_medical_sup_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_medical_sup_1') - + if actor.getLevel() >= 10: + actor.addAbility("of_medical_sup_1") + if actor.getLevel() >= 34: + actor.addAbility("of_medical_sup_2") + if actor.getLevel() >= 48: + actor.addAbility("of_medical_sup_3") + if actor.getLevel() >= 62: + actor.addAbility("of_medical_sup_4") + if actor.getLevel() >= 76: + actor.addAbility("of_medical_sup_5") + if actor.getLevel() >= 90: + actor.addAbility("of_medical_sup_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_medical_sup_1') - + actor.removeAbility("of_medical_sup_1") + actor.removeAbility("of_medical_sup_2") + actor.removeAbility("of_medical_sup_3") + actor.removeAbility("of_medical_sup_4") + actor.removeAbility("of_medical_sup_5") + actor.removeAbility("of_medical_sup_6") return diff --git a/scripts/expertise/expertise_of_paint_dam_1.py b/scripts/expertise/expertise_of_paint_dam_1.py index ba5725e3..9ba31a9b 100644 --- a/scripts/expertise/expertise_of_paint_dam_1.py +++ b/scripts/expertise/expertise_of_paint_dam_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_paint_dam_1') - - actor.addSkillMod('expertise_damage_line_of_paint', 10) - actor.addSkillMod('expertise_action_line_of_paint', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_paint_dam_1') - - actor.removeSkillMod('expertise_damage_line_of_paint', 10) - actor.removeSkillMod('expertise_action_line_of_paint', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_paint_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_paint_dam_1") return diff --git a/scripts/expertise/expertise_of_paint_dam_2.py b/scripts/expertise/expertise_of_paint_dam_2.py index 12995cae..7733a8d2 100644 --- a/scripts/expertise/expertise_of_paint_dam_2.py +++ b/scripts/expertise/expertise_of_paint_dam_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_paint_dam_2') - - actor.addSkillMod('expertise_damage_line_of_paint', 10) - actor.addSkillMod('expertise_action_line_of_paint', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_paint_dam_2') - - actor.removeSkillMod('expertise_damage_line_of_paint', 10) - actor.removeSkillMod('expertise_action_line_of_paint', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_paint_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_paint_dam_2") return diff --git a/scripts/expertise/expertise_of_paint_debuff_1.py b/scripts/expertise/expertise_of_paint_debuff_1.py index 5b2ac0cd..f3529a45 100644 --- a/scripts/expertise/expertise_of_paint_debuff_1.py +++ b/scripts/expertise/expertise_of_paint_debuff_1.py @@ -1,48 +1,31 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_paint_debuff_1') - - actor.addSkillMod('expertise_of_adv_paint_debuff', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_paint_debuff_1') - - actor.removeSkillMod('expertise_of_adv_paint_debuff', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + if actor.getLevel() >= 4: + actor.addAbility("of_adv_paint_debuff_1") + if actor.getLevel() >= 12: + actor.addAbility("of_adv_paint_debuff_2") + if actor.getLevel() >= 20: + actor.addAbility("of_adv_paint_debuff_3") + if actor.getLevel() >= 30: + actor.addAbility("of_adv_paint_debuff_4") + if actor.getLevel() >= 38: + actor.addAbility("of_adv_paint_debuff_5") + if actor.getLevel() >= 52: + actor.addAbility("of_adv_paint_debuff_6") + if actor.getLevel() >= 62: + actor.addAbility("of_adv_paint_debuff_7") + if actor.getLevel() >= 72: + actor.addAbility("of_adv_paint_debuff_8") return def removeAbilities(core, actor, player): - - + actor.removeAbility("of_adv_paint_debuff_1") + actor.removeAbility("of_adv_paint_debuff_2") + actor.removeAbility("of_adv_paint_debuff_3") + actor.removeAbility("of_adv_paint_debuff_4") + actor.removeAbility("of_adv_paint_debuff_5") + actor.removeAbility("of_adv_paint_debuff_6") + actor.removeAbility("of_adv_paint_debuff_7") + actor.removeAbility("of_adv_paint_debuff_8") return diff --git a/scripts/expertise/expertise_of_paint_expose_1.py b/scripts/expertise/expertise_of_paint_expose_1.py index 91c6d84b..561882fd 100644 --- a/scripts/expertise/expertise_of_paint_expose_1.py +++ b/scripts/expertise/expertise_of_paint_expose_1.py @@ -1,48 +1,31 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_paint_expose_1') - - actor.addSkillMod('expertise_of_adv_paint_expose', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_paint_expose_1') - - actor.removeSkillMod('expertise_of_adv_paint_expose', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + if actor.getLevel() >= 4: + actor.addAbility("of_adv_paint_expose_1") + if actor.getLevel() >= 12: + actor.addAbility("of_adv_paint_expose_2") + if actor.getLevel() >= 20: + actor.addAbility("of_adv_paint_expose_3") + if actor.getLevel() >= 30: + actor.addAbility("of_adv_paint_expose_4") + if actor.getLevel() >= 38: + actor.addAbility("of_adv_paint_expose_5") + if actor.getLevel() >= 52: + actor.addAbility("of_adv_paint_expose_6") + if actor.getLevel() >= 62: + actor.addAbility("of_adv_paint_expose_7") + if actor.getLevel() >= 72: + actor.addAbility("of_adv_paint_expose_8") return def removeAbilities(core, actor, player): - - + actor.removeAbility("of_adv_paint_expose_1") + actor.removeAbility("of_adv_paint_expose_2") + actor.removeAbility("of_adv_paint_expose_3") + actor.removeAbility("of_adv_paint_expose_4") + actor.removeAbility("of_adv_paint_expose_5") + actor.removeAbility("of_adv_paint_expose_6") + actor.removeAbility("of_adv_paint_expose_7") + actor.removeAbility("of_adv_paint_expose_8") return diff --git a/scripts/expertise/expertise_of_pistol_bleed.py b/scripts/expertise/expertise_of_pistol_bleed.py index 2c9835a0..38f923f5 100644 --- a/scripts/expertise/expertise_of_pistol_bleed.py +++ b/scripts/expertise/expertise_of_pistol_bleed.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_pistol_bleed') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_pistol_bleed') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_pistol_bleed') - + actor.addAbility("of_pistol_bleed") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_pistol_bleed') - + actor.removeAbility("of_pistol_bleed") return diff --git a/scripts/expertise/expertise_of_pistol_crit_1.py b/scripts/expertise/expertise_of_pistol_crit_1.py index bc787fd9..7e944647 100644 --- a/scripts/expertise/expertise_of_pistol_crit_1.py +++ b/scripts/expertise/expertise_of_pistol_crit_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_pistol_crit_1') - - actor.addSkillMod('expertise_undiminished_critical_pistol', 5) - actor.addSkillMod('expertise_undiminished_critical_carbine', 5) - actor.addSkillMod('expertise_range_bonus_pistol', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_pistol_crit_1') - - actor.removeSkillMod('expertise_undiminished_critical_pistol', 5) - actor.removeSkillMod('expertise_undiminished_critical_carbine', 5) - actor.removeSkillMod('expertise_range_bonus_pistol', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_pistol_crit_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_pistol_crit_1") return diff --git a/scripts/expertise/expertise_of_pistol_crit_2.py b/scripts/expertise/expertise_of_pistol_crit_2.py index 8d0101ba..d36a18b3 100644 --- a/scripts/expertise/expertise_of_pistol_crit_2.py +++ b/scripts/expertise/expertise_of_pistol_crit_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_pistol_crit_2') - - actor.addSkillMod('expertise_undiminished_critical_pistol', 5) - actor.addSkillMod('expertise_undiminished_critical_carbine', 5) - actor.addSkillMod('expertise_range_bonus_pistol', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_pistol_crit_2') - - actor.removeSkillMod('expertise_undiminished_critical_pistol', 5) - actor.removeSkillMod('expertise_undiminished_critical_carbine', 5) - actor.removeSkillMod('expertise_range_bonus_pistol', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_pistol_crit_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_pistol_crit_2") return diff --git a/scripts/expertise/expertise_of_pistol_dam_1.py b/scripts/expertise/expertise_of_pistol_dam_1.py index dc46dd87..877ac063 100644 --- a/scripts/expertise/expertise_of_pistol_dam_1.py +++ b/scripts/expertise/expertise_of_pistol_dam_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_pistol_dam_1') - - actor.addSkillMod('expertise_damage_weapon_1', 2) - actor.addSkillMod('expertise_damage_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_pistol_dam_1') - - actor.removeSkillMod('expertise_damage_weapon_1', 2) - actor.removeSkillMod('expertise_damage_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_pistol_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_pistol_dam_1") return diff --git a/scripts/expertise/expertise_of_pistol_dam_2.py b/scripts/expertise/expertise_of_pistol_dam_2.py index efd000de..e01f6b55 100644 --- a/scripts/expertise/expertise_of_pistol_dam_2.py +++ b/scripts/expertise/expertise_of_pistol_dam_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_pistol_dam_2') - - actor.addSkillMod('expertise_damage_weapon_1', 2) - actor.addSkillMod('expertise_damage_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_pistol_dam_2') - - actor.removeSkillMod('expertise_damage_weapon_1', 2) - actor.removeSkillMod('expertise_damage_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_pistol_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_pistol_dam_2") return diff --git a/scripts/expertise/expertise_of_pistol_dam_3.py b/scripts/expertise/expertise_of_pistol_dam_3.py index d433e2e7..8762ecfa 100644 --- a/scripts/expertise/expertise_of_pistol_dam_3.py +++ b/scripts/expertise/expertise_of_pistol_dam_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_pistol_dam_3') - - actor.addSkillMod('expertise_damage_weapon_1', 2) - actor.addSkillMod('expertise_damage_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_pistol_dam_3') - - actor.removeSkillMod('expertise_damage_weapon_1', 2) - actor.removeSkillMod('expertise_damage_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_pistol_dam_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_pistol_dam_3") return diff --git a/scripts/expertise/expertise_of_pistol_dam_4.py b/scripts/expertise/expertise_of_pistol_dam_4.py index a9dc63c6..478313ef 100644 --- a/scripts/expertise/expertise_of_pistol_dam_4.py +++ b/scripts/expertise/expertise_of_pistol_dam_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_pistol_dam_4') - - actor.addSkillMod('expertise_damage_weapon_1', 2) - actor.addSkillMod('expertise_damage_weapon_2', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_pistol_dam_4') - - actor.removeSkillMod('expertise_damage_weapon_1', 2) - actor.removeSkillMod('expertise_damage_weapon_2', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_pistol_dam_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_pistol_dam_4") return diff --git a/scripts/expertise/expertise_of_precision_1.py b/scripts/expertise/expertise_of_precision_1.py index 8933a340..fb5f45a2 100644 --- a/scripts/expertise/expertise_of_precision_1.py +++ b/scripts/expertise/expertise_of_precision_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_precision_1') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_precision_1') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_precision_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_precision_1") return diff --git a/scripts/expertise/expertise_of_precision_2.py b/scripts/expertise/expertise_of_precision_2.py index 0d2f5a03..95ba3853 100644 --- a/scripts/expertise/expertise_of_precision_2.py +++ b/scripts/expertise/expertise_of_precision_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_precision_2') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_precision_2') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_precision_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_precision_2") return diff --git a/scripts/expertise/expertise_of_precision_3.py b/scripts/expertise/expertise_of_precision_3.py index 78b48b4e..cfb27438 100644 --- a/scripts/expertise/expertise_of_precision_3.py +++ b/scripts/expertise/expertise_of_precision_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_precision_3') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_precision_3') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_precision_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_precision_3") return diff --git a/scripts/expertise/expertise_of_precision_4.py b/scripts/expertise/expertise_of_precision_4.py index 04824268..9ca52db1 100644 --- a/scripts/expertise/expertise_of_precision_4.py +++ b/scripts/expertise/expertise_of_precision_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_precision_4') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_precision_4') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_precision_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_precision_4") return diff --git a/scripts/expertise/expertise_of_purge_1.py b/scripts/expertise/expertise_of_purge_1.py index c6c4bdfa..3598d236 100644 --- a/scripts/expertise/expertise_of_purge_1.py +++ b/scripts/expertise/expertise_of_purge_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_purge_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_purge_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_purge_1') - + actor.addAbility("of_purge_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_purge_1') - + actor.removeAbility("of_purge_1") return diff --git a/scripts/expertise/expertise_of_reinforcements_1.py b/scripts/expertise/expertise_of_reinforcements_1.py index 7c68a80f..06aa5cad 100644 --- a/scripts/expertise/expertise_of_reinforcements_1.py +++ b/scripts/expertise/expertise_of_reinforcements_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_reinforcements_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_reinforcements_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_reinforcements_1') - + if actor.getLevel() >= 10: + actor.addAbility("of_reinforcements_1") + if actor.getLevel() >= 34: + actor.addAbility("of_reinforcements_2") + if actor.getLevel() >= 48: + actor.addAbility("of_reinforcements_3") + if actor.getLevel() >= 62: + actor.addAbility("of_reinforcements_4") + if actor.getLevel() >= 76: + actor.addAbility("of_reinforcements_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_reinforcements_1') - + actor.removeAbility("of_reinforcements_1") + actor.removeAbility("of_reinforcements_2") + actor.removeAbility("of_reinforcements_3") + actor.removeAbility("of_reinforcements_4") + actor.removeAbility("of_reinforcements_5") return diff --git a/scripts/expertise/expertise_of_scatter_1.py b/scripts/expertise/expertise_of_scatter_1.py index e9ce9565..85ab0ef8 100644 --- a/scripts/expertise/expertise_of_scatter_1.py +++ b/scripts/expertise/expertise_of_scatter_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_scatter_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_scatter_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_scatter_1') - + actor.addAbility("of_scatter_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_scatter_1') - + actor.removeAbility("of_scatter_1") return diff --git a/scripts/expertise/expertise_of_stamina_1.py b/scripts/expertise/expertise_of_stamina_1.py index deaa1e13..73155458 100644 --- a/scripts/expertise/expertise_of_stamina_1.py +++ b/scripts/expertise/expertise_of_stamina_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_stamina_1') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_stamina_1') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_stamina_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_stamina_1") return diff --git a/scripts/expertise/expertise_of_stamina_2.py b/scripts/expertise/expertise_of_stamina_2.py index 3dcfda6b..1cc498d9 100644 --- a/scripts/expertise/expertise_of_stamina_2.py +++ b/scripts/expertise/expertise_of_stamina_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_stamina_2') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_stamina_2') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_stamina_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_stamina_2") return diff --git a/scripts/expertise/expertise_of_stamina_3.py b/scripts/expertise/expertise_of_stamina_3.py index fa6810b5..63826671 100644 --- a/scripts/expertise/expertise_of_stamina_3.py +++ b/scripts/expertise/expertise_of_stamina_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_stamina_3') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_stamina_3') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_stamina_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_stamina_3") return diff --git a/scripts/expertise/expertise_of_stamina_4.py b/scripts/expertise/expertise_of_stamina_4.py index 94dbeab3..22e5cea3 100644 --- a/scripts/expertise/expertise_of_stamina_4.py +++ b/scripts/expertise/expertise_of_stamina_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_stamina_4') - - actor.addSkillMod('stamina_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_stamina_4') - - actor.removeSkillMod('stamina_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_stamina_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_stamina_4") return diff --git a/scripts/expertise/expertise_of_stimulator_1.py b/scripts/expertise/expertise_of_stimulator_1.py index 6e66f3b4..10ab1e90 100644 --- a/scripts/expertise/expertise_of_stimulator_1.py +++ b/scripts/expertise/expertise_of_stimulator_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_stimulator_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_stimulator_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_stimulator_1') - + actor.addAbility("of_stimulator_1") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_stimulator_1') - + actor.removeAbility("of_stimulator_1") return diff --git a/scripts/expertise/expertise_of_strength_1.py b/scripts/expertise/expertise_of_strength_1.py index b2fa95d0..3decd9c7 100644 --- a/scripts/expertise/expertise_of_strength_1.py +++ b/scripts/expertise/expertise_of_strength_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_strength_1') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_strength_1') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_strength_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_strength_1") return diff --git a/scripts/expertise/expertise_of_strength_2.py b/scripts/expertise/expertise_of_strength_2.py index 8a05bcc3..676d8d92 100644 --- a/scripts/expertise/expertise_of_strength_2.py +++ b/scripts/expertise/expertise_of_strength_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_strength_2') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_strength_2') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_strength_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_strength_2") return diff --git a/scripts/expertise/expertise_of_strength_3.py b/scripts/expertise/expertise_of_strength_3.py index 6dbddcf1..d6780308 100644 --- a/scripts/expertise/expertise_of_strength_3.py +++ b/scripts/expertise/expertise_of_strength_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_strength_3') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_strength_3') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_strength_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_strength_3") return diff --git a/scripts/expertise/expertise_of_strength_4.py b/scripts/expertise/expertise_of_strength_4.py index 067d377a..4a59b20d 100644 --- a/scripts/expertise/expertise_of_strength_4.py +++ b/scripts/expertise/expertise_of_strength_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_strength_4') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_strength_4') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_strength_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_strength_4") return diff --git a/scripts/expertise/expertise_of_sup_cool_1.py b/scripts/expertise/expertise_of_sup_cool_1.py index aaa7224b..2e982ac3 100644 --- a/scripts/expertise/expertise_of_sup_cool_1.py +++ b/scripts/expertise/expertise_of_sup_cool_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sup_cool_1') - - actor.addSkillMod('expertise_cooldown_line_of_sup', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sup_cool_1') - - actor.removeSkillMod('expertise_cooldown_line_of_sup', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sup_cool_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sup_cool_1") return diff --git a/scripts/expertise/expertise_of_sup_cool_2.py b/scripts/expertise/expertise_of_sup_cool_2.py index 8beb380c..1d469433 100644 --- a/scripts/expertise/expertise_of_sup_cool_2.py +++ b/scripts/expertise/expertise_of_sup_cool_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sup_cool_2') - - actor.addSkillMod('expertise_cooldown_line_of_sup', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sup_cool_2') - - actor.removeSkillMod('expertise_cooldown_line_of_sup', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sup_cool_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sup_cool_2") return diff --git a/scripts/expertise/expertise_of_sup_cool_3.py b/scripts/expertise/expertise_of_sup_cool_3.py index 9e6e8c8d..32064d76 100644 --- a/scripts/expertise/expertise_of_sup_cool_3.py +++ b/scripts/expertise/expertise_of_sup_cool_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sup_cool_3') - - actor.addSkillMod('expertise_cooldown_line_of_sup', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sup_cool_3') - - actor.removeSkillMod('expertise_cooldown_line_of_sup', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sup_cool_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sup_cool_3") return diff --git a/scripts/expertise/expertise_of_sup_cool_4.py b/scripts/expertise/expertise_of_sup_cool_4.py index 083f92ab..3a2418dc 100644 --- a/scripts/expertise/expertise_of_sup_cool_4.py +++ b/scripts/expertise/expertise_of_sup_cool_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sup_cool_4') - - actor.addSkillMod('expertise_cooldown_line_of_sup', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sup_cool_4') - - actor.removeSkillMod('expertise_cooldown_line_of_sup', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sup_cool_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sup_cool_4") return diff --git a/scripts/expertise/expertise_of_sure_act_1.py b/scripts/expertise/expertise_of_sure_act_1.py index 14e31356..5d4f27cd 100644 --- a/scripts/expertise/expertise_of_sure_act_1.py +++ b/scripts/expertise/expertise_of_sure_act_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sure_act_1') - - actor.addSkillMod('expertise_action_line_of_sure', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sure_act_1') - - actor.removeSkillMod('expertise_action_line_of_sure', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sure_act_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sure_act_1") return diff --git a/scripts/expertise/expertise_of_sure_act_2.py b/scripts/expertise/expertise_of_sure_act_2.py index 441a8ce7..208d6135 100644 --- a/scripts/expertise/expertise_of_sure_act_2.py +++ b/scripts/expertise/expertise_of_sure_act_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sure_act_2') - - actor.addSkillMod('expertise_action_line_of_sure', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sure_act_2') - - actor.removeSkillMod('expertise_action_line_of_sure', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sure_act_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sure_act_2") return diff --git a/scripts/expertise/expertise_of_sure_act_3.py b/scripts/expertise/expertise_of_sure_act_3.py index 908d9e13..d66005c7 100644 --- a/scripts/expertise/expertise_of_sure_act_3.py +++ b/scripts/expertise/expertise_of_sure_act_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sure_act_3') - - actor.addSkillMod('expertise_action_line_of_sure', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sure_act_3') - - actor.removeSkillMod('expertise_action_line_of_sure', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sure_act_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sure_act_3") return diff --git a/scripts/expertise/expertise_of_sure_act_4.py b/scripts/expertise/expertise_of_sure_act_4.py index b876afe3..75485c39 100644 --- a/scripts/expertise/expertise_of_sure_act_4.py +++ b/scripts/expertise/expertise_of_sure_act_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sure_act_4') - - actor.addSkillMod('expertise_action_line_of_sure', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sure_act_4') - - actor.removeSkillMod('expertise_action_line_of_sure', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sure_act_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sure_act_4") return diff --git a/scripts/expertise/expertise_of_sure_dam_1.py b/scripts/expertise/expertise_of_sure_dam_1.py index 4a18bcb2..8acfba2d 100644 --- a/scripts/expertise/expertise_of_sure_dam_1.py +++ b/scripts/expertise/expertise_of_sure_dam_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sure_dam_1') - - actor.addSkillMod('expertise_damage_line_of_sure', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sure_dam_1') - - actor.removeSkillMod('expertise_damage_line_of_sure', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sure_dam_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sure_dam_1") return diff --git a/scripts/expertise/expertise_of_sure_dam_2.py b/scripts/expertise/expertise_of_sure_dam_2.py index 9d199519..740150f1 100644 --- a/scripts/expertise/expertise_of_sure_dam_2.py +++ b/scripts/expertise/expertise_of_sure_dam_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sure_dam_2') - - actor.addSkillMod('expertise_damage_line_of_sure', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sure_dam_2') - - actor.removeSkillMod('expertise_damage_line_of_sure', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sure_dam_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sure_dam_2") return diff --git a/scripts/expertise/expertise_of_sure_dam_3.py b/scripts/expertise/expertise_of_sure_dam_3.py index f39ac985..05c3d330 100644 --- a/scripts/expertise/expertise_of_sure_dam_3.py +++ b/scripts/expertise/expertise_of_sure_dam_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_sure_dam_3') - - actor.addSkillMod('expertise_damage_line_of_sure', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_sure_dam_3') - - actor.removeSkillMod('expertise_damage_line_of_sure', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_of_sure_dam_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_of_sure_dam_3") return diff --git a/scripts/expertise/expertise_of_tactical_sup_1.py b/scripts/expertise/expertise_of_tactical_sup_1.py index 451c6fbe..a3434b0e 100644 --- a/scripts/expertise/expertise_of_tactical_sup_1.py +++ b/scripts/expertise/expertise_of_tactical_sup_1.py @@ -1,44 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_tactical_sup_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_tactical_sup_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - + if actor.getLevel() >= 10: + actor.addAbility("of_tactical_sup_1") + if actor.getLevel() >= 34: + actor.addAbility("of_tactical_sup_2") + if actor.getLevel() >= 48: + actor.addAbility("of_tactical_sup_3") + if actor.getLevel() >= 62: + actor.addAbility("of_tactical_sup_4") + if actor.getLevel() >= 76: + actor.addAbility("of_tactical_sup_5") + if actor.getLevel() >= 90: + actor.addAbility("of_tactical_sup_6") return def removeAbilities(core, actor, player): - + actor.removeAbility("of_tactical_sup_1") + actor.removeAbility("of_tactical_sup_2") + actor.removeAbility("of_tactical_sup_3") + actor.removeAbility("of_tactical_sup_4") + actor.removeAbility("of_tactical_sup_5") + actor.removeAbility("of_tactical_sup_6") return diff --git a/scripts/expertise/expertise_of_vortex_1.py b/scripts/expertise/expertise_of_vortex_1.py index e2a24f55..a4f6f04c 100644 --- a/scripts/expertise/expertise_of_vortex_1.py +++ b/scripts/expertise/expertise_of_vortex_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.addSkill('expertise_of_vortex_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'officer_1a': - return - - actor.removeSkill('expertise_of_vortex_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('of_vortex_1') - + if actor.getLevel() >= 26: + actor.addAbility("of_vortex_1") + if actor.getLevel() >= 34: + actor.addAbility("of_vortex_2") + if actor.getLevel() >= 48: + actor.addAbility("of_vortex_3") + if actor.getLevel() >= 62: + actor.addAbility("of_vortex_4") + if actor.getLevel() >= 76: + actor.addAbility("of_vortex_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('of_vortex_1') - + actor.removeAbility("of_vortex_1") + actor.removeAbility("of_vortex_2") + actor.removeAbility("of_vortex_3") + actor.removeAbility("of_vortex_4") + actor.removeAbility("of_vortex_5") return diff --git a/scripts/expertise/expertise_sm_general_bad_odds_1.py b/scripts/expertise/expertise_sm_general_bad_odds_1.py index e2c44993..fa70a2fc 100644 --- a/scripts/expertise/expertise_sm_general_bad_odds_1.py +++ b/scripts/expertise/expertise_sm_general_bad_odds_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_bad_odds_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_bad_odds_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_bad_odds_1') - + if actor.getLevel() >= 26: + actor.addAbility("sm_bad_odds_1") + if actor.getLevel() >= 34: + actor.addAbility("sm_bad_odds_2") + if actor.getLevel() >= 48: + actor.addAbility("sm_bad_odds_3") + if actor.getLevel() >= 62: + actor.addAbility("sm_bad_odds_4") + if actor.getLevel() >= 76: + actor.addAbility("sm_bad_odds_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_bad_odds_1') - + actor.removeAbility("sm_bad_odds_1") + actor.removeAbility("sm_bad_odds_2") + actor.removeAbility("sm_bad_odds_3") + actor.removeAbility("sm_bad_odds_4") + actor.removeAbility("sm_bad_odds_5") return diff --git a/scripts/expertise/expertise_sm_general_break_the_deal_1.py b/scripts/expertise/expertise_sm_general_break_the_deal_1.py index f12dfb8f..757e75f9 100644 --- a/scripts/expertise/expertise_sm_general_break_the_deal_1.py +++ b/scripts/expertise/expertise_sm_general_break_the_deal_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_break_the_deal_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_break_the_deal_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_break_the_deal') - + actor.addAbility("sm_break_the_deal") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_break_the_deal') - + actor.removeAbility("sm_break_the_deal") return diff --git a/scripts/expertise/expertise_sm_general_double_deal_1.py b/scripts/expertise/expertise_sm_general_double_deal_1.py index 237b1cbd..8dbe17db 100644 --- a/scripts/expertise/expertise_sm_general_double_deal_1.py +++ b/scripts/expertise/expertise_sm_general_double_deal_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_double_deal_1') - - actor.addSkillMod('expertise_double_deal_chance', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_double_deal_1') - - actor.removeSkillMod('expertise_double_deal_chance', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_double_deal_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_double_deal_1") return diff --git a/scripts/expertise/expertise_sm_general_double_deal_2.py b/scripts/expertise/expertise_sm_general_double_deal_2.py index f5b3e464..5215636e 100644 --- a/scripts/expertise/expertise_sm_general_double_deal_2.py +++ b/scripts/expertise/expertise_sm_general_double_deal_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_double_deal_2') - - actor.addSkillMod('expertise_double_deal_chance', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_double_deal_2') - - actor.removeSkillMod('expertise_double_deal_chance', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_double_deal_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_double_deal_2") return diff --git a/scripts/expertise/expertise_sm_general_elbow_grease_1.py b/scripts/expertise/expertise_sm_general_elbow_grease_1.py index 92f55ca2..b0ff55ad 100644 --- a/scripts/expertise/expertise_sm_general_elbow_grease_1.py +++ b/scripts/expertise/expertise_sm_general_elbow_grease_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_elbow_grease_1') - - actor.addSkillMod('expertise_action_weapon_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_elbow_grease_1') - - actor.removeSkillMod('expertise_action_weapon_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_elbow_grease_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_elbow_grease_1") return diff --git a/scripts/expertise/expertise_sm_general_end_of_the_line_1.py b/scripts/expertise/expertise_sm_general_end_of_the_line_1.py index 3afc6b0b..05ec2f19 100644 --- a/scripts/expertise/expertise_sm_general_end_of_the_line_1.py +++ b/scripts/expertise/expertise_sm_general_end_of_the_line_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_end_of_the_line_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_end_of_the_line_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_end_of_the_line') - + actor.addAbility("sm_end_of_the_line") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_end_of_the_line') - + actor.removeAbility("sm_end_of_the_line") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_luck_1.py b/scripts/expertise/expertise_sm_general_enhanced_luck_1.py index 3446d7af..347e28e3 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_luck_1.py +++ b/scripts/expertise/expertise_sm_general_enhanced_luck_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_luck_1') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_luck_1') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_luck_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_luck_1") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_luck_2.py b/scripts/expertise/expertise_sm_general_enhanced_luck_2.py index f0402408..2f9d1747 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_luck_2.py +++ b/scripts/expertise/expertise_sm_general_enhanced_luck_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_luck_2') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_luck_2') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_luck_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_luck_2") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_luck_3.py b/scripts/expertise/expertise_sm_general_enhanced_luck_3.py index dc8fb800..ad637ef1 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_luck_3.py +++ b/scripts/expertise/expertise_sm_general_enhanced_luck_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_luck_3') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_luck_3') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_luck_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_luck_3") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_luck_4.py b/scripts/expertise/expertise_sm_general_enhanced_luck_4.py index 6c844743..acbe531d 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_luck_4.py +++ b/scripts/expertise/expertise_sm_general_enhanced_luck_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_luck_4') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_luck_4') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_luck_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_luck_4") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_precision_1.py b/scripts/expertise/expertise_sm_general_enhanced_precision_1.py index 9a865689..959579d6 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_precision_1.py +++ b/scripts/expertise/expertise_sm_general_enhanced_precision_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_precision_1') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_precision_1') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_precision_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_precision_1") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_precision_2.py b/scripts/expertise/expertise_sm_general_enhanced_precision_2.py index dda076b0..a50e08ba 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_precision_2.py +++ b/scripts/expertise/expertise_sm_general_enhanced_precision_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_precision_2') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_precision_2') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_precision_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_precision_2") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_precision_3.py b/scripts/expertise/expertise_sm_general_enhanced_precision_3.py index 3d93777f..58c40a83 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_precision_3.py +++ b/scripts/expertise/expertise_sm_general_enhanced_precision_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_precision_3') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_precision_3') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_precision_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_precision_3") return diff --git a/scripts/expertise/expertise_sm_general_enhanced_precision_4.py b/scripts/expertise/expertise_sm_general_enhanced_precision_4.py index 3aa85853..938574a4 100644 --- a/scripts/expertise/expertise_sm_general_enhanced_precision_4.py +++ b/scripts/expertise/expertise_sm_general_enhanced_precision_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_enhanced_precision_4') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_enhanced_precision_4') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_enhanced_precision_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_enhanced_precision_4") return diff --git a/scripts/expertise/expertise_sm_general_gun_oil_1.py b/scripts/expertise/expertise_sm_general_gun_oil_1.py index f71e62d5..618b2f14 100644 --- a/scripts/expertise/expertise_sm_general_gun_oil_1.py +++ b/scripts/expertise/expertise_sm_general_gun_oil_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_gun_oil_1') - - actor.addSkillMod('expertise_action_weapon_2', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_gun_oil_1') - - actor.removeSkillMod('expertise_action_weapon_2', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_gun_oil_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_gun_oil_1") return diff --git a/scripts/expertise/expertise_sm_general_hair_trigger_1.py b/scripts/expertise/expertise_sm_general_hair_trigger_1.py index 0bc61fb4..981958f2 100644 --- a/scripts/expertise/expertise_sm_general_hair_trigger_1.py +++ b/scripts/expertise/expertise_sm_general_hair_trigger_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hair_trigger_1') - - actor.addSkillMod('expertise_action_line_sm_dm', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hair_trigger_1') - - actor.removeSkillMod('expertise_action_line_sm_dm', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hair_trigger_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hair_trigger_1") return diff --git a/scripts/expertise/expertise_sm_general_hair_trigger_2.py b/scripts/expertise/expertise_sm_general_hair_trigger_2.py index 9dc7f200..0e8537b5 100644 --- a/scripts/expertise/expertise_sm_general_hair_trigger_2.py +++ b/scripts/expertise/expertise_sm_general_hair_trigger_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hair_trigger_2') - - actor.addSkillMod('expertise_action_line_sm_dm', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hair_trigger_2') - - actor.removeSkillMod('expertise_action_line_sm_dm', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hair_trigger_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hair_trigger_2") return diff --git a/scripts/expertise/expertise_sm_general_hair_trigger_3.py b/scripts/expertise/expertise_sm_general_hair_trigger_3.py index 0d81af85..9e3f61fc 100644 --- a/scripts/expertise/expertise_sm_general_hair_trigger_3.py +++ b/scripts/expertise/expertise_sm_general_hair_trigger_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hair_trigger_3') - - actor.addSkillMod('expertise_action_line_sm_dm', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hair_trigger_3') - - actor.removeSkillMod('expertise_action_line_sm_dm', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hair_trigger_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hair_trigger_3") return diff --git a/scripts/expertise/expertise_sm_general_hair_trigger_4.py b/scripts/expertise/expertise_sm_general_hair_trigger_4.py index 5309084c..78108d29 100644 --- a/scripts/expertise/expertise_sm_general_hair_trigger_4.py +++ b/scripts/expertise/expertise_sm_general_hair_trigger_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hair_trigger_4') - - actor.addSkillMod('expertise_action_line_sm_dm', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hair_trigger_4') - - actor.removeSkillMod('expertise_action_line_sm_dm', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hair_trigger_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hair_trigger_4") return diff --git a/scripts/expertise/expertise_sm_general_hammer_fanning_1.py b/scripts/expertise/expertise_sm_general_hammer_fanning_1.py index 8108302d..d0a970f5 100644 --- a/scripts/expertise/expertise_sm_general_hammer_fanning_1.py +++ b/scripts/expertise/expertise_sm_general_hammer_fanning_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hammer_fanning_1') - - actor.addSkillMod('expertise_sm_ranged_shot_proc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hammer_fanning_1') - - actor.removeSkillMod('expertise_sm_ranged_shot_proc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hammer_fanning_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hammer_fanning_1") return diff --git a/scripts/expertise/expertise_sm_general_hammer_fanning_2.py b/scripts/expertise/expertise_sm_general_hammer_fanning_2.py index d15065e5..9d157ddb 100644 --- a/scripts/expertise/expertise_sm_general_hammer_fanning_2.py +++ b/scripts/expertise/expertise_sm_general_hammer_fanning_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hammer_fanning_2') - - actor.addSkillMod('expertise_sm_ranged_shot_proc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hammer_fanning_2') - - actor.removeSkillMod('expertise_sm_ranged_shot_proc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hammer_fanning_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hammer_fanning_2") return diff --git a/scripts/expertise/expertise_sm_general_hammer_fanning_3.py b/scripts/expertise/expertise_sm_general_hammer_fanning_3.py index f37b9495..24b7a3fb 100644 --- a/scripts/expertise/expertise_sm_general_hammer_fanning_3.py +++ b/scripts/expertise/expertise_sm_general_hammer_fanning_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hammer_fanning_3') - - actor.addSkillMod('expertise_sm_ranged_shot_proc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hammer_fanning_3') - - actor.removeSkillMod('expertise_sm_ranged_shot_proc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hammer_fanning_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hammer_fanning_3") return diff --git a/scripts/expertise/expertise_sm_general_hammer_fanning_4.py b/scripts/expertise/expertise_sm_general_hammer_fanning_4.py index de5f58b2..5db77165 100644 --- a/scripts/expertise/expertise_sm_general_hammer_fanning_4.py +++ b/scripts/expertise/expertise_sm_general_hammer_fanning_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hammer_fanning_4') - - actor.addSkillMod('expertise_sm_ranged_shot_proc', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hammer_fanning_4') - - actor.removeSkillMod('expertise_sm_ranged_shot_proc', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hammer_fanning_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hammer_fanning_4") return diff --git a/scripts/expertise/expertise_sm_general_head_crack_1.py b/scripts/expertise/expertise_sm_general_head_crack_1.py index 41521dc6..7f20d29f 100644 --- a/scripts/expertise/expertise_sm_general_head_crack_1.py +++ b/scripts/expertise/expertise_sm_general_head_crack_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_head_crack_1') - - actor.addSkillMod('expertise_sm_melee_stun_proc', 6) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_head_crack_1') - - actor.removeSkillMod('expertise_sm_melee_stun_proc', 6) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_head_crack_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_head_crack_1") return diff --git a/scripts/expertise/expertise_sm_general_head_crack_2.py b/scripts/expertise/expertise_sm_general_head_crack_2.py index 44d451ed..abe7628c 100644 --- a/scripts/expertise/expertise_sm_general_head_crack_2.py +++ b/scripts/expertise/expertise_sm_general_head_crack_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_head_crack_2') - - actor.addSkillMod('expertise_sm_melee_stun_proc', 6) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_head_crack_2') - - actor.removeSkillMod('expertise_sm_melee_stun_proc', 6) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_head_crack_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_head_crack_2") return diff --git a/scripts/expertise/expertise_sm_general_hidden_padding_1.py b/scripts/expertise/expertise_sm_general_hidden_padding_1.py index e0294af3..07cceb20 100644 --- a/scripts/expertise/expertise_sm_general_hidden_padding_1.py +++ b/scripts/expertise/expertise_sm_general_hidden_padding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hidden_padding_1') - - actor.addSkillMod('expertise_overridable_protection_generic', 1475) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hidden_padding_1') - - actor.removeSkillMod('expertise_overridable_protection_generic', 1475) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hidden_padding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hidden_padding_1") return diff --git a/scripts/expertise/expertise_sm_general_hidden_padding_2.py b/scripts/expertise/expertise_sm_general_hidden_padding_2.py index e3662b44..3c2cc318 100644 --- a/scripts/expertise/expertise_sm_general_hidden_padding_2.py +++ b/scripts/expertise/expertise_sm_general_hidden_padding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_hidden_padding_2') - - actor.addSkillMod('expertise_overridable_protection_generic', 1475) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_hidden_padding_2') - - actor.removeSkillMod('expertise_overridable_protection_generic', 1475) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_hidden_padding_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_hidden_padding_2") return diff --git a/scripts/expertise/expertise_sm_general_idiot_proof_plan_1.py b/scripts/expertise/expertise_sm_general_idiot_proof_plan_1.py index d9c15db8..05db4ebf 100644 --- a/scripts/expertise/expertise_sm_general_idiot_proof_plan_1.py +++ b/scripts/expertise/expertise_sm_general_idiot_proof_plan_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_idiot_proof_plan_1') - - actor.addSkillMod('damage_decrease_percentage', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_idiot_proof_plan_1') - - actor.removeSkillMod('damage_decrease_percentage', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_idiot_proof_plan_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_idiot_proof_plan_1") return diff --git a/scripts/expertise/expertise_sm_general_idiot_proof_plan_2.py b/scripts/expertise/expertise_sm_general_idiot_proof_plan_2.py index 6cd3dace..3baa2e23 100644 --- a/scripts/expertise/expertise_sm_general_idiot_proof_plan_2.py +++ b/scripts/expertise/expertise_sm_general_idiot_proof_plan_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_idiot_proof_plan_2') - - actor.addSkillMod('damage_decrease_percentage', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_idiot_proof_plan_2') - - actor.removeSkillMod('damage_decrease_percentage', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_idiot_proof_plan_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_idiot_proof_plan_2") return diff --git a/scripts/expertise/expertise_sm_general_lined_pockets_1.py b/scripts/expertise/expertise_sm_general_lined_pockets_1.py index 5d53be45..e22e98ad 100644 --- a/scripts/expertise/expertise_sm_general_lined_pockets_1.py +++ b/scripts/expertise/expertise_sm_general_lined_pockets_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_lined_pockets_1') - - actor.addSkillMod('expertise_overridable_protection_generic', 1475) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_lined_pockets_1') - - actor.removeSkillMod('expertise_overridable_protection_generic', 1475) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_lined_pockets_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_lined_pockets_1") return diff --git a/scripts/expertise/expertise_sm_general_lined_pockets_2.py b/scripts/expertise/expertise_sm_general_lined_pockets_2.py index 03209a76..08bf5f8d 100644 --- a/scripts/expertise/expertise_sm_general_lined_pockets_2.py +++ b/scripts/expertise/expertise_sm_general_lined_pockets_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_lined_pockets_2') - - actor.addSkillMod('expertise_overridable_protection_generic', 1475) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_lined_pockets_2') - - actor.removeSkillMod('expertise_overridable_protection_generic', 1475) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_lined_pockets_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_lined_pockets_2") return diff --git a/scripts/expertise/expertise_sm_general_meager_fortune_1.py b/scripts/expertise/expertise_sm_general_meager_fortune_1.py index 557528ad..40018dbd 100644 --- a/scripts/expertise/expertise_sm_general_meager_fortune_1.py +++ b/scripts/expertise/expertise_sm_general_meager_fortune_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_meager_fortune_1') - - actor.addSkillMod('expertise_spot_a_sucker_critical_decrease', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_meager_fortune_1') - - actor.removeSkillMod('expertise_spot_a_sucker_critical_decrease', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_meager_fortune_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_meager_fortune_1") return diff --git a/scripts/expertise/expertise_sm_general_narrow_escape_1.py b/scripts/expertise/expertise_sm_general_narrow_escape_1.py index 3993e41e..4f1029a9 100644 --- a/scripts/expertise/expertise_sm_general_narrow_escape_1.py +++ b/scripts/expertise/expertise_sm_general_narrow_escape_1.py @@ -1,48 +1,19 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_narrow_escape_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_narrow_escape_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_narrow_escape_1') - + if actor.getLevel() >= 34: + actor.addAbility("sm_narrow_escape_1") + if actor.getLevel() >= 50: + actor.addAbility("sm_narrow_escape_2") + if actor.getLevel() >= 66: + actor.addAbility("sm_narrow_escape_3") + if actor.getLevel() >= 82: + actor.addAbility("sm_narrow_escape_4") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_narrow_escape_1') - + actor.removeAbility("sm_narrow_escape_1") + actor.removeAbility("sm_narrow_escape_2") + actor.removeAbility("sm_narrow_escape_3") + actor.removeAbility("sm_narrow_escape_4") return diff --git a/scripts/expertise/expertise_sm_general_nerf_herder_1.py b/scripts/expertise/expertise_sm_general_nerf_herder_1.py index 127d4f16..bf1ed358 100644 --- a/scripts/expertise/expertise_sm_general_nerf_herder_1.py +++ b/scripts/expertise/expertise_sm_general_nerf_herder_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_nerf_herder_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_nerf_herder_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_nerf_herder') - + actor.addAbility("sm_general_nerf_herder") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_nerf_herder') - + actor.removeAbility("sm_general_nerf_herder") return diff --git a/scripts/expertise/expertise_sm_general_off_the_cuff_1.py b/scripts/expertise/expertise_sm_general_off_the_cuff_1.py index fec22b4e..9b7fd56a 100644 --- a/scripts/expertise/expertise_sm_general_off_the_cuff_1.py +++ b/scripts/expertise/expertise_sm_general_off_the_cuff_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_off_the_cuff_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_off_the_cuff_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_off_the_cuff') - + actor.addAbility("sm_off_the_cuff") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_off_the_cuff') - + actor.removeAbility("sm_off_the_cuff") return diff --git a/scripts/expertise/expertise_sm_general_one_two_pummel_1.py b/scripts/expertise/expertise_sm_general_one_two_pummel_1.py index b9eb89bd..0fbb25e1 100644 --- a/scripts/expertise/expertise_sm_general_one_two_pummel_1.py +++ b/scripts/expertise/expertise_sm_general_one_two_pummel_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_one_two_pummel_1') - - actor.addSkillMod('expertise_sm_melee_proc', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_one_two_pummel_1') - - actor.removeSkillMod('expertise_sm_melee_proc', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_one_two_pummel_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_one_two_pummel_1") return diff --git a/scripts/expertise/expertise_sm_general_one_two_pummel_2.py b/scripts/expertise/expertise_sm_general_one_two_pummel_2.py index dbd447d9..f33d6cca 100644 --- a/scripts/expertise/expertise_sm_general_one_two_pummel_2.py +++ b/scripts/expertise/expertise_sm_general_one_two_pummel_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_one_two_pummel_2') - - actor.addSkillMod('expertise_sm_melee_proc', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_one_two_pummel_2') - - actor.removeSkillMod('expertise_sm_melee_proc', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_one_two_pummel_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_one_two_pummel_2") return diff --git a/scripts/expertise/expertise_sm_general_one_two_pummel_3.py b/scripts/expertise/expertise_sm_general_one_two_pummel_3.py index 98060a5d..31f91153 100644 --- a/scripts/expertise/expertise_sm_general_one_two_pummel_3.py +++ b/scripts/expertise/expertise_sm_general_one_two_pummel_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_one_two_pummel_3') - - actor.addSkillMod('expertise_sm_melee_proc', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_one_two_pummel_3') - - actor.removeSkillMod('expertise_sm_melee_proc', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_one_two_pummel_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_one_two_pummel_3") return diff --git a/scripts/expertise/expertise_sm_general_one_two_pummel_4.py b/scripts/expertise/expertise_sm_general_one_two_pummel_4.py index 6b7e15b7..7832734e 100644 --- a/scripts/expertise/expertise_sm_general_one_two_pummel_4.py +++ b/scripts/expertise/expertise_sm_general_one_two_pummel_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_one_two_pummel_4') - - actor.addSkillMod('expertise_sm_melee_proc', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_one_two_pummel_4') - - actor.removeSkillMod('expertise_sm_melee_proc', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_one_two_pummel_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_one_two_pummel_4") return diff --git a/scripts/expertise/expertise_sm_general_poor_prospect_1.py b/scripts/expertise/expertise_sm_general_poor_prospect_1.py index d1d9d03c..6cbf1c51 100644 --- a/scripts/expertise/expertise_sm_general_poor_prospect_1.py +++ b/scripts/expertise/expertise_sm_general_poor_prospect_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_poor_prospect_1') - - actor.addSkillMod('expertise_spot_a_sucker_damage_decrease_chance', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_poor_prospect_1') - - actor.removeSkillMod('expertise_spot_a_sucker_damage_decrease_chance', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_poor_prospect_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_poor_prospect_1") return diff --git a/scripts/expertise/expertise_sm_general_poor_prospect_2.py b/scripts/expertise/expertise_sm_general_poor_prospect_2.py index ba6e97ae..18d810f7 100644 --- a/scripts/expertise/expertise_sm_general_poor_prospect_2.py +++ b/scripts/expertise/expertise_sm_general_poor_prospect_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_poor_prospect_2') - - actor.addSkillMod('expertise_spot_a_sucker_damage_decrease_chance', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_poor_prospect_2') - - actor.removeSkillMod('expertise_spot_a_sucker_damage_decrease_chance', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_poor_prospect_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_poor_prospect_2") return diff --git a/scripts/expertise/expertise_sm_general_precise_bead_1.py b/scripts/expertise/expertise_sm_general_precise_bead_1.py index e2d219f6..427e2f61 100644 --- a/scripts/expertise/expertise_sm_general_precise_bead_1.py +++ b/scripts/expertise/expertise_sm_general_precise_bead_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_precise_bead_1') - - actor.addSkillMod('expertise_undiminished_critical_pistol', 5) - actor.addSkillMod('expertise_range_bonus_pistol', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_precise_bead_1') - - actor.removeSkillMod('expertise_undiminished_critical_pistol', 5) - actor.removeSkillMod('expertise_range_bonus_pistol', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_precise_bead_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_precise_bead_1") return diff --git a/scripts/expertise/expertise_sm_general_precise_bead_2.py b/scripts/expertise/expertise_sm_general_precise_bead_2.py index b3ae274d..941d326d 100644 --- a/scripts/expertise/expertise_sm_general_precise_bead_2.py +++ b/scripts/expertise/expertise_sm_general_precise_bead_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_precise_bead_2') - - actor.addSkillMod('expertise_undiminished_critical_pistol', 5) - actor.addSkillMod('expertise_range_bonus_pistol', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_precise_bead_2') - - actor.removeSkillMod('expertise_undiminished_critical_pistol', 5) - actor.removeSkillMod('expertise_range_bonus_pistol', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_precise_bead_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_precise_bead_2") return diff --git a/scripts/expertise/expertise_sm_general_spot_a_sucker_1.py b/scripts/expertise/expertise_sm_general_spot_a_sucker_1.py index 18b3ce1c..d043338d 100644 --- a/scripts/expertise/expertise_sm_general_spot_a_sucker_1.py +++ b/scripts/expertise/expertise_sm_general_spot_a_sucker_1.py @@ -1,48 +1,19 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_spot_a_sucker_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_spot_a_sucker_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_spot_a_sucker_1') - + if actor.getLevel() >= 34: + actor.addAbility("sm_spot_a_sucker_1") + if actor.getLevel() >= 50: + actor.addAbility("sm_spot_a_sucker_2") + if actor.getLevel() >= 66: + actor.addAbility("sm_spot_a_sucker_3") + if actor.getLevel() >= 82: + actor.addAbility("sm_spot_a_sucker_4") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_spot_a_sucker_1') - + actor.removeAbility("sm_spot_a_sucker_1") + actor.removeAbility("sm_spot_a_sucker_2") + actor.removeAbility("sm_spot_a_sucker_3") + actor.removeAbility("sm_spot_a_sucker_4") return diff --git a/scripts/expertise/expertise_sm_general_switcheroo_1.py b/scripts/expertise/expertise_sm_general_switcheroo_1.py index bec0a317..50d08045 100644 --- a/scripts/expertise/expertise_sm_general_switcheroo_1.py +++ b/scripts/expertise/expertise_sm_general_switcheroo_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_switcheroo_1') - - actor.addSkillMod('expertise_critical_hit_reduction', 1) - actor.addSkillMod('expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_switcheroo_1') - - actor.removeSkillMod('expertise_critical_hit_reduction', 1) - actor.removeSkillMod('expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_switcheroo_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_switcheroo_1") return diff --git a/scripts/expertise/expertise_sm_general_switcheroo_2.py b/scripts/expertise/expertise_sm_general_switcheroo_2.py index eb79a782..e66bad5a 100644 --- a/scripts/expertise/expertise_sm_general_switcheroo_2.py +++ b/scripts/expertise/expertise_sm_general_switcheroo_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_switcheroo_2') - - actor.addSkillMod('expertise_critical_hit_reduction', 1) - actor.addSkillMod('expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_switcheroo_2') - - actor.removeSkillMod('expertise_critical_hit_reduction', 1) - actor.removeSkillMod('expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_switcheroo_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_switcheroo_2") return diff --git a/scripts/expertise/expertise_sm_general_switcheroo_3.py b/scripts/expertise/expertise_sm_general_switcheroo_3.py index 9732dbf7..e7e1dcf9 100644 --- a/scripts/expertise/expertise_sm_general_switcheroo_3.py +++ b/scripts/expertise/expertise_sm_general_switcheroo_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_switcheroo_3') - - actor.addSkillMod('expertise_critical_hit_reduction', 1) - actor.addSkillMod('expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_switcheroo_3') - - actor.removeSkillMod('expertise_critical_hit_reduction', 1) - actor.removeSkillMod('expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_switcheroo_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_switcheroo_3") return diff --git a/scripts/expertise/expertise_sm_general_switcheroo_4.py b/scripts/expertise/expertise_sm_general_switcheroo_4.py index b5d082a5..c52c8ddf 100644 --- a/scripts/expertise/expertise_sm_general_switcheroo_4.py +++ b/scripts/expertise/expertise_sm_general_switcheroo_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_switcheroo_4') - - actor.addSkillMod('expertise_critical_hit_reduction', 1) - actor.addSkillMod('expertise_glancing_blow_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_switcheroo_4') - - actor.removeSkillMod('expertise_critical_hit_reduction', 1) - actor.removeSkillMod('expertise_glancing_blow_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_switcheroo_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_switcheroo_4") return diff --git a/scripts/expertise/expertise_sm_general_wretched_fate_1.py b/scripts/expertise/expertise_sm_general_wretched_fate_1.py index 25287ad7..e1c1ba8d 100644 --- a/scripts/expertise/expertise_sm_general_wretched_fate_1.py +++ b/scripts/expertise/expertise_sm_general_wretched_fate_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_general_wretched_fate_1') - - actor.addSkillMod('expertise_spot_a_sucker_glance_chance', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_general_wretched_fate_1') - - actor.removeSkillMod('expertise_spot_a_sucker_glance_chance', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_general_wretched_fate_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_general_wretched_fate_1") return diff --git a/scripts/expertise/expertise_sm_path_beat_down_1.py b/scripts/expertise/expertise_sm_path_beat_down_1.py index af1829d9..ac0f35cb 100644 --- a/scripts/expertise/expertise_sm_path_beat_down_1.py +++ b/scripts/expertise/expertise_sm_path_beat_down_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_beat_down_1') - - actor.addSkillMod('expertise_buff_duration_line_sm_pistol_whip', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_beat_down_1') - - actor.removeSkillMod('expertise_buff_duration_line_sm_pistol_whip', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_beat_down_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_beat_down_1") return diff --git a/scripts/expertise/expertise_sm_path_beat_down_2.py b/scripts/expertise/expertise_sm_path_beat_down_2.py index 692ea516..49463363 100644 --- a/scripts/expertise/expertise_sm_path_beat_down_2.py +++ b/scripts/expertise/expertise_sm_path_beat_down_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_beat_down_2') - - actor.addSkillMod('expertise_buff_duration_line_sm_pistol_whip', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_beat_down_2') - - actor.removeSkillMod('expertise_buff_duration_line_sm_pistol_whip', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_beat_down_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_beat_down_2") return diff --git a/scripts/expertise/expertise_sm_path_best_deal_ever_1.py b/scripts/expertise/expertise_sm_path_best_deal_ever_1.py index 2abbe97f..5ff94eb3 100644 --- a/scripts/expertise/expertise_sm_path_best_deal_ever_1.py +++ b/scripts/expertise/expertise_sm_path_best_deal_ever_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_best_deal_ever_1') - - actor.addSkillMod('expertise_buff_best_deal_ever', 3) - actor.addSkillMod('expertise_junk_dealer_cut', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_best_deal_ever_1') - - actor.removeSkillMod('expertise_buff_best_deal_ever', 3) - actor.removeSkillMod('expertise_junk_dealer_cut', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_best_deal_ever_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_best_deal_ever_1") return diff --git a/scripts/expertise/expertise_sm_path_best_deal_ever_2.py b/scripts/expertise/expertise_sm_path_best_deal_ever_2.py index 8d50a957..60cf82ff 100644 --- a/scripts/expertise/expertise_sm_path_best_deal_ever_2.py +++ b/scripts/expertise/expertise_sm_path_best_deal_ever_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_best_deal_ever_2') - - actor.addSkillMod('expertise_buff_best_deal_ever', 3) - actor.addSkillMod('expertise_junk_dealer_cut', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_best_deal_ever_2') - - actor.removeSkillMod('expertise_buff_best_deal_ever', 3) - actor.removeSkillMod('expertise_junk_dealer_cut', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_best_deal_ever_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_best_deal_ever_2") return diff --git a/scripts/expertise/expertise_sm_path_blaster_at_your_side_1.py b/scripts/expertise/expertise_sm_path_blaster_at_your_side_1.py index fcbf88bf..93b9fb75 100644 --- a/scripts/expertise/expertise_sm_path_blaster_at_your_side_1.py +++ b/scripts/expertise/expertise_sm_path_blaster_at_your_side_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_blaster_at_your_side_1') - - actor.addSkillMod('level_add_to_damage', 100) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_blaster_at_your_side_1') - - actor.removeSkillMod('level_add_to_damage', 100) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_blaster_at_your_side_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_blaster_at_your_side_1") return diff --git a/scripts/expertise/expertise_sm_path_blaster_at_your_side_2.py b/scripts/expertise/expertise_sm_path_blaster_at_your_side_2.py index d1297d00..71b64cd7 100644 --- a/scripts/expertise/expertise_sm_path_blaster_at_your_side_2.py +++ b/scripts/expertise/expertise_sm_path_blaster_at_your_side_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_blaster_at_your_side_2') - - actor.addSkillMod('level_add_to_damage', 100) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_blaster_at_your_side_2') - - actor.removeSkillMod('level_add_to_damage', 100) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_blaster_at_your_side_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_blaster_at_your_side_2") return diff --git a/scripts/expertise/expertise_sm_path_blindside_1.py b/scripts/expertise/expertise_sm_path_blindside_1.py index 082ed6a7..8914b449 100644 --- a/scripts/expertise/expertise_sm_path_blindside_1.py +++ b/scripts/expertise/expertise_sm_path_blindside_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_blindside_1') - - actor.addSkillMod('expertise_buff_duration_line_sm_skullduggery', 13) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_blindside_1') - - actor.removeSkillMod('expertise_buff_duration_line_sm_skullduggery', 13) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_blindside_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_blindside_1") return diff --git a/scripts/expertise/expertise_sm_path_blindside_2.py b/scripts/expertise/expertise_sm_path_blindside_2.py index 3af5ea33..85ff65e6 100644 --- a/scripts/expertise/expertise_sm_path_blindside_2.py +++ b/scripts/expertise/expertise_sm_path_blindside_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_blindside_2') - - actor.addSkillMod('expertise_buff_duration_line_sm_skullduggery', 13) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_blindside_2') - - actor.removeSkillMod('expertise_buff_duration_line_sm_skullduggery', 13) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_blindside_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_blindside_2") return diff --git a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_1.py b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_1.py index 14d4ae68..c8664074 100644 --- a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_1.py +++ b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_card_up_your_sleeve_1') - - actor.addSkillMod('expertise_double_hit_chance', 10) - actor.addSkillMod('expertise_sm_card_ranged_proc', 25) - actor.addSkillMod('expertise_sm_card_melee_proc', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_card_up_your_sleeve_1') - - actor.removeSkillMod('expertise_double_hit_chance', 10) - actor.removeSkillMod('expertise_sm_card_ranged_proc', 25) - actor.removeSkillMod('expertise_sm_card_melee_proc', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_card_up_your_sleeve_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_card_up_your_sleeve_1") return diff --git a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_2.py b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_2.py index 56aaad3a..350c78a6 100644 --- a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_2.py +++ b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_card_up_your_sleeve_2') - - actor.addSkillMod('expertise_double_hit_chance', 10) - actor.addSkillMod('expertise_sm_card_ranged_proc', 25) - actor.addSkillMod('expertise_sm_card_melee_proc', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_card_up_your_sleeve_2') - - actor.removeSkillMod('expertise_double_hit_chance', 10) - actor.removeSkillMod('expertise_sm_card_ranged_proc', 25) - actor.removeSkillMod('expertise_sm_card_melee_proc', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_card_up_your_sleeve_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_card_up_your_sleeve_2") return diff --git a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_3.py b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_3.py index e86ff955..36a56da8 100644 --- a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_3.py +++ b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_3.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_card_up_your_sleeve_3') - - actor.addSkillMod('expertise_double_hit_chance', 10) - actor.addSkillMod('expertise_sm_card_ranged_proc', 25) - actor.addSkillMod('expertise_sm_card_melee_proc', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_card_up_your_sleeve_3') - - actor.removeSkillMod('expertise_double_hit_chance', 10) - actor.removeSkillMod('expertise_sm_card_ranged_proc', 25) - actor.removeSkillMod('expertise_sm_card_melee_proc', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_card_up_your_sleeve_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_card_up_your_sleeve_3") return diff --git a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_4.py b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_4.py index e687b8de..2c273743 100644 --- a/scripts/expertise/expertise_sm_path_card_up_your_sleeve_4.py +++ b/scripts/expertise/expertise_sm_path_card_up_your_sleeve_4.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_card_up_your_sleeve_4') - - actor.addSkillMod('expertise_double_hit_chance', 10) - actor.addSkillMod('expertise_sm_card_ranged_proc', 25) - actor.addSkillMod('expertise_sm_card_melee_proc', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_card_up_your_sleeve_4') - - actor.removeSkillMod('expertise_double_hit_chance', 10) - actor.removeSkillMod('expertise_sm_card_ranged_proc', 25) - actor.removeSkillMod('expertise_sm_card_melee_proc', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_card_up_your_sleeve_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_card_up_your_sleeve_4") return diff --git a/scripts/expertise/expertise_sm_path_easy_money_1.py b/scripts/expertise/expertise_sm_path_easy_money_1.py index 9d8550f0..9891035b 100644 --- a/scripts/expertise/expertise_sm_path_easy_money_1.py +++ b/scripts/expertise/expertise_sm_path_easy_money_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_easy_money_1') - - actor.addSkillMod('luck_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_easy_money_1') - - actor.removeSkillMod('luck_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_easy_money_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_easy_money_1") return diff --git a/scripts/expertise/expertise_sm_path_easy_money_2.py b/scripts/expertise/expertise_sm_path_easy_money_2.py index 70412fba..a02f24f8 100644 --- a/scripts/expertise/expertise_sm_path_easy_money_2.py +++ b/scripts/expertise/expertise_sm_path_easy_money_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_easy_money_2') - - actor.addSkillMod('luck_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_easy_money_2') - - actor.removeSkillMod('luck_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_easy_money_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_easy_money_2") return diff --git a/scripts/expertise/expertise_sm_path_easy_money_3.py b/scripts/expertise/expertise_sm_path_easy_money_3.py index 3a44209a..18684c32 100644 --- a/scripts/expertise/expertise_sm_path_easy_money_3.py +++ b/scripts/expertise/expertise_sm_path_easy_money_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_easy_money_3') - - actor.addSkillMod('luck_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_easy_money_3') - - actor.removeSkillMod('luck_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_easy_money_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_easy_money_3") return diff --git a/scripts/expertise/expertise_sm_path_easy_money_4.py b/scripts/expertise/expertise_sm_path_easy_money_4.py index aaf2d0ef..3241291b 100644 --- a/scripts/expertise/expertise_sm_path_easy_money_4.py +++ b/scripts/expertise/expertise_sm_path_easy_money_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_easy_money_4') - - actor.addSkillMod('luck_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_easy_money_4') - - actor.removeSkillMod('luck_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_easy_money_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_easy_money_4") return diff --git a/scripts/expertise/expertise_sm_path_eat_dirt_1.py b/scripts/expertise/expertise_sm_path_eat_dirt_1.py index 7f3776b3..54211af3 100644 --- a/scripts/expertise/expertise_sm_path_eat_dirt_1.py +++ b/scripts/expertise/expertise_sm_path_eat_dirt_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_eat_dirt_1') - - actor.addSkillMod('expertise_miss_by_luck', 6) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_eat_dirt_1') - - actor.removeSkillMod('expertise_miss_by_luck', 6) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_eat_dirt_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_eat_dirt_1") return diff --git a/scripts/expertise/expertise_sm_path_eat_dirt_2.py b/scripts/expertise/expertise_sm_path_eat_dirt_2.py index 897d340c..da074616 100644 --- a/scripts/expertise/expertise_sm_path_eat_dirt_2.py +++ b/scripts/expertise/expertise_sm_path_eat_dirt_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_eat_dirt_2') - - actor.addSkillMod('expertise_miss_by_luck', 6) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_eat_dirt_2') - - actor.removeSkillMod('expertise_miss_by_luck', 6) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_eat_dirt_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_eat_dirt_2") return diff --git a/scripts/expertise/expertise_sm_path_fake_goods_1.py b/scripts/expertise/expertise_sm_path_fake_goods_1.py index 5b414151..bd727012 100644 --- a/scripts/expertise/expertise_sm_path_fake_goods_1.py +++ b/scripts/expertise/expertise_sm_path_fake_goods_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_fake_goods_1') - - actor.addSkillMod('expertise_buff_duration_line_sm_false_hope', 1) - actor.addSkillMod('expertise_delay_reduce_line_sm_false_hope', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_fake_goods_1') - - actor.removeSkillMod('expertise_buff_duration_line_sm_false_hope', 1) - actor.removeSkillMod('expertise_delay_reduce_line_sm_false_hope', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_fake_goods_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_fake_goods_1") return diff --git a/scripts/expertise/expertise_sm_path_fake_goods_2.py b/scripts/expertise/expertise_sm_path_fake_goods_2.py index 75d5968e..3419faae 100644 --- a/scripts/expertise/expertise_sm_path_fake_goods_2.py +++ b/scripts/expertise/expertise_sm_path_fake_goods_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_fake_goods_2') - - actor.addSkillMod('expertise_buff_duration_line_sm_false_hope', 1) - actor.addSkillMod('expertise_delay_reduce_line_sm_false_hope', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_fake_goods_2') - - actor.removeSkillMod('expertise_buff_duration_line_sm_false_hope', 1) - actor.removeSkillMod('expertise_delay_reduce_line_sm_false_hope', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_fake_goods_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_fake_goods_2") return diff --git a/scripts/expertise/expertise_sm_path_false_hope_1.py b/scripts/expertise/expertise_sm_path_false_hope_1.py index 92c2b34d..b1a72de3 100644 --- a/scripts/expertise/expertise_sm_path_false_hope_1.py +++ b/scripts/expertise/expertise_sm_path_false_hope_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_false_hope_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_false_hope_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_false_hope') - + actor.addAbility("sm_false_hope") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_false_hope') - + actor.removeAbility("sm_false_hope") return diff --git a/scripts/expertise/expertise_sm_path_feeling_lucky_1.py b/scripts/expertise/expertise_sm_path_feeling_lucky_1.py index 93fd0635..1f38b885 100644 --- a/scripts/expertise/expertise_sm_path_feeling_lucky_1.py +++ b/scripts/expertise/expertise_sm_path_feeling_lucky_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_feeling_lucky_1') - - actor.addSkillMod('expertise_increase_smuggler_loot', 1) - actor.addSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_feeling_lucky_1') - - actor.removeSkillMod('expertise_increase_smuggler_loot', 1) - actor.removeSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_feeling_lucky_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_feeling_lucky_1") return diff --git a/scripts/expertise/expertise_sm_path_feeling_lucky_2.py b/scripts/expertise/expertise_sm_path_feeling_lucky_2.py index ea2f7d6b..6c5af161 100644 --- a/scripts/expertise/expertise_sm_path_feeling_lucky_2.py +++ b/scripts/expertise/expertise_sm_path_feeling_lucky_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_feeling_lucky_2') - - actor.addSkillMod('expertise_increase_smuggler_loot', 1) - actor.addSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_feeling_lucky_2') - - actor.removeSkillMod('expertise_increase_smuggler_loot', 1) - actor.removeSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_feeling_lucky_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_feeling_lucky_2") return diff --git a/scripts/expertise/expertise_sm_path_feeling_lucky_3.py b/scripts/expertise/expertise_sm_path_feeling_lucky_3.py index a18e89b4..7965558c 100644 --- a/scripts/expertise/expertise_sm_path_feeling_lucky_3.py +++ b/scripts/expertise/expertise_sm_path_feeling_lucky_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_feeling_lucky_3') - - actor.addSkillMod('expertise_increase_smuggler_loot', 1) - actor.addSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_feeling_lucky_3') - - actor.removeSkillMod('expertise_increase_smuggler_loot', 1) - actor.removeSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_feeling_lucky_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_feeling_lucky_3") return diff --git a/scripts/expertise/expertise_sm_path_feeling_lucky_4.py b/scripts/expertise/expertise_sm_path_feeling_lucky_4.py index 4a924398..b9299149 100644 --- a/scripts/expertise/expertise_sm_path_feeling_lucky_4.py +++ b/scripts/expertise/expertise_sm_path_feeling_lucky_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_feeling_lucky_4') - - actor.addSkillMod('expertise_increase_smuggler_loot', 1) - actor.addSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_feeling_lucky_4') - - actor.removeSkillMod('expertise_increase_smuggler_loot', 1) - actor.removeSkillMod('expertise_sm_feeling_lucky_chance_proc', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_feeling_lucky_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_feeling_lucky_4") return diff --git a/scripts/expertise/expertise_sm_path_flying_tackle_1.py b/scripts/expertise/expertise_sm_path_flying_tackle_1.py index cb696d20..5fbcd2eb 100644 --- a/scripts/expertise/expertise_sm_path_flying_tackle_1.py +++ b/scripts/expertise/expertise_sm_path_flying_tackle_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_flying_tackle_1') - - actor.addSkillMod('expertise_stun_line_sm_pistol_whip', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_flying_tackle_1') - - actor.removeSkillMod('expertise_stun_line_sm_pistol_whip', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_flying_tackle_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_flying_tackle_1") return diff --git a/scripts/expertise/expertise_sm_path_flying_tackle_2.py b/scripts/expertise/expertise_sm_path_flying_tackle_2.py index fdf47b07..249e61b5 100644 --- a/scripts/expertise/expertise_sm_path_flying_tackle_2.py +++ b/scripts/expertise/expertise_sm_path_flying_tackle_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_flying_tackle_2') - - actor.addSkillMod('expertise_stun_line_sm_pistol_whip', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_flying_tackle_2') - - actor.removeSkillMod('expertise_stun_line_sm_pistol_whip', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_flying_tackle_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_flying_tackle_2") return diff --git a/scripts/expertise/expertise_sm_path_healthy_profits_1.py b/scripts/expertise/expertise_sm_path_healthy_profits_1.py index 431019aa..8145066b 100644 --- a/scripts/expertise/expertise_sm_path_healthy_profits_1.py +++ b/scripts/expertise/expertise_sm_path_healthy_profits_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_healthy_profits_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_healthy_profits_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_summon_medic') - + actor.addAbility("sm_summon_medic") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_summon_medic') - + actor.removeAbility("sm_summon_medic") return diff --git a/scripts/expertise/expertise_sm_path_impossible_odds_1.py b/scripts/expertise/expertise_sm_path_impossible_odds_1.py index 63e78de4..3191ef8f 100644 --- a/scripts/expertise/expertise_sm_path_impossible_odds_1.py +++ b/scripts/expertise/expertise_sm_path_impossible_odds_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_impossible_odds_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_impossible_odds_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_impossible_odds') - + actor.addAbility("sm_impossible_odds") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_impossible_odds') - + actor.removeAbility("sm_impossible_odds") return diff --git a/scripts/expertise/expertise_sm_path_inside_information_1.py b/scripts/expertise/expertise_sm_path_inside_information_1.py index 3bdba930..508ee947 100644 --- a/scripts/expertise/expertise_sm_path_inside_information_1.py +++ b/scripts/expertise/expertise_sm_path_inside_information_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_inside_information_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_inside_information_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_inside_information') - + actor.addAbility("sm_inside_information") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_inside_information') - + actor.removeAbility("sm_inside_information") return diff --git a/scripts/expertise/expertise_sm_path_loaded_chance_dice_1.py b/scripts/expertise/expertise_sm_path_loaded_chance_dice_1.py index ccc1e6ba..a73977ba 100644 --- a/scripts/expertise/expertise_sm_path_loaded_chance_dice_1.py +++ b/scripts/expertise/expertise_sm_path_loaded_chance_dice_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_loaded_chance_dice_1') - - actor.addSkillMod('expertise_increase_hit_by_luck', 5) - actor.addSkillMod('expertise_buff_duration_line_sm_impossible_odds', 13) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_loaded_chance_dice_1') - - actor.removeSkillMod('expertise_increase_hit_by_luck', 5) - actor.removeSkillMod('expertise_buff_duration_line_sm_impossible_odds', 13) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_loaded_chance_dice_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_loaded_chance_dice_1") return diff --git a/scripts/expertise/expertise_sm_path_loaded_chance_dice_2.py b/scripts/expertise/expertise_sm_path_loaded_chance_dice_2.py index 1af5ac14..ec00a3d4 100644 --- a/scripts/expertise/expertise_sm_path_loaded_chance_dice_2.py +++ b/scripts/expertise/expertise_sm_path_loaded_chance_dice_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_loaded_chance_dice_2') - - actor.addSkillMod('expertise_increase_hit_by_luck', 5) - actor.addSkillMod('expertise_buff_duration_line_sm_impossible_odds', 13) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_loaded_chance_dice_2') - - actor.removeSkillMod('expertise_increase_hit_by_luck', 5) - actor.removeSkillMod('expertise_buff_duration_line_sm_impossible_odds', 13) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_loaded_chance_dice_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_loaded_chance_dice_2") return diff --git a/scripts/expertise/expertise_sm_path_lucky_break_1.py b/scripts/expertise/expertise_sm_path_lucky_break_1.py index df59283b..2beff304 100644 --- a/scripts/expertise/expertise_sm_path_lucky_break_1.py +++ b/scripts/expertise/expertise_sm_path_lucky_break_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_lucky_break_1') - - actor.addSkillMod('expertise_lucky_break_chance', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_lucky_break_1') - - actor.removeSkillMod('expertise_lucky_break_chance', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_lucky_break_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_lucky_break_1") return diff --git a/scripts/expertise/expertise_sm_path_lucky_break_2.py b/scripts/expertise/expertise_sm_path_lucky_break_2.py index fabd837e..5a40d6c0 100644 --- a/scripts/expertise/expertise_sm_path_lucky_break_2.py +++ b/scripts/expertise/expertise_sm_path_lucky_break_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_lucky_break_2') - - actor.addSkillMod('expertise_lucky_break_chance', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_lucky_break_2') - - actor.removeSkillMod('expertise_lucky_break_chance', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_lucky_break_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_lucky_break_2") return diff --git a/scripts/expertise/expertise_sm_path_lucky_break_3.py b/scripts/expertise/expertise_sm_path_lucky_break_3.py index 572d050f..b1507e0b 100644 --- a/scripts/expertise/expertise_sm_path_lucky_break_3.py +++ b/scripts/expertise/expertise_sm_path_lucky_break_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_lucky_break_3') - - actor.addSkillMod('expertise_lucky_break_chance', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_lucky_break_3') - - actor.removeSkillMod('expertise_lucky_break_chance', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_lucky_break_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_lucky_break_3") return diff --git a/scripts/expertise/expertise_sm_path_lucky_break_4.py b/scripts/expertise/expertise_sm_path_lucky_break_4.py index 8a29ac79..b30641cc 100644 --- a/scripts/expertise/expertise_sm_path_lucky_break_4.py +++ b/scripts/expertise/expertise_sm_path_lucky_break_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_lucky_break_4') - - actor.addSkillMod('expertise_lucky_break_chance', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_lucky_break_4') - - actor.removeSkillMod('expertise_lucky_break_chance', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_lucky_break_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_lucky_break_4") return diff --git a/scripts/expertise/expertise_sm_path_off_the_books_1.py b/scripts/expertise/expertise_sm_path_off_the_books_1.py index eeac5c97..c42eeff2 100644 --- a/scripts/expertise/expertise_sm_path_off_the_books_1.py +++ b/scripts/expertise/expertise_sm_path_off_the_books_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_off_the_books_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_off_the_books_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_off_the_books') - + actor.addAbility("sm_off_the_books") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_off_the_books') - + actor.removeAbility("sm_off_the_books") return diff --git a/scripts/expertise/expertise_sm_path_pistol_whip_1.py b/scripts/expertise/expertise_sm_path_pistol_whip_1.py index e1dd1a3f..e38045db 100644 --- a/scripts/expertise/expertise_sm_path_pistol_whip_1.py +++ b/scripts/expertise/expertise_sm_path_pistol_whip_1.py @@ -1,48 +1,19 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_pistol_whip_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_pistol_whip_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_pistol_whip_1') - + if actor.getLevel() >= 34: + actor.addAbility("sm_pistol_whip_1") + if actor.getLevel() >= 50: + actor.addAbility("sm_pistol_whip_2") + if actor.getLevel() >= 66: + actor.addAbility("sm_pistol_whip_3") + if actor.getLevel() >= 82: + actor.addAbility("sm_pistol_whip_4") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_pistol_whip_1') - + actor.removeAbility("sm_pistol_whip_1") + actor.removeAbility("sm_pistol_whip_2") + actor.removeAbility("sm_pistol_whip_3") + actor.removeAbility("sm_pistol_whip_4") return diff --git a/scripts/expertise/expertise_sm_path_ploy_1.py b/scripts/expertise/expertise_sm_path_ploy_1.py index 972f5cf6..956c9d43 100644 --- a/scripts/expertise/expertise_sm_path_ploy_1.py +++ b/scripts/expertise/expertise_sm_path_ploy_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_ploy_1') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_ploy_1') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_ploy_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_ploy_1") return diff --git a/scripts/expertise/expertise_sm_path_ploy_2.py b/scripts/expertise/expertise_sm_path_ploy_2.py index a49453d7..fe707dc0 100644 --- a/scripts/expertise/expertise_sm_path_ploy_2.py +++ b/scripts/expertise/expertise_sm_path_ploy_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_ploy_2') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_ploy_2') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_ploy_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_ploy_2") return diff --git a/scripts/expertise/expertise_sm_path_ploy_3.py b/scripts/expertise/expertise_sm_path_ploy_3.py index 84904cdf..cecca14e 100644 --- a/scripts/expertise/expertise_sm_path_ploy_3.py +++ b/scripts/expertise/expertise_sm_path_ploy_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_ploy_3') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_ploy_3') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_ploy_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_ploy_3") return diff --git a/scripts/expertise/expertise_sm_path_ploy_4.py b/scripts/expertise/expertise_sm_path_ploy_4.py index 4ca79a1f..de968f40 100644 --- a/scripts/expertise/expertise_sm_path_ploy_4.py +++ b/scripts/expertise/expertise_sm_path_ploy_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_ploy_4') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_ploy_4') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_ploy_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_ploy_4") return diff --git a/scripts/expertise/expertise_sm_path_quick_fix_1.py b/scripts/expertise/expertise_sm_path_quick_fix_1.py index 522a120c..68fa7682 100644 --- a/scripts/expertise/expertise_sm_path_quick_fix_1.py +++ b/scripts/expertise/expertise_sm_path_quick_fix_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_quick_fix_1') - - actor.addSkillMod('expertise_healing_line_sm_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_quick_fix_1') - - actor.removeSkillMod('expertise_healing_line_sm_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_quick_fix_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_quick_fix_1") return diff --git a/scripts/expertise/expertise_sm_path_quick_fix_2.py b/scripts/expertise/expertise_sm_path_quick_fix_2.py index 2f4cdc81..7426e059 100644 --- a/scripts/expertise/expertise_sm_path_quick_fix_2.py +++ b/scripts/expertise/expertise_sm_path_quick_fix_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_quick_fix_2') - - actor.addSkillMod('expertise_healing_line_sm_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_quick_fix_2') - - actor.removeSkillMod('expertise_healing_line_sm_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_quick_fix_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_quick_fix_2") return diff --git a/scripts/expertise/expertise_sm_path_quick_fix_3.py b/scripts/expertise/expertise_sm_path_quick_fix_3.py index 42f74088..c469d4ed 100644 --- a/scripts/expertise/expertise_sm_path_quick_fix_3.py +++ b/scripts/expertise/expertise_sm_path_quick_fix_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_quick_fix_3') - - actor.addSkillMod('expertise_healing_line_sm_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_quick_fix_3') - - actor.removeSkillMod('expertise_healing_line_sm_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_quick_fix_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_quick_fix_3") return diff --git a/scripts/expertise/expertise_sm_path_quick_fix_4.py b/scripts/expertise/expertise_sm_path_quick_fix_4.py index c041fb6e..cebeae68 100644 --- a/scripts/expertise/expertise_sm_path_quick_fix_4.py +++ b/scripts/expertise/expertise_sm_path_quick_fix_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_quick_fix_4') - - actor.addSkillMod('expertise_healing_line_sm_heal', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_quick_fix_4') - - actor.removeSkillMod('expertise_healing_line_sm_heal', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_quick_fix_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_quick_fix_4") return diff --git a/scripts/expertise/expertise_sm_path_scandal_1.py b/scripts/expertise/expertise_sm_path_scandal_1.py index d3201976..e4f9b9b0 100644 --- a/scripts/expertise/expertise_sm_path_scandal_1.py +++ b/scripts/expertise/expertise_sm_path_scandal_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_scandal_1') - - actor.addSkillMod('expertise_damage_area_effect', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_scandal_1') - - actor.removeSkillMod('expertise_damage_area_effect', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_scandal_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_scandal_1") return diff --git a/scripts/expertise/expertise_sm_path_scandal_2.py b/scripts/expertise/expertise_sm_path_scandal_2.py index 5a14559b..39dc1d2b 100644 --- a/scripts/expertise/expertise_sm_path_scandal_2.py +++ b/scripts/expertise/expertise_sm_path_scandal_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_scandal_2') - - actor.addSkillMod('expertise_damage_area_effect', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_scandal_2') - - actor.removeSkillMod('expertise_damage_area_effect', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_scandal_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_scandal_2) return diff --git a/scripts/expertise/expertise_sm_path_scandal_3.py b/scripts/expertise/expertise_sm_path_scandal_3.py index 0d7ae351..4094a791 100644 --- a/scripts/expertise/expertise_sm_path_scandal_3.py +++ b/scripts/expertise/expertise_sm_path_scandal_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_scandal_3') - - actor.addSkillMod('expertise_damage_area_effect', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_scandal_3') - - actor.removeSkillMod('expertise_damage_area_effect', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_scandal_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_scandal_3") return diff --git a/scripts/expertise/expertise_sm_path_scandal_4.py b/scripts/expertise/expertise_sm_path_scandal_4.py index 96b3235c..6352b2e1 100644 --- a/scripts/expertise/expertise_sm_path_scandal_4.py +++ b/scripts/expertise/expertise_sm_path_scandal_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_scandal_4') - - actor.addSkillMod('expertise_damage_area_effect', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_scandal_4') - - actor.removeSkillMod('expertise_damage_area_effect', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_scandal_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_scandal_4") return diff --git a/scripts/expertise/expertise_sm_path_shoot_first_1.py b/scripts/expertise/expertise_sm_path_shoot_first_1.py index af429bb5..3cfcce30 100644 --- a/scripts/expertise/expertise_sm_path_shoot_first_1.py +++ b/scripts/expertise/expertise_sm_path_shoot_first_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_shoot_first_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_shoot_first_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_shoot_first_1') - + if actor.getLevel() >= 26: + actor.addAbility("sm_shoot_first_1") + if actor.getLevel() >= 34: + actor.addAbility("sm_shoot_first_2") + if actor.getLevel() >= 48: + actor.addAbility("sm_shoot_first_3") + if actor.getLevel() >= 62: + actor.addAbility("sm_shoot_first_4") + if actor.getLevel() >= 76: + actor.addAbility("sm_shoot_first_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_shoot_first_1') - + actor.removeAbility("sm_shoot_first_1") + actor.removeAbility("sm_shoot_first_2") + actor.removeAbility("sm_shoot_first_3") + actor.removeAbility("sm_shoot_first_4") + actor.removeAbility("sm_shoot_first_5") return diff --git a/scripts/expertise/expertise_sm_path_skullduggery_1.py b/scripts/expertise/expertise_sm_path_skullduggery_1.py index 3da59a99..7c662b84 100644 --- a/scripts/expertise/expertise_sm_path_skullduggery_1.py +++ b/scripts/expertise/expertise_sm_path_skullduggery_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_skullduggery_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_skullduggery_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sm_skullduggery') - + actor.addAbility("sm_path_skullduggery") return def removeAbilities(core, actor, player): - - actor.removeAbility('sm_skullduggery') - + actor.removeAbility("sm_path_skullduggery") return diff --git a/scripts/expertise/expertise_sm_path_sleight_of_hand_1.py b/scripts/expertise/expertise_sm_path_sleight_of_hand_1.py index 555dc04d..98907737 100644 --- a/scripts/expertise/expertise_sm_path_sleight_of_hand_1.py +++ b/scripts/expertise/expertise_sm_path_sleight_of_hand_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_sleight_of_hand_1') - - actor.addSkillMod('expertise_hit_by_luck', 8) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_sleight_of_hand_1') - - actor.removeSkillMod('expertise_hit_by_luck', 8) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_sleight_of_hand_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_sleight_of_hand_1") return diff --git a/scripts/expertise/expertise_sm_path_sleight_of_hand_2.py b/scripts/expertise/expertise_sm_path_sleight_of_hand_2.py index 50a5b317..88bdf88d 100644 --- a/scripts/expertise/expertise_sm_path_sleight_of_hand_2.py +++ b/scripts/expertise/expertise_sm_path_sleight_of_hand_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_sleight_of_hand_2') - - actor.addSkillMod('expertise_hit_by_luck', 8) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_sleight_of_hand_2') - - actor.removeSkillMod('expertise_hit_by_luck', 8) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_sleight_of_hand_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_sleight_of_hand_2") return diff --git a/scripts/expertise/expertise_sm_path_smooth_move_1.py b/scripts/expertise/expertise_sm_path_smooth_move_1.py index c04b10a0..0f766064 100644 --- a/scripts/expertise/expertise_sm_path_smooth_move_1.py +++ b/scripts/expertise/expertise_sm_path_smooth_move_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_smooth_move_1') - - actor.addSkillMod('expertise_damage_melee', 1) - actor.addSkillMod('expertise_damage_weapon_2', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_smooth_move_1') - - actor.removeSkillMod('expertise_damage_melee', 1) - actor.removeSkillMod('expertise_damage_weapon_2', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_smooth_move_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_smooth_move_1") return diff --git a/scripts/expertise/expertise_sm_path_smooth_move_2.py b/scripts/expertise/expertise_sm_path_smooth_move_2.py index e7f8a910..d27d5c81 100644 --- a/scripts/expertise/expertise_sm_path_smooth_move_2.py +++ b/scripts/expertise/expertise_sm_path_smooth_move_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_smooth_move_2') - - actor.addSkillMod('expertise_damage_melee', 1) - actor.addSkillMod('expertise_damage_weapon_2', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_smooth_move_2') - - actor.removeSkillMod('expertise_damage_melee', 1) - actor.removeSkillMod('expertise_damage_weapon_2', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_smooth_move_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_smooth_move_2") return diff --git a/scripts/expertise/expertise_sm_path_smooth_move_3.py b/scripts/expertise/expertise_sm_path_smooth_move_3.py index 036e78ed..888bd5d2 100644 --- a/scripts/expertise/expertise_sm_path_smooth_move_3.py +++ b/scripts/expertise/expertise_sm_path_smooth_move_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_smooth_move_3') - - actor.addSkillMod('expertise_damage_melee', 1) - actor.addSkillMod('expertise_damage_weapon_2', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_smooth_move_3') - - actor.removeSkillMod('expertise_damage_melee', 1) - actor.removeSkillMod('expertise_damage_weapon_2', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_smooth_move_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_smooth_move_3") return diff --git a/scripts/expertise/expertise_sm_path_smooth_move_4.py b/scripts/expertise/expertise_sm_path_smooth_move_4.py index c608477d..52572e2a 100644 --- a/scripts/expertise/expertise_sm_path_smooth_move_4.py +++ b/scripts/expertise/expertise_sm_path_smooth_move_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_smooth_move_4') - - actor.addSkillMod('expertise_damage_melee', 1) - actor.addSkillMod('expertise_damage_weapon_2', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_smooth_move_4') - - actor.removeSkillMod('expertise_damage_melee', 1) - actor.removeSkillMod('expertise_damage_weapon_2', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sm_path_smooth_move_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sm_path_smooth_move_4") return diff --git a/scripts/expertise/expertise_sm_path_under_the_counter_1.py b/scripts/expertise/expertise_sm_path_under_the_counter_1.py index 563ac15f..4ca94bdb 100644 --- a/scripts/expertise/expertise_sm_path_under_the_counter_1.py +++ b/scripts/expertise/expertise_sm_path_under_the_counter_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_under_the_counter_1') - - actor.addSkillMod('expertise_buff_under_the_counter', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_under_the_counter_1') - - actor.removeSkillMod('expertise_buff_under_the_counter', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_path_under_the_counter_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_path_under_the_counter_1") return diff --git a/scripts/expertise/expertise_sm_path_under_the_counter_2.py b/scripts/expertise/expertise_sm_path_under_the_counter_2.py index f4a1f72c..5769c9d6 100644 --- a/scripts/expertise/expertise_sm_path_under_the_counter_2.py +++ b/scripts/expertise/expertise_sm_path_under_the_counter_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.addSkill('expertise_sm_path_under_the_counter_2') - - actor.addSkillMod('expertise_buff_under_the_counter', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'smuggler_1a': - return - - actor.removeSkill('expertise_sm_path_under_the_counter_2') - - actor.removeSkillMod('expertise_buff_under_the_counter', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_path_under_the_counter_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_path_under_the_counter_2") return diff --git a/scripts/expertise/expertise_sp_assassins_blade_1.py b/scripts/expertise/expertise_sp_assassins_blade_1.py index 93a526dd..e022fcf7 100644 --- a/scripts/expertise/expertise_sp_assassins_blade_1.py +++ b/scripts/expertise/expertise_sp_assassins_blade_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_assassins_blade_1') - - actor.addSkillMod('expertise_strikethrough_chance', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_assassins_blade_1') - - actor.removeSkillMod('expertise_strikethrough_chance', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_assassins_blade_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_assassins_blade_1") return diff --git a/scripts/expertise/expertise_sp_assassins_blade_2.py b/scripts/expertise/expertise_sp_assassins_blade_2.py index ec05ff91..19d3ca7d 100644 --- a/scripts/expertise/expertise_sp_assassins_blade_2.py +++ b/scripts/expertise/expertise_sp_assassins_blade_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_assassins_blade_2') - - actor.addSkillMod('expertise_strikethrough_chance', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_assassins_blade_2') - - actor.removeSkillMod('expertise_strikethrough_chance', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_assassins_blade_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_assassins_blade_2") return diff --git a/scripts/expertise/expertise_sp_assassins_blade_4.py b/scripts/expertise/expertise_sp_assassins_blade_4.py index 1c18ae9f..810a2d9c 100644 --- a/scripts/expertise/expertise_sp_assassins_blade_4.py +++ b/scripts/expertise/expertise_sp_assassins_blade_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_assassins_blade_4') - - actor.addSkillMod('expertise_strikethrough_chance', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_assassins_blade_4') - - actor.removeSkillMod('expertise_strikethrough_chance', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_assassins_blade_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_assassins_blade_3") return diff --git a/scripts/expertise/expertise_sp_assassins_mark.py b/scripts/expertise/expertise_sp_assassins_mark.py index c15c1096..08e35d4d 100644 --- a/scripts/expertise/expertise_sp_assassins_mark.py +++ b/scripts/expertise/expertise_sp_assassins_mark.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_assassins_mark') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_assassins_mark') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_assassins_mark') - + actor.addAbility("sp_assassins_mark") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_assassins_mark') - + actor.removeAbility("sp_assassins_mark") return diff --git a/scripts/expertise/expertise_sp_avoid_damage_1.py b/scripts/expertise/expertise_sp_avoid_damage_1.py index 8e706bc7..723ca08c 100644 --- a/scripts/expertise/expertise_sp_avoid_damage_1.py +++ b/scripts/expertise/expertise_sp_avoid_damage_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_avoid_damage_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_avoid_damage_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_avoid_damage') - + actor.addAbility("sp_avoid_damage") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_avoid_damage') - + actor.removeAbility("sp_avoid_damage") return diff --git a/scripts/expertise/expertise_sp_burst_of_shadows_1.py b/scripts/expertise/expertise_sp_burst_of_shadows_1.py index a15ceaf2..8f106d74 100644 --- a/scripts/expertise/expertise_sp_burst_of_shadows_1.py +++ b/scripts/expertise/expertise_sp_burst_of_shadows_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_burst_of_shadows_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_burst_of_shadows_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_burst_of_shadows') - + actor.addAbility("sp_burst_of_shadows") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_burst_of_shadows') - + actor.removeAbility("sp_burst_of_shadows") return diff --git a/scripts/expertise/expertise_sp_careful_observation_1.py b/scripts/expertise/expertise_sp_careful_observation_1.py index 16654a46..158e2de9 100644 --- a/scripts/expertise/expertise_sp_careful_observation_1.py +++ b/scripts/expertise/expertise_sp_careful_observation_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_careful_observation_1') - - actor.addSkillMod('detect_hidden', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_careful_observation_1') - - actor.removeSkillMod('detect_hidden', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_careful_observation_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_careful_observation_1") return diff --git a/scripts/expertise/expertise_sp_careful_observation_2.py b/scripts/expertise/expertise_sp_careful_observation_2.py index 24e1430f..64ab18fe 100644 --- a/scripts/expertise/expertise_sp_careful_observation_2.py +++ b/scripts/expertise/expertise_sp_careful_observation_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_careful_observation_2') - - actor.addSkillMod('detect_hidden', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_careful_observation_2') - - actor.removeSkillMod('detect_hidden', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_careful_observation_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_careful_observation_2") return diff --git a/scripts/expertise/expertise_sp_cheap_shots_1.py b/scripts/expertise/expertise_sp_cheap_shots_1.py index 25e6ce82..4c45be85 100644 --- a/scripts/expertise/expertise_sp_cheap_shots_1.py +++ b/scripts/expertise/expertise_sp_cheap_shots_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_shots_1') - - actor.addSkillMod('expertise_action_weapon_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_shots_1') - - actor.removeSkillMod('expertise_action_weapon_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_shots_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_shots_1") return diff --git a/scripts/expertise/expertise_sp_cheap_shots_2.py b/scripts/expertise/expertise_sp_cheap_shots_2.py index 80c50bbd..6f1510ff 100644 --- a/scripts/expertise/expertise_sp_cheap_shots_2.py +++ b/scripts/expertise/expertise_sp_cheap_shots_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_shots_2') - - actor.addSkillMod('expertise_action_weapon_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_shots_2') - - actor.removeSkillMod('expertise_action_weapon_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_shots_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_shots_2") return diff --git a/scripts/expertise/expertise_sp_cheap_shots_3.py b/scripts/expertise/expertise_sp_cheap_shots_3.py index b109039c..a44a75a0 100644 --- a/scripts/expertise/expertise_sp_cheap_shots_3.py +++ b/scripts/expertise/expertise_sp_cheap_shots_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_shots_3') - - actor.addSkillMod('expertise_action_weapon_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_shots_3') - - actor.removeSkillMod('expertise_action_weapon_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_shots_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_shots_3") return diff --git a/scripts/expertise/expertise_sp_cheap_shots_4.py b/scripts/expertise/expertise_sp_cheap_shots_4.py index 473d1c54..be49ce20 100644 --- a/scripts/expertise/expertise_sp_cheap_shots_4.py +++ b/scripts/expertise/expertise_sp_cheap_shots_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_shots_4') - - actor.addSkillMod('expertise_action_weapon_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_shots_4') - - actor.removeSkillMod('expertise_action_weapon_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_shots_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_shots_4") return diff --git a/scripts/expertise/expertise_sp_cheap_strikes_1.py b/scripts/expertise/expertise_sp_cheap_strikes_1.py index b32c86b8..bf64aff5 100644 --- a/scripts/expertise/expertise_sp_cheap_strikes_1.py +++ b/scripts/expertise/expertise_sp_cheap_strikes_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_strikes_1') - - actor.addSkillMod('expertise_action_weapon_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_strikes_1') - - actor.removeSkillMod('expertise_action_weapon_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_strikes_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_strikes_1") return diff --git a/scripts/expertise/expertise_sp_cheap_strikes_2.py b/scripts/expertise/expertise_sp_cheap_strikes_2.py index a88b5b7a..2264e3cc 100644 --- a/scripts/expertise/expertise_sp_cheap_strikes_2.py +++ b/scripts/expertise/expertise_sp_cheap_strikes_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_strikes_2') - - actor.addSkillMod('expertise_action_weapon_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_strikes_2') - - actor.removeSkillMod('expertise_action_weapon_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_strikes_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_strikes_2") return diff --git a/scripts/expertise/expertise_sp_cheap_strikes_3.py b/scripts/expertise/expertise_sp_cheap_strikes_3.py index c3e9a8a0..110acea8 100644 --- a/scripts/expertise/expertise_sp_cheap_strikes_3.py +++ b/scripts/expertise/expertise_sp_cheap_strikes_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_strikes_3') - - actor.addSkillMod('expertise_action_weapon_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_strikes_3') - - actor.removeSkillMod('expertise_action_weapon_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_strikes_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_strikes_3") return diff --git a/scripts/expertise/expertise_sp_cheap_strikes_4.py b/scripts/expertise/expertise_sp_cheap_strikes_4.py index 2f58d895..97a2d0f6 100644 --- a/scripts/expertise/expertise_sp_cheap_strikes_4.py +++ b/scripts/expertise/expertise_sp_cheap_strikes_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cheap_strikes_4') - - actor.addSkillMod('expertise_action_weapon_melee', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cheap_strikes_4') - - actor.removeSkillMod('expertise_action_weapon_melee', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cheap_strikes_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cheap_strikes_4") return diff --git a/scripts/expertise/expertise_sp_cloak_and_dagger_1.py b/scripts/expertise/expertise_sp_cloak_and_dagger_1.py index f1333f00..55d9c884 100644 --- a/scripts/expertise/expertise_sp_cloak_and_dagger_1.py +++ b/scripts/expertise/expertise_sp_cloak_and_dagger_1.py @@ -1,54 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloak_and_dagger_1') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloak_and_dagger_1') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cloak_and_dagger_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cloak_and_dagger_1") return diff --git a/scripts/expertise/expertise_sp_cloak_and_dagger_2.py b/scripts/expertise/expertise_sp_cloak_and_dagger_2.py index f9ac5034..1ee3ca02 100644 --- a/scripts/expertise/expertise_sp_cloak_and_dagger_2.py +++ b/scripts/expertise/expertise_sp_cloak_and_dagger_2.py @@ -1,54 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloak_and_dagger_2') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloak_and_dagger_2') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cloak_and_dagger_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cloak_and_dagger_2") return diff --git a/scripts/expertise/expertise_sp_cloak_and_dagger_3.py b/scripts/expertise/expertise_sp_cloak_and_dagger_3.py index 977c7b67..c46d0390 100644 --- a/scripts/expertise/expertise_sp_cloak_and_dagger_3.py +++ b/scripts/expertise/expertise_sp_cloak_and_dagger_3.py @@ -1,54 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloak_and_dagger_3') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloak_and_dagger_3') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cloak_and_dagger_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cloak_and_dagger_3") return diff --git a/scripts/expertise/expertise_sp_cloak_and_dagger_4.py b/scripts/expertise/expertise_sp_cloak_and_dagger_4.py index bc53f9a9..7e78d832 100644 --- a/scripts/expertise/expertise_sp_cloak_and_dagger_4.py +++ b/scripts/expertise/expertise_sp_cloak_and_dagger_4.py @@ -1,54 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloak_and_dagger_4') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.addSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloak_and_dagger_4') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_melee', 20) - actor.removeSkillMod('expertise_dot_damage_line_sp_stealth_ranged', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cloak_and_dagger_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cloak_and_dagger_4") return diff --git a/scripts/expertise/expertise_sp_cloaked_attacks_1.py b/scripts/expertise/expertise_sp_cloaked_attacks_1.py index d96a977e..9f979c33 100644 --- a/scripts/expertise/expertise_sp_cloaked_attacks_1.py +++ b/scripts/expertise/expertise_sp_cloaked_attacks_1.py @@ -1,48 +1,52 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloaked_attacks_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloaked_attacks_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_ambush_snipe_0') - + if actor.getLevel() >= 10: + actor.addAbility("sp_stealth_melee_0") + if actor.getLevel() >= 20: + actor.addAbility("sp_stealth_melee_1") + if actor.getLevel() >= 32: + actor.addAbility("sp_stealth_melee_2") + if actor.getLevel() >= 46: + actor.addAbility("sp_stealth_melee_3") + if actor.getLevel() >= 60: + actor.addAbility("sp_stealth_melee_4") + if actor.getLevel() >= 70: + actor.addAbility("sp_stealth_melee_5") + if actor.getLevel() >= 86: + actor.addAbility("sp_stealth_melee_6") + + if actor.getLevel() >= 10: + actor.addAbility("sp_stealth_ranged_0") + if actor.getLevel() >= 20: + actor.addAbility("sp_stealth_ranged_1") + if actor.getLevel() >= 32: + actor.addAbility("sp_stealth_ranged_2") + if actor.getLevel() >= 46: + actor.addAbility("sp_stealth_ranged_3") + if actor.getLevel() >= 60: + actor.addAbility("sp_stealth_ranged_4") + if actor.getLevel() >= 70: + actor.addAbility("sp_stealth_ranged_5") + if actor.getLevel() >= 86: + actor.addAbility("sp_stealth_ranged_6") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_ambush_snipe_0') - + actor.removeAbility("sp_stealth_melee_0") + actor.removeAbility("sp_stealth_melee_1") + actor.removeAbility("sp_stealth_melee_2") + actor.removeAbility("sp_stealth_melee_3") + actor.removeAbility("sp_stealth_melee_4") + actor.removeAbility("sp_stealth_melee_5") + actor.removeAbility("sp_stealth_melee_6") + + actor.removeAbility("sp_stealth_ranged_0") + actor.removeAbility("sp_stealth_ranged_1") + actor.removeAbility("sp_stealth_ranged_2") + actor.removeAbility("sp_stealth_ranged_3") + actor.removeAbility("sp_stealth_ranged_4") + actor.removeAbility("sp_stealth_ranged_5") + actor.removeAbility("sp_stealth_ranged_6") return + diff --git a/scripts/expertise/expertise_sp_cloaked_recovery_1.py b/scripts/expertise/expertise_sp_cloaked_recovery_1.py index 17e8cb25..5e8ffb01 100644 --- a/scripts/expertise/expertise_sp_cloaked_recovery_1.py +++ b/scripts/expertise/expertise_sp_cloaked_recovery_1.py @@ -1,48 +1,22 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloaked_recovery_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloaked_recovery_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_cloaked_recovery_0') - + if actor.getLevel() >= 10: + actor.addAbility("sp_cloaked_recovery_0") + if actor.getLevel() >= 28: + actor.addAbility("sp_cloaked_recovery_1") + if actor.getLevel() >= 54: + actor.addAbility("sp_cloaked_recovery_2") + if actor.getLevel() >= 70: + actor.addAbility("sp_cloaked_recovery_3") + if actor.getLevel() >= 86: + actor.addAbility("sp_cloaked_recovery_4") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_cloaked_recovery_0') - + actor.removeAbility("sp_cloaked_recovery_0") + actor.removeAbility("sp_cloaked_recovery_1") + actor.removeAbility("sp_cloaked_recovery_2") + actor.removeAbility("sp_cloaked_recovery_3") + actor.removeAbility("sp_cloaked_recovery_4") return diff --git a/scripts/expertise/expertise_sp_cloaking_armor_1.py b/scripts/expertise/expertise_sp_cloaking_armor_1.py index 80d1afc1..4d29b500 100644 --- a/scripts/expertise/expertise_sp_cloaking_armor_1.py +++ b/scripts/expertise/expertise_sp_cloaking_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloaking_armor_1') - - actor.addSkillMod('camouflage', 35) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloaking_armor_1') - - actor.removeSkillMod('camouflage', 35) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cloaking_armor_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cloaking_armor_1") return diff --git a/scripts/expertise/expertise_sp_cloaking_armor_2.py b/scripts/expertise/expertise_sp_cloaking_armor_2.py index 79cb0d6f..7aef08d8 100644 --- a/scripts/expertise/expertise_sp_cloaking_armor_2.py +++ b/scripts/expertise/expertise_sp_cloaking_armor_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_cloaking_armor_2') - - actor.addSkillMod('camouflage', 40) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_cloaking_armor_2') - - actor.removeSkillMod('camouflage', 40) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_cloaking_armor_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_cloaking_armor_2") return diff --git a/scripts/expertise/expertise_sp_close_quarters_1.py b/scripts/expertise/expertise_sp_close_quarters_1.py index 7f47d8c4..e98a053f 100644 --- a/scripts/expertise/expertise_sp_close_quarters_1.py +++ b/scripts/expertise/expertise_sp_close_quarters_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_close_quarters_1') - - actor.addSkillMod('expertise_damage_melee', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_close_quarters_1') - - actor.removeSkillMod('expertise_damage_melee', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_close_quarters_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_close_quarters_1") return diff --git a/scripts/expertise/expertise_sp_close_quarters_2.py b/scripts/expertise/expertise_sp_close_quarters_2.py index 11685e64..6a94d3e4 100644 --- a/scripts/expertise/expertise_sp_close_quarters_2.py +++ b/scripts/expertise/expertise_sp_close_quarters_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_close_quarters_2') - - actor.addSkillMod('expertise_damage_melee', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_close_quarters_2') - - actor.removeSkillMod('expertise_damage_melee', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_close_quarters_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_close_quarters_2") return diff --git a/scripts/expertise/expertise_sp_close_quarters_3.py b/scripts/expertise/expertise_sp_close_quarters_3.py index ee025e54..3b9e0088 100644 --- a/scripts/expertise/expertise_sp_close_quarters_3.py +++ b/scripts/expertise/expertise_sp_close_quarters_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_close_quarters_3') - - actor.addSkillMod('expertise_damage_melee', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_close_quarters_3') - - actor.removeSkillMod('expertise_damage_melee', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_close_quarters_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_close_quarters_3") return diff --git a/scripts/expertise/expertise_sp_covert_mastery_1.py b/scripts/expertise/expertise_sp_covert_mastery_1.py index 114d70b6..56e5d7df 100644 --- a/scripts/expertise/expertise_sp_covert_mastery_1.py +++ b/scripts/expertise/expertise_sp_covert_mastery_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_covert_mastery_1') - - actor.addSkillMod('expertise_covert_mastery', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_covert_mastery_1') - - actor.removeSkillMod('expertise_covert_mastery', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_covert_mastery_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_covert_mastery_1") return diff --git a/scripts/expertise/expertise_sp_crippling_traps_1.py b/scripts/expertise/expertise_sp_crippling_traps_1.py index 9189c956..f414594b 100644 --- a/scripts/expertise/expertise_sp_crippling_traps_1.py +++ b/scripts/expertise/expertise_sp_crippling_traps_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_crippling_traps_1') - - actor.addSkillMod('expertise_sp_cripple_trap_proc_increase', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_crippling_traps_1') - - actor.removeSkillMod('expertise_sp_cripple_trap_proc_increase', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_crippling_traps_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_crippling_traps_1") return diff --git a/scripts/expertise/expertise_sp_crippling_traps_2.py b/scripts/expertise/expertise_sp_crippling_traps_2.py index c7b2170e..f5899f9c 100644 --- a/scripts/expertise/expertise_sp_crippling_traps_2.py +++ b/scripts/expertise/expertise_sp_crippling_traps_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_crippling_traps_2') - - actor.addSkillMod('expertise_sp_cripple_trap_proc_increase', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_crippling_traps_2') - - actor.removeSkillMod('expertise_sp_cripple_trap_proc_increase', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_crippling_traps_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_crippling_traps_2") return diff --git a/scripts/expertise/expertise_sp_deadly_pistols_1.py b/scripts/expertise/expertise_sp_deadly_pistols_1.py index fc98249a..16e02540 100644 --- a/scripts/expertise/expertise_sp_deadly_pistols_1.py +++ b/scripts/expertise/expertise_sp_deadly_pistols_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_deadly_pistols_1') - - actor.addSkillMod('expertise_damage_ranged', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_deadly_pistols_1') - - actor.removeSkillMod('expertise_damage_ranged', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_deadly_pistols_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_deadly_pistols_1") return diff --git a/scripts/expertise/expertise_sp_deadly_pistols_2.py b/scripts/expertise/expertise_sp_deadly_pistols_2.py index 6f51bb5e..dc23941c 100644 --- a/scripts/expertise/expertise_sp_deadly_pistols_2.py +++ b/scripts/expertise/expertise_sp_deadly_pistols_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_deadly_pistols_2') - - actor.addSkillMod('expertise_damage_ranged', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_deadly_pistols_2') - - actor.removeSkillMod('expertise_damage_ranged', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_deadly_pistols_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_deadly_pistols_2") return diff --git a/scripts/expertise/expertise_sp_deadly_pistols_3.py b/scripts/expertise/expertise_sp_deadly_pistols_3.py index 2e75294c..42077da1 100644 --- a/scripts/expertise/expertise_sp_deadly_pistols_3.py +++ b/scripts/expertise/expertise_sp_deadly_pistols_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_deadly_pistols_3') - - actor.addSkillMod('expertise_damage_ranged', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_deadly_pistols_3') - - actor.removeSkillMod('expertise_damage_ranged', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_deadly_pistols_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_deadly_pistols_3") return diff --git a/scripts/expertise/expertise_sp_deadly_toxins_1.py b/scripts/expertise/expertise_sp_deadly_toxins_1.py index 7e8dc0c9..cc5432e9 100644 --- a/scripts/expertise/expertise_sp_deadly_toxins_1.py +++ b/scripts/expertise/expertise_sp_deadly_toxins_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_deadly_toxins_1') - - actor.addSkillMod('expertise_critical_line_fldmot', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_deadly_toxins_1') - - actor.removeSkillMod('expertise_critical_line_fldmot', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_deadly_toxins_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_deadly_toxins_1") return diff --git a/scripts/expertise/expertise_sp_deadly_toxins_2.py b/scripts/expertise/expertise_sp_deadly_toxins_2.py index 1995b0dc..f5f3be36 100644 --- a/scripts/expertise/expertise_sp_deadly_toxins_2.py +++ b/scripts/expertise/expertise_sp_deadly_toxins_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_deadly_toxins_2') - - actor.addSkillMod('expertise_critical_line_fldmot', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_deadly_toxins_2') - - actor.removeSkillMod('expertise_critical_line_fldmot', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_deadly_toxins_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_deadly_toxins_2") return diff --git a/scripts/expertise/expertise_sp_decoy_1.py b/scripts/expertise/expertise_sp_decoy_1.py index 4888c20c..50f9dcc6 100644 --- a/scripts/expertise/expertise_sp_decoy_1.py +++ b/scripts/expertise/expertise_sp_decoy_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_decoy_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_decoy_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_decoy') - + actor.addAbility("sp_decoy") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_decoy') - + actor.removeAbility("sp_decoy") return diff --git a/scripts/expertise/expertise_sp_diversion_1.py b/scripts/expertise/expertise_sp_diversion_1.py index aa564906..fdd847e9 100644 --- a/scripts/expertise/expertise_sp_diversion_1.py +++ b/scripts/expertise/expertise_sp_diversion_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_diversion_1') - - actor.addSkillMod('expertise_improved_decoy', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_diversion_1') - - actor.removeSkillMod('expertise_improved_decoy', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_diversion_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_diversion_1") return diff --git a/scripts/expertise/expertise_sp_diversion_2.py b/scripts/expertise/expertise_sp_diversion_2.py index d8b6c134..7dddf6ba 100644 --- a/scripts/expertise/expertise_sp_diversion_2.py +++ b/scripts/expertise/expertise_sp_diversion_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_diversion_2') - - actor.addSkillMod('expertise_improved_decoy', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_diversion_2') - - actor.removeSkillMod('expertise_improved_decoy', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_diversion_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_diversion_2") return diff --git a/scripts/expertise/expertise_sp_equilibrium.py b/scripts/expertise/expertise_sp_equilibrium.py index d42cdb4d..1ebdcbd1 100644 --- a/scripts/expertise/expertise_sp_equilibrium.py +++ b/scripts/expertise/expertise_sp_equilibrium.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_equilibrium') - - actor.addSkillMod('freeshot_case_miss', 1) - actor.addSkillMod('freeshot_case_dodge', 1) - actor.addSkillMod('freeshot_case_parry', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_equilibrium') - - actor.removeSkillMod('freeshot_case_miss', 1) - actor.removeSkillMod('freeshot_case_dodge', 1) - actor.removeSkillMod('freeshot_case_parry', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_equilibrium") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_equilibrium") return diff --git a/scripts/expertise/expertise_sp_expose_shadows_1.py b/scripts/expertise/expertise_sp_expose_shadows_1.py index 4b08472a..22769831 100644 --- a/scripts/expertise/expertise_sp_expose_shadows_1.py +++ b/scripts/expertise/expertise_sp_expose_shadows_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_expose_shadows_1') - - actor.addSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.addSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.addSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_expose_shadows_1') - - actor.removeSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.removeSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.removeSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_expose_shadows_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_expose_shadows_1") return diff --git a/scripts/expertise/expertise_sp_expose_shadows_2.py b/scripts/expertise/expertise_sp_expose_shadows_2.py index 79a4cf58..ff7f014f 100644 --- a/scripts/expertise/expertise_sp_expose_shadows_2.py +++ b/scripts/expertise/expertise_sp_expose_shadows_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_expose_shadows_2') - - actor.addSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.addSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.addSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_expose_shadows_2') - - actor.removeSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.removeSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.removeSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_expose_shadows_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_expose_shadows_2") return diff --git a/scripts/expertise/expertise_sp_expose_shadows_3.py b/scripts/expertise/expertise_sp_expose_shadows_3.py index 648a6cb4..209eb428 100644 --- a/scripts/expertise/expertise_sp_expose_shadows_3.py +++ b/scripts/expertise/expertise_sp_expose_shadows_3.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_expose_shadows_3') - - actor.addSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.addSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.addSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_expose_shadows_3') - - actor.removeSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.removeSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.removeSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_expose_shadows_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_expose_shadows_3") return diff --git a/scripts/expertise/expertise_sp_expose_shadows_4.py b/scripts/expertise/expertise_sp_expose_shadows_4.py index cce077b5..2afdddf2 100644 --- a/scripts/expertise/expertise_sp_expose_shadows_4.py +++ b/scripts/expertise/expertise_sp_expose_shadows_4.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_expose_shadows_4') - - actor.addSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.addSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.addSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_expose_shadows_4') - - actor.removeSkillMod('expertise_sp_reveal_shadows_distance_increase', 5) - actor.removeSkillMod('expertise_sp_reveal_shadows_detect_chance_increase', 3) - actor.removeSkillMod('expertise_cooldown_line_sp_reveal_shadows', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_expose_shadows_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_expose_shadows_4") return diff --git a/scripts/expertise/expertise_sp_glancing_armor_1.py b/scripts/expertise/expertise_sp_glancing_armor_1.py index 2bc35f22..f1e04872 100644 --- a/scripts/expertise/expertise_sp_glancing_armor_1.py +++ b/scripts/expertise/expertise_sp_glancing_armor_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_glancing_armor_1') - - actor.addSkillMod('expertise_dodge', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_glancing_armor_1') - - actor.removeSkillMod('expertise_dodge', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_glancing_armor_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_glancing_armor_1") return diff --git a/scripts/expertise/expertise_sp_glancing_armor_2.py b/scripts/expertise/expertise_sp_glancing_armor_2.py index 84e0e50d..42c8c808 100644 --- a/scripts/expertise/expertise_sp_glancing_armor_2.py +++ b/scripts/expertise/expertise_sp_glancing_armor_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_glancing_armor_2') - - actor.addSkillMod('expertise_dodge', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_glancing_armor_2') - - actor.removeSkillMod('expertise_dodge', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_glancing_armor_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_glancing_armor_2") return diff --git a/scripts/expertise/expertise_sp_hidden_daggers_1.py b/scripts/expertise/expertise_sp_hidden_daggers_1.py index 2b947a0c..38c849d5 100644 --- a/scripts/expertise/expertise_sp_hidden_daggers_1.py +++ b/scripts/expertise/expertise_sp_hidden_daggers_1.py @@ -1,48 +1,51 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_hidden_daggers_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_hidden_daggers_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): + if actor.getLevel() >= 10: + actor.addAbility("sp_hd_melee_0") + if actor.getLevel() >= 18: + actor.addAbility("sp_hd_melee_1") + if actor.getLevel() >= 32: + actor.addAbility("sp_hd_melee_2") + if actor.getLevel() >= 46: + actor.addAbility("sp_hd_melee_3") + if actor.getLevel() >= 58: + actor.addAbility("sp_hd_melee_4") + if actor.getLevel() >= 70: + actor.addAbility("sp_hd_melee_5") + if actor.getLevel() >= 84: + actor.addAbility("sp_hd_melee_6") - actor.addAbility('sp_hd_ability_0') - + if actor.getLevel() >= 10: + actor.addAbility("sp_hd_range_0") + if actor.getLevel() >= 18: + actor.addAbility("sp_hd_range_1") + if actor.getLevel() >= 32: + actor.addAbility("sp_hd_range_2") + if actor.getLevel() >= 46: + actor.addAbility("sp_hd_range_3") + if actor.getLevel() >= 58: + actor.addAbility("sp_hd_range_4") + if actor.getLevel() >= 70: + actor.addAbility("sp_hd_range_5") + if actor.getLevel() >= 84: + actor.addAbility("sp_hd_range_6") return def removeAbilities(core, actor, player): + actor.removeAbility("sp_hd_melee_0") + actor.removeAbility("sp_hd_melee_1") + actor.removeAbility("sp_hd_melee_2") + actor.removeAbility("sp_hd_melee_3") + actor.removeAbility("sp_hd_melee_4") + actor.removeAbility("sp_hd_melee_5") + actor.removeAbility("sp_hd_melee_6") - actor.removeAbility('sp_hd_ability_0') - + actor.removeAbility("sp_hd_range_0") + actor.removeAbility("sp_hd_range_1") + actor.removeAbility("sp_hd_range_2") + actor.removeAbility("sp_hd_range_3") + actor.removeAbility("sp_hd_range_4") + actor.removeAbility("sp_hd_range_5") + actor.removeAbility("sp_hd_range_6") return diff --git a/scripts/expertise/expertise_sp_hidden_daggers_2.py b/scripts/expertise/expertise_sp_hidden_daggers_2.py new file mode 100644 index 00000000..9b197112 --- /dev/null +++ b/scripts/expertise/expertise_sp_hidden_daggers_2.py @@ -0,0 +1,9 @@ +import sys + +def addAbilities(core, actor, player): + actor.addAbility("sp_hd_range_0") + return + +def removeAbilities(core, actor, player): + actor.removeAbility("sp_hd_range_0") + return diff --git a/scripts/expertise/expertise_sp_improved_arachnids_web_1.py b/scripts/expertise/expertise_sp_improved_arachnids_web_1.py new file mode 100644 index 00000000..b9c80355 --- /dev/null +++ b/scripts/expertise/expertise_sp_improved_arachnids_web_1.py @@ -0,0 +1,19 @@ +import sys + +def addAbilities(core, actor, player): + if actor.getLevel() >= 34: + actor.addAbility("sp_improved_cc_dot_1") + if actor.getLevel() >= 50: + actor.addAbility("sp_improved_cc_dot_2") + if actor.getLevel() >= 66: + actor.addAbility("sp_improved_cc_dot_3") + if actor.getLevel() >= 82: + actor.addAbility("sp_improved_cc_dot_4") + return + +def removeAbilities(core, actor, player): + actor.removeAbility("sp_improved_cc_dot_1") + actor.removeAbility("sp_improved_cc_dot_2") + actor.removeAbility("sp_improved_cc_dot_3") + actor.removeAbility("sp_improved_cc_dot_4") + return diff --git a/scripts/expertise/expertise_sp_improved_first_aid_1.py b/scripts/expertise/expertise_sp_improved_first_aid_1.py index 302ef8e0..7e866996 100644 --- a/scripts/expertise/expertise_sp_improved_first_aid_1.py +++ b/scripts/expertise/expertise_sp_improved_first_aid_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_improved_first_aid_1') - - actor.addSkillMod('expertise_target_healing_bonus', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_improved_first_aid_1') - - actor.removeSkillMod('expertise_target_healing_bonus', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_improved_first_aid_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_improved_first_aid_1") return diff --git a/scripts/expertise/expertise_sp_improved_first_aid_2.py b/scripts/expertise/expertise_sp_improved_first_aid_2.py index 5c810822..cec8de8b 100644 --- a/scripts/expertise/expertise_sp_improved_first_aid_2.py +++ b/scripts/expertise/expertise_sp_improved_first_aid_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_improved_first_aid_2') - - actor.addSkillMod('expertise_target_healing_bonus', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_improved_first_aid_2') - - actor.removeSkillMod('expertise_target_healing_bonus', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_improved_first_aid_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_improved_first_aid_2") return diff --git a/scripts/expertise/expertise_sp_improved_spys_fang_1.py b/scripts/expertise/expertise_sp_improved_spys_fang_1.py index a91bbc75..5a085702 100644 --- a/scripts/expertise/expertise_sp_improved_spys_fang_1.py +++ b/scripts/expertise/expertise_sp_improved_spys_fang_1.py @@ -1,48 +1,25 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_improved_spys_fang_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_improved_spys_fang_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_dot_0') - + if actor.getLevel() >= 10: + actor.addAbility("sp_dot_0") + if actor.getLevel() >= 28: + actor.addAbility("sp_dot_1") + if actor.getLevel() >= 46: + actor.addAbility("sp_dot_2") + if actor.getLevel() >= 58: + actor.addAbility("sp_dot_3") + if actor.getLevel() >= 72: + actor.addAbility("sp_dot_4") + if actor.getLevel() >= 88: + actor.addAbility("sp_dot_5") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_dot_0') - + actor.removeAbility("sp_dot_0") + actor.removeAbility("sp_dot_1") + actor.removeAbility("sp_dot_2") + actor.removeAbility("sp_dot_3") + actor.removeAbility("sp_dot_4") + actor.removeAbility("sp_dot_5") return diff --git a/scripts/expertise/expertise_sp_increased_agility_1.py b/scripts/expertise/expertise_sp_increased_agility_1.py index e3c8d957..3b62fbf5 100644 --- a/scripts/expertise/expertise_sp_increased_agility_1.py +++ b/scripts/expertise/expertise_sp_increased_agility_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_increased_agility_1') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_increased_agility_1') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_increased_agility_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_increased_agility_1") return diff --git a/scripts/expertise/expertise_sp_increased_agility_2.py b/scripts/expertise/expertise_sp_increased_agility_2.py index b5728cc0..dea0db05 100644 --- a/scripts/expertise/expertise_sp_increased_agility_2.py +++ b/scripts/expertise/expertise_sp_increased_agility_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_increased_agility_2') - - actor.addSkillMod('agility_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_increased_agility_2') - - actor.removeSkillMod('agility_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_increased_agility_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_increased_agility_2") return diff --git a/scripts/expertise/expertise_sp_increased_strength_1.py b/scripts/expertise/expertise_sp_increased_strength_1.py index 005cf60d..b1bec56f 100644 --- a/scripts/expertise/expertise_sp_increased_strength_1.py +++ b/scripts/expertise/expertise_sp_increased_strength_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_increased_strength_1') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_increased_strength_1') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_increased_strength_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_increased_strength_1") return diff --git a/scripts/expertise/expertise_sp_increased_strength_2.py b/scripts/expertise/expertise_sp_increased_strength_2.py index 16b7b90f..ae61711d 100644 --- a/scripts/expertise/expertise_sp_increased_strength_2.py +++ b/scripts/expertise/expertise_sp_increased_strength_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_increased_strength_2') - - actor.addSkillMod('strength_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_increased_strength_2') - - actor.removeSkillMod('strength_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_increased_strength_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_increased_strength_2") return diff --git a/scripts/expertise/expertise_sp_initiative_1.py b/scripts/expertise/expertise_sp_initiative_1.py index edb3db3d..9032c21a 100644 --- a/scripts/expertise/expertise_sp_initiative_1.py +++ b/scripts/expertise/expertise_sp_initiative_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_initiative_1') - - actor.addSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.addSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_initiative_1') - - actor.removeSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.removeSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_initiative_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_initiative_1") return diff --git a/scripts/expertise/expertise_sp_initiative_2.py b/scripts/expertise/expertise_sp_initiative_2.py index fefb02bf..ea719348 100644 --- a/scripts/expertise/expertise_sp_initiative_2.py +++ b/scripts/expertise/expertise_sp_initiative_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_initiative_2') - - actor.addSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.addSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_initiative_2') - - actor.removeSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.removeSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_initiative_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_initiative_2") return diff --git a/scripts/expertise/expertise_sp_initiative_3.py b/scripts/expertise/expertise_sp_initiative_3.py index 56a20d27..15748ad9 100644 --- a/scripts/expertise/expertise_sp_initiative_3.py +++ b/scripts/expertise/expertise_sp_initiative_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_initiative_3') - - actor.addSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.addSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_initiative_3') - - actor.removeSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.removeSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_initiative_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_initiative_3") return diff --git a/scripts/expertise/expertise_sp_initiative_4.py b/scripts/expertise/expertise_sp_initiative_4.py index a3847b2a..d013c718 100644 --- a/scripts/expertise/expertise_sp_initiative_4.py +++ b/scripts/expertise/expertise_sp_initiative_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_initiative_4') - - actor.addSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.addSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_initiative_4') - - actor.removeSkillMod('expertise_critical_line_sp_stealth_melee', 15) - actor.removeSkillMod('expertise_critical_line_sp_stealth_ranged', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_initiative_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_initiative_4") return diff --git a/scripts/expertise/expertise_sp_jagged_edge_1.py b/scripts/expertise/expertise_sp_jagged_edge_1.py index 3b094630..2043cb12 100644 --- a/scripts/expertise/expertise_sp_jagged_edge_1.py +++ b/scripts/expertise/expertise_sp_jagged_edge_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_jagged_edge_1') - - actor.addSkillMod('expertise_critical_damage_increase', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_jagged_edge_1') - - actor.removeSkillMod('expertise_critical_damage_increase', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_jagged_edge_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_jagged_edge_1") return diff --git a/scripts/expertise/expertise_sp_jagged_edge_2.py b/scripts/expertise/expertise_sp_jagged_edge_2.py index b63c3a03..4360a1af 100644 --- a/scripts/expertise/expertise_sp_jagged_edge_2.py +++ b/scripts/expertise/expertise_sp_jagged_edge_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_jagged_edge_2') - - actor.addSkillMod('expertise_critical_damage_increase', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_jagged_edge_2') - - actor.removeSkillMod('expertise_critical_damage_increase', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_jagged_edge_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_jagged_edge_2") return diff --git a/scripts/expertise/expertise_sp_jagged_edge_3.py b/scripts/expertise/expertise_sp_jagged_edge_3.py index 467a8ecb..e2d8f310 100644 --- a/scripts/expertise/expertise_sp_jagged_edge_3.py +++ b/scripts/expertise/expertise_sp_jagged_edge_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_jagged_edge_3') - - actor.addSkillMod('expertise_critical_damage_increase', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_jagged_edge_3') - - actor.removeSkillMod('expertise_critical_damage_increase', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_jagged_edge_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_jagged_edge_3") return diff --git a/scripts/expertise/expertise_sp_noxious_traps_1.py b/scripts/expertise/expertise_sp_noxious_traps_1.py index 6bdcfe7d..8bf68635 100644 --- a/scripts/expertise/expertise_sp_noxious_traps_1.py +++ b/scripts/expertise/expertise_sp_noxious_traps_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_noxious_traps_1') - - actor.addSkillMod('expertise_damage_line_fldmot', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_noxious_traps_1') - - actor.removeSkillMod('expertise_damage_line_fldmot', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_noxious_traps_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_noxious_traps_1") return diff --git a/scripts/expertise/expertise_sp_noxious_traps_2.py b/scripts/expertise/expertise_sp_noxious_traps_2.py index 27dbf617..3d684ce2 100644 --- a/scripts/expertise/expertise_sp_noxious_traps_2.py +++ b/scripts/expertise/expertise_sp_noxious_traps_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_noxious_traps_2') - - actor.addSkillMod('expertise_damage_line_fldmot', 15) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_noxious_traps_2') - - actor.removeSkillMod('expertise_damage_line_fldmot', 15) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_noxious_traps_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_noxious_traps_2") return diff --git a/scripts/expertise/expertise_sp_opportunity_1.py b/scripts/expertise/expertise_sp_opportunity_1.py index a775b549..ce63f8f1 100644 --- a/scripts/expertise/expertise_sp_opportunity_1.py +++ b/scripts/expertise/expertise_sp_opportunity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_opportunity_1') - - actor.addSkillMod('expertise_critical_niche_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_opportunity_1') - - actor.removeSkillMod('expertise_critical_niche_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_opportunity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_opportunity_1") return diff --git a/scripts/expertise/expertise_sp_opportunity_2.py b/scripts/expertise/expertise_sp_opportunity_2.py index d8a596ae..92941b78 100644 --- a/scripts/expertise/expertise_sp_opportunity_2.py +++ b/scripts/expertise/expertise_sp_opportunity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_opportunity_2') - - actor.addSkillMod('expertise_critical_niche_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_opportunity_2') - - actor.removeSkillMod('expertise_critical_niche_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_opportunity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_opportunity_2") return diff --git a/scripts/expertise/expertise_sp_opportunity_3.py b/scripts/expertise/expertise_sp_opportunity_3.py index 92872b63..f69db076 100644 --- a/scripts/expertise/expertise_sp_opportunity_3.py +++ b/scripts/expertise/expertise_sp_opportunity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_opportunity_3') - - actor.addSkillMod('expertise_critical_niche_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_opportunity_3') - - actor.removeSkillMod('expertise_critical_niche_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_opportunity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_opportunity_3") return diff --git a/scripts/expertise/expertise_sp_opportunity_4.py b/scripts/expertise/expertise_sp_opportunity_4.py index 021557d0..5c11573c 100644 --- a/scripts/expertise/expertise_sp_opportunity_4.py +++ b/scripts/expertise/expertise_sp_opportunity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_opportunity_4') - - actor.addSkillMod('expertise_critical_niche_all', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_opportunity_4') - - actor.removeSkillMod('expertise_critical_niche_all', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_opportunity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_opportunity_4") return diff --git a/scripts/expertise/expertise_sp_precision_1.py b/scripts/expertise/expertise_sp_precision_1.py index 0838078e..fc82b38c 100644 --- a/scripts/expertise/expertise_sp_precision_1.py +++ b/scripts/expertise/expertise_sp_precision_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_precision_1') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_precision_1') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_precision_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_precision_1") return diff --git a/scripts/expertise/expertise_sp_precision_2.py b/scripts/expertise/expertise_sp_precision_2.py index 646d2555..7dbf6345 100644 --- a/scripts/expertise/expertise_sp_precision_2.py +++ b/scripts/expertise/expertise_sp_precision_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_precision_2') - - actor.addSkillMod('precision_modified', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_precision_2') - - actor.removeSkillMod('precision_modified', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_precision_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_precision_2") return diff --git a/scripts/expertise/expertise_sp_preparation_1.py b/scripts/expertise/expertise_sp_preparation_1.py index f9642ef1..4a81cc8f 100644 --- a/scripts/expertise/expertise_sp_preparation_1.py +++ b/scripts/expertise/expertise_sp_preparation_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_preparation_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_preparation_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_preparation') - + actor.addAbility("sp_preparation") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_preparation') - + actor.removeAbility("sp_preparation") return diff --git a/scripts/expertise/expertise_sp_protective_armor_1.py b/scripts/expertise/expertise_sp_protective_armor_1.py index cc1f4fce..e4b17d21 100644 --- a/scripts/expertise/expertise_sp_protective_armor_1.py +++ b/scripts/expertise/expertise_sp_protective_armor_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_protective_armor_1') - - actor.addSkillMod('expertise_innate_protection_kinetic', 300) - actor.addSkillMod('expertise_innate_protection_energy', 300) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_protective_armor_1') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 300) - actor.removeSkillMod('expertise_innate_protection_energy', 300) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_protective_armor_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_protective_armor_1") return diff --git a/scripts/expertise/expertise_sp_protective_armor_2.py b/scripts/expertise/expertise_sp_protective_armor_2.py index d28b98fa..1e9e1495 100644 --- a/scripts/expertise/expertise_sp_protective_armor_2.py +++ b/scripts/expertise/expertise_sp_protective_armor_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_protective_armor_2') - - actor.addSkillMod('expertise_innate_protection_kinetic', 300) - actor.addSkillMod('expertise_innate_protection_energy', 300) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_protective_armor_2') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 300) - actor.removeSkillMod('expertise_innate_protection_energy', 300) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_protective_armor_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_protective_armor_2") return diff --git a/scripts/expertise/expertise_sp_protective_armor_3.py b/scripts/expertise/expertise_sp_protective_armor_3.py index 362cf151..daaaae35 100644 --- a/scripts/expertise/expertise_sp_protective_armor_3.py +++ b/scripts/expertise/expertise_sp_protective_armor_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_protective_armor_3') - - actor.addSkillMod('expertise_innate_protection_kinetic', 300) - actor.addSkillMod('expertise_innate_protection_energy', 300) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_protective_armor_3') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 300) - actor.removeSkillMod('expertise_innate_protection_energy', 300) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_protective_armor_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_protective_armor_3") return diff --git a/scripts/expertise/expertise_sp_protective_armor_4.py b/scripts/expertise/expertise_sp_protective_armor_4.py index 217d1cf2..14b113f9 100644 --- a/scripts/expertise/expertise_sp_protective_armor_4.py +++ b/scripts/expertise/expertise_sp_protective_armor_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_protective_armor_4') - - actor.addSkillMod('expertise_innate_protection_kinetic', 300) - actor.addSkillMod('expertise_innate_protection_energy', 300) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_protective_armor_4') - - actor.removeSkillMod('expertise_innate_protection_kinetic', 300) - actor.removeSkillMod('expertise_innate_protection_energy', 300) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_protective_armor_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_protective_armor_4") return diff --git a/scripts/expertise/expertise_sp_puncturing_strikes_1.py b/scripts/expertise/expertise_sp_puncturing_strikes_1.py index b6a49540..07849a4d 100644 --- a/scripts/expertise/expertise_sp_puncturing_strikes_1.py +++ b/scripts/expertise/expertise_sp_puncturing_strikes_1.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_puncturing_strikes_1') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_puncturing_strikes_1') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_puncturing_strikes_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_puncturing_strikes_1") return diff --git a/scripts/expertise/expertise_sp_puncturing_strikes_2.py b/scripts/expertise/expertise_sp_puncturing_strikes_2.py index 9b72c541..d1526657 100644 --- a/scripts/expertise/expertise_sp_puncturing_strikes_2.py +++ b/scripts/expertise/expertise_sp_puncturing_strikes_2.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_puncturing_strikes_2') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_puncturing_strikes_2') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_puncturing_strikes_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_puncturing_strikes_2") return diff --git a/scripts/expertise/expertise_sp_puncturing_strikes_3.py b/scripts/expertise/expertise_sp_puncturing_strikes_3.py index f744abd6..20173336 100644 --- a/scripts/expertise/expertise_sp_puncturing_strikes_3.py +++ b/scripts/expertise/expertise_sp_puncturing_strikes_3.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_puncturing_strikes_3') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_puncturing_strikes_3') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_puncturing_strikes_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_puncturing_strikes_3") return diff --git a/scripts/expertise/expertise_sp_puncturing_strikes_4.py b/scripts/expertise/expertise_sp_puncturing_strikes_4.py index 4ff64223..858d86c0 100644 --- a/scripts/expertise/expertise_sp_puncturing_strikes_4.py +++ b/scripts/expertise/expertise_sp_puncturing_strikes_4.py @@ -1,52 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_puncturing_strikes_4') - - actor.addSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.addSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_puncturing_strikes_4') - - actor.removeSkillMod('expertise_damage_line_sp_stealth_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_hd_melee', 10) - actor.removeSkillMod('expertise_damage_line_sp_stealth_ranged', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_puncturing_strikes_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_puncturing_strikes_4") return diff --git a/scripts/expertise/expertise_sp_quiet_steps_1.py b/scripts/expertise/expertise_sp_quiet_steps_1.py index bf0844a0..a9ffb99e 100644 --- a/scripts/expertise/expertise_sp_quiet_steps_1.py +++ b/scripts/expertise/expertise_sp_quiet_steps_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_quiet_steps_1') - - actor.addSkillMod('expertise_avoidance_overpower', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_quiet_steps_1') - - actor.removeSkillMod('expertise_avoidance_overpower', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_quiet_steps_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_quiet_steps_1") return diff --git a/scripts/expertise/expertise_sp_quiet_steps_2.py b/scripts/expertise/expertise_sp_quiet_steps_2.py index e9cee417..9dc38491 100644 --- a/scripts/expertise/expertise_sp_quiet_steps_2.py +++ b/scripts/expertise/expertise_sp_quiet_steps_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_quiet_steps_2') - - actor.addSkillMod('expertise_avoidance_overpower', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_quiet_steps_2') - - actor.removeSkillMod('expertise_avoidance_overpower', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_quiet_steps_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_quiet_steps_2") return diff --git a/scripts/expertise/expertise_sp_rapid_concealment_1.py b/scripts/expertise/expertise_sp_rapid_concealment_1.py index a2e0ad1a..a9c2efb4 100644 --- a/scripts/expertise/expertise_sp_rapid_concealment_1.py +++ b/scripts/expertise/expertise_sp_rapid_concealment_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_rapid_concealment_1') - - actor.addSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_rapid_concealment_1') - - actor.removeSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_rapid_concealment_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_rapid_concealment_1") return diff --git a/scripts/expertise/expertise_sp_rapid_concealment_2.py b/scripts/expertise/expertise_sp_rapid_concealment_2.py index 7ab413ab..5397db2e 100644 --- a/scripts/expertise/expertise_sp_rapid_concealment_2.py +++ b/scripts/expertise/expertise_sp_rapid_concealment_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_rapid_concealment_2') - - actor.addSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_rapid_concealment_2') - - actor.removeSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_rapid_concealment_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_rapid_concealment_2") return diff --git a/scripts/expertise/expertise_sp_rapid_concealment_3.py b/scripts/expertise/expertise_sp_rapid_concealment_3.py index d8cc0332..ce36df91 100644 --- a/scripts/expertise/expertise_sp_rapid_concealment_3.py +++ b/scripts/expertise/expertise_sp_rapid_concealment_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_rapid_concealment_3') - - actor.addSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_rapid_concealment_3') - - actor.removeSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_rapid_concealment_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_rapid_concealment_3") return diff --git a/scripts/expertise/expertise_sp_rapid_concealment_4.py b/scripts/expertise/expertise_sp_rapid_concealment_4.py index 179d007a..1b0d16bc 100644 --- a/scripts/expertise/expertise_sp_rapid_concealment_4.py +++ b/scripts/expertise/expertise_sp_rapid_concealment_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_rapid_concealment_4') - - actor.addSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_rapid_concealment_4') - - actor.removeSkillMod('expertise_cooldown_line_sp_smoke', 30) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_rapid_concealment_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_rapid_concealment_4") return diff --git a/scripts/expertise/expertise_sp_resonance.py b/scripts/expertise/expertise_sp_resonance.py index 1f0fd64c..815f559a 100644 --- a/scripts/expertise/expertise_sp_resonance.py +++ b/scripts/expertise/expertise_sp_resonance.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_resonance') - - actor.addSkillMod('expertise_onstrikethrough_proc_sp_resonance', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_resonance') - - actor.removeSkillMod('expertise_onstrikethrough_proc_sp_resonance', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_resonance") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_resonance") return diff --git a/scripts/expertise/expertise_sp_reveal_shadows_1.py b/scripts/expertise/expertise_sp_reveal_shadows_1.py index 12bd2510..94e45084 100644 --- a/scripts/expertise/expertise_sp_reveal_shadows_1.py +++ b/scripts/expertise/expertise_sp_reveal_shadows_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_reveal_shadows_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_reveal_shadows_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_reveal_shadows') - + actor.addAbility("sp_reveal_shadows") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_reveal_shadows') - + actor.removeAbility("sp_reveal_shadows") return diff --git a/scripts/expertise/expertise_sp_run_its_course_1.py b/scripts/expertise/expertise_sp_run_its_course_1.py index 15365503..5534253b 100644 --- a/scripts/expertise/expertise_sp_run_its_course_1.py +++ b/scripts/expertise/expertise_sp_run_its_course_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_run_its_course_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_run_its_course_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_run_its_course') - + actor.addAbility("sp_run_its_course") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_run_its_course') - + actor.removeAbility("sp_run_its_course") return diff --git a/scripts/expertise/expertise_sp_savagery.py b/scripts/expertise/expertise_sp_savagery.py index fce6867c..b8522cc2 100644 --- a/scripts/expertise/expertise_sp_savagery.py +++ b/scripts/expertise/expertise_sp_savagery.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_savagery') - - actor.addSkillMod('expertise_oncrit_proc_sp_savagery', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_savagery') - - actor.removeSkillMod('expertise_oncrit_proc_sp_savagery', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_savagery") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_savagery") return diff --git a/scripts/expertise/expertise_sp_shadows_embrace_1.py b/scripts/expertise/expertise_sp_shadows_embrace_1.py index 8acb23d6..b0e83dee 100644 --- a/scripts/expertise/expertise_sp_shadows_embrace_1.py +++ b/scripts/expertise/expertise_sp_shadows_embrace_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_shadows_embrace_1') - - actor.addSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_shadows_embrace_1') - - actor.removeSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_shadows_embrace_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_shadows_embrace_1") return diff --git a/scripts/expertise/expertise_sp_shadows_embrace_2.py b/scripts/expertise/expertise_sp_shadows_embrace_2.py index 7f894561..ccd8c71e 100644 --- a/scripts/expertise/expertise_sp_shadows_embrace_2.py +++ b/scripts/expertise/expertise_sp_shadows_embrace_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_shadows_embrace_2') - - actor.addSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_shadows_embrace_2') - - actor.removeSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_shadows_embrace_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_shadows_embrace_2") return diff --git a/scripts/expertise/expertise_sp_shadows_embrace_3.py b/scripts/expertise/expertise_sp_shadows_embrace_3.py index ab5023c0..ac459d05 100644 --- a/scripts/expertise/expertise_sp_shadows_embrace_3.py +++ b/scripts/expertise/expertise_sp_shadows_embrace_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_shadows_embrace_3') - - actor.addSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_shadows_embrace_3') - - actor.removeSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_shadows_embrace_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_shadows_embrace_3") return diff --git a/scripts/expertise/expertise_sp_shadows_embrace_4.py b/scripts/expertise/expertise_sp_shadows_embrace_4.py index a98522ee..ef6195ea 100644 --- a/scripts/expertise/expertise_sp_shadows_embrace_4.py +++ b/scripts/expertise/expertise_sp_shadows_embrace_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_shadows_embrace_4') - - actor.addSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.addSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_shadows_embrace_4') - - actor.removeSkillMod('expertise_buff_duration_line_sp_burst_shadows', 2) - actor.removeSkillMod('expertise_cooldown_line_sp_burst_shadows', 30) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_shadows_embrace_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_shadows_embrace_4") return diff --git a/scripts/expertise/expertise_sp_shifty_setup_1.py b/scripts/expertise/expertise_sp_shifty_setup_1.py index 90865851..76bf26d8 100644 --- a/scripts/expertise/expertise_sp_shifty_setup_1.py +++ b/scripts/expertise/expertise_sp_shifty_setup_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_shifty_setup_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_shifty_setup_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_shifty_setup') - + actor.addAbility("sp_shifty_setup") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_shifty_setup') - + actor.removeAbility("sp_shifty_setup") return diff --git a/scripts/expertise/expertise_sp_smoke_mirrors.py b/scripts/expertise/expertise_sp_smoke_mirrors.py index 5e88dd3e..4b720c0a 100644 --- a/scripts/expertise/expertise_sp_smoke_mirrors.py +++ b/scripts/expertise/expertise_sp_smoke_mirrors.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_smoke_mirrors') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_smoke_mirrors') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - actor.addAbility('sp_smoke_mirrors') - + actor.addAbility("sp_smoke_mirrors") return def removeAbilities(core, actor, player): - - actor.removeAbility('sp_smoke_mirrors') - + actor.removeAbility("sp_smoke_mirrors") return diff --git a/scripts/expertise/expertise_sp_smoke_screen_1.py b/scripts/expertise/expertise_sp_smoke_screen_1.py index 1deb5789..b3e851b3 100644 --- a/scripts/expertise/expertise_sp_smoke_screen_1.py +++ b/scripts/expertise/expertise_sp_smoke_screen_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_smoke_screen_1') - - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_smoke_screen_1') - - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_smoke_screen_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_smoke_screen_1") return diff --git a/scripts/expertise/expertise_sp_smoke_screen_2.py b/scripts/expertise/expertise_sp_smoke_screen_2.py index e091741b..2873cd10 100644 --- a/scripts/expertise/expertise_sp_smoke_screen_2.py +++ b/scripts/expertise/expertise_sp_smoke_screen_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_smoke_screen_2') - - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_smoke_screen_2') - - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_smoke_screen_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_smoke_screen_2") return diff --git a/scripts/expertise/expertise_sp_smoke_screen_3.py b/scripts/expertise/expertise_sp_smoke_screen_3.py index c8ba6991..57be23e9 100644 --- a/scripts/expertise/expertise_sp_smoke_screen_3.py +++ b/scripts/expertise/expertise_sp_smoke_screen_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_smoke_screen_3') - - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_smoke_screen_3') - - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_smoke_screen_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_smoke_screen_3") return diff --git a/scripts/expertise/expertise_sp_smoke_screen_4.py b/scripts/expertise/expertise_sp_smoke_screen_4.py index f4f00aa4..0ec9ab54 100644 --- a/scripts/expertise/expertise_sp_smoke_screen_4.py +++ b/scripts/expertise/expertise_sp_smoke_screen_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_smoke_screen_4') - - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_smoke_screen_4') - - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_smoke_screen_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_smoke_screen_4") return diff --git a/scripts/expertise/expertise_sp_steup_1.py b/scripts/expertise/expertise_sp_steup_1.py index b039c564..80eed675 100644 --- a/scripts/expertise/expertise_sp_steup_1.py +++ b/scripts/expertise/expertise_sp_steup_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_steup_1') - - actor.addSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.addSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_steup_1') - - actor.removeSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.removeSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_steup_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_steup_1") return diff --git a/scripts/expertise/expertise_sp_steup_2.py b/scripts/expertise/expertise_sp_steup_2.py index 9450fa6a..3a6b451b 100644 --- a/scripts/expertise/expertise_sp_steup_2.py +++ b/scripts/expertise/expertise_sp_steup_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_steup_2') - - actor.addSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.addSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_steup_2') - - actor.removeSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.removeSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_steup_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_steup_2") return diff --git a/scripts/expertise/expertise_sp_steup_3.py b/scripts/expertise/expertise_sp_steup_3.py index d0b36017..3ab4f758 100644 --- a/scripts/expertise/expertise_sp_steup_3.py +++ b/scripts/expertise/expertise_sp_steup_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_steup_3') - - actor.addSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.addSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_steup_3') - - actor.removeSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.removeSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_steup_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_steup_3") return diff --git a/scripts/expertise/expertise_sp_steup_4.py b/scripts/expertise/expertise_sp_steup_4.py index dd9ce2f4..b2eb1e65 100644 --- a/scripts/expertise/expertise_sp_steup_4.py +++ b/scripts/expertise/expertise_sp_steup_4.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_steup_4') - - actor.addSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.addSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_steup_4') - - actor.removeSkillMod('expertise_action_line_sp_stealth_melee', 5) - actor.removeSkillMod('expertise_action_line_sp_stealth_ranged', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_steup_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_steup_4") return diff --git a/scripts/expertise/expertise_sp_undercover_1.py b/scripts/expertise/expertise_sp_undercover_1.py index 05754013..3c67e708 100644 --- a/scripts/expertise/expertise_sp_undercover_1.py +++ b/scripts/expertise/expertise_sp_undercover_1.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_undercover_1') - - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -5) - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_stealth_1', -20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_undercover_1') - - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -5) - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_stealth_1', -20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_undercover_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_undercover_1") return diff --git a/scripts/expertise/expertise_sp_undercover_2.py b/scripts/expertise/expertise_sp_undercover_2.py index 50edd523..b6660db2 100644 --- a/scripts/expertise/expertise_sp_undercover_2.py +++ b/scripts/expertise/expertise_sp_undercover_2.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_undercover_2') - - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -5) - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_stealth_1', -20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_undercover_2') - - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -5) - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_stealth_1', -20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_undercover_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_undercover_2") return diff --git a/scripts/expertise/expertise_sp_undercover_3.py b/scripts/expertise/expertise_sp_undercover_3.py index 23d181c5..39c4394d 100644 --- a/scripts/expertise/expertise_sp_undercover_3.py +++ b/scripts/expertise/expertise_sp_undercover_3.py @@ -1,50 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_undercover_3') - - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -5) - actor.addSkillMod('expertise_movement_buff_invis_sp_buff_stealth_1', -20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_undercover_3') - - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_invis_1', -5) - actor.removeSkillMod('expertise_movement_buff_invis_sp_buff_stealth_1', -20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_undercover_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_undercover_3") return diff --git a/scripts/expertise/expertise_sp_vibrogenerator_1.py b/scripts/expertise/expertise_sp_vibrogenerator_1.py index 90cb92c6..ed2f90ea 100644 --- a/scripts/expertise/expertise_sp_vibrogenerator_1.py +++ b/scripts/expertise/expertise_sp_vibrogenerator_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_vibrogenerator_1') - - actor.addSkillMod('expertise_armor_neglect', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_vibrogenerator_1') - - actor.removeSkillMod('expertise_armor_neglect', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_vibrogenerator_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_vibrogenerator_1") return diff --git a/scripts/expertise/expertise_sp_vibrogenerator_2.py b/scripts/expertise/expertise_sp_vibrogenerator_2.py index 4d047dc5..84e4e570 100644 --- a/scripts/expertise/expertise_sp_vibrogenerator_2.py +++ b/scripts/expertise/expertise_sp_vibrogenerator_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_vibrogenerator_2') - - actor.addSkillMod('expertise_armor_neglect', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_vibrogenerator_2') - - actor.removeSkillMod('expertise_armor_neglect', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_vibrogenerator_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_vibrogenerator_2") return diff --git a/scripts/expertise/expertise_sp_vibrogenerator_3.py b/scripts/expertise/expertise_sp_vibrogenerator_3.py index 810b8b4d..592cb4d4 100644 --- a/scripts/expertise/expertise_sp_vibrogenerator_3.py +++ b/scripts/expertise/expertise_sp_vibrogenerator_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_vibrogenerator_3') - - actor.addSkillMod('expertise_armor_neglect', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_vibrogenerator_3') - - actor.removeSkillMod('expertise_armor_neglect', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_sp_vibrogenerator_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_sp_vibrogenerator_3") return diff --git a/scripts/expertise/expertise_sp_without_a_trace_1.py b/scripts/expertise/expertise_sp_without_a_trace_1.py index 35327fdf..ebe2f8f3 100644 --- a/scripts/expertise/expertise_sp_without_a_trace_1.py +++ b/scripts/expertise/expertise_sp_without_a_trace_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.addSkill('expertise_sp_without_a_trace_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'spy_1a': - return - - actor.removeSkill('expertise_sp_without_a_trace_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("sp_without_a_trace") return def removeAbilities(core, actor, player): - - + actor.removeAbility("sp_without_a_trace") return diff --git a/scripts/expertise/expertise_structure_architect_advanced_theory_1.py b/scripts/expertise/expertise_structure_architect_advanced_theory_1.py index 762a10ca..42e72115 100644 --- a/scripts/expertise/expertise_structure_architect_advanced_theory_1.py +++ b/scripts/expertise/expertise_structure_architect_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_advanced_theory_1') - - actor.addSkillMod('structure_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_advanced_theory_1') - - actor.removeSkillMod('structure_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_theory_1") return diff --git a/scripts/expertise/expertise_structure_architect_dexterity_1.py b/scripts/expertise/expertise_structure_architect_dexterity_1.py index eaf875af..b3644dbd 100644 --- a/scripts/expertise/expertise_structure_architect_dexterity_1.py +++ b/scripts/expertise/expertise_structure_architect_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_dexterity_1') - - actor.addSkillMod('structure_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_dexterity_1') - - actor.removeSkillMod('structure_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_dexterity_1") return diff --git a/scripts/expertise/expertise_structure_architect_dexterity_2.py b/scripts/expertise/expertise_structure_architect_dexterity_2.py index e3a98a3d..d87f7a01 100644 --- a/scripts/expertise/expertise_structure_architect_dexterity_2.py +++ b/scripts/expertise/expertise_structure_architect_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_dexterity_2') - - actor.addSkillMod('structure_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_dexterity_2') - - actor.removeSkillMod('structure_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_dexterity_2") return diff --git a/scripts/expertise/expertise_structure_architect_dexterity_3.py b/scripts/expertise/expertise_structure_architect_dexterity_3.py index ca3b2d31..f07fb9ae 100644 --- a/scripts/expertise/expertise_structure_architect_dexterity_3.py +++ b/scripts/expertise/expertise_structure_architect_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_dexterity_3') - - actor.addSkillMod('structure_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_dexterity_3') - - actor.removeSkillMod('structure_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_dexterity_3") return diff --git a/scripts/expertise/expertise_structure_architect_dexterity_4.py b/scripts/expertise/expertise_structure_architect_dexterity_4.py index a3d8534f..339e3773 100644 --- a/scripts/expertise/expertise_structure_architect_dexterity_4.py +++ b/scripts/expertise/expertise_structure_architect_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_dexterity_4') - - actor.addSkillMod('structure_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_dexterity_4') - - actor.removeSkillMod('structure_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_dexterity_4") return diff --git a/scripts/expertise/expertise_structure_architect_hypothesis_1.py b/scripts/expertise/expertise_structure_architect_hypothesis_1.py index b5eafa01..7c1de09a 100644 --- a/scripts/expertise/expertise_structure_architect_hypothesis_1.py +++ b/scripts/expertise/expertise_structure_architect_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_architect', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_architect', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_hypothesis_1") return diff --git a/scripts/expertise/expertise_structure_architect_hypothesis_2.py b/scripts/expertise/expertise_structure_architect_hypothesis_2.py index ec83d7d4..e9acaf9b 100644 --- a/scripts/expertise/expertise_structure_architect_hypothesis_2.py +++ b/scripts/expertise/expertise_structure_architect_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_architect', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_architect', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_hypothesis_2") return diff --git a/scripts/expertise/expertise_structure_architect_hypothesis_3.py b/scripts/expertise/expertise_structure_architect_hypothesis_3.py index 15ddc720..b43dc039 100644 --- a/scripts/expertise/expertise_structure_architect_hypothesis_3.py +++ b/scripts/expertise/expertise_structure_architect_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_architect', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_architect', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_hypothesis_3") return diff --git a/scripts/expertise/expertise_structure_architect_hypothesis_4.py b/scripts/expertise/expertise_structure_architect_hypothesis_4.py index 00e33f1b..7a184294 100644 --- a/scripts/expertise/expertise_structure_architect_hypothesis_4.py +++ b/scripts/expertise/expertise_structure_architect_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_architect', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_architect', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_hypothesis_4") return diff --git a/scripts/expertise/expertise_structure_architect_insight_1.py b/scripts/expertise/expertise_structure_architect_insight_1.py index ff19b257..9ff69aa3 100644 --- a/scripts/expertise/expertise_structure_architect_insight_1.py +++ b/scripts/expertise/expertise_structure_architect_insight_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_insight_1') - - actor.addSkillMod('expertise_complexity_decrease_architect', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_insight_1') - - actor.removeSkillMod('expertise_complexity_decrease_architect', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_insight_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_insight_1") return diff --git a/scripts/expertise/expertise_structure_architect_insight_2.py b/scripts/expertise/expertise_structure_architect_insight_2.py index e48c07f5..b5acc5e0 100644 --- a/scripts/expertise/expertise_structure_architect_insight_2.py +++ b/scripts/expertise/expertise_structure_architect_insight_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_insight_2') - - actor.addSkillMod('expertise_complexity_decrease_architect', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_insight_2') - - actor.removeSkillMod('expertise_complexity_decrease_architect', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_insight_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_insight_2") return diff --git a/scripts/expertise/expertise_structure_architect_keen_understanding_1.py b/scripts/expertise/expertise_structure_architect_keen_understanding_1.py index 1ff82037..5e63c078 100644 --- a/scripts/expertise/expertise_structure_architect_keen_understanding_1.py +++ b/scripts/expertise/expertise_structure_architect_keen_understanding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_keen_understanding_1') - - actor.addSkillMod('expertise_complexity_decrease_architect', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_keen_understanding_1') - - actor.removeSkillMod('expertise_complexity_decrease_architect', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_keen_understanding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_keen_understanding_1") return diff --git a/scripts/expertise/expertise_structure_architect_keen_understanding_2.py b/scripts/expertise/expertise_structure_architect_keen_understanding_2.py index 552ebd65..a35ab95e 100644 --- a/scripts/expertise/expertise_structure_architect_keen_understanding_2.py +++ b/scripts/expertise/expertise_structure_architect_keen_understanding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_keen_understanding_2') - - actor.addSkillMod('expertise_complexity_decrease_architect', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_keen_understanding_2') - - actor.removeSkillMod('expertise_complexity_decrease_architect', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_keen_understanding_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_keen_understanding_2") return diff --git a/scripts/expertise/expertise_structure_architect_schematic_1_1.py b/scripts/expertise/expertise_structure_architect_schematic_1_1.py index 7ef6e4eb..77d60042 100644 --- a/scripts/expertise/expertise_structure_architect_schematic_1_1.py +++ b/scripts/expertise/expertise_structure_architect_schematic_1_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_schematic_1_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_schematic_1_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_schematic_1_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_schematic_1_1") return diff --git a/scripts/expertise/expertise_structure_architect_schematic_2_1.py b/scripts/expertise/expertise_structure_architect_schematic_2_1.py index 7df673d9..9db9ab48 100644 --- a/scripts/expertise/expertise_structure_architect_schematic_2_1.py +++ b/scripts/expertise/expertise_structure_architect_schematic_2_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_architect_schematic_2_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_architect_schematic_2_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_architect_schematic_2_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_architect_schematic_2_1") return diff --git a/scripts/expertise/expertise_structure_artisan_advanced_theory_1.py b/scripts/expertise/expertise_structure_artisan_advanced_theory_1.py index f2498949..59364e96 100644 --- a/scripts/expertise/expertise_structure_artisan_advanced_theory_1.py +++ b/scripts/expertise/expertise_structure_artisan_advanced_theory_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_advanced_theory_1') - - actor.addSkillMod('general_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_advanced_theory_1') - - actor.removeSkillMod('general_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_advanced_theory_1") return diff --git a/scripts/expertise/expertise_structure_artisan_dexterity_1.py b/scripts/expertise/expertise_structure_artisan_dexterity_1.py index 5dd3479f..6b4364cf 100644 --- a/scripts/expertise/expertise_structure_artisan_dexterity_1.py +++ b/scripts/expertise/expertise_structure_artisan_dexterity_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_dexterity_1') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_dexterity_1') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_dexterity_1") return diff --git a/scripts/expertise/expertise_structure_artisan_dexterity_2.py b/scripts/expertise/expertise_structure_artisan_dexterity_2.py index 7390c520..e5bee87f 100644 --- a/scripts/expertise/expertise_structure_artisan_dexterity_2.py +++ b/scripts/expertise/expertise_structure_artisan_dexterity_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_dexterity_2') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_dexterity_2') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_dexterity_2") return diff --git a/scripts/expertise/expertise_structure_artisan_dexterity_3.py b/scripts/expertise/expertise_structure_artisan_dexterity_3.py index 91971842..fb2b5c62 100644 --- a/scripts/expertise/expertise_structure_artisan_dexterity_3.py +++ b/scripts/expertise/expertise_structure_artisan_dexterity_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_dexterity_3') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_dexterity_3') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_dexterity_3") return diff --git a/scripts/expertise/expertise_structure_artisan_dexterity_4.py b/scripts/expertise/expertise_structure_artisan_dexterity_4.py index 4cb0041e..c4fea7ab 100644 --- a/scripts/expertise/expertise_structure_artisan_dexterity_4.py +++ b/scripts/expertise/expertise_structure_artisan_dexterity_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_dexterity_4') - - actor.addSkillMod('general_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_dexterity_4') - - actor.removeSkillMod('general_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_dexterity_4") return diff --git a/scripts/expertise/expertise_structure_artisan_hypothesis_1.py b/scripts/expertise/expertise_structure_artisan_hypothesis_1.py index 18cbdb54..c5ec040c 100644 --- a/scripts/expertise/expertise_structure_artisan_hypothesis_1.py +++ b/scripts/expertise/expertise_structure_artisan_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_hypothesis_1") return diff --git a/scripts/expertise/expertise_structure_artisan_hypothesis_2.py b/scripts/expertise/expertise_structure_artisan_hypothesis_2.py index 1260a16f..c8803e0c 100644 --- a/scripts/expertise/expertise_structure_artisan_hypothesis_2.py +++ b/scripts/expertise/expertise_structure_artisan_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_hypothesis_2") return diff --git a/scripts/expertise/expertise_structure_artisan_hypothesis_3.py b/scripts/expertise/expertise_structure_artisan_hypothesis_3.py index 5101ccc2..0995112b 100644 --- a/scripts/expertise/expertise_structure_artisan_hypothesis_3.py +++ b/scripts/expertise/expertise_structure_artisan_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_hypothesis_3") return diff --git a/scripts/expertise/expertise_structure_artisan_hypothesis_4.py b/scripts/expertise/expertise_structure_artisan_hypothesis_4.py index ae1c642f..d5a30bc6 100644 --- a/scripts/expertise/expertise_structure_artisan_hypothesis_4.py +++ b/scripts/expertise/expertise_structure_artisan_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_artisan_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_artisan', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_artisan_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_artisan', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_artisan_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_artisan_hypothesis_4") return diff --git a/scripts/expertise/expertise_structure_resource_processing_1.py b/scripts/expertise/expertise_structure_resource_processing_1.py index 80444cc0..38475c6d 100644 --- a/scripts/expertise/expertise_structure_resource_processing_1.py +++ b/scripts/expertise/expertise_structure_resource_processing_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_resource_processing_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_resource_processing_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_resource_processing_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_resource_processing_1") return diff --git a/scripts/expertise/expertise_structure_resource_processing_2.py b/scripts/expertise/expertise_structure_resource_processing_2.py index 89253106..79d11128 100644 --- a/scripts/expertise/expertise_structure_resource_processing_2.py +++ b/scripts/expertise/expertise_structure_resource_processing_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_resource_processing_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_resource_processing_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_resource_processing_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_resource_processing_2") return diff --git a/scripts/expertise/expertise_structure_resource_refinement_1.py b/scripts/expertise/expertise_structure_resource_refinement_1.py index 948b3822..5b55ffb2 100644 --- a/scripts/expertise/expertise_structure_resource_refinement_1.py +++ b/scripts/expertise/expertise_structure_resource_refinement_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_resource_refinement_1') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_resource_refinement_1') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_resource_refinement_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_resource_refinement_1") return diff --git a/scripts/expertise/expertise_structure_resource_refinement_2.py b/scripts/expertise/expertise_structure_resource_refinement_2.py index bc8e7478..d9347d52 100644 --- a/scripts/expertise/expertise_structure_resource_refinement_2.py +++ b/scripts/expertise/expertise_structure_resource_refinement_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_resource_refinement_2') - - actor.addSkillMod('expertise_resource_quality_increase', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_resource_refinement_2') - - actor.removeSkillMod('expertise_resource_quality_increase', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_resource_refinement_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_resource_refinement_2") return diff --git a/scripts/expertise/expertise_structure_shipwright_advanced_theory_1.py b/scripts/expertise/expertise_structure_shipwright_advanced_theory_1.py index 3ad59ca5..7077e0e4 100644 --- a/scripts/expertise/expertise_structure_shipwright_advanced_theory_1.py +++ b/scripts/expertise/expertise_structure_shipwright_advanced_theory_1.py @@ -1,60 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_advanced_theory_1') - - actor.addSkillMod('chassis_experimentation', 10) - actor.addSkillMod('weapon_systems_experimentation', 10) - actor.addSkillMod('engine_experimentation', 10) - actor.addSkillMod('booster_experimentation', 10) - actor.addSkillMod('power_systems_experimentation', 10) - actor.addSkillMod('shields_experimentation', 10) - actor.addSkillMod('advanced_ship_experimentation', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_advanced_theory_1') - - actor.removeSkillMod('chassis_experimentation', 10) - actor.removeSkillMod('weapon_systems_experimentation', 10) - actor.removeSkillMod('engine_experimentation', 10) - actor.removeSkillMod('booster_experimentation', 10) - actor.removeSkillMod('power_systems_experimentation', 10) - actor.removeSkillMod('shields_experimentation', 10) - actor.removeSkillMod('advanced_ship_experimentation', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_advanced_theory_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_advanced_theory_1") return diff --git a/scripts/expertise/expertise_structure_shipwright_dexterity_1.py b/scripts/expertise/expertise_structure_shipwright_dexterity_1.py index 210f669b..f3bd8da5 100644 --- a/scripts/expertise/expertise_structure_shipwright_dexterity_1.py +++ b/scripts/expertise/expertise_structure_shipwright_dexterity_1.py @@ -1,60 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_dexterity_1') - - actor.addSkillMod('chassis_assembly', 5) - actor.addSkillMod('engine_assembly', 5) - actor.addSkillMod('booster_assembly', 5) - actor.addSkillMod('power_systems', 5) - actor.addSkillMod('weapon_systems', 5) - actor.addSkillMod('shields_assembly', 5) - actor.addSkillMod('advanced_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_dexterity_1') - - actor.removeSkillMod('chassis_assembly', 5) - actor.removeSkillMod('engine_assembly', 5) - actor.removeSkillMod('booster_assembly', 5) - actor.removeSkillMod('power_systems', 5) - actor.removeSkillMod('weapon_systems', 5) - actor.removeSkillMod('shields_assembly', 5) - actor.removeSkillMod('advanced_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_dexterity_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_dexterity_1") return diff --git a/scripts/expertise/expertise_structure_shipwright_dexterity_2.py b/scripts/expertise/expertise_structure_shipwright_dexterity_2.py index b1bc4bd6..c242e7f8 100644 --- a/scripts/expertise/expertise_structure_shipwright_dexterity_2.py +++ b/scripts/expertise/expertise_structure_shipwright_dexterity_2.py @@ -1,60 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_dexterity_2') - - actor.addSkillMod('chassis_assembly', 5) - actor.addSkillMod('engine_assembly', 5) - actor.addSkillMod('booster_assembly', 5) - actor.addSkillMod('power_systems', 5) - actor.addSkillMod('weapon_systems', 5) - actor.addSkillMod('shields_assembly', 5) - actor.addSkillMod('advanced_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_dexterity_2') - - actor.removeSkillMod('chassis_assembly', 5) - actor.removeSkillMod('engine_assembly', 5) - actor.removeSkillMod('booster_assembly', 5) - actor.removeSkillMod('power_systems', 5) - actor.removeSkillMod('weapon_systems', 5) - actor.removeSkillMod('shields_assembly', 5) - actor.removeSkillMod('advanced_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_dexterity_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_dexterity_2") return diff --git a/scripts/expertise/expertise_structure_shipwright_dexterity_3.py b/scripts/expertise/expertise_structure_shipwright_dexterity_3.py index 09592b62..7690812b 100644 --- a/scripts/expertise/expertise_structure_shipwright_dexterity_3.py +++ b/scripts/expertise/expertise_structure_shipwright_dexterity_3.py @@ -1,60 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_dexterity_3') - - actor.addSkillMod('chassis_assembly', 5) - actor.addSkillMod('engine_assembly', 5) - actor.addSkillMod('booster_assembly', 5) - actor.addSkillMod('power_systems', 5) - actor.addSkillMod('weapon_systems', 5) - actor.addSkillMod('shields_assembly', 5) - actor.addSkillMod('advanced_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_dexterity_3') - - actor.removeSkillMod('chassis_assembly', 5) - actor.removeSkillMod('engine_assembly', 5) - actor.removeSkillMod('booster_assembly', 5) - actor.removeSkillMod('power_systems', 5) - actor.removeSkillMod('weapon_systems', 5) - actor.removeSkillMod('shields_assembly', 5) - actor.removeSkillMod('advanced_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_dexterity_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_dexterity_3") return diff --git a/scripts/expertise/expertise_structure_shipwright_dexterity_4.py b/scripts/expertise/expertise_structure_shipwright_dexterity_4.py index 242ccbd2..a63652c5 100644 --- a/scripts/expertise/expertise_structure_shipwright_dexterity_4.py +++ b/scripts/expertise/expertise_structure_shipwright_dexterity_4.py @@ -1,60 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_dexterity_4') - - actor.addSkillMod('chassis_assembly', 5) - actor.addSkillMod('engine_assembly', 5) - actor.addSkillMod('booster_assembly', 5) - actor.addSkillMod('power_systems', 5) - actor.addSkillMod('weapon_systems', 5) - actor.addSkillMod('shields_assembly', 5) - actor.addSkillMod('advanced_assembly', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_dexterity_4') - - actor.removeSkillMod('chassis_assembly', 5) - actor.removeSkillMod('engine_assembly', 5) - actor.removeSkillMod('booster_assembly', 5) - actor.removeSkillMod('power_systems', 5) - actor.removeSkillMod('weapon_systems', 5) - actor.removeSkillMod('shields_assembly', 5) - actor.removeSkillMod('advanced_assembly', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_dexterity_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_dexterity_4") return diff --git a/scripts/expertise/expertise_structure_shipwright_hypothesis_1.py b/scripts/expertise/expertise_structure_shipwright_hypothesis_1.py index 6fc0b225..65ef4ba2 100644 --- a/scripts/expertise/expertise_structure_shipwright_hypothesis_1.py +++ b/scripts/expertise/expertise_structure_shipwright_hypothesis_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_hypothesis_1') - - actor.addSkillMod('expertise_experimentation_increase_shipwright', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_hypothesis_1') - - actor.removeSkillMod('expertise_experimentation_increase_shipwright', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_hypothesis_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_hypothesis_1") return diff --git a/scripts/expertise/expertise_structure_shipwright_hypothesis_2.py b/scripts/expertise/expertise_structure_shipwright_hypothesis_2.py index 101a7342..4ab8f864 100644 --- a/scripts/expertise/expertise_structure_shipwright_hypothesis_2.py +++ b/scripts/expertise/expertise_structure_shipwright_hypothesis_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_hypothesis_2') - - actor.addSkillMod('expertise_experimentation_increase_shipwright', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_hypothesis_2') - - actor.removeSkillMod('expertise_experimentation_increase_shipwright', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_hypothesis_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_hypothesis_2") return diff --git a/scripts/expertise/expertise_structure_shipwright_hypothesis_3.py b/scripts/expertise/expertise_structure_shipwright_hypothesis_3.py index 2c00785c..af933c60 100644 --- a/scripts/expertise/expertise_structure_shipwright_hypothesis_3.py +++ b/scripts/expertise/expertise_structure_shipwright_hypothesis_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_hypothesis_3') - - actor.addSkillMod('expertise_experimentation_increase_shipwright', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_hypothesis_3') - - actor.removeSkillMod('expertise_experimentation_increase_shipwright', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_hypothesis_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_hypothesis_3") return diff --git a/scripts/expertise/expertise_structure_shipwright_hypothesis_4.py b/scripts/expertise/expertise_structure_shipwright_hypothesis_4.py index d723697e..4b120a10 100644 --- a/scripts/expertise/expertise_structure_shipwright_hypothesis_4.py +++ b/scripts/expertise/expertise_structure_shipwright_hypothesis_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_hypothesis_4') - - actor.addSkillMod('expertise_experimentation_increase_shipwright', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_hypothesis_4') - - actor.removeSkillMod('expertise_experimentation_increase_shipwright', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_hypothesis_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_hypothesis_4") return diff --git a/scripts/expertise/expertise_structure_shipwright_insight_1.py b/scripts/expertise/expertise_structure_shipwright_insight_1.py index 82b35892..43dd055e 100644 --- a/scripts/expertise/expertise_structure_shipwright_insight_1.py +++ b/scripts/expertise/expertise_structure_shipwright_insight_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_insight_1') - - actor.addSkillMod('expertise_complexity_decrease_shipwright', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_insight_1') - - actor.removeSkillMod('expertise_complexity_decrease_shipwright', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_insight_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_insight_1") return diff --git a/scripts/expertise/expertise_structure_shipwright_insight_2.py b/scripts/expertise/expertise_structure_shipwright_insight_2.py index d50e67a5..0fe7dd52 100644 --- a/scripts/expertise/expertise_structure_shipwright_insight_2.py +++ b/scripts/expertise/expertise_structure_shipwright_insight_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_insight_2') - - actor.addSkillMod('expertise_complexity_decrease_shipwright', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_insight_2') - - actor.removeSkillMod('expertise_complexity_decrease_shipwright', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_insight_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_insight_2") return diff --git a/scripts/expertise/expertise_structure_shipwright_keen_understanding_1.py b/scripts/expertise/expertise_structure_shipwright_keen_understanding_1.py index 06d07813..211217c1 100644 --- a/scripts/expertise/expertise_structure_shipwright_keen_understanding_1.py +++ b/scripts/expertise/expertise_structure_shipwright_keen_understanding_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_keen_understanding_1') - - actor.addSkillMod('expertise_complexity_decrease_shipwright', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_keen_understanding_1') - - actor.removeSkillMod('expertise_complexity_decrease_shipwright', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_keen_understanding_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_keen_understanding_1") return diff --git a/scripts/expertise/expertise_structure_shipwright_keen_understanding_2.py b/scripts/expertise/expertise_structure_shipwright_keen_understanding_2.py index bd0f235a..c11a18a0 100644 --- a/scripts/expertise/expertise_structure_shipwright_keen_understanding_2.py +++ b/scripts/expertise/expertise_structure_shipwright_keen_understanding_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_keen_understanding_2') - - actor.addSkillMod('expertise_complexity_decrease_shipwright', 2) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_keen_understanding_2') - - actor.removeSkillMod('expertise_complexity_decrease_shipwright', 2) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_keen_understanding_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_keen_understanding_2") return diff --git a/scripts/expertise/expertise_structure_shipwright_schematic_1_1.py b/scripts/expertise/expertise_structure_shipwright_schematic_1_1.py index 7e8de7a2..2cce7bef 100644 --- a/scripts/expertise/expertise_structure_shipwright_schematic_1_1.py +++ b/scripts/expertise/expertise_structure_shipwright_schematic_1_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_schematic_1_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_schematic_1_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_schmematic_1_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_schmematic_1_1") return diff --git a/scripts/expertise/expertise_structure_shipwright_schematic_2_1.py b/scripts/expertise/expertise_structure_shipwright_schematic_2_1.py index 71c2d9b5..b23f6f2c 100644 --- a/scripts/expertise/expertise_structure_shipwright_schematic_2_1.py +++ b/scripts/expertise/expertise_structure_shipwright_schematic_2_1.py @@ -1,46 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.addSkill('expertise_structure_shipwright_schematic_2_1') - - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_struct_1a': - return - - actor.removeSkill('expertise_structure_shipwright_schematic_2_1') - - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_structure_shipwright_schmematic_2_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_structure_shipwright_schmematic_2_1") return diff --git a/scripts/expertise/expertise_trader_business_accounting_1.py b/scripts/expertise/expertise_trader_business_accounting_1.py index 79324ca3..115fc5cd 100644 --- a/scripts/expertise/expertise_trader_business_accounting_1.py +++ b/scripts/expertise/expertise_trader_business_accounting_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_business_accounting_1') - - actor.addSkillMod('expertise_vendor_cost_decrease', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_business_accounting_1') - - actor.removeSkillMod('expertise_vendor_cost_decrease', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_business_accounting_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_business_accounting_1") return diff --git a/scripts/expertise/expertise_trader_business_accounting_2.py b/scripts/expertise/expertise_trader_business_accounting_2.py index 86469f30..24e5d569 100644 --- a/scripts/expertise/expertise_trader_business_accounting_2.py +++ b/scripts/expertise/expertise_trader_business_accounting_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_business_accounting_2') - - actor.addSkillMod('expertise_vendor_cost_decrease', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_business_accounting_2') - - actor.removeSkillMod('expertise_vendor_cost_decrease', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_business_accounting_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_business_accounting_2") return diff --git a/scripts/expertise/expertise_trader_business_accounting_3.py b/scripts/expertise/expertise_trader_business_accounting_3.py index cc43a91d..d0d619c7 100644 --- a/scripts/expertise/expertise_trader_business_accounting_3.py +++ b/scripts/expertise/expertise_trader_business_accounting_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_business_accounting_3') - - actor.addSkillMod('expertise_vendor_cost_decrease', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_business_accounting_3') - - actor.removeSkillMod('expertise_vendor_cost_decrease', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_business_accounting_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_business_accounting_3") return diff --git a/scripts/expertise/expertise_trader_business_accounting_4.py b/scripts/expertise/expertise_trader_business_accounting_4.py index 0c751506..62d4ef7a 100644 --- a/scripts/expertise/expertise_trader_business_accounting_4.py +++ b/scripts/expertise/expertise_trader_business_accounting_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_business_accounting_4') - - actor.addSkillMod('expertise_vendor_cost_decrease', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_business_accounting_4') - - actor.removeSkillMod('expertise_vendor_cost_decrease', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_business_accounting_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_business_accounting_4") return diff --git a/scripts/expertise/expertise_trader_factory_energy_1.py b/scripts/expertise/expertise_trader_factory_energy_1.py index cd7525fc..0c42837e 100644 --- a/scripts/expertise/expertise_trader_factory_energy_1.py +++ b/scripts/expertise/expertise_trader_factory_energy_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_energy_1') - - actor.addSkillMod('expertise_factory_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_energy_1') - - actor.removeSkillMod('expertise_factory_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_energy_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_energy_1") return diff --git a/scripts/expertise/expertise_trader_factory_energy_2.py b/scripts/expertise/expertise_trader_factory_energy_2.py index ab07aa02..5a89f344 100644 --- a/scripts/expertise/expertise_trader_factory_energy_2.py +++ b/scripts/expertise/expertise_trader_factory_energy_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_energy_2') - - actor.addSkillMod('expertise_factory_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_energy_2') - - actor.removeSkillMod('expertise_factory_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_energy_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_energy_2") return diff --git a/scripts/expertise/expertise_trader_factory_energy_3.py b/scripts/expertise/expertise_trader_factory_energy_3.py index 04bac30c..998dd932 100644 --- a/scripts/expertise/expertise_trader_factory_energy_3.py +++ b/scripts/expertise/expertise_trader_factory_energy_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_energy_3') - - actor.addSkillMod('expertise_factory_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_energy_3') - - actor.removeSkillMod('expertise_factory_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_energy_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_energy_3") return diff --git a/scripts/expertise/expertise_trader_factory_energy_4.py b/scripts/expertise/expertise_trader_factory_energy_4.py index b2012ebc..dbed8294 100644 --- a/scripts/expertise/expertise_trader_factory_energy_4.py +++ b/scripts/expertise/expertise_trader_factory_energy_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_energy_4') - - actor.addSkillMod('expertise_factory_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_energy_4') - - actor.removeSkillMod('expertise_factory_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_energy_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_energy_4") return diff --git a/scripts/expertise/expertise_trader_factory_maintenance_1.py b/scripts/expertise/expertise_trader_factory_maintenance_1.py index 539c8406..cc4ea7c8 100644 --- a/scripts/expertise/expertise_trader_factory_maintenance_1.py +++ b/scripts/expertise/expertise_trader_factory_maintenance_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_maintenance_1') - - actor.addSkillMod('expertise_factory_maintenance_decrease', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_maintenance_1') - - actor.removeSkillMod('expertise_factory_maintenance_decrease', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_maintenance_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_maintenance_1") return diff --git a/scripts/expertise/expertise_trader_factory_maintenance_2.py b/scripts/expertise/expertise_trader_factory_maintenance_2.py index 917acca1..701595a4 100644 --- a/scripts/expertise/expertise_trader_factory_maintenance_2.py +++ b/scripts/expertise/expertise_trader_factory_maintenance_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_maintenance_2') - - actor.addSkillMod('expertise_factory_maintenance_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_maintenance_2') - - actor.removeSkillMod('expertise_factory_maintenance_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_maintenance_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_maintenance_2") return diff --git a/scripts/expertise/expertise_trader_factory_maintenance_3.py b/scripts/expertise/expertise_trader_factory_maintenance_3.py index 58fdaa1d..f192b2e5 100644 --- a/scripts/expertise/expertise_trader_factory_maintenance_3.py +++ b/scripts/expertise/expertise_trader_factory_maintenance_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_maintenance_3') - - actor.addSkillMod('expertise_factory_maintenance_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_maintenance_3') - - actor.removeSkillMod('expertise_factory_maintenance_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_maintenance_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_maintenance_3") return diff --git a/scripts/expertise/expertise_trader_factory_maintenance_4.py b/scripts/expertise/expertise_trader_factory_maintenance_4.py index 51f4dff6..2af47dac 100644 --- a/scripts/expertise/expertise_trader_factory_maintenance_4.py +++ b/scripts/expertise/expertise_trader_factory_maintenance_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_maintenance_4') - - actor.addSkillMod('expertise_factory_maintenance_decrease', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_maintenance_4') - - actor.removeSkillMod('expertise_factory_maintenance_decrease', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_maintenance_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_maintenance_4") return diff --git a/scripts/expertise/expertise_trader_factory_production_1.py b/scripts/expertise/expertise_trader_factory_production_1.py index 9f82bcae..1d1f755b 100644 --- a/scripts/expertise/expertise_trader_factory_production_1.py +++ b/scripts/expertise/expertise_trader_factory_production_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_production_1') - - actor.addSkillMod('factory_speed', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_production_1') - - actor.removeSkillMod('factory_speed', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_production_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_production_1") return diff --git a/scripts/expertise/expertise_trader_factory_production_2.py b/scripts/expertise/expertise_trader_factory_production_2.py index 97a69abe..8feb2585 100644 --- a/scripts/expertise/expertise_trader_factory_production_2.py +++ b/scripts/expertise/expertise_trader_factory_production_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_factory_production_2') - - actor.addSkillMod('factory_speed', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_factory_production_2') - - actor.removeSkillMod('factory_speed', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_factory_production_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_factory_production_2") return diff --git a/scripts/expertise/expertise_trader_harvester_collection_1.py b/scripts/expertise/expertise_trader_harvester_collection_1.py index f509b4ce..3b7b2f6e 100644 --- a/scripts/expertise/expertise_trader_harvester_collection_1.py +++ b/scripts/expertise/expertise_trader_harvester_collection_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_collection_1') - - actor.addSkillMod('expertise_harvester_collection_increase', 20) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_collection_1') - - actor.removeSkillMod('expertise_harvester_collection_increase', 20) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_collection_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_collection_1") return diff --git a/scripts/expertise/expertise_trader_harvester_collection_2.py b/scripts/expertise/expertise_trader_harvester_collection_2.py index fb287890..1959a0fb 100644 --- a/scripts/expertise/expertise_trader_harvester_collection_2.py +++ b/scripts/expertise/expertise_trader_harvester_collection_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_collection_2') - - actor.addSkillMod('expertise_harvester_collection_increase', 10) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_collection_2') - - actor.removeSkillMod('expertise_harvester_collection_increase', 10) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_collection_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_collection_2") return diff --git a/scripts/expertise/expertise_trader_harvester_energy_1.py b/scripts/expertise/expertise_trader_harvester_energy_1.py index b0a7f738..ef79a694 100644 --- a/scripts/expertise/expertise_trader_harvester_energy_1.py +++ b/scripts/expertise/expertise_trader_harvester_energy_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_energy_1') - - actor.addSkillMod('expertise_harvester_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_energy_1') - - actor.removeSkillMod('expertise_harvester_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_energy_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_energy_1") return diff --git a/scripts/expertise/expertise_trader_harvester_energy_2.py b/scripts/expertise/expertise_trader_harvester_energy_2.py index d6822bed..6ae294a9 100644 --- a/scripts/expertise/expertise_trader_harvester_energy_2.py +++ b/scripts/expertise/expertise_trader_harvester_energy_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_energy_2') - - actor.addSkillMod('expertise_harvester_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_energy_2') - - actor.removeSkillMod('expertise_harvester_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_energy_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_energy_2") return diff --git a/scripts/expertise/expertise_trader_harvester_energy_3.py b/scripts/expertise/expertise_trader_harvester_energy_3.py index 35e85782..247b53c3 100644 --- a/scripts/expertise/expertise_trader_harvester_energy_3.py +++ b/scripts/expertise/expertise_trader_harvester_energy_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_energy_3') - - actor.addSkillMod('expertise_harvester_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_energy_3') - - actor.removeSkillMod('expertise_harvester_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_energy_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_energy_3") return diff --git a/scripts/expertise/expertise_trader_harvester_energy_4.py b/scripts/expertise/expertise_trader_harvester_energy_4.py index f7132f84..8d6225be 100644 --- a/scripts/expertise/expertise_trader_harvester_energy_4.py +++ b/scripts/expertise/expertise_trader_harvester_energy_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_energy_4') - - actor.addSkillMod('expertise_harvester_energy_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_energy_4') - - actor.removeSkillMod('expertise_harvester_energy_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_energy_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_energy_4") return diff --git a/scripts/expertise/expertise_trader_harvester_maintenance_1.py b/scripts/expertise/expertise_trader_harvester_maintenance_1.py index 0dbf85ca..da891720 100644 --- a/scripts/expertise/expertise_trader_harvester_maintenance_1.py +++ b/scripts/expertise/expertise_trader_harvester_maintenance_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_maintenance_1') - - actor.addSkillMod('expertise_harvester_maintenance_decrease', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_maintenance_1') - - actor.removeSkillMod('expertise_harvester_maintenance_decrease', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_maintenance_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_maintenance_1") return diff --git a/scripts/expertise/expertise_trader_harvester_maintenance_2.py b/scripts/expertise/expertise_trader_harvester_maintenance_2.py index e581d20d..fd1f96cd 100644 --- a/scripts/expertise/expertise_trader_harvester_maintenance_2.py +++ b/scripts/expertise/expertise_trader_harvester_maintenance_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_maintenance_2') - - actor.addSkillMod('expertise_harvester_maintenance_decrease', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_maintenance_2') - - actor.removeSkillMod('expertise_harvester_maintenance_decrease', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_maintenance_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_maintenance_2") return diff --git a/scripts/expertise/expertise_trader_harvester_maintenance_3.py b/scripts/expertise/expertise_trader_harvester_maintenance_3.py index 85c77180..d1d62f39 100644 --- a/scripts/expertise/expertise_trader_harvester_maintenance_3.py +++ b/scripts/expertise/expertise_trader_harvester_maintenance_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_maintenance_3') - - actor.addSkillMod('expertise_harvester_maintenance_decrease', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_maintenance_3') - - actor.removeSkillMod('expertise_harvester_maintenance_decrease', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_maintenance_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_maintenance_3") return diff --git a/scripts/expertise/expertise_trader_harvester_maintenance_4.py b/scripts/expertise/expertise_trader_harvester_maintenance_4.py index e04f5f73..54e4b04e 100644 --- a/scripts/expertise/expertise_trader_harvester_maintenance_4.py +++ b/scripts/expertise/expertise_trader_harvester_maintenance_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_maintenance_4') - - actor.addSkillMod('expertise_harvester_maintenance_decrease', 4) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_maintenance_4') - - actor.removeSkillMod('expertise_harvester_maintenance_decrease', 4) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_maintenance_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_maintenance_4") return diff --git a/scripts/expertise/expertise_trader_harvester_storage_1.py b/scripts/expertise/expertise_trader_harvester_storage_1.py index ad6c85ee..a1a9c7c8 100644 --- a/scripts/expertise/expertise_trader_harvester_storage_1.py +++ b/scripts/expertise/expertise_trader_harvester_storage_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_storage_1') - - actor.addSkillMod('expertise_havester_storage_increase', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_storage_1') - - actor.removeSkillMod('expertise_havester_storage_increase', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_storage_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_storage_1") return diff --git a/scripts/expertise/expertise_trader_harvester_storage_2.py b/scripts/expertise/expertise_trader_harvester_storage_2.py index 9ac213e9..4f4dc914 100644 --- a/scripts/expertise/expertise_trader_harvester_storage_2.py +++ b/scripts/expertise/expertise_trader_harvester_storage_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_storage_2') - - actor.addSkillMod('expertise_havester_storage_increase', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_storage_2') - - actor.removeSkillMod('expertise_havester_storage_increase', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_storage_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_storage_2") return diff --git a/scripts/expertise/expertise_trader_harvester_storage_3.py b/scripts/expertise/expertise_trader_harvester_storage_3.py index 1c2abe57..d0c04a3d 100644 --- a/scripts/expertise/expertise_trader_harvester_storage_3.py +++ b/scripts/expertise/expertise_trader_harvester_storage_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_storage_3') - - actor.addSkillMod('expertise_havester_storage_increase', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_storage_3') - - actor.removeSkillMod('expertise_havester_storage_increase', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_storage_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_storage_3") return diff --git a/scripts/expertise/expertise_trader_harvester_storage_4.py b/scripts/expertise/expertise_trader_harvester_storage_4.py index 9abc452b..6e2b769b 100644 --- a/scripts/expertise/expertise_trader_harvester_storage_4.py +++ b/scripts/expertise/expertise_trader_harvester_storage_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_harvester_storage_4') - - actor.addSkillMod('expertise_havester_storage_increase', 3) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_harvester_storage_4') - - actor.removeSkillMod('expertise_havester_storage_increase', 3) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_harvester_storage_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_harvester_storage_4") return diff --git a/scripts/expertise/expertise_trader_personnel_management_1.py b/scripts/expertise/expertise_trader_personnel_management_1.py index 9e618df1..e44aba53 100644 --- a/scripts/expertise/expertise_trader_personnel_management_1.py +++ b/scripts/expertise/expertise_trader_personnel_management_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_personnel_management_1') - - actor.addSkillMod('manage_vendor', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_personnel_management_1') - - actor.removeSkillMod('manage_vendor', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_personnel_management_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_personnel_management_1") return diff --git a/scripts/expertise/expertise_trader_personnel_management_2.py b/scripts/expertise/expertise_trader_personnel_management_2.py index 465e9b8e..064d6415 100644 --- a/scripts/expertise/expertise_trader_personnel_management_2.py +++ b/scripts/expertise/expertise_trader_personnel_management_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_personnel_management_2') - - actor.addSkillMod('manage_vendor', 1) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_personnel_management_2') - - actor.removeSkillMod('manage_vendor', 1) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_personnel_management_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_personnel_management_2") return diff --git a/scripts/expertise/expertise_trader_reverse_engineering_1.py b/scripts/expertise/expertise_trader_reverse_engineering_1.py index 6c6a1599..26f209bc 100644 --- a/scripts/expertise/expertise_trader_reverse_engineering_1.py +++ b/scripts/expertise/expertise_trader_reverse_engineering_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_reverse_engineering_1') - - actor.addSkillMod('expertise_reverse_engineering_bonus', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_reverse_engineering_1') - - actor.removeSkillMod('expertise_reverse_engineering_bonus', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_reverse_engineering_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_reverse_engineering_1") return diff --git a/scripts/expertise/expertise_trader_reverse_engineering_2.py b/scripts/expertise/expertise_trader_reverse_engineering_2.py index a0716403..2192e020 100644 --- a/scripts/expertise/expertise_trader_reverse_engineering_2.py +++ b/scripts/expertise/expertise_trader_reverse_engineering_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_reverse_engineering_2') - - actor.addSkillMod('expertise_reverse_engineering_bonus', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_reverse_engineering_2') - - actor.removeSkillMod('expertise_reverse_engineering_bonus', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_reverse_engineering_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_reverse_engineering_2") return diff --git a/scripts/expertise/expertise_trader_sampling_collection_1.py b/scripts/expertise/expertise_trader_sampling_collection_1.py index cb6861b2..4935bf9d 100644 --- a/scripts/expertise/expertise_trader_sampling_collection_1.py +++ b/scripts/expertise/expertise_trader_sampling_collection_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_sampling_collection_1') - - actor.addSkillMod('expertise_resource_sampling_increase', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_sampling_collection_1') - - actor.removeSkillMod('expertise_resource_sampling_increase', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_sampling_collection_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_sampling_collection_1") return diff --git a/scripts/expertise/expertise_trader_sampling_collection_2.py b/scripts/expertise/expertise_trader_sampling_collection_2.py index f1c55a3d..1fa225fc 100644 --- a/scripts/expertise/expertise_trader_sampling_collection_2.py +++ b/scripts/expertise/expertise_trader_sampling_collection_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_sampling_collection_2') - - actor.addSkillMod('expertise_resource_sampling_increase', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_sampling_collection_2') - - actor.removeSkillMod('expertise_resource_sampling_increase', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_sampling_collection_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_sampling_collection_2") return diff --git a/scripts/expertise/expertise_trader_sampling_collection_3.py b/scripts/expertise/expertise_trader_sampling_collection_3.py index b6a31585..9a7a1174 100644 --- a/scripts/expertise/expertise_trader_sampling_collection_3.py +++ b/scripts/expertise/expertise_trader_sampling_collection_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_sampling_collection_3') - - actor.addSkillMod('expertise_resource_sampling_increase', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_sampling_collection_3') - - actor.removeSkillMod('expertise_resource_sampling_increase', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_sampling_collection_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_sampling_collection_3") return diff --git a/scripts/expertise/expertise_trader_sampling_collection_4.py b/scripts/expertise/expertise_trader_sampling_collection_4.py index 08805c30..158ca5da 100644 --- a/scripts/expertise/expertise_trader_sampling_collection_4.py +++ b/scripts/expertise/expertise_trader_sampling_collection_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_sampling_collection_4') - - actor.addSkillMod('expertise_resource_sampling_increase', 25) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_sampling_collection_4') - - actor.removeSkillMod('expertise_resource_sampling_increase', 25) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_sampling_collection_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_sampling_collection_4") return diff --git a/scripts/expertise/expertise_trader_sampling_efficiency_1.py b/scripts/expertise/expertise_trader_sampling_efficiency_1.py index 0722f5bb..2f4c90f2 100644 --- a/scripts/expertise/expertise_trader_sampling_efficiency_1.py +++ b/scripts/expertise/expertise_trader_sampling_efficiency_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_sampling_efficiency_1') - - actor.addSkillMod('expertise_resource_sampling_time_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_sampling_efficiency_1') - - actor.removeSkillMod('expertise_resource_sampling_time_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_sampling_efficiency_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_sampling_efficiency_1") return diff --git a/scripts/expertise/expertise_trader_sampling_efficiency_2.py b/scripts/expertise/expertise_trader_sampling_efficiency_2.py index c9043c3f..f197eff0 100644 --- a/scripts/expertise/expertise_trader_sampling_efficiency_2.py +++ b/scripts/expertise/expertise_trader_sampling_efficiency_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_sampling_efficiency_2') - - actor.addSkillMod('expertise_resource_sampling_time_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_sampling_efficiency_2') - - actor.removeSkillMod('expertise_resource_sampling_time_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_sampling_efficiency_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_sampling_efficiency_2") return diff --git a/scripts/expertise/expertise_trader_sampling_efficiency_3.py b/scripts/expertise/expertise_trader_sampling_efficiency_3.py index 2d3d621c..cf2e5c0c 100644 --- a/scripts/expertise/expertise_trader_sampling_efficiency_3.py +++ b/scripts/expertise/expertise_trader_sampling_efficiency_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_sampling_efficiency_3') - - actor.addSkillMod('expertise_resource_sampling_time_decrease', 5) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_sampling_efficiency_3') - - actor.removeSkillMod('expertise_resource_sampling_time_decrease', 5) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_sampling_efficiency_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_sampling_efficiency_3") return diff --git a/scripts/expertise/expertise_trader_warehousing_1.py b/scripts/expertise/expertise_trader_warehousing_1.py index c865daf6..9ca8b894 100644 --- a/scripts/expertise/expertise_trader_warehousing_1.py +++ b/scripts/expertise/expertise_trader_warehousing_1.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_warehousing_1') - - actor.addSkillMod('vendor_item_limit', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_warehousing_1') - - actor.removeSkillMod('vendor_item_limit', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_trader_warehousing_1") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_trader_warehousing_1") return diff --git a/scripts/expertise/expertise_trader_warehousing_2.py b/scripts/expertise/expertise_trader_warehousing_2.py index 99f6db9d..5541c71e 100644 --- a/scripts/expertise/expertise_trader_warehousing_2.py +++ b/scripts/expertise/expertise_trader_warehousing_2.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_warehousing_2') - - actor.addSkillMod('vendor_item_limit', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_warehousing_2') - - actor.removeSkillMod('vendor_item_limit', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_trader_warehousing_2") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_trader_warehousing_2") return diff --git a/scripts/expertise/expertise_trader_warehousing_3.py b/scripts/expertise/expertise_trader_warehousing_3.py index 19d00373..eb1dc350 100644 --- a/scripts/expertise/expertise_trader_warehousing_3.py +++ b/scripts/expertise/expertise_trader_warehousing_3.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_warehousing_3') - - actor.addSkillMod('vendor_item_limit', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_warehousing_3') - - actor.removeSkillMod('vendor_item_limit', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_trader_warehousing_3") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_trader_warehousing_3") return diff --git a/scripts/expertise/expertise_trader_warehousing_4.py b/scripts/expertise/expertise_trader_warehousing_4.py index cb2f936c..96495edd 100644 --- a/scripts/expertise/expertise_trader_warehousing_4.py +++ b/scripts/expertise/expertise_trader_warehousing_4.py @@ -1,48 +1,9 @@ import sys -def addExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.addSkill('expertise_trader_warehousing_4') - - actor.addSkillMod('vendor_item_limit', 50) - - addAbilities(core, actor, player) - - return - -def removeExpertisePoint(core, actor): - - player = actor.getSlottedObject('ghost') - - if not player: - return - - if not player.getProfession() == 'trader_1a': - return - - actor.removeSkill('expertise_trader_warehousing_4') - - actor.removeSkillMod('vendor_item_limit', 50) - - removeAbilities(core, actor, player) - - return - -# this checks what abilities the player gets by level, need to also call this on level-up def addAbilities(core, actor, player): - - + actor.addAbility("expertise_trader_trader_warehousing_4") return def removeAbilities(core, actor, player): - - + actor.removeAbility("expertise_trader_trader_warehousing_4") return diff --git a/scripts/houses/player_house_corellia_small_style_01.py b/scripts/houses/player_house_corellia_small_style_01.py new file mode 100644 index 00000000..71a4efb8 --- /dev/null +++ b/scripts/houses/player_house_corellia_small_style_01.py @@ -0,0 +1,14 @@ +import sys +from services.housing import HouseTemplate +from engine.resources.scene import Point3D + +def setup(core): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_deed.iff", "object/building/player/shared_player_house_corellia_small_style_01.iff", 2) + + houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) + houseTemplate.addPlaceablePlanet("corellia") + houseTemplate.addPlaceablePlanet("talus") + houseTemplate.setDefaultItemLimit(200) + + core.housingService.addHousingTemplate(houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_small_style_01_floorplan_02.py b/scripts/houses/player_house_corellia_small_style_01_floorplan_02.py new file mode 100644 index 00000000..4e6231e1 --- /dev/null +++ b/scripts/houses/player_house_corellia_small_style_01_floorplan_02.py @@ -0,0 +1,14 @@ +import sys +from services.housing import HouseTemplate +from engine.resources.scene import Point3D + +def setup(core): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_floor_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_01_floorplan_02.iff", 2) + + houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) + houseTemplate.addPlaceablePlanet("corellia") + houseTemplate.addPlaceablePlanet("talus") + houseTemplate.setDefaultItemLimit(200) + + core.housingService.addHousingTemplate(houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_small_style_02.py b/scripts/houses/player_house_corellia_small_style_02.py new file mode 100644 index 00000000..7cb2d6cc --- /dev/null +++ b/scripts/houses/player_house_corellia_small_style_02.py @@ -0,0 +1,14 @@ +import sys +from services.housing import HouseTemplate +from engine.resources.scene import Point3D + +def setup(core): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_02.iff", 2) + + houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) + houseTemplate.addPlaceablePlanet("corellia") + houseTemplate.addPlaceablePlanet("talus") + houseTemplate.setDefaultItemLimit(200) + + core.housingService.addHousingTemplate(houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_small_style_02_floorplan_02.py b/scripts/houses/player_house_corellia_small_style_02_floorplan_02.py new file mode 100644 index 00000000..6c52f8c9 --- /dev/null +++ b/scripts/houses/player_house_corellia_small_style_02_floorplan_02.py @@ -0,0 +1,14 @@ +import sys +from services.housing import HouseTemplate +from engine.resources.scene import Point3D + +def setup(core): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_floor_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_02_floorplan_02.iff", 2) + + houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) + houseTemplate.addPlaceablePlanet("corellia") + houseTemplate.addPlaceablePlanet("talus") + houseTemplate.setDefaultItemLimit(200) + + core.housingService.addHousingTemplate(houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_style_01.py b/scripts/houses/player_house_generic_small_style_01.py new file mode 100644 index 00000000..3b1f0a4c --- /dev/null +++ b/scripts/houses/player_house_generic_small_style_01.py @@ -0,0 +1,19 @@ +import sys +from services.housing import HouseTemplate +from engine.resources.scene import Point3D + +def setup(core): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff", "object/building/player/shared_player_house_generic_small_style_01.iff", 2) + + houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) + houseTemplate.addPlaceablePlanet("tatooine") + houseTemplate.addPlaceablePlanet("corellia") + houseTemplate.addPlaceablePlanet("naboo") + houseTemplate.addPlaceablePlanet("talus") + houseTemplate.addPlaceablePlanet("rori") + houseTemplate.addPlaceablePlanet("dantooine") + houseTemplate.addPlaceablePlanet("lok") + houseTemplate.setDefaultItemLimit(200) + + core.housingService.addHousingTemplate(houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_style_01_floorplan_02.py b/scripts/houses/player_house_generic_small_style_01_floorplan_02.py new file mode 100644 index 00000000..b1fc020f --- /dev/null +++ b/scripts/houses/player_house_generic_small_style_01_floorplan_02.py @@ -0,0 +1,19 @@ +import sys +from services.housing import HouseTemplate +from engine.resources.scene import Point3D + +def setup(core): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_floor_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_01_floorplan_02.iff", 2) + + houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) + houseTemplate.addPlaceablePlanet("tatooine") + houseTemplate.addPlaceablePlanet("corellia") + houseTemplate.addPlaceablePlanet("naboo") + houseTemplate.addPlaceablePlanet("talus") + houseTemplate.addPlaceablePlanet("rori") + houseTemplate.addPlaceablePlanet("dantooine") + houseTemplate.addPlaceablePlanet("lok") + houseTemplate.setDefaultItemLimit(200) + + core.housingService.addHousingTemplate(houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_style_02.py b/scripts/houses/player_house_generic_small_style_02.py new file mode 100644 index 00000000..4df4319c --- /dev/null +++ b/scripts/houses/player_house_generic_small_style_02.py @@ -0,0 +1,19 @@ +import sys +from services.housing import HouseTemplate +from engine.resources.scene import Point3D + +def setup(core): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_02.iff", 2) + + houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) + houseTemplate.addPlaceablePlanet("tatooine") + houseTemplate.addPlaceablePlanet("corellia") + houseTemplate.addPlaceablePlanet("naboo") + houseTemplate.addPlaceablePlanet("talus") + houseTemplate.addPlaceablePlanet("rori") + houseTemplate.addPlaceablePlanet("dantooine") + houseTemplate.addPlaceablePlanet("lok") + houseTemplate.setDefaultItemLimit(200) + + core.housingService.addHousingTemplate(houseTemplate) + return \ No newline at end of file diff --git a/scripts/instances/heroic_exar_kun.py b/scripts/instances/heroic_exar_kun.py new file mode 100644 index 00000000..d961fee0 --- /dev/null +++ b/scripts/instances/heroic_exar_kun.py @@ -0,0 +1,53 @@ +import sys +import services.InstanceService.Instance + +def getTerrain(): + return 'terrain/dungeon1.trn' + +def getBuilding(): + return 'object/building/heroic/shared_exar_kun_tomb.iff' + +def getCellId(): + return 1 + +def getSpawnPosition(position): + position.x = float(-11.918457) + position.y = float(0.601063) + position.z = float(-125.692871) + return + +def getDuration(): + return 120 + +# NK lockout time was 30 minutes. Most instances were 0 and got reset at 12AM PTC. +def getLockoutTime(): + return 0 + +def getExitTerrain(): + return 'terrain/yavin4.trn' + +def getExitPosition(position): + position.x = float(5097) + position.y = float(0) + position.z = float(5537) + return + +# Called on instance creation to spawn npcs and objects. +def setup(core, instance): + return + +# Called when there is a new participant added to the instance. +def add(core, instance, actor): + return + +# Called when a participant is removed from the instance. +def remove(core, instance, actor): + return + +# Any operations that need to be carried out regularly +def run(core, instance): + return + +# Called on instance destruction to destroy the instance. +def destroy(core, instance): + return \ No newline at end of file diff --git a/scripts/instances/heroic_star_destroyer.py b/scripts/instances/heroic_star_destroyer.py new file mode 100644 index 00000000..2109ea39 --- /dev/null +++ b/scripts/instances/heroic_star_destroyer.py @@ -0,0 +1,53 @@ +import sys +import services.InstanceService.Instance + +def getTerrain(): + return 'terrain/dungeon1.trn' + +def getBuilding(): + return 'object/building/general/shared_space_dungeon_star_destroyer.iff' + +def getCellId(): + return 36 + +def getSpawnPosition(position): + position.x = float(0) + position.y = float(173.834625) + position.z = float(30) + return + +def getDuration(): + return 120 + +# NK lockout time was 30 minutes. Most instances were 0 and got reset at 12AM PTC. +def getLockoutTime(): + return 0 + +def getExitTerrain(): + return 'terrain/corellia.trn' + +def getExitPosition(position): + position.x = float(-131) + position.y = float(0) + position.z = float(-4723) + return + +# Called on instance creation to spawn npcs and objects. +def setup(core, instance): + return + +# Called when there is a new participant added to the instance. +def add(core, instance, actor): + return + +# Called when a participant is removed from the instance. +def remove(core, instance, actor): + return + +# Any operations that need to be carried out regularly +def run(core, instance): + return + +# Called on instance destruction to destroy the instance. +def destroy(core, instance): + return \ No newline at end of file diff --git a/scripts/loot/lootItems/armor/composite_armor_bicep_left.py b/scripts/loot/lootItems/armor/composite_armor_bicep_left.py new file mode 100644 index 00000000..d5089e38 --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_bicep_left.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_bicep_l.iff'] + +def customItemName(): + + return 'Composite Armor Left Bicep' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_bicep_right.py b/scripts/loot/lootItems/armor/composite_armor_bicep_right.py new file mode 100644 index 00000000..5e04243e --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_bicep_right.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_bicep_r.iff'] + +def customItemName(): + + return 'Composite Armor Right Bicep' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_boots.py b/scripts/loot/lootItems/armor/composite_armor_boots.py new file mode 100644 index 00000000..f996bfa7 --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_boots.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_boots.iff'] + +def customItemName(): + + return 'Composite Armor Boots' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_bracer_left.py b/scripts/loot/lootItems/armor/composite_armor_bracer_left.py new file mode 100644 index 00000000..7d805114 --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_bracer_left.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_bracer_l.iff'] + +def customItemName(): + + return 'Composite Armor Bracer Left' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_bracer_right.py b/scripts/loot/lootItems/armor/composite_armor_bracer_right.py new file mode 100644 index 00000000..deb22a6c --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_bracer_right.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_bracer_r.iff'] + +def customItemName(): + + return 'Composite Armor Bracer Right' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_chestplate.py b/scripts/loot/lootItems/armor/composite_armor_chestplate.py new file mode 100644 index 00000000..b569da42 --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_chestplate.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_chest_plate.iff'] + +def customItemName(): + + return 'Composite Armor Chestplate' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_gloves.py b/scripts/loot/lootItems/armor/composite_armor_gloves.py new file mode 100644 index 00000000..acd4a1cf --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_gloves.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_gloves.iff'] + +def customItemName(): + + return 'Composite Armor Gloves' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_helmet.py b/scripts/loot/lootItems/armor/composite_armor_helmet.py new file mode 100644 index 00000000..d5fe36de --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_helmet.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_helmet.iff'] + +def customItemName(): + + return 'Composite Armor Helmet' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/armor/composite_armor_leggings.py b/scripts/loot/lootItems/armor/composite_armor_leggings.py new file mode 100644 index 00000000..a48864a4 --- /dev/null +++ b/scripts/loot/lootItems/armor/composite_armor_leggings.py @@ -0,0 +1,31 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/armor/composite/shared_armor_composite_leggings.iff'] + +def customItemName(): + + return 'Composite Armor Leggings' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def itemStats(): + + stats = ['armor_efficiency_kinetic','5000','6800'] + stats += ['armor_efficiency_energy','3000','4800'] + stats += ['special_protection_heat','4000','5800'] + stats += ['special_protection_cold','4000','5800'] + stats += ['special_protection_acid','4000','5800'] + stats += ['special_protection_electricity','4000','5800'] + + return stats diff --git a/scripts/loot/lootItems/clothes/tusken_raider_bandolier.py b/scripts/loot/lootItems/clothes/tusken_raider_bandolier.py new file mode 100644 index 00000000..163a87ea --- /dev/null +++ b/scripts/loot/lootItems/clothes/tusken_raider_bandolier.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/bandolier/shared_bandolier_tusken_raider_s01.iff','object/tangible/wearables/bandolier/shared_bandolier_tusken_raider_s02.iff','object/tangible/wearables/bandolier/shared_bandolier_tusken_raider_s03.iff'] + +def customItemName(): + + return 'Tusken Raider Bandolier' diff --git a/scripts/loot/lootItems/clothes/tusken_raider_boots.py b/scripts/loot/lootItems/clothes/tusken_raider_boots.py new file mode 100644 index 00000000..81cb35af --- /dev/null +++ b/scripts/loot/lootItems/clothes/tusken_raider_boots.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/boots/shared_boots_tusken_raider.iff'] + +def customItemName(): + + return 'Tusken Raider Boots' diff --git a/scripts/loot/lootItems/clothes/tusken_raider_dress.py b/scripts/loot/lootItems/clothes/tusken_raider_dress.py new file mode 100644 index 00000000..c697642b --- /dev/null +++ b/scripts/loot/lootItems/clothes/tusken_raider_dress.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/robe/shared_robe_tusken_raider_s01.iff','object/tangible/wearables/robe/shared_robe_tusken_raider_s02.iff'] + +def customItemName(): + + return 'Tusken Raider Dress' diff --git a/scripts/loot/lootItems/clothes/tusken_raider_gloves.py b/scripts/loot/lootItems/clothes/tusken_raider_gloves.py new file mode 100644 index 00000000..a942a1d3 --- /dev/null +++ b/scripts/loot/lootItems/clothes/tusken_raider_gloves.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/gloves/shared_gloves_tusken_raider.iff'] + +def customItemName(): + + return 'Tusken Raider Gloves' diff --git a/scripts/loot/lootItems/clothes/tusken_raider_helmet.py b/scripts/loot/lootItems/clothes/tusken_raider_helmet.py new file mode 100644 index 00000000..d4e539d4 --- /dev/null +++ b/scripts/loot/lootItems/clothes/tusken_raider_helmet.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/wearables/helmet/shared_helmet_tusken_raider_s01.iff','object/tangible/wearables/helmet/shared_helmet_tusken_raider_s02.iff'] + +def customItemName(): + + return 'Tusken Raider Helmet' diff --git a/scripts/loot/lootItems/colorcrystal.py b/scripts/loot/lootItems/colorcrystal.py new file mode 100644 index 00000000..1458e1be --- /dev/null +++ b/scripts/loot/lootItems/colorcrystal.py @@ -0,0 +1,4 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] diff --git a/scripts/loot/lootItems/creatureloot/antenna.py b/scripts/loot/lootItems/creatureloot/antenna.py new file mode 100644 index 00000000..62113b2d --- /dev/null +++ b/scripts/loot/lootItems/creatureloot/antenna.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/loot/creature_loot/generic/shared_generic_antennae.iff'] + +def customItemName(): + + return 'Antenna' diff --git a/scripts/loot/lootItems/creatureloot/brain.py b/scripts/loot/lootItems/creatureloot/brain.py new file mode 100644 index 00000000..107add91 --- /dev/null +++ b/scripts/loot/lootItems/creatureloot/brain.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/loot/creature_loot/generic/shared_brain_s01.iff'] + +def customItemName(): + + return 'Brain' \ No newline at end of file diff --git a/scripts/loot/lootItems/creatureloot/eye.py b/scripts/loot/lootItems/creatureloot/eye.py new file mode 100644 index 00000000..076ce324 --- /dev/null +++ b/scripts/loot/lootItems/creatureloot/eye.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/loot/creature_loot/generic/shared_generic_eye.iff'] + +def customItemName(): + + return 'Eye' diff --git a/scripts/loot/lootItems/creatureloot/gland.py b/scripts/loot/lootItems/creatureloot/gland.py new file mode 100644 index 00000000..ccf78284 --- /dev/null +++ b/scripts/loot/lootItems/creatureloot/gland.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/loot/creature_loot/generic/shared_lungs_gland.iff'] + +def customItemName(): + + return 'Gland' \ No newline at end of file diff --git a/scripts/loot/lootItems/creatureloot/heart.py b/scripts/loot/lootItems/creatureloot/heart.py new file mode 100644 index 00000000..8232f7a7 --- /dev/null +++ b/scripts/loot/lootItems/creatureloot/heart.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/loot/creature_loot/generic/shared_generic_heart.iff'] + +def customItemName(): + + return 'Heart' diff --git a/scripts/loot/lootItems/creatureloot/stomach.py b/scripts/loot/lootItems/creatureloot/stomach.py new file mode 100644 index 00000000..47042a7d --- /dev/null +++ b/scripts/loot/lootItems/creatureloot/stomach.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/loot/creature_loot/generic/shared_generic_stomach.iff'] + +def customItemName(): + + return 'Stomach' diff --git a/scripts/loot/lootItems/junk/armor_repair_device.py b/scripts/loot/lootItems/junk/armor_repair_device.py new file mode 100644 index 00000000..079cd72a --- /dev/null +++ b/scripts/loot/lootItems/junk/armor_repair_device.py @@ -0,0 +1,21 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_armor_repair_device_generic.iff'] + +def customItemName(): + + return 'Armor Repair Device' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 28 + +def junkType(): + + return 0 + diff --git a/scripts/loot/lootItems/junk/chassis_blueprint.py b/scripts/loot/lootItems/junk/chassis_blueprint.py new file mode 100644 index 00000000..2848f501 --- /dev/null +++ b/scripts/loot/lootItems/junk/chassis_blueprint.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/generic_usable/shared_chassis_blueprint_usuable.iff'] + +def customItemName(): + + return 'Chassis Blueprint' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 21 + +def junkType(): + + return 0 \ No newline at end of file diff --git a/scripts/loot/lootItems/junk/comlink.py b/scripts/loot/lootItems/junk/comlink.py new file mode 100644 index 00000000..afc926dd --- /dev/null +++ b/scripts/loot/lootItems/junk/comlink.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_comlink_civilian_generic.iff'] + +def customItemName(): + + return 'Comlink' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 15 + +def junkType(): + + return 0 \ No newline at end of file diff --git a/scripts/loot/lootItems/junk/damaged_datapad.py b/scripts/loot/lootItems/junk/damaged_datapad.py new file mode 100644 index 00000000..8bb43fba --- /dev/null +++ b/scripts/loot/lootItems/junk/damaged_datapad.py @@ -0,0 +1,21 @@ + +def itemTemplate(): + + return ['object/tangible/loot/misc/shared_damaged_datapad.iff'] + +def customItemName(): + + return 'Damaged Datapad' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 8 + +def junkType(): + + return 0 + diff --git a/scripts/loot/lootItems/junk/ear_jewel.py b/scripts/loot/lootItems/junk/ear_jewel.py new file mode 100644 index 00000000..6093adae --- /dev/null +++ b/scripts/loot/lootItems/junk/ear_jewel.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['/object/tangible/loot/npc_loot/shared_jewelry_ear_s02.iff'] + +def customItemName(): + + return 'Ear jewel' \ No newline at end of file diff --git a/scripts/loot/lootItems/junk/explosive_dud.py b/scripts/loot/lootItems/junk/explosive_dud.py new file mode 100644 index 00000000..2d0291da --- /dev/null +++ b/scripts/loot/lootItems/junk/explosive_dud.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_firework_dud_s1.iff'] + +def customItemName(): + + return 'Explosive Dud' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 10 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/hyperdrive_unit.py b/scripts/loot/lootItems/junk/hyperdrive_unit.py new file mode 100644 index 00000000..8ce2372d --- /dev/null +++ b/scripts/loot/lootItems/junk/hyperdrive_unit.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/misc/shared_hyperdrive_part_s01.iff'] + +def customItemName(): + + return 'Hyperdrive Unit' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 34 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/id_chip.py b/scripts/loot/lootItems/junk/id_chip.py new file mode 100644 index 00000000..38cb1161 --- /dev/null +++ b/scripts/loot/lootItems/junk/id_chip.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_id_chip_generic.iff'] + +def customItemName(): + + return 'ID Chip' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 14 + +def junkType(): + + return 0 \ No newline at end of file diff --git a/scripts/loot/lootItems/junk/impulse_detector.py b/scripts/loot/lootItems/junk/impulse_detector.py new file mode 100644 index 00000000..6da7301b --- /dev/null +++ b/scripts/loot/lootItems/junk/impulse_detector.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_impulse_detector_01_generic.iff'] + +def customItemName(): + + return 'Impulse Detector' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 17 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/laser_trap.py b/scripts/loot/lootItems/junk/laser_trap.py new file mode 100644 index 00000000..fd8840b9 --- /dev/null +++ b/scripts/loot/lootItems/junk/laser_trap.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_laser_trap_generic.iff'] + +def customItemName(): + + return 'Laser Trap' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 22 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/launcher_tube.py b/scripts/loot/lootItems/junk/launcher_tube.py new file mode 100644 index 00000000..8f6d60a2 --- /dev/null +++ b/scripts/loot/lootItems/junk/launcher_tube.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_launcher_tube_generic.iff'] + +def customItemName(): + + return 'Launcher Tube' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 16 + +def junkType(): + + return 0 \ No newline at end of file diff --git a/scripts/loot/lootItems/junk/ledger.py b/scripts/loot/lootItems/junk/ledger.py new file mode 100644 index 00000000..ba93e09b --- /dev/null +++ b/scripts/loot/lootItems/junk/ledger.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_ledger_generic.iff'] + +def customItemName(): + + return 'Ledger' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 13 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/magseal_detector.py b/scripts/loot/lootItems/junk/magseal_detector.py new file mode 100644 index 00000000..e98ebf36 --- /dev/null +++ b/scripts/loot/lootItems/junk/magseal_detector.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_magseal_detector_generic.iff'] + +def customItemName(): + + return 'MagSeal Detector' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 15 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/medical_console.py b/scripts/loot/lootItems/junk/medical_console.py new file mode 100644 index 00000000..d393fe32 --- /dev/null +++ b/scripts/loot/lootItems/junk/medical_console.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_medical_console_generic.iff'] + +def customItemName(): + + return 'Medical Console' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 24 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/medical_device.py b/scripts/loot/lootItems/junk/medical_device.py new file mode 100644 index 00000000..8511594b --- /dev/null +++ b/scripts/loot/lootItems/junk/medical_device.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_medical_device_generic.iff'] + +def customItemName(): + + return 'Medical Device' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 17 + +def junkType(): + + return 0 \ No newline at end of file diff --git a/scripts/loot/lootItems/junk/motor.py b/scripts/loot/lootItems/junk/motor.py new file mode 100644 index 00000000..0e72d464 --- /dev/null +++ b/scripts/loot/lootItems/junk/motor.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_small_motor_generic.iff'] + +def customItemName(): + + return 'Motor' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 13 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/power_output_analyzer.py b/scripts/loot/lootItems/junk/power_output_analyzer.py new file mode 100644 index 00000000..16114969 --- /dev/null +++ b/scripts/loot/lootItems/junk/power_output_analyzer.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_power_output_analyzer_generic.iff'] + +def customItemName(): + + return 'Power Output Analyzer' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 21 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/red_wiring.py b/scripts/loot/lootItems/junk/red_wiring.py new file mode 100644 index 00000000..fbefb228 --- /dev/null +++ b/scripts/loot/lootItems/junk/red_wiring.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_red_wiring_generic.iff'] + +def customItemName(): + + return 'Red Wiring' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 12 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/shield_module.py b/scripts/loot/lootItems/junk/shield_module.py new file mode 100644 index 00000000..db0fb690 --- /dev/null +++ b/scripts/loot/lootItems/junk/shield_module.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_shield_module_generic.iff'] + +def customItemName(): + + return 'Shield Module' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 20 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/software_module.py b/scripts/loot/lootItems/junk/software_module.py new file mode 100644 index 00000000..58cc91ef --- /dev/null +++ b/scripts/loot/lootItems/junk/software_module.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_software_module_generic.iff'] + +def customItemName(): + + return 'Software Module' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 12 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/survival_gear.py b/scripts/loot/lootItems/junk/survival_gear.py new file mode 100644 index 00000000..efdaebfb --- /dev/null +++ b/scripts/loot/lootItems/junk/survival_gear.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_survival_equipment_generic.iff'] + +def customItemName(): + + return 'Survival Gear' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 11 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/underpowered_survey_pad.py b/scripts/loot/lootItems/junk/underpowered_survey_pad.py new file mode 100644 index 00000000..27fac34c --- /dev/null +++ b/scripts/loot/lootItems/junk/underpowered_survey_pad.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_survey_pad_adv_generic.iff'] + +def customItemName(): + + return 'Underpowered Survey Pad' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 13 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/unidentified_serum_vial.py b/scripts/loot/lootItems/junk/unidentified_serum_vial.py new file mode 100644 index 00000000..d9b5590e --- /dev/null +++ b/scripts/loot/lootItems/junk/unidentified_serum_vial.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_serum_vial_generic.iff'] + +def customItemName(): + + return 'Unidentified Serum Vial' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 14 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/used_notebook.py b/scripts/loot/lootItems/junk/used_notebook.py new file mode 100644 index 00000000..6d117330 --- /dev/null +++ b/scripts/loot/lootItems/junk/used_notebook.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_notebook_generic.iff'] + +def customItemName(): + + return 'Used Notebook' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 12 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/weak_droid_battery.py b/scripts/loot/lootItems/junk/weak_droid_battery.py new file mode 100644 index 00000000..8647f305 --- /dev/null +++ b/scripts/loot/lootItems/junk/weak_droid_battery.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/generic/shared_battery_useable_generic.iff'] + +def customItemName(): + + return 'Weak Droid Battery' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 9 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/junk/worklight_generic.py b/scripts/loot/lootItems/junk/worklight_generic.py new file mode 100644 index 00000000..3b3bed9a --- /dev/null +++ b/scripts/loot/lootItems/junk/worklight_generic.py @@ -0,0 +1,20 @@ + +def itemTemplate(): + + return ['object/tangible/loot/npc_loot/shared_worklight_generic.iff'] + +def customItemName(): + + return 'Generic Worklight' + +def stackable(): + + return 1 + +def junkDealerPrice(): + + return 10 + +def junkType(): + + return 0 diff --git a/scripts/loot/lootItems/kraytpearl_cracked.py b/scripts/loot/lootItems/kraytpearl_cracked.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_cracked.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_fair.py b/scripts/loot/lootItems/kraytpearl_fair.py new file mode 100644 index 00000000..bf16c0ec --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_fair.py @@ -0,0 +1,12 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_flawless.py b/scripts/loot/lootItems/kraytpearl_flawless.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_flawless.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_good.py b/scripts/loot/lootItems/kraytpearl_good.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_good.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_poor.py b/scripts/loot/lootItems/kraytpearl_poor.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_poor.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_premium.py b/scripts/loot/lootItems/kraytpearl_premium.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_premium.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_quality.py b/scripts/loot/lootItems/kraytpearl_quality.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_quality.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_scratched.py b/scripts/loot/lootItems/kraytpearl_scratched.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_scratched.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/kraytpearl_select.py b/scripts/loot/lootItems/kraytpearl_select.py new file mode 100644 index 00000000..89e55d04 --- /dev/null +++ b/scripts/loot/lootItems/kraytpearl_select.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_fair.py b/scripts/loot/lootItems/powercrystal_fair.py new file mode 100644 index 00000000..46f1add7 --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_fair.py @@ -0,0 +1,12 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_flawless.py b/scripts/loot/lootItems/powercrystal_flawless.py new file mode 100644 index 00000000..eadb333a --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_flawless.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_good.py b/scripts/loot/lootItems/powercrystal_good.py new file mode 100644 index 00000000..eadb333a --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_good.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_perfect.py b/scripts/loot/lootItems/powercrystal_perfect.py new file mode 100644 index 00000000..eadb333a --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_perfect.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_poor.py b/scripts/loot/lootItems/powercrystal_poor.py new file mode 100644 index 00000000..eadb333a --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_poor.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_premium.py b/scripts/loot/lootItems/powercrystal_premium.py new file mode 100644 index 00000000..eadb333a --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_premium.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_quality.py b/scripts/loot/lootItems/powercrystal_quality.py new file mode 100644 index 00000000..eadb333a --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_quality.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/powercrystal_select.py b/scripts/loot/lootItems/powercrystal_select.py new file mode 100644 index 00000000..eadb333a --- /dev/null +++ b/scripts/loot/lootItems/powercrystal_select.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/rarelootchest1.py b/scripts/loot/lootItems/rarelootchest1.py new file mode 100644 index 00000000..a7568822 --- /dev/null +++ b/scripts/loot/lootItems/rarelootchest1.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/item/shared_rare_loot_chest_3.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/rarelootchest2.py b/scripts/loot/lootItems/rarelootchest2.py new file mode 100644 index 00000000..a7568822 --- /dev/null +++ b/scripts/loot/lootItems/rarelootchest2.py @@ -0,0 +1,8 @@ + +def itemTemplate(): + + return ['object/tangible/item/shared_rare_loot_chest_3.iff'] + +def customItemName(): + + return '' diff --git a/scripts/loot/lootItems/weapons/adjusted_cdef_rifle.py b/scripts/loot/lootItems/weapons/adjusted_cdef_rifle.py new file mode 100644 index 00000000..63bef054 --- /dev/null +++ b/scripts/loot/lootItems/weapons/adjusted_cdef_rifle.py @@ -0,0 +1,35 @@ + +def itemTemplate(): + + return ['object/weapon/ranged/rifle/shared_rifle_cdef.iff'] + +def customItemName(): + + return 'Adjusted CDEF Rifle' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def requiredCL(): + + return 10 + +def itemStats(): + + stats = ['mindamage','12','27'] + stats += ['maxdamage','48','95'] + stats += ['attackspeed','0.8','0.8'] + stats += ['maxrange','0','64'] + stats += ['damagetype','energy','energy'] + stats += ['weapontype','0','0'] + + return stats diff --git a/scripts/loot/lootItems/weapons/gaderiffi_baton.py b/scripts/loot/lootItems/weapons/gaderiffi_baton.py new file mode 100644 index 00000000..f0aa09e9 --- /dev/null +++ b/scripts/loot/lootItems/weapons/gaderiffi_baton.py @@ -0,0 +1,35 @@ + +def itemTemplate(): + + return ['object/weapon/melee/baton/shared_baton_gaderiffi.iff'] + +def customItemName(): + + return 'Gaderiffi Baton' + +def customItemStackCount(): + + return 1 + +def customizationAttributes(): + + return [] + +def customizationValues(): + + return [] + +def requiredCL(): + + return 10 + +def itemStats(): + + stats = ['mindamage','12','27'] + stats += ['maxdamage','48','95'] + stats += ['attackspeed','1.0','1.0'] + stats += ['maxrange','0','4'] + stats += ['damagetype','kinetic','kinetic'] + stats += ['weapontype','4','4'] + + return stats diff --git a/scripts/loot/lootPools/batons.py b/scripts/loot/lootPools/batons.py new file mode 100644 index 00000000..99e26d99 --- /dev/null +++ b/scripts/loot/lootPools/batons.py @@ -0,0 +1,8 @@ + +def itemNames(): + + return ['gaderiffi_baton'] + +def itemChances(): + return [100] + \ No newline at end of file diff --git a/scripts/loot/lootPools/colorcrystals.py b/scripts/loot/lootPools/colorcrystals.py new file mode 100644 index 00000000..d372b968 --- /dev/null +++ b/scripts/loot/lootPools/colorcrystals.py @@ -0,0 +1,8 @@ + +def itemNames(): + + return ['colorCrystal'] + +def itemChances(): + + return [70] \ No newline at end of file diff --git a/scripts/loot/lootPools/composite_armor.py b/scripts/loot/lootPools/composite_armor.py new file mode 100644 index 00000000..747a2995 --- /dev/null +++ b/scripts/loot/lootPools/composite_armor.py @@ -0,0 +1,10 @@ + +def itemNames(): + + items = ['composite_armor_bicep_left','composite_armor_bicep_right','composite_armor_bracer_left','composite_armor_bracer_right'] + items += ['composite_armor_chestplate','composite_armor_helmet','composite_armor_leggings','composite_armor_boots','composite_armor_gloves'] + return items + +def itemChances(): + + return [11,11,11,11,11,11,11,11,12] # = 100% \ No newline at end of file diff --git a/scripts/loot/lootPools/jediholocrons.py b/scripts/loot/lootPools/jediholocrons.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/loot/lootPools/junk.py b/scripts/loot/lootPools/junk.py new file mode 100644 index 00000000..ef757825 --- /dev/null +++ b/scripts/loot/lootPools/junk.py @@ -0,0 +1,15 @@ + +def itemNames(): + + templates=['damaged_datapad','red_wiring','worklight_generic','antenna','brain','eye','gland','heart','stomach','armor_repair_device'] #10 + templates=templates+['brain','chassis_blueprint','comlink','explosive_dud','hyperdrive_unit','id_chip','impulse_detector','laser_trap'] #8 + templates=templates+['launcher_tube','ledger','magseal_detector','medical_console','medical_device','motor','power_output_analyzer','shield_module'] #8 + templates=templates+['software_module','survival_gear','underpowered_survey_pad','unidentified_serum_vial','used_notebook','weak_droid_battery'] #6 + return templates + +def itemChances(): + chances=[3.125,3.125,3.125,3.125,3.125,3.125,3.125,3.125] + chances=chances+[3.125,3.125,3.125,3.125,3.125,3.125,3.125,3.125] + chances=chances+[3.125,3.125,3.125,3.125,3.125,3.125,3.125,3.125] + chances=chances+[3.125,3.125,3.125,3.125,3.125,3.125,3.125,3.125] + return chances #32 \ No newline at end of file diff --git a/scripts/loot/lootPools/kraytpearl_lowq.py b/scripts/loot/lootPools/kraytpearl_lowq.py new file mode 100644 index 00000000..4fe709c2 --- /dev/null +++ b/scripts/loot/lootPools/kraytpearl_lowq.py @@ -0,0 +1,8 @@ + +def itemNames(): + + return ['kraytpearl_cracked','kraytpearl_scratched','kraytpearl_poor'] + +def itemChances(): + + return [33,33,34] \ No newline at end of file diff --git a/scripts/loot/lootPools/kraytpearls_range.py b/scripts/loot/lootPools/kraytpearls_range.py new file mode 100644 index 00000000..23477840 --- /dev/null +++ b/scripts/loot/lootPools/kraytpearls_range.py @@ -0,0 +1,6 @@ + +def itemTemplates(): + return ['kraytpearl_fair','kraytpearl_good','kraytpearl_quality','kraytpearl_select','kraytpearl_premium','kraytpearl_flawless'] + +def itemChances(): + return [10,20,30,34,5,1] #= 100% \ No newline at end of file diff --git a/scripts/loot/lootPools/powercrystals_hiq.py b/scripts/loot/lootPools/powercrystals_hiq.py new file mode 100644 index 00000000..63d33a9b --- /dev/null +++ b/scripts/loot/lootPools/powercrystals_hiq.py @@ -0,0 +1,6 @@ + +def itemNames(): + return ['powercrystal_premium','powercrystal_flawless','powercrystal_perfect'] + +def itemChances(): + return [94,5,1] #= 100% \ No newline at end of file diff --git a/scripts/loot/lootPools/random_loot_rifles.py b/scripts/loot/lootPools/random_loot_rifles.py new file mode 100644 index 00000000..4992e807 --- /dev/null +++ b/scripts/loot/lootPools/random_loot_rifles.py @@ -0,0 +1,8 @@ + +def itemNames(): + + return ['adjusted_cdef_rifle'] + +def itemChances(): + return [100] + \ No newline at end of file diff --git a/scripts/loot/lootPools/rareloot.py b/scripts/loot/lootPools/rareloot.py new file mode 100644 index 00000000..435ebfce --- /dev/null +++ b/scripts/loot/lootPools/rareloot.py @@ -0,0 +1,9 @@ + + +def itemNames(): + + templates=['rarelootchest1','rarelootchest2'] + return templates + +def itemChances(): + return [70,30] \ No newline at end of file diff --git a/scripts/loot/lootPools/sithholocrons.py b/scripts/loot/lootPools/sithholocrons.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/loot/lootPools/tusken_clothing.py b/scripts/loot/lootPools/tusken_clothing.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/loot/lootPools/tusken_raider_clothing.py b/scripts/loot/lootPools/tusken_raider_clothing.py new file mode 100644 index 00000000..72762d37 --- /dev/null +++ b/scripts/loot/lootPools/tusken_raider_clothing.py @@ -0,0 +1,6 @@ + +def itemNames(): + return ['tusken_raider_dress','tusken_raider_boots','tusken_raider_gloves','tusken_raider_helmet','tusken_raider_bandolier'] + +def itemChances(): + return [20,20,20,20,20] #= 100% \ No newline at end of file diff --git a/scripts/loot/rarelootchestcontents/exceptionaltable.py b/scripts/loot/rarelootchestcontents/exceptionaltable.py new file mode 100644 index 00000000..b8c4ba4d --- /dev/null +++ b/scripts/loot/rarelootchestcontents/exceptionaltable.py @@ -0,0 +1,12 @@ + +def itemTemplates(): + templates = ['Biological_Focus_Crystal','Synapse_Focus_Crystal','Concentrated_Bacta_Tank','DNA_Storage_Device_Kowakian'] + templates = templates + ['Dug_Costume_Instructions','Dusk_in_Kachirho','Mercenaries_Despair','Mercenaries_Lament','Nightsister_Melee_Armguard'] + templates = templates + ['Rare_Painting','Sunriders_Destiny'] + return templates + +def itemChances(): + chances = [9,9,9,9] + chances = chances+[9,9,9,9,9] + chances = chances+[9,9] #= 100% + return chances \ No newline at end of file diff --git a/scripts/loot/rarelootchestcontents/legendarytable.py b/scripts/loot/rarelootchestcontents/legendarytable.py new file mode 100644 index 00000000..d372b968 --- /dev/null +++ b/scripts/loot/rarelootchestcontents/legendarytable.py @@ -0,0 +1,8 @@ + +def itemNames(): + + return ['colorCrystal'] + +def itemChances(): + + return [70] \ No newline at end of file diff --git a/scripts/loot/rarelootchestcontents/raretable.py b/scripts/loot/rarelootchestcontents/raretable.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/mobiles/canon/jedi_master.py b/scripts/mobiles/canon/jedi_master.py new file mode 100644 index 00000000..afc80223 --- /dev/null +++ b/scripts/mobiles/canon/jedi_master.py @@ -0,0 +1,41 @@ +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_jedi_sentinel_uber') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(2) + mobileTemplate.setAttackRange(6) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(9) + + 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('jedi_master', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/canon/stormtrooper.py b/scripts/mobiles/canon/stormtrooper.py new file mode 100644 index 00000000..a7a49123 --- /dev/null +++ b/scripts/mobiles/canon/stormtrooper.py @@ -0,0 +1,33 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('stormtrooper') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(24) + mobileTemplate.setAttackSpeed(1.0) + mobileTemplate.setWeaponType(0) + + templates = Vector() + templates.add('object/mobile/shared_dressed_stormtrooper_m.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/rifle/shared_rifle_e11.iff', 0, 1.0) + weaponTemplates.add(weapontemplate) + weapontemplate = WeaponTemplate('object/weapon/ranged/rifle/shared_rifle_t21.iff', 0, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShot') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('stormtrooper', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/lairgroups/naboo_starter.py b/scripts/mobiles/lairgroups/naboo_starter.py new file mode 100644 index 00000000..a046b63e --- /dev/null +++ b/scripts/mobiles/lairgroups/naboo_starter.py @@ -0,0 +1,11 @@ +import sys +from services.spawn import LairSpawnTemplate +from java.util import Vector + +def addLairGroup(core): + spawnTemplate1 = LairSpawnTemplate(-1, 'naboo_chuba_lair_neutral_small', 5, 20) + + spawnTemplates = Vector() + spawnTemplates.add(spawnTemplate1) + + core.spawnService.addLairGroup('naboo_starter', spawnTemplates) \ No newline at end of file diff --git a/scripts/mobiles/lairgroups/tatooine_starter.py b/scripts/mobiles/lairgroups/tatooine_starter.py index 63eda38c..55242c03 100644 --- a/scripts/mobiles/lairgroups/tatooine_starter.py +++ b/scripts/mobiles/lairgroups/tatooine_starter.py @@ -3,7 +3,11 @@ from services.spawn import LairSpawnTemplate from java.util import Vector def addLairGroup(core): - spawnTemplate = LairSpawnTemplate(-1, 'tatooine_kreetle_lair_neutral_small', 5, 20) + spawnTemplate1 = LairSpawnTemplate(-1, 'tatooine_kreetle_lair_neutral_small', 5, 20) + spawnTemplate2 = LairSpawnTemplate(-1, 'tatooine_womprat_lair_neutral_small', 5, 15) + spawnTemplates = Vector() - spawnTemplates.add(spawnTemplate) + #spawnTemplates.add(spawnTemplate1) + spawnTemplates.add(spawnTemplate2) + core.spawnService.addLairGroup('tatooine_starter', spawnTemplates) \ No newline at end of file diff --git a/scripts/mobiles/lairs/naboo_chuba_lair_neutral_small.py b/scripts/mobiles/lairs/naboo_chuba_lair_neutral_small.py new file mode 100644 index 00000000..ac408bdb --- /dev/null +++ b/scripts/mobiles/lairs/naboo_chuba_lair_neutral_small.py @@ -0,0 +1,4 @@ +import sys + +def addTemplate(core): + core.spawnService.addLairTemplate('naboo_chuba_lair_neutral_small', 'chuba', 15, 'object/tangible/lair/base/shared_poi_all_lair_brambles_small.iff') \ No newline at end of file diff --git a/scripts/mobiles/lairs/tatooine_womprat_lair_neutral_small.py b/scripts/mobiles/lairs/tatooine_womprat_lair_neutral_small.py new file mode 100644 index 00000000..60400598 --- /dev/null +++ b/scripts/mobiles/lairs/tatooine_womprat_lair_neutral_small.py @@ -0,0 +1,4 @@ +import sys + +def addTemplate(core): + core.spawnService.addLairTemplate('tatooine_womprat_lair_neutral_small', 'womprat', 15, 'object/tangible/lair/base/shared_poi_all_lair_brambles_small.iff') \ No newline at end of file diff --git a/scripts/mobiles/naboo/chuba.py b/scripts/mobiles/naboo/chuba.py new file mode 100644 index 00000000..085d9e77 --- /dev/null +++ b/scripts/mobiles/naboo/chuba.py @@ -0,0 +1,16 @@ +import sys +from services.spawn import MobileTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + templates = Vector() + templates.add('object/mobile/shared_chuba_hue.iff') + mobileTemplate.setCreatureName('chuba') + mobileTemplate.setTemplates(templates) + mobileTemplate.setLevel(5) + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + core.spawnService.addMobileTemplate('chuba', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/naboo/kaadu.py b/scripts/mobiles/naboo/kaadu.py new file mode 100644 index 00000000..d4e27c91 --- /dev/null +++ b/scripts/mobiles/naboo/kaadu.py @@ -0,0 +1,15 @@ +import sys +from services.spawn import MobileTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + templates = Vector() + templates.add('object/mobile/shared_kaadu_hue.iff') + mobileTemplate.setCreatureName('kaadu') + mobileTemplate.setTemplates(templates) + mobileTemplate.setLevel(14) + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + core.spawnService.addMobileTemplate('kaadu', mobileTemplate) \ No newline at end of file diff --git a/scripts/mobiles/spawnareas/keren_lair.py b/scripts/mobiles/spawnareas/keren_lair.py new file mode 100644 index 00000000..8723ee3f --- /dev/null +++ b/scripts/mobiles/spawnareas/keren_lair.py @@ -0,0 +1,6 @@ +import sys + +def addSpawnArea(core): + core.spawnService.addLairSpawnArea('naboo_starter', 1685, 2620, 1360, 'naboo') + + diff --git a/scripts/mobiles/tatooine/krayt_dragon.py b/scripts/mobiles/tatooine/krayt_dragon.py new file mode 100644 index 00000000..aded5429 --- /dev/null +++ b/scripts/mobiles/tatooine/krayt_dragon.py @@ -0,0 +1,19 @@ +import sys +from services.spawn import MobileTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + templates = Vector() + templates.add('object/mobile/shared_krayt_dragon.iff') + mobileTemplate.setTemplates(templates) + mobileTemplate.setLevel(10) + mobileTemplate.setDifficulty(2) + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + mobileTemplate.setCreatureName('krayt_dragon') + mobileTemplate.setScale(2) + mobileTemplate.setAttackRange(12) + core.spawnService.addMobileTemplate('krayt_dragon', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/tatooine/krayt_dragon_ancient.py b/scripts/mobiles/tatooine/krayt_dragon_ancient.py new file mode 100644 index 00000000..a65f6786 --- /dev/null +++ b/scripts/mobiles/tatooine/krayt_dragon_ancient.py @@ -0,0 +1,19 @@ +import sys +from services.spawn import MobileTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + templates = Vector() + templates.add('object/mobile/shared_krayt_dragon.iff') + mobileTemplate.setTemplates(templates) + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(2) + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + mobileTemplate.setCreatureName('krayt_dragon_ancient') + mobileTemplate.setScale(2) + mobileTemplate.setAttackRange(12) + core.spawnService.addMobileTemplate('krayt_dragon_ancient', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/tatooine/kreetle.py b/scripts/mobiles/tatooine/kreetle.py new file mode 100644 index 00000000..ec037bd4 --- /dev/null +++ b/scripts/mobiles/tatooine/kreetle.py @@ -0,0 +1,16 @@ +import sys +from services.spawn import MobileTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + templates = Vector() + templates.add('object/mobile/shared_kreetle.iff') + mobileTemplate.setCreatureName('kreetle') + mobileTemplate.setTemplates(templates) + mobileTemplate.setLevel(5) + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + core.spawnService.addMobileTemplate('kreetle', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/tatooine/tusken_raider.py b/scripts/mobiles/tatooine/tusken_raider.py new file mode 100644 index 00000000..41542293 --- /dev/null +++ b/scripts/mobiles/tatooine/tusken_raider.py @@ -0,0 +1,28 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('tusken_raider') + mobileTemplate.setLevel(10) + mobileTemplate.setDifficulty(1) + mobileTemplate.setAttackRange(24) + + templates = Vector() + templates.add('object/mobile/shared_tusken_raider.iff') + mobileTemplate.setTemplates(templates) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/ranged/rifle/shared_rifle_tusken.iff', 0, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + + attacks = Vector() + mobileTemplate.setDefaultAttack('rangedShot') + mobileTemplate.setAttacks(attacks) + + core.spawnService.addMobileTemplate('tusken_raider', mobileTemplate) + \ No newline at end of file diff --git a/scripts/mobiles/tatooine/womprat.py b/scripts/mobiles/tatooine/womprat.py new file mode 100644 index 00000000..836d9922 --- /dev/null +++ b/scripts/mobiles/tatooine/womprat.py @@ -0,0 +1,16 @@ +import sys +from services.spawn import MobileTemplate +from java.util import Vector + +def addTemplate(core): + mobileTemplate = MobileTemplate() + templates = Vector() + templates.add('object/mobile/shared_womp_rat.iff') + mobileTemplate.setCreatureName('womprat') + mobileTemplate.setTemplates(templates) + mobileTemplate.setLevel(5) + attacks = Vector() + mobileTemplate.setDefaultAttack('creatureMeleeAttack') + mobileTemplate.setAttacks(attacks) + core.spawnService.addMobileTemplate('womprat', mobileTemplate) + \ No newline at end of file diff --git a/scripts/object/building/military/outpost_cloning_facility.py b/scripts/object/building/military/outpost_cloning_facility.py index c3d8cb98..e9fd684a 100644 --- a/scripts/object/building/military/outpost_cloning_facility.py +++ b/scripts/object/building/military/outpost_cloning_facility.py @@ -4,10 +4,10 @@ from resources.common import SpawnPoint def setup(core, object): objSvc = core.objectService - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(0.0387871), float(0.125265), float(-6), float(-0.0595427), float(0.998226), 3) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(0.04), float(0.16), float(-6), float(-0.06), float(0.99), 3) spawnPoints = Vector() - spawnPoints.add(SpawnPoint(3.2408, 0.125266, -3.59732, 0.707641, -0.706572, 5)) + spawnPoints.add(SpawnPoint(3.24, 0.16, -3.60, 0.71, -0.71, 5)) object.setAttachment('spawnPoints', spawnPoints) diff --git a/scripts/object/building/military/outpost_cloning_facility_s02.py b/scripts/object/building/military/outpost_cloning_facility_s02.py index b77dca9b..bcea9348 100644 --- a/scripts/object/building/military/outpost_cloning_facility_s02.py +++ b/scripts/object/building/military/outpost_cloning_facility_s02.py @@ -4,12 +4,12 @@ from resources.common import SpawnPoint def setup(core, object): objSvc = core.objectService - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(-5.5), float(0.125265), float(-3.43841), float(0.699512), float(0.714621), 6) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(-5.5), float(0.13), float(-3.44), float(0.70), float(0.71), 6) spawnPoints = Vector() - spawnPoints.add(SpawnPoint(4.44727, 0.125266, -3.80136, -0.706468, 0.707745, 5)) - spawnPoints.add(SpawnPoint(4.65395, 0.125266, 1.49466, 0.714548, -0.699587, 4)) - spawnPoints.add(SpawnPoint(-3.99569, 0.125266, -3.51553, 0.70407, 0.710131, 6)) + spawnPoints.add(SpawnPoint(4.45, 0.13, -3.80, -0.71, 0.71, 5)) + spawnPoints.add(SpawnPoint(4.65, 0.13, 1.50, 0.71, -0.70, 4)) + spawnPoints.add(SpawnPoint(-3.99, 0.13, -3.52, 0.70, 0.71, 6)) object.setAttachment('spawnPoints', spawnPoints) diff --git a/scripts/object/building/military/outpost_starport.py b/scripts/object/building/military/outpost_starport.py index 22ca3e75..b0e8b915 100644 --- a/scripts/object/building/military/outpost_starport.py +++ b/scripts/object/building/military/outpost_starport.py @@ -2,9 +2,9 @@ import sys def setup(core, object): objSvc = core.objectService - objSvc.createChildObject(object, 'object/creature/npc/theme_park/shared_player_transport.iff', 0, 7, 0, 0.707107, 0.707107) + objSvc.createChildObject(object, 'object/creature/npc/theme_park/shared_player_transport.iff', 0, 7, 0, 0.71, 0.71) objSvc.createChildObject(object, 'object/tangible/travel/ticket_collector/shared_ticket_collector.iff', 1, 0, -10, 0, 1) - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-3.12), float(0.14659503), float(-17.57), float(0.707107), float(-0.707107), 1) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-3.12), float(0.15), float(-17.57), float(0.71), float(-0.71), 1) core.mapService.addLocation(object.getPlanet(), 'Starport', object.getPosition().x, object.getPosition().z, 15, 0, 0) return \ No newline at end of file diff --git a/scripts/object/building/naboo/cloning_facility_naboo.py b/scripts/object/building/naboo/cloning_facility_naboo.py index 76288df2..91cb87d3 100644 --- a/scripts/object/building/naboo/cloning_facility_naboo.py +++ b/scripts/object/building/naboo/cloning_facility_naboo.py @@ -8,13 +8,13 @@ def setup(core, object): objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_cloning.iff', float(1), float(-0.05), float(-1.35), float(1), float(0), 2) spawnPoints = Vector() - spawnPoints.add(SpawnPoint(-16.6514, -4.29167, -10.4976, 0.709453, 0.704753, 4)) - spawnPoints.add(SpawnPoint(-16.5965, -4.29167, -14.1652, 0.721346, 0.692575, 4)) - spawnPoints.add(SpawnPoint(16.5771, -4.29167, -14.2091, 0.71195, -0.702231, 4)) - spawnPoints.add(SpawnPoint(16.6876, -4.29167, -10.5391, -0.6972, 0.716877, 4)) - spawnPoints.add(SpawnPoint(6.32992, -4.79167, 0.613332, 0.999992, 0.00405023, 4)) - spawnPoints.add(SpawnPoint(1.58067, -4.79167, 0.582775, 0.989691, 0.0143216, 4)) - spawnPoints.add(SpawnPoint(-2.84125, -4.79167, 0.657588, -0.0356012, 0.999366, 4)) + spawnPoints.add(SpawnPoint(-16.66, -4.29, -10.50, 0.71, 0.70, 4)) + spawnPoints.add(SpawnPoint(-16.60, -4.29, -14.17, 0.72, 0.69, 4)) + spawnPoints.add(SpawnPoint(16.58, -4.29, -14.21, 0.71, -0.70, 4)) + spawnPoints.add(SpawnPoint(16.69, -4.29, -10.54, -0.70, 0.72, 4)) + spawnPoints.add(SpawnPoint(6.33, -4.79, 0.61, 0.99, 0.01, 4)) + spawnPoints.add(SpawnPoint(1.58, -4.79, 0.58, 0.99, 0.01, 4)) + spawnPoints.add(SpawnPoint(-2.84, -4.79, 0.66, -0.04, 0.99, 4)) object.setAttachment('spawnPoints', spawnPoints) diff --git a/scripts/object/building/naboo/hangar_naboo_theed.py b/scripts/object/building/naboo/hangar_naboo_theed.py index 41cc6f5c..79a247e9 100644 --- a/scripts/object/building/naboo/hangar_naboo_theed.py +++ b/scripts/object/building/naboo/hangar_naboo_theed.py @@ -3,12 +3,12 @@ import sys def setup(core, object): objSvc = core.objectService - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-26.94), float(0.749), float(-67.14), float(1), float(0), 3) - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(26.94), float(0.749), float(-67.14), float(1), float(0), 4) - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-9.49), float(7.979), float(-45.2359), float(0), float(1), 5) - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(9.49), float(7.979), float(-45.2359), float(0), float(1), 5) - objSvc.createChildObject(object, 'object/tangible/travel/ticket_collector/shared_ticket_collector.iff', float(-10), float(7.979), float(10), float(-0.707107), float(0.707107), 5) - objSvc.createChildObject(object, 'object/creature/npc/theme_park/shared_player_transport_theed_hangar.iff', float(0), float(7.979), float(0), float(1), float(1), 5) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-26.94), float(0.75), float(-67.14), float(1), float(0), 3) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(26.94), float(0.75), float(-67.14), float(1), float(0), 4) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-9.49), float(7.98), float(-45.24), float(0), float(1), 5) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(9.49), float(7.98), float(-45.24), float(0), float(1), 5) + objSvc.createChildObject(object, 'object/tangible/travel/ticket_collector/shared_ticket_collector.iff', float(-10), float(7.98), float(10), float(-0.71), float(0.71), 5) + objSvc.createChildObject(object, 'object/creature/npc/theme_park/shared_player_transport_theed_hangar.iff', float(0), float(7.98), float(0), float(1), float(1), 5) core.mapService.addLocation(object.getPlanet(), 'Starport', object.getPosition().x, object.getPosition().z, 15, 0, 0) diff --git a/scripts/object/building/naboo/starport_naboo.py b/scripts/object/building/naboo/starport_naboo.py index bfb384c6..e66e8bf2 100644 --- a/scripts/object/building/naboo/starport_naboo.py +++ b/scripts/object/building/naboo/starport_naboo.py @@ -2,12 +2,12 @@ import sys def setup(core, object): objSvc = core.objectService - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(11.5), float(0.6), float(51.3), float(0.195405), float(-0.980722), 4) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(11.5), float(0.6), float(51.3), float(0.20), float(-0.98), 4) objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(3.1), float(0.6), float(49), float(0), float(1), 4) objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-2.7), float(0.6), float(49), float(0), float(1), 4) - objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-13.2), float(0.6), float(51.3), float(-0.195405), float(-0.980722), 4) + objSvc.createChildObject(object, 'object/tangible/terminal/shared_terminal_travel.iff', float(-13.2), float(0.6), float(51.3), float(-0.20), float(-0.98), 4) objSvc.createChildObject(object, 'object/creature/npc/theme_park/shared_player_transport.iff', 0, 0, 0, 1, 0) - objSvc.createChildObject(object, 'object/tangible/travel/ticket_collector/shared_ticket_collector.iff', 10, 0, -10, 0.707107, 0.707107) + objSvc.createChildObject(object, 'object/tangible/travel/ticket_collector/shared_ticket_collector.iff', 10, 0, -10, 0.71, 0.71) core.mapService.addLocation(object.getPlanet(), 'Starport', object.getPosition().x, object.getPosition().z, 15, 0, 0) return \ No newline at end of file diff --git a/scripts/object/building/player/player_house_corellia_small_style_01.py b/scripts/object/building/player/player_house_corellia_small_style_01.py index ccad8904..6e0ae61d 100644 --- a/scripts/object/building/player/player_house_corellia_small_style_01.py +++ b/scripts/object/building/player/player_house_corellia_small_style_01.py @@ -1,4 +1,11 @@ import sys def setup(core, object): + sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -7.39, 2.36, 2, -1, 0, -1) + print(sign) + object.setAttachment("structureSign", sign) + + structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', -5, 0.74, -1.81, 0.707107, -0.707107, 1) + #structureterminal.setAttachment('radial_filename', 'structure_management_terminal') + structureterminal.setAttachment('housing_parentstruct', object) return \ No newline at end of file diff --git a/scripts/object/building/player/player_house_corellia_small_style_01_floorplan_02.py b/scripts/object/building/player/player_house_corellia_small_style_01_floorplan_02.py index ccad8904..6e0ae61d 100644 --- a/scripts/object/building/player/player_house_corellia_small_style_01_floorplan_02.py +++ b/scripts/object/building/player/player_house_corellia_small_style_01_floorplan_02.py @@ -1,4 +1,11 @@ import sys def setup(core, object): + sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -7.39, 2.36, 2, -1, 0, -1) + print(sign) + object.setAttachment("structureSign", sign) + + structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', -5, 0.74, -1.81, 0.707107, -0.707107, 1) + #structureterminal.setAttachment('radial_filename', 'structure_management_terminal') + structureterminal.setAttachment('housing_parentstruct', object) return \ No newline at end of file diff --git a/scripts/object/building/player/player_house_corellia_small_style_02.py b/scripts/object/building/player/player_house_corellia_small_style_02.py index ccad8904..d301f713 100644 --- a/scripts/object/building/player/player_house_corellia_small_style_02.py +++ b/scripts/object/building/player/player_house_corellia_small_style_02.py @@ -1,4 +1,11 @@ import sys def setup(core, object): + sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -1.9, 2.86, 8.35, -1, 0, -1) + print(sign) + object.setAttachment("structureSign", sign) + + structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', 6.5, 0.5, -3.8, 0.707108, -0.707108, 3) + #structureterminal.setAttachment('radial_filename', 'structure_management_terminal') + structureterminal.setAttachment('housing_parentstruct', object) return \ No newline at end of file diff --git a/scripts/object/building/player/player_house_corellia_small_style_02_floorplan_02.py b/scripts/object/building/player/player_house_corellia_small_style_02_floorplan_02.py index ccad8904..faba7813 100644 --- a/scripts/object/building/player/player_house_corellia_small_style_02_floorplan_02.py +++ b/scripts/object/building/player/player_house_corellia_small_style_02_floorplan_02.py @@ -1,4 +1,11 @@ import sys def setup(core, object): + sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -1.9, 2.86, 8.35, -1, 0, -1) + print(sign) + object.setAttachment("structureSign", sign) + + structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', 6.5, 0.5, -3.8, 0.707108, -0.707108, 2) + #structureterminal.setAttachment('radial_filename', 'structure_management_terminal') + structureterminal.setAttachment('housing_parentstruct', object) return \ No newline at end of file diff --git a/scripts/object/building/player/player_house_generic_small_style_01.py b/scripts/object/building/player/player_house_generic_small_style_01.py index ccad8904..aa9723bd 100644 --- a/scripts/object/building/player/player_house_generic_small_style_01.py +++ b/scripts/object/building/player/player_house_generic_small_style_01.py @@ -1,4 +1,11 @@ import sys def setup(core, object): + sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -7.39, 2.36, 2, -1, 0, -1) + print(sign) + object.setAttachment("structureSign", sign) + + structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', -5, 0.74, -1.81, 0.707107, -0.707107, 1) + #structureterminal.setAttachment('radial_filename', 'structure/structure_management_terminal') + structureterminal.setAttachment('housing_parentstruct', object) return \ No newline at end of file diff --git a/scripts/object/building/player/player_house_generic_small_style_01_floorplan_02.py b/scripts/object/building/player/player_house_generic_small_style_01_floorplan_02.py index ccad8904..6e0ae61d 100644 --- a/scripts/object/building/player/player_house_generic_small_style_01_floorplan_02.py +++ b/scripts/object/building/player/player_house_generic_small_style_01_floorplan_02.py @@ -1,4 +1,11 @@ import sys def setup(core, object): + sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -7.39, 2.36, 2, -1, 0, -1) + print(sign) + object.setAttachment("structureSign", sign) + + structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', -5, 0.74, -1.81, 0.707107, -0.707107, 1) + #structureterminal.setAttachment('radial_filename', 'structure_management_terminal') + structureterminal.setAttachment('housing_parentstruct', object) return \ No newline at end of file diff --git a/scripts/object/building/player/player_house_generic_small_style_02.py b/scripts/object/building/player/player_house_generic_small_style_02.py index ccad8904..d301f713 100644 --- a/scripts/object/building/player/player_house_generic_small_style_02.py +++ b/scripts/object/building/player/player_house_generic_small_style_02.py @@ -1,4 +1,11 @@ import sys def setup(core, object): + sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -1.9, 2.86, 8.35, -1, 0, -1) + print(sign) + object.setAttachment("structureSign", sign) + + structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', 6.5, 0.5, -3.8, 0.707108, -0.707108, 3) + #structureterminal.setAttachment('radial_filename', 'structure_management_terminal') + structureterminal.setAttachment('housing_parentstruct', object) return \ No newline at end of file diff --git a/scripts/object/creature/player/bothan_female.py b/scripts/object/creature/player/bothan_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/bothan_female.py +++ b/scripts/object/creature/player/bothan_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/bothan_male.py b/scripts/object/creature/player/bothan_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/bothan_male.py +++ b/scripts/object/creature/player/bothan_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/human_female.py b/scripts/object/creature/player/human_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/human_female.py +++ b/scripts/object/creature/player/human_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/human_male.py b/scripts/object/creature/player/human_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/human_male.py +++ b/scripts/object/creature/player/human_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/ithorian_female.py b/scripts/object/creature/player/ithorian_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/ithorian_female.py +++ b/scripts/object/creature/player/ithorian_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/ithorian_male.py b/scripts/object/creature/player/ithorian_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/ithorian_male.py +++ b/scripts/object/creature/player/ithorian_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/moncal_female.py b/scripts/object/creature/player/moncal_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/moncal_female.py +++ b/scripts/object/creature/player/moncal_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/moncal_male.py b/scripts/object/creature/player/moncal_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/moncal_male.py +++ b/scripts/object/creature/player/moncal_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/rodian_female.py b/scripts/object/creature/player/rodian_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/rodian_female.py +++ b/scripts/object/creature/player/rodian_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/rodian_male.py b/scripts/object/creature/player/rodian_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/rodian_male.py +++ b/scripts/object/creature/player/rodian_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/sullustan_female.py b/scripts/object/creature/player/sullustan_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/sullustan_female.py +++ b/scripts/object/creature/player/sullustan_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/sullustan_male.py b/scripts/object/creature/player/sullustan_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/sullustan_male.py +++ b/scripts/object/creature/player/sullustan_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/trandoshan_female.py b/scripts/object/creature/player/trandoshan_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/trandoshan_female.py +++ b/scripts/object/creature/player/trandoshan_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/trandoshan_male.py b/scripts/object/creature/player/trandoshan_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/trandoshan_male.py +++ b/scripts/object/creature/player/trandoshan_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/twilek_female.py b/scripts/object/creature/player/twilek_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/twilek_female.py +++ b/scripts/object/creature/player/twilek_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/twilek_male.py b/scripts/object/creature/player/twilek_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/twilek_male.py +++ b/scripts/object/creature/player/twilek_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/wookiee_female.py b/scripts/object/creature/player/wookiee_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/wookiee_female.py +++ b/scripts/object/creature/player/wookiee_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/wookiee_male.py b/scripts/object/creature/player/wookiee_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/wookiee_male.py +++ b/scripts/object/creature/player/wookiee_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/zabrak_female.py b/scripts/object/creature/player/zabrak_female.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/zabrak_female.py +++ b/scripts/object/creature/player/zabrak_female.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/creature/player/zabrak_male.py b/scripts/object/creature/player/zabrak_male.py index ccad8904..a77a99e7 100644 --- a/scripts/object/creature/player/zabrak_male.py +++ b/scripts/object/creature/player/zabrak_male.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'creature/player') return \ No newline at end of file diff --git a/scripts/object/installation/generators/power_generator_fusion_style_1.py b/scripts/object/installation/generators/power_generator_fusion_style_1.py index ccad8904..3b0b69aa 100644 --- a/scripts/object/installation/generators/power_generator_fusion_style_1.py +++ b/scripts/object/installation/generators/power_generator_fusion_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/generator') + object.setHarvester_type(5) + object.setMaintenanceCost(30) + object.setGenerator(1) return \ No newline at end of file diff --git a/scripts/object/installation/generators/power_generator_geothermal_style_1.py b/scripts/object/installation/generators/power_generator_geothermal_style_1.py index ccad8904..3b0b69aa 100644 --- a/scripts/object/installation/generators/power_generator_geothermal_style_1.py +++ b/scripts/object/installation/generators/power_generator_geothermal_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/generator') + object.setHarvester_type(5) + object.setMaintenanceCost(30) + object.setGenerator(1) return \ No newline at end of file diff --git a/scripts/object/installation/generators/power_generator_photo_bio_style_1.py b/scripts/object/installation/generators/power_generator_photo_bio_style_1.py index ccad8904..3b0b69aa 100644 --- a/scripts/object/installation/generators/power_generator_photo_bio_style_1.py +++ b/scripts/object/installation/generators/power_generator_photo_bio_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/generator') + object.setHarvester_type(5) + object.setMaintenanceCost(30) + object.setGenerator(1) return \ No newline at end of file diff --git a/scripts/object/installation/generators/power_generator_solar_style_1.py b/scripts/object/installation/generators/power_generator_solar_style_1.py index ccad8904..3b0b69aa 100644 --- a/scripts/object/installation/generators/power_generator_solar_style_1.py +++ b/scripts/object/installation/generators/power_generator_solar_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/generator') + object.setHarvester_type(5) + object.setMaintenanceCost(30) + object.setGenerator(1) return \ No newline at end of file diff --git a/scripts/object/installation/generators/power_generator_wind_style_1.py b/scripts/object/installation/generators/power_generator_wind_style_1.py index ccad8904..0c7bc05c 100644 --- a/scripts/object/installation/generators/power_generator_wind_style_1.py +++ b/scripts/object/installation/generators/power_generator_wind_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/generator') + object.setHarvester_type(5) + object.setMaintenanceCost(20) + object.setGenerator(1) return \ No newline at end of file diff --git a/scripts/object/installation/mining_gas/mining_gas_harvester_style_1.py b/scripts/object/installation/mining_gas/mining_gas_harvester_style_1.py index ccad8904..6b49d930 100644 --- a/scripts/object/installation/mining_gas/mining_gas_harvester_style_1.py +++ b/scripts/object/installation/mining_gas/mining_gas_harvester_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(3) + object.setPowerCost(25); + object.setMaintenanceCost(16); return \ No newline at end of file diff --git a/scripts/object/installation/mining_gas/mining_gas_harvester_style_2.py b/scripts/object/installation/mining_gas/mining_gas_harvester_style_2.py index ccad8904..7a6f2b77 100644 --- a/scripts/object/installation/mining_gas/mining_gas_harvester_style_2.py +++ b/scripts/object/installation/mining_gas/mining_gas_harvester_style_2.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(3) + object.setPowerCost(60); + object.setMaintenanceCost(60); return \ No newline at end of file diff --git a/scripts/object/installation/mining_gas/mining_gas_harvester_style_3.py b/scripts/object/installation/mining_gas/mining_gas_harvester_style_3.py index ccad8904..36a2c41e 100644 --- a/scripts/object/installation/mining_gas/mining_gas_harvester_style_3.py +++ b/scripts/object/installation/mining_gas/mining_gas_harvester_style_3.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(3) + object.setPowerCost(75); + object.setMaintenanceCost(90); return \ No newline at end of file diff --git a/scripts/object/installation/mining_gas/mining_gas_harvester_style_4.py b/scripts/object/installation/mining_gas/mining_gas_harvester_style_4.py index ccad8904..93f4bfec 100644 --- a/scripts/object/installation/mining_gas/mining_gas_harvester_style_4.py +++ b/scripts/object/installation/mining_gas/mining_gas_harvester_style_4.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(3) + object.setPowerCost(100); + object.setMaintenanceCost(120); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_1.py b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_1.py index ccad8904..f8ad23ca 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_1.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(1) + object.setPowerCost(25); + object.setMaintenanceCost(16); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_2.py b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_2.py index ccad8904..346183c1 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_2.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_2.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(1) + object.setPowerCost(60); + object.setMaintenanceCost(60); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_3.py b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_3.py index ccad8904..c1ad33db 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_3.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_3.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(1) + object.setPowerCost(75); + object.setMaintenanceCost(90); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_4.py b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_4.py index ccad8904..a394e5ce 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_4.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_harvester_style_4.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(1) + object.setPowerCost(100); + object.setMaintenanceCost(120); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester.py b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester.py index ccad8904..3905b4c0 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(4) + object.setPowerCost(25); + object.setMaintenanceCost(16); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_elite.py b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_elite.py index ccad8904..ae69d03d 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_elite.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_elite.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(4) + object.setPowerCost(100); + object.setMaintenanceCost(120); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_heavy.py b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_heavy.py index ccad8904..499bd036 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_heavy.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_heavy.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(4) + object.setPowerCost(75); + object.setMaintenanceCost(90); return \ No newline at end of file diff --git a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_medium.py b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_medium.py index ccad8904..4962e477 100644 --- a/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_medium.py +++ b/scripts/object/installation/mining_liquid/mining_liquid_moisture_harvester_medium.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(4) + object.setPowerCost(60); + object.setMaintenanceCost(60); return \ No newline at end of file diff --git a/scripts/object/installation/mining_ore/mining_ore_harvester_elite.py b/scripts/object/installation/mining_ore/mining_ore_harvester_elite.py index ccad8904..daafe847 100644 --- a/scripts/object/installation/mining_ore/mining_ore_harvester_elite.py +++ b/scripts/object/installation/mining_ore/mining_ore_harvester_elite.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(0) + object.setPowerCost(100); + object.setMaintenanceCost(120); return \ No newline at end of file diff --git a/scripts/object/installation/mining_ore/mining_ore_harvester_heavy.py b/scripts/object/installation/mining_ore/mining_ore_harvester_heavy.py index ccad8904..02cad7c2 100644 --- a/scripts/object/installation/mining_ore/mining_ore_harvester_heavy.py +++ b/scripts/object/installation/mining_ore/mining_ore_harvester_heavy.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(0) + object.setPowerCost(75); + object.setMaintenanceCost(90); return \ No newline at end of file diff --git a/scripts/object/installation/mining_ore/mining_ore_harvester_style_1.py b/scripts/object/installation/mining_ore/mining_ore_harvester_style_1.py index ccad8904..7a6fdae5 100644 --- a/scripts/object/installation/mining_ore/mining_ore_harvester_style_1.py +++ b/scripts/object/installation/mining_ore/mining_ore_harvester_style_1.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(0) + object.setPowerCost(25); + object.setMaintenanceCost(16); return \ No newline at end of file diff --git a/scripts/object/installation/mining_ore/mining_ore_harvester_style_2.py b/scripts/object/installation/mining_ore/mining_ore_harvester_style_2.py index ccad8904..76358940 100644 --- a/scripts/object/installation/mining_ore/mining_ore_harvester_style_2.py +++ b/scripts/object/installation/mining_ore/mining_ore_harvester_style_2.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(0) + object.setPowerCost(60); + object.setMaintenanceCost(60); return \ No newline at end of file diff --git a/scripts/object/installation/mining_organic/mining_organic_flora_farm.py b/scripts/object/installation/mining_organic/mining_organic_flora_farm.py index ccad8904..714ccd97 100644 --- a/scripts/object/installation/mining_organic/mining_organic_flora_farm.py +++ b/scripts/object/installation/mining_organic/mining_organic_flora_farm.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(2) + object.setPowerCost(25); + object.setMaintenanceCost(16); return \ No newline at end of file diff --git a/scripts/object/installation/mining_organic/mining_organic_flora_farm_elite.py b/scripts/object/installation/mining_organic/mining_organic_flora_farm_elite.py index ccad8904..71580f57 100644 --- a/scripts/object/installation/mining_organic/mining_organic_flora_farm_elite.py +++ b/scripts/object/installation/mining_organic/mining_organic_flora_farm_elite.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(2) + object.setPowerCost(100); + object.setMaintenanceCost(120); return \ No newline at end of file diff --git a/scripts/object/installation/mining_organic/mining_organic_flora_farm_heavy.py b/scripts/object/installation/mining_organic/mining_organic_flora_farm_heavy.py index ccad8904..dbd32ee3 100644 --- a/scripts/object/installation/mining_organic/mining_organic_flora_farm_heavy.py +++ b/scripts/object/installation/mining_organic/mining_organic_flora_farm_heavy.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(2) + object.setPowerCost(60); + object.setMaintenanceCost(60); return \ No newline at end of file diff --git a/scripts/object/installation/mining_organic/mining_organic_flora_farm_medium.py b/scripts/object/installation/mining_organic/mining_organic_flora_farm_medium.py index ccad8904..dbd32ee3 100644 --- a/scripts/object/installation/mining_organic/mining_organic_flora_farm_medium.py +++ b/scripts/object/installation/mining_organic/mining_organic_flora_farm_medium.py @@ -1,4 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/harvester') + object.setHarvester_type(2) + object.setPowerCost(60); + object.setMaintenanceCost(60); return \ No newline at end of file diff --git a/scripts/object/intangible/vehicle/barc_speeder_pcd.py b/scripts/object/intangible/vehicle/barc_speeder_pcd.py index ccad8904..e9fa1234 100644 --- a/scripts/object/intangible/vehicle/barc_speeder_pcd.py +++ b/scripts/object/intangible/vehicle/barc_speeder_pcd.py @@ -1,4 +1,15 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'vehicle_pcd') + return + +def use(core, actor, object): + if object and actor.getAttachment('activeVehicleID') == None: + barc = core.objectService.createObject('object/mobile/vehicle/shared_barc_speeder.iff', 0, actor.getPlanet(), actor.getPosition(), actor.getOrientation()) + + barc.setOwnerId(actor.getObjectID()) + actor.setAttachment('activeVehicleID', barc.getObjectID()) + + core.simulationService.add(barc, barc.getPosition().x, barc.getPosition().z, True) return \ No newline at end of file diff --git a/scripts/object/intangible/vehicle/landspeeder_tantive4_pcd.py b/scripts/object/intangible/vehicle/landspeeder_tantive4_pcd.py index ccad8904..ff8849f4 100644 --- a/scripts/object/intangible/vehicle/landspeeder_tantive4_pcd.py +++ b/scripts/object/intangible/vehicle/landspeeder_tantive4_pcd.py @@ -1,4 +1,15 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'vehicle_pcd') + return + +def use(core, actor, object): + if object and actor.getAttachment('activeVehicleID') == None: + tantive4 = core.objectService.createObject('object/mobile/vehicle/shared_landspeeder_tantive4.iff', 0, actor.getPlanet(), actor.getPosition(), actor.getOrientation()) + + tantive4.setOwnerId(actor.getObjectID()) + actor.setAttachment('activeVehicleID', tantive4.getObjectID()) + + core.simulationService.add(tantive4, tantive4.getPosition().x, tantive4.getPosition().z, True) return \ No newline at end of file diff --git a/scripts/object/intangible/vehicle/speederbike_swoop_pcd.py b/scripts/object/intangible/vehicle/speederbike_swoop_pcd.py index 94a561f7..d7c3f4a1 100644 --- a/scripts/object/intangible/vehicle/speederbike_swoop_pcd.py +++ b/scripts/object/intangible/vehicle/speederbike_swoop_pcd.py @@ -1,23 +1,5 @@ import sys def setup(core, object): - object.setAttachment('vehicleId', core.objectService.generateObjectID()) - object.setAttachment('radial_filename', 'item') - return - -def use(core, actor, object): - if object: - vehicleId = object.getAttachment('vehicleId') - - if not vehicleId: - return - - vehicle = core.objectService.getObject(vehicleId) - - if vehicle: - core.objectService.destroyObject(vehicle) - else: - core.objectService.createObject('object/mobile/vehicles/shared_speederbike_swoop.iff', vehicleId, actor.getPlanet(), actor.getPosition(), actor.getOrientation()) - core.simulationService.add(vehicle, vehicle.getPosition().x, vehicle.getPosition().z, True) - + object.setAttachment('radial_filename', 'datapad/vehicle_pcd') return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_female_twk_01.py b/scripts/object/mobile/dressed_dark_jedi_master_female_twk_01.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_female_twk_01.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_female_twk_01.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_female_twk_02.py b/scripts/object/mobile/dressed_dark_jedi_master_female_twk_02.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_female_twk_02.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_female_twk_02.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_female_zab_01.py b/scripts/object/mobile/dressed_dark_jedi_master_female_zab_01.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_female_zab_01.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_female_zab_01.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_female_zab_02.py b/scripts/object/mobile/dressed_dark_jedi_master_female_zab_02.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_female_zab_02.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_female_zab_02.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_male_human_01.py b/scripts/object/mobile/dressed_dark_jedi_master_male_human_01.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_male_human_01.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_male_human_01.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_male_human_02.py b/scripts/object/mobile/dressed_dark_jedi_master_male_human_02.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_male_human_02.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_male_human_02.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_male_human_03.py b/scripts/object/mobile/dressed_dark_jedi_master_male_human_03.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_male_human_03.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_male_human_03.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_male_human_04.py b/scripts/object/mobile/dressed_dark_jedi_master_male_human_04.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_male_human_04.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_male_human_04.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_male_human_05.py b/scripts/object/mobile/dressed_dark_jedi_master_male_human_05.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_male_human_05.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_male_human_05.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_dark_jedi_master_male_human_06.py b/scripts/object/mobile/dressed_dark_jedi_master_male_human_06.py index ccad8904..58245dfb 100644 --- a/scripts/object/mobile/dressed_dark_jedi_master_male_human_06.py +++ b/scripts/object/mobile/dressed_dark_jedi_master_male_human_06.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['powercrystals_hiq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_stormtrooper_m.py b/scripts/object/mobile/dressed_stormtrooper_m.py index ccad8904..6e1e28ee 100644 --- a/scripts/object/mobile/dressed_stormtrooper_m.py +++ b/scripts/object/mobile/dressed_stormtrooper_m.py @@ -1,4 +1,20 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 90 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['composite_armor','random_loot_rifles'] + lootPoolChances_2 = [50,50] + lootGroupChance_2 = 20 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + lootPoolNames_3 = ['Colorcrystals'] + lootPoolChances_3 = [100] + lootGroupChance_3 = 6 + object.addToLootGroups(lootPoolNames_3,lootPoolChances_3,lootGroupChance_3) + + return \ No newline at end of file diff --git a/scripts/object/mobile/krayt_dragon.py b/scripts/object/mobile/krayt_dragon.py index ccad8904..e023f206 100644 --- a/scripts/object/mobile/krayt_dragon.py +++ b/scripts/object/mobile/krayt_dragon.py @@ -1,4 +1,15 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 65 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['kraytpearl_lowq'] + lootPoolChances_2 = [100] + lootGroupChance_2 = 85 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + return \ No newline at end of file diff --git a/scripts/object/mobile/respec_seller_f_1.py b/scripts/object/mobile/respec_seller_f_1.py index ccad8904..c7327815 100644 --- a/scripts/object/mobile/respec_seller_f_1.py +++ b/scripts/object/mobile/respec_seller_f_1.py @@ -1,4 +1,7 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation') + object.setAttachment('conversationFile', 'respec') return \ No newline at end of file diff --git a/scripts/object/mobile/tusken_raider.py b/scripts/object/mobile/tusken_raider.py index ccad8904..2d06ec85 100644 --- a/scripts/object/mobile/tusken_raider.py +++ b/scripts/object/mobile/tusken_raider.py @@ -1,4 +1,25 @@ import sys def setup(core, object): - return \ No newline at end of file + + lootPoolNames_1 = ['Junk'] + lootPoolChances_1 = [100] + lootGroupChance_1 = 90 + object.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1) + + lootPoolNames_2 = ['batons','random_loot_rifles',] + lootPoolChances_2 = [60,40] + lootGroupChance_2 = 20 + object.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2) + + lootPoolNames_3 = ['tusken_raider_clothing'] + lootPoolChances_3 = [100] + lootGroupChance_3 = 10 + object.addToLootGroups(lootPoolNames_3,lootPoolChances_3,lootGroupChance_3) + + lootPoolNames_4 = ['Colorcrystals'] + lootPoolChances_4 = [100] + lootGroupChance_4 = 6 + object.addToLootGroups(lootPoolNames_4,lootPoolChances_4,lootGroupChance_4) + + return \ No newline at end of file diff --git a/scripts/object/mobile/vehicle/barc_speeder.py b/scripts/object/mobile/vehicle/barc_speeder.py index ccad8904..4626c764 100644 --- a/scripts/object/mobile/vehicle/barc_speeder.py +++ b/scripts/object/mobile/vehicle/barc_speeder.py @@ -1,4 +1,16 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'vehicle') + return + +def use(core, actor, object): + vehicle = actor.getContainer() + + if vehicle: + if vehicle.getObjectID() == object.getObjectID(): + vehicle.remove(actor) + else: + vehicle.add(actor) + return \ No newline at end of file diff --git a/scripts/object/mobile/vehicle/landspeeder_tantive4.py b/scripts/object/mobile/vehicle/landspeeder_tantive4.py index ccad8904..1e2994c6 100644 --- a/scripts/object/mobile/vehicle/landspeeder_tantive4.py +++ b/scripts/object/mobile/vehicle/landspeeder_tantive4.py @@ -1,4 +1,20 @@ import sys +def setup(core, object): + object.setAttachment('radial_filename', 'vehicle') + return + +def use(core, actor, object): + vehicle = actor.getContainer() + + if vehicle: + if vehicle.getObjectID() == object.getObjectID(): + vehicle.remove(actor) + else: + vehicle.add(actor) + + return +import sys + def setup(core, object): return \ No newline at end of file diff --git a/scripts/object/mobile/vehicle/speederbike_swoop.py b/scripts/object/mobile/vehicle/speederbike_swoop.py index 4626c764..0f6896cd 100644 --- a/scripts/object/mobile/vehicle/speederbike_swoop.py +++ b/scripts/object/mobile/vehicle/speederbike_swoop.py @@ -1,16 +1,6 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'vehicle') - return - -def use(core, actor, object): - vehicle = actor.getContainer() - - if vehicle: - if vehicle.getObjectID() == object.getObjectID(): - vehicle.remove(actor) - else: - vehicle.add(actor) - + object.setAttachment('radial_filename', 'creature/vehicle') + object.setAttachment('passengers', 0) return \ No newline at end of file diff --git a/scripts/object/tangible/component/weapon/lightsaber/item_krayt_pearl_04_01.py b/scripts/object/tangible/component/weapon/lightsaber/item_krayt_pearl_04_01.py new file mode 100644 index 00000000..49c8246d --- /dev/null +++ b/scripts/object/tangible/component/weapon/lightsaber/item_krayt_pearl_04_01.py @@ -0,0 +1,6 @@ +import sys + +def setup(core, object): + object.setStringAttribute('crystal_owner', '\#FFFF00UNTUNED') + object.setStringAttribute('quality', 'Poor') + return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py index ccad8904..bc69c878 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm.iff') + object.setLotRequirement(1) + object.setBMR(16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py index ccad8904..3bda16b3 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm_elite.iff') + object.setLotRequirement(3) + object.setBMR(120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py index ccad8904..419f60f5 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm_heavy.iff') + object.setLotRequirement(1) + object.setBMR(90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py index ccad8904..9eb27e8b 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm_medium.iff') + object.setLotRequirement(1) + object.setBMR(60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py index ccad8904..5a4a2404 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_1.iff') + object.setLotRequirement(1) + object.setBMR(16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py index ccad8904..f560acdf 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_4.iff') + object.setLotRequirement(3) + object.setBMR(120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py index ccad8904..c9bbd64b 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_3.iff') + object.setLotRequirement(1) + object.setBMR(90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py index ccad8904..10a7007a 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_2.iff') + object.setLotRequirement(1) + object.setBMR(60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py index ccad8904..b0455145 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_1.iff') + object.setLotRequirement(1) + object.setBMR(16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py index ccad8904..723f3eab 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_4.iff') + object.setLotRequirement(3) + object.setBMR(120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py index ccad8904..773e722d 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_3.iff') + object.setLotRequirement(1) + object.setBMR(90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py index ccad8904..1f40b563 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_2.iff') + object.setLotRequirement(1) + object.setBMR(60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py index ccad8904..0241a524 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester.iff') + object.setLotRequirement(1) + object.setBMR(16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py index ccad8904..e008e004 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_elite.iff') + object.setLotRequirement(3) + object.setBMR(120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py index ccad8904..e9206a11 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_heavy.iff') + object.setLotRequirement(1) + object.setBMR(90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py index ccad8904..2d1b24d2 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_medium.iff') + object.setLotRequirement(1) + object.setBMR(60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py index ccad8904..b8f86d6e 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_elite.iff') + object.setLotRequirement(3) + object.setBMR(120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py index ccad8904..28978e9c 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_heavy.iff') + object.setLotRequirement(1) + object.setBMR(90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py index ccad8904..ca897eb7 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff') + object.setLotRequirement(1) + object.setBMR(16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py index ccad8904..97ca86a7 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/harvesterDeed') + object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_style_2.iff') + object.setLotRequirement(1) + object.setBMR(60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py index ccad8904..a49b0675 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py @@ -1,4 +1,12 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structureDeed') + object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_01.iff') + object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_deed.iff') + object.setLotRequirement(1) + object.setBMR(15) + return + +def use(core, actor, object): return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py index ccad8904..000b6dcf 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py @@ -1,4 +1,12 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structureDeed') + object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_01.iff') + object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_floor_02_deed.iff') + object.setLotRequirement(1) + object.setBMR(15) + return + +def use(core, actor, object): return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py index ccad8904..9819f244 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py @@ -1,4 +1,12 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structureDeed') + object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_02.iff') + object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_deed.iff') + object.setLotRequirement(1) + object.setBMR(15) + return + +def use(core, actor, object): return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py index ccad8904..f35ca172 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py @@ -1,4 +1,12 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structureDeed') + object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_02.iff') + object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_floor_02_deed.iff') + object.setLotRequirement(1) + object.setBMR(15) + return + +def use(core, actor, object): return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py index ccad8904..f59934aa 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py @@ -1,4 +1,12 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'deeds/structureDeed') + object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_01.iff') + object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff') + object.setLotRequirement(1) + object.setBMR(15) + return + +def use(core, actor, object): return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py index ccad8904..51a196dc 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structureDeed') + object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_02.iff') + object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_floor_02_deed.iff') + object.setLotRequirement(1) + object.setBMR(15) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py index ccad8904..0f343705 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py @@ -1,4 +1,9 @@ import sys def setup(core, object): - return \ No newline at end of file + object.setAttachment('radial_filename', 'structureDeed') + object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_02.iff') + object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_deed.iff') + object.setLotRequirement(1) + object.setBMR(15) + return diff --git a/scripts/object/tangible/deed/vehicle_deed/barc_speeder_deed.py b/scripts/object/tangible/deed/vehicle_deed/barc_speeder_deed.py index ccad8904..af21fb67 100644 --- a/scripts/object/tangible/deed/vehicle_deed/barc_speeder_deed.py +++ b/scripts/object/tangible/deed/vehicle_deed/barc_speeder_deed.py @@ -1,4 +1,24 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'vehicleDeed') + return + +def use(core, actor, object): + datapad = actor.getSlottedObject('datapad') + pcd = core.objectService.createObject('object/intangible/vehicle/shared_barc_speeder_pcd.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y) + + if datapad and pcd: + + datapad.add(pcd) + core.objectService.destroyObject(object) + + vehicleId = actor.getAttachment('activeVehicleID') + + if vehicleId == None: + vehicle = core.objectService.createObject('object/mobile/vehicle/shared_barc_speeder.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y) + vehicle.setOwnerId(actor.getObjectID()) + core.simulationService.add(vehicle, vehicle.getPosition().x, vehicle.getPosition().z, True) + actor.setAttachment('activeVehicleID', vehicle.getObjectID()) + return \ No newline at end of file diff --git a/scripts/object/tangible/deed/vehicle_deed/landspeeder_tantive4_deed.py b/scripts/object/tangible/deed/vehicle_deed/landspeeder_tantive4_deed.py index ccad8904..92a45a9d 100644 --- a/scripts/object/tangible/deed/vehicle_deed/landspeeder_tantive4_deed.py +++ b/scripts/object/tangible/deed/vehicle_deed/landspeeder_tantive4_deed.py @@ -1,4 +1,24 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'vehicleDeed') + return + +def use(core, actor, object): + datapad = actor.getSlottedObject('datapad') + pcd = core.objectService.createObject('object/intangible/vehicle/shared_landspeeder_tantive4_pcd.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y) + + if datapad and pcd: + + datapad.add(pcd) + core.objectService.destroyObject(object) + + vehicleId = actor.getAttachment('activeVehicleID') + + if vehicleId == None: + vehicle = core.objectService.createObject('object/mobile/vehicle/shared_landspeeder_tantive4.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y) + vehicle.setOwnerId(actor.getObjectID()) + core.simulationService.add(vehicle, vehicle.getPosition().x, vehicle.getPosition().z, True) + actor.setAttachment('activeVehicleID', vehicle.getObjectID()) + return \ No newline at end of file diff --git a/scripts/object/tangible/deed/vehicle_deed/speederbike_swoop_deed.py b/scripts/object/tangible/deed/vehicle_deed/speederbike_swoop_deed.py index eb077d1f..48f0518e 100644 --- a/scripts/object/tangible/deed/vehicle_deed/speederbike_swoop_deed.py +++ b/scripts/object/tangible/deed/vehicle_deed/speederbike_swoop_deed.py @@ -1,19 +1,9 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'vehicleDeed') + object.setAttachment('radial_filename', 'deeds/vehicleDeed') return def use(core, actor, object): - datapad = actor.getSlottedObject('datapad') - - pcd = core.objectService.createObject('object/intangible/vehicle/shared_speederbike_swoop_pcd.iff', actor.getPlanet(), actor.getPosition()) - - if datapad and pcd: - datapad.add(pcd) - core.objectService.destroyObject(object) - vehicle = createObject('object/mobile/vehicle/shared_speederbike_swoop.iff', pcd.getAttachment('vehicleId'), actor.getPlanet(), actor.getPosition(), actor.getOrientation()) - vehicle.setOwnerId(actor.getObjectID()) - core.simulationService.add(vehicle, vehicle.getPosition().x, vehicle.getPosition().z, True) - + core.mountService.generateVehicle(actor, object, 'object/mobile/vehicle/shared_speederbike_swoop.iff', 'object/intangible/vehicle/shared_speederbike_swoop_pcd.iff') return \ No newline at end of file diff --git a/scripts/object/tangible/door/shared_thm_kash_zonegate_door_simple.py b/scripts/object/tangible/door/shared_thm_kash_zonegate_door_simple.py new file mode 100644 index 00000000..4bd7f23d --- /dev/null +++ b/scripts/object/tangible/door/shared_thm_kash_zonegate_door_simple.py @@ -0,0 +1,19 @@ +import sys + +from engine.resources.scene import Point3D +from engine.resources.scene import Quaternion + +def setup(core, object): + object.setAttachment('radial_filename', 'a_gate_door') + return + +#TODO: Solve problem with displayed ObjectID from buildout not being proper unsigned int. +#-56576470324869753 rryatt +#-56576470324869754 blackscale +#-56576470324869755 ettyy +#kkowir exit coord -746 18 256 + +def use(core, actor, object): + if object.getObjectID() == long(-56576470324869752): + core.simulationService.transferToPlanet(actor, core.terrainService.getPlanetByName('kashyyyk_dead_forest'), Point3D(float(86.9), float(29.4), float(-473)), Quaternion(float(0), float(0), float(0), float(1)), None) + return \ No newline at end of file diff --git a/scripts/object/tangible/holiday/life_day/main_lifeday_tree.py b/scripts/object/tangible/holiday/life_day/main_lifeday_tree.py index ed6e638b..f98db1aa 100644 --- a/scripts/object/tangible/holiday/life_day/main_lifeday_tree.py +++ b/scripts/object/tangible/holiday/life_day/main_lifeday_tree.py @@ -1,5 +1,5 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'main_lifeday_tree') + object.setAttachment('radial_filename', 'holidays/lifeday/main_lifeday_tree') return diff --git a/scripts/object/tangible/item/rare_loot_chest_1.py b/scripts/object/tangible/item/rare_loot_chest_1.py index ccad8904..4b7795de 100644 --- a/scripts/object/tangible/item/rare_loot_chest_1.py +++ b/scripts/object/tangible/item/rare_loot_chest_1.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/lootchest') return \ No newline at end of file diff --git a/scripts/object/tangible/item/rare_loot_chest_2.py b/scripts/object/tangible/item/rare_loot_chest_2.py index ccad8904..4b7795de 100644 --- a/scripts/object/tangible/item/rare_loot_chest_2.py +++ b/scripts/object/tangible/item/rare_loot_chest_2.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/lootchest') return \ No newline at end of file diff --git a/scripts/object/tangible/item/rare_loot_chest_3.py b/scripts/object/tangible/item/rare_loot_chest_3.py index ccad8904..4b7795de 100644 --- a/scripts/object/tangible/item/rare_loot_chest_3.py +++ b/scripts/object/tangible/item/rare_loot_chest_3.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/lootchest') return \ No newline at end of file diff --git a/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_other_01_01.py b/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_other_01_01.py index 3e649d7b..6f7c8887 100644 --- a/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_other_01_01.py +++ b/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_other_01_01.py @@ -6,5 +6,5 @@ def setup(core, object): object.setCustomName('Life Day Gift Box For A Friend') object.setIntAttribute('volume', 1) object.setIntAttribute('tier', 2) - object.setAttachment('radial_filename', 'lifeday_gift') + object.setAttachment('radial_filename', 'holidays/lifeday/lifeday_gift') return \ No newline at end of file diff --git a/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_self_01_01.py b/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_self_01_01.py index aef17bd8..273b89dc 100644 --- a/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_self_01_01.py +++ b/scripts/object/tangible/loot/creature_loot/collections/item_lifeday_gift_self_01_01.py @@ -7,5 +7,5 @@ def setup(core, object): object.setIntAttribute('volume', 1) object.setIntAttribute('no_trade', 1) object.setIntAttribute('tier', 2) - object.setAttachment('radial_filename', 'lifeday_gift') + object.setAttachment('radial_filename', 'holidays/lifeday/lifeday_gift') return \ No newline at end of file diff --git a/scripts/object/tangible/loot/generic_usable/item_bounty_hunter_clicky_01_02.py b/scripts/object/tangible/loot/generic_usable/item_bounty_hunter_clicky_01_02.py new file mode 100644 index 00000000..22d032c5 --- /dev/null +++ b/scripts/object/tangible/loot/generic_usable/item_bounty_hunter_clicky_01_02.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_bounty_hunter_clicky_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bounty_hunter_clicky_01_02') + object.setStringAttribute('class_required', 'Bounty Hunter') + return diff --git a/scripts/object/tangible/loot/generic_usable/item_commando_clicky_01_02.py b/scripts/object/tangible/loot/generic_usable/item_commando_clicky_01_02.py new file mode 100644 index 00000000..5041ee3b --- /dev/null +++ b/scripts/object/tangible/loot/generic_usable/item_commando_clicky_01_02.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_commando_clicky_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_commando_clicky_01_02') + object.setStringAttribute('class_required', 'Commando') + return diff --git a/scripts/object/tangible/loot/generic_usable/item_force_sensitive_clicky_01_02.py b/scripts/object/tangible/loot/generic_usable/item_force_sensitive_clicky_01_02.py new file mode 100644 index 00000000..e6745838 --- /dev/null +++ b/scripts/object/tangible/loot/generic_usable/item_force_sensitive_clicky_01_02.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_force_sensitive_clicky_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_force_sensitive_clicky_01_02') + object.setStringAttribute('class_required', 'Jedi') + return diff --git a/scripts/object/tangible/loot/generic_usable/stim_syringe_generic.py b/scripts/object/tangible/loot/generic_usable/stim_syringe_generic.py index ccad8904..786a488c 100644 --- a/scripts/object/tangible/loot/generic_usable/stim_syringe_generic.py +++ b/scripts/object/tangible/loot/generic_usable/stim_syringe_generic.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'object/usable') return \ No newline at end of file diff --git a/scripts/object/tangible/quest/heroic/heroic_exar_kun_entrance.py b/scripts/object/tangible/quest/heroic/heroic_exar_kun_entrance.py index ccad8904..7ca08004 100644 --- a/scripts/object/tangible/quest/heroic/heroic_exar_kun_entrance.py +++ b/scripts/object/tangible/quest/heroic/heroic_exar_kun_entrance.py @@ -1,4 +1,9 @@ import sys def setup(core, object): - return \ No newline at end of file + object.setAttachment('radial_filename', 'instances/exar_kun/exar_kun_brazier') + return + +def use(core, actor, object): + if actor: + core.instanceService.queue('heroic_exar_kun', actor) \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_all.py b/scripts/object/tangible/survey_tool/survey_tool_all.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_all.py +++ b/scripts/object/tangible/survey_tool/survey_tool_all.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_gas.py b/scripts/object/tangible/survey_tool/survey_tool_gas.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_gas.py +++ b/scripts/object/tangible/survey_tool/survey_tool_gas.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_geo_thermal.py b/scripts/object/tangible/survey_tool/survey_tool_geo_thermal.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_geo_thermal.py +++ b/scripts/object/tangible/survey_tool/survey_tool_geo_thermal.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_inorganic.py b/scripts/object/tangible/survey_tool/survey_tool_inorganic.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_inorganic.py +++ b/scripts/object/tangible/survey_tool/survey_tool_inorganic.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_liquid.py b/scripts/object/tangible/survey_tool/survey_tool_liquid.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_liquid.py +++ b/scripts/object/tangible/survey_tool/survey_tool_liquid.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_lumber.py b/scripts/object/tangible/survey_tool/survey_tool_lumber.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_lumber.py +++ b/scripts/object/tangible/survey_tool/survey_tool_lumber.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_mineral.py b/scripts/object/tangible/survey_tool/survey_tool_mineral.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_mineral.py +++ b/scripts/object/tangible/survey_tool/survey_tool_mineral.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_moisture.py b/scripts/object/tangible/survey_tool/survey_tool_moisture.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_moisture.py +++ b/scripts/object/tangible/survey_tool/survey_tool_moisture.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_organic.py b/scripts/object/tangible/survey_tool/survey_tool_organic.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_organic.py +++ b/scripts/object/tangible/survey_tool/survey_tool_organic.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_solar.py b/scripts/object/tangible/survey_tool/survey_tool_solar.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_solar.py +++ b/scripts/object/tangible/survey_tool/survey_tool_solar.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/survey_tool/survey_tool_wind.py b/scripts/object/tangible/survey_tool/survey_tool_wind.py index ccad8904..fa89b86c 100644 --- a/scripts/object/tangible/survey_tool/survey_tool_wind.py +++ b/scripts/object/tangible/survey_tool/survey_tool_wind.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'item/survey_tool') return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_bank.py b/scripts/object/tangible/terminal/terminal_bank.py index 4f068472..64205c68 100644 --- a/scripts/object/tangible/terminal/terminal_bank.py +++ b/scripts/object/tangible/terminal/terminal_bank.py @@ -1,7 +1,7 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'bank') + object.setAttachment('radial_filename', 'terminal/bank') core.mapService.addLocation(object.getPlanet(), 'Bank Terminal', object.getPosition().x, object.getPosition().z, 41, 42, 0) return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_character_builder.py b/scripts/object/tangible/terminal/terminal_character_builder.py index ccad8904..306a13df 100644 --- a/scripts/object/tangible/terminal/terminal_character_builder.py +++ b/scripts/object/tangible/terminal/terminal_character_builder.py @@ -1,4 +1,9 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'object/usable') + return + +def use(core, owner, target): + core.devService.sendCharacterBuilderSUI(owner, 0); return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_cloning.py b/scripts/object/tangible/terminal/terminal_cloning.py index 91f80095..dc256f9a 100644 --- a/scripts/object/tangible/terminal/terminal_cloning.py +++ b/scripts/object/tangible/terminal/terminal_cloning.py @@ -1,6 +1,6 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'cloning_terminal') + object.setAttachment('radial_filename', 'terminal/cloning_terminal') return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_player_structure.py b/scripts/object/tangible/terminal/terminal_player_structure.py index ccad8904..dd5b18cd 100644 --- a/scripts/object/tangible/terminal/terminal_player_structure.py +++ b/scripts/object/tangible/terminal/terminal_player_structure.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/structure_management_terminal') return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_player_structure_new.py b/scripts/object/tangible/terminal/terminal_player_structure_new.py index ccad8904..dd5b18cd 100644 --- a/scripts/object/tangible/terminal/terminal_player_structure_new.py +++ b/scripts/object/tangible/terminal/terminal_player_structure_new.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/structure_management_terminal') return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_player_structure_nosnap.py b/scripts/object/tangible/terminal/terminal_player_structure_nosnap.py index ccad8904..dd5b18cd 100644 --- a/scripts/object/tangible/terminal/terminal_player_structure_nosnap.py +++ b/scripts/object/tangible/terminal/terminal_player_structure_nosnap.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/structure_management_terminal') return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_player_structure_nosnap_mini.py b/scripts/object/tangible/terminal/terminal_player_structure_nosnap_mini.py index ccad8904..dd5b18cd 100644 --- a/scripts/object/tangible/terminal/terminal_player_structure_nosnap_mini.py +++ b/scripts/object/tangible/terminal/terminal_player_structure_nosnap_mini.py @@ -1,4 +1,5 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'structure/structure_management_terminal') return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_travel.py b/scripts/object/tangible/terminal/terminal_travel.py index 160aac1c..07222fe6 100644 --- a/scripts/object/tangible/terminal/terminal_travel.py +++ b/scripts/object/tangible/terminal/terminal_travel.py @@ -1,5 +1,5 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'travel_terminal') + object.setAttachment('radial_filename', 'terminal/travel_terminal') return \ No newline at end of file diff --git a/scripts/object/tangible/travel/ticket_collector/ticket_collector.py b/scripts/object/tangible/travel/ticket_collector/ticket_collector.py index d243308d..a4dcc12f 100644 --- a/scripts/object/tangible/travel/ticket_collector/ticket_collector.py +++ b/scripts/object/tangible/travel/ticket_collector/ticket_collector.py @@ -1,5 +1,5 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'npc_ticket_collector') + object.setAttachment('radial_filename', 'npc/npc_ticket_collector') return \ No newline at end of file diff --git a/scripts/object/tangible/travel/travel_ticket/base/base_travel_ticket.py b/scripts/object/tangible/travel/travel_ticket/base/base_travel_ticket.py index 77e1b16d..446e9f9f 100644 --- a/scripts/object/tangible/travel/travel_ticket/base/base_travel_ticket.py +++ b/scripts/object/tangible/travel/travel_ticket/base/base_travel_ticket.py @@ -1,5 +1,5 @@ import sys def setup(core, object): - object.setAttachment('radial_filename', 'travel_ticket') + object.setAttachment('radial_filename', 'item/travel_ticket') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bicep_l_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bicep_l_02_01.py new file mode 100644 index 00000000..9fa443b7 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bicep_l_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_bicep_l_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_bicep_l_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bicep_r_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bicep_r_02_01.py new file mode 100644 index 00000000..f8e88597 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bicep_r_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_bicep_r_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_bicep_r_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_boots_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_boots_02_01.py new file mode 100644 index 00000000..dcbb349e --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_boots_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_boots_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_boots_02_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bracer_l_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bracer_l_02_01.py new file mode 100644 index 00000000..5ca4b024 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bracer_l_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_bracer_l_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_bracer_l_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bracer_r_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bracer_r_02_01.py new file mode 100644 index 00000000..83bf330b --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_bracer_r_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_bracer_r_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_bracer_r_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_chest_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_chest_02_01.py new file mode 100644 index 00000000..815a1640 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_chest_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_chest_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_chest_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_gloves_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_gloves_02_01.py new file mode 100644 index 00000000..0edc69cc --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_gloves_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_gloves_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_gloves_02_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_helmet_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_helmet_02_01.py new file mode 100644 index 00000000..f798283c --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_helmet_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_helmet_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_helmet_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_leggings_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_leggings_02_01.py new file mode 100644 index 00000000..6ad62c58 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_bounty_hunter_roadmap_leggings_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_bounty_hunter_roadmap_leggings_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_bounty_hunter_roadmap_leggings_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bicep_l_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bicep_l_02_01.py new file mode 100644 index 00000000..725b9056 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bicep_l_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_bicep_l_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_bicep_l_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bicep_r_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bicep_r_02_01.py new file mode 100644 index 00000000..a0c37a28 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bicep_r_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_bicep_r_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_bicep_r_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_boots_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_boots_02_01.py new file mode 100644 index 00000000..16df82a0 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_boots_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_boots_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_boots_02_01') + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bracer_l_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bracer_l_02_01.py new file mode 100644 index 00000000..0cdc5e97 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bracer_l_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_bracer_l_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_bracer_l_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bracer_r_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bracer_r_02_01.py new file mode 100644 index 00000000..c4e221c2 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_bracer_r_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_bracer_r_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_bracer_r_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_chest_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_chest_02_01.py new file mode 100644 index 00000000..af0fa26f --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_chest_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_chest_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_chest_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_gloves_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_gloves_02_01.py new file mode 100644 index 00000000..17ee0ecd --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_gloves_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_gloves_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_gloves_02_01') + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_helmet_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_helmet_02_01.py new file mode 100644 index 00000000..1d8a8c05 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_helmet_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_helmet_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_helmet_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_leggings_02_01.py b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_leggings_02_01.py new file mode 100644 index 00000000..3ebce0ac --- /dev/null +++ b/scripts/object/tangible/wearables/armor/composite/armor_commando_roadmap_leggings_02_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_commando_roadmap_leggings_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_commando_roadmap_leggings_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Commando') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bicep_l_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bicep_l_02_03.py new file mode 100644 index 00000000..67da6ef4 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bicep_l_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_bicep_l_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_bicep_l_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bicep_r_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bicep_r_02_03.py new file mode 100644 index 00000000..53f0fb21 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bicep_r_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_bicep_r_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_bicep_r_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_boots_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_boots_02_03.py new file mode 100644 index 00000000..5822a2dc --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_boots_02_03.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_boots_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_boots_02_03') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bracer_l_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bracer_l_02_03.py new file mode 100644 index 00000000..2c96e2dd --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bracer_l_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_bracer_l_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_bracer_l_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bracer_r_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bracer_r_02_03.py new file mode 100644 index 00000000..1fee94a5 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_bracer_r_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_bracer_r_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_bracer_r_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_chest_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_chest_02_03.py new file mode 100644 index 00000000..b17b98cc --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_chest_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_chest_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_chest_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_gloves_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_gloves_02_03.py new file mode 100644 index 00000000..54aab0ca --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_gloves_02_03.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_gloves_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_gloves_02_03') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_helmet_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_helmet_02_03.py new file mode 100644 index 00000000..91f77a60 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_helmet_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_helmet_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_helmet_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_leggings_02_03.py b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_leggings_02_03.py new file mode 100644 index 00000000..e77eef3a --- /dev/null +++ b/scripts/object/tangible/wearables/armor/ithorian_sentinel/armor_ithorian_roadmap_leggings_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_ithorian_roadmap_leggings_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_ithorian_roadmap_leggings_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bicep_l_02_03.py b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bicep_l_02_03.py new file mode 100644 index 00000000..765a3379 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bicep_l_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_wookiee_roadmap_bicep_l_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_wookiee_roadmap_bicep_l_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bicep_r_02_03.py b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bicep_r_02_03.py new file mode 100644 index 00000000..f25225df --- /dev/null +++ b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bicep_r_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_wookiee_roadmap_bicep_r_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_wookiee_roadmap_bicep_r_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bracer_l_02_03.py b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bracer_l_02_03.py new file mode 100644 index 00000000..808e135d --- /dev/null +++ b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bracer_l_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_wookiee_roadmap_bracer_l_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_wookiee_roadmap_bracer_l_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bracer_r_02_03.py b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bracer_r_02_03.py new file mode 100644 index 00000000..a2b95572 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_bracer_r_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_wookiee_roadmap_bracer_r_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_wookiee_roadmap_bracer_r_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_chest_02_03.py b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_chest_02_03.py new file mode 100644 index 00000000..15500015 --- /dev/null +++ b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_chest_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_wookiee_roadmap_chest_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_wookiee_roadmap_chest_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_leggings_02_03.py b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_leggings_02_03.py new file mode 100644 index 00000000..ca4b2cfa --- /dev/null +++ b/scripts/object/tangible/wearables/armor/kashyyykian_hunting/armor_wookiee_roadmap_leggings_02_03.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('armor_wookiee_roadmap_leggings_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('armor_wookiee_roadmap_leggings_02_03') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 3) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setStringAttribute('armor_category', 'Assault') + object.setIntAttribute('cat_armor_standard_protection.kinetic', 2640) + object.setIntAttribute('cat_armor_standard_protection.energy', 640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 1640) + object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 1640) + return diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_bounty_hunter_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_bounty_hunter_01_02.py new file mode 100644 index 00000000..c845f9fb --- /dev/null +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_bounty_hunter_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_roadmap_belt_bounty_hunter_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_roadmap_belt_bounty_hunter_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 15) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 20) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 15) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 90) + return diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_commando_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_commando_01_02.py new file mode 100644 index 00000000..03d3b4ae --- /dev/null +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_commando_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_roadmap_belt_commando_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_roadmap_belt_commando_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 15) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 20) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 15) + object.setStringAttribute('class_required', 'Commando') + object.setIntAttribute('required_combat_level', 90) + return diff --git a/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_force_sensitive_01_02.py b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_force_sensitive_01_02.py new file mode 100644 index 00000000..e383382b --- /dev/null +++ b/scripts/object/tangible/wearables/armor/zam/item_roadmap_belt_force_sensitive_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_roadmap_belt_force_sensitive_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_roadmap_belt_force_sensitive_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 15) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 20) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 15) + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 90) + return diff --git a/scripts/object/tangible/wearables/backpack/fannypack_s01.py b/scripts/object/tangible/wearables/backpack/fannypack_s01.py index ccad8904..b0e3e3ee 100644 --- a/scripts/object/tangible/wearables/backpack/fannypack_s01.py +++ b/scripts/object/tangible/wearables/backpack/fannypack_s01.py @@ -1,4 +1,16 @@ import sys def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_fannypack_04_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_fannypack_04_01') + + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 50) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 50) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 50) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 50) + + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') + object.setAttachment('setBonus', 'set_bonus_jedi_robe') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/backpack/item_bounty_hunter_backpack_01_02.py b/scripts/object/tangible/wearables/backpack/item_bounty_hunter_backpack_01_02.py new file mode 100644 index 00000000..b1bdc206 --- /dev/null +++ b/scripts/object/tangible/wearables/backpack/item_bounty_hunter_backpack_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_bounty_hunter_backpack_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bounty_hunter_backpack_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 5) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 5) + object.setStringAttribute('class_required', 'Bounty Hunter') + return diff --git a/scripts/object/tangible/wearables/backpack/item_commando_backpack_01_02.py b/scripts/object/tangible/wearables/backpack/item_commando_backpack_01_02.py new file mode 100644 index 00000000..ffc76111 --- /dev/null +++ b/scripts/object/tangible/wearables/backpack/item_commando_backpack_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_commando_backpack_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_commando_backpack_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 5) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 5) + object.setStringAttribute('class_required', 'Commando') + return diff --git a/scripts/object/tangible/wearables/boots/item_smuggler_boots_02_01.py b/scripts/object/tangible/wearables/boots/item_smuggler_boots_02_01.py new file mode 100644 index 00000000..e589fa8e --- /dev/null +++ b/scripts/object/tangible/wearables/boots/item_smuggler_boots_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_smuggler_boots_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_smuggler_boots_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Smuggler') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/boots/item_spy_boots_02_01.py b/scripts/object/tangible/wearables/boots/item_spy_boots_02_01.py new file mode 100644 index 00000000..caa1f917 --- /dev/null +++ b/scripts/object/tangible/wearables/boots/item_spy_boots_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_spy_boots_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_spy_boots_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Spy') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/bracelet/item_bracelet_l_set_bh_utility_b_01_01.py b/scripts/object/tangible/wearables/bracelet/item_bracelet_l_set_bh_utility_b_01_01.py new file mode 100644 index 00000000..ddd2ac6f --- /dev/null +++ b/scripts/object/tangible/wearables/bracelet/item_bracelet_l_set_bh_utility_b_01_01.py @@ -0,0 +1,19 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_bracelet_l_set_bh_utility_b_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bracelet_l_set_bh_utility_b_01_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_root', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_snare', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:fast_attack_line_dm_cc', 2) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_utility_b_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_bh_utility_b_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_utility_b_3') + object.setAttachment('setBonus', 'set_bonus_bh_utility_b') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/bracelet/item_bracelet_l_set_hero_01_01.py b/scripts/object/tangible/wearables/bracelet/item_bracelet_l_set_hero_01_01.py new file mode 100644 index 00000000..3326feb5 --- /dev/null +++ b/scripts/object/tangible/wearables/bracelet/item_bracelet_l_set_hero_01_01.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_bracelet_l_set_hero_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bracelet_l_set_hero_01_01') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 30) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_hero_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + object.setAttachment('setBonus', 'set_bonus_hero') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/bracelet/item_bracelet_r_set_bh_utility_b_01_01.py b/scripts/object/tangible/wearables/bracelet/item_bracelet_r_set_bh_utility_b_01_01.py new file mode 100644 index 00000000..1d0aa2c9 --- /dev/null +++ b/scripts/object/tangible/wearables/bracelet/item_bracelet_r_set_bh_utility_b_01_01.py @@ -0,0 +1,19 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_bracelet_r_set_bh_utility_b_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bracelet_r_set_bh_utility_b_01_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_root', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_snare', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:fast_attack_line_dm_cc', 2) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_utility_b_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_bh_utility_b_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_utility_b_3') + object.setAttachment('setBonus', 'set_bonus_bh_utility_b') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/bracelet/item_bracelet_r_set_hero_01_01.py b/scripts/object/tangible/wearables/bracelet/item_bracelet_r_set_hero_01_01.py new file mode 100644 index 00000000..81be4417 --- /dev/null +++ b/scripts/object/tangible/wearables/bracelet/item_bracelet_r_set_hero_01_01.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_bracelet_r_set_hero_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bracelet_r_set_hero_01_01') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 30) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_hero_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + object.setAttachment('setBonus', 'set_bonus_hero') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/gloves/item_spy_gloves_02_01.py b/scripts/object/tangible/wearables/gloves/item_spy_gloves_02_01.py new file mode 100644 index 00000000..f5f06373 --- /dev/null +++ b/scripts/object/tangible/wearables/gloves/item_spy_gloves_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_spy_gloves_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_spy_gloves_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Spy') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/necklace/item_bounty_hunter_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_bounty_hunter_pendant_01_02.py new file mode 100644 index 00000000..46555e1f --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_bounty_hunter_pendant_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_bounty_hunter_pendant_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bounty_hunter_pendant_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 12) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 12) + object.setStringAttribute('class_required', 'Bounty Hunter') + return diff --git a/scripts/object/tangible/wearables/necklace/item_commando_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_commando_pendant_01_02.py new file mode 100644 index 00000000..716905e2 --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_commando_pendant_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_commando_pendant_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_commando_pendant_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 12) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 12) + object.setStringAttribute('class_required', 'Commando') + return diff --git a/scripts/object/tangible/wearables/necklace/item_force_sensitive_pendant_01_02.py b/scripts/object/tangible/wearables/necklace/item_force_sensitive_pendant_01_02.py new file mode 100644 index 00000000..37735e50 --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_force_sensitive_pendant_01_02.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_force_sensitive_pendant_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_force_sensitive_pendant_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 12) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 12) + object.setStringAttribute('class_required', 'Jedi') + return diff --git a/scripts/object/tangible/wearables/necklace/item_necklace_set_bh_utility_b_01_01.py b/scripts/object/tangible/wearables/necklace/item_necklace_set_bh_utility_b_01_01.py new file mode 100644 index 00000000..7426c06e --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_necklace_set_bh_utility_b_01_01.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_necklace_set_bh_utility_b_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_necklace_set_bh_utility_b_01_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_root', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_snare', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:fast_attack_line_dm_cc', 2) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_utility_b_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_bh_utility_b_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_utility_b_3') + object.setAttachment('setBonus', 'set_bonus_bh_utility_b') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/necklace/item_necklace_set_hero_01_01.py b/scripts/object/tangible/wearables/necklace/item_necklace_set_hero_01_01.py new file mode 100644 index 00000000..efb1bc12 --- /dev/null +++ b/scripts/object/tangible/wearables/necklace/item_necklace_set_hero_01_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_necklace_set_hero_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_necklace_set_hero_01_01') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 30) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_hero_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + object.setAttachment('setBonus', 'set_bonus_hero') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/pants/item_smuggler_pants_02_01.py b/scripts/object/tangible/wearables/pants/item_smuggler_pants_02_01.py new file mode 100644 index 00000000..12b3bd30 --- /dev/null +++ b/scripts/object/tangible/wearables/pants/item_smuggler_pants_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_smuggler_pants_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_smuggler_pants_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Smuggler') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/pants/item_spy_pants_02_01.py b/scripts/object/tangible/wearables/pants/item_spy_pants_02_01.py new file mode 100644 index 00000000..a1021bf4 --- /dev/null +++ b/scripts/object/tangible/wearables/pants/item_spy_pants_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_spy_pants_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_spy_pants_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Spy') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/aakuan_ring.py b/scripts/object/tangible/wearables/ring/aakuan_ring.py index ccad8904..a7a9a10b 100644 --- a/scripts/object/tangible/wearables/ring/aakuan_ring.py +++ b/scripts/object/tangible/wearables/ring/aakuan_ring.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/item_band_set_bh_utility_b_01_01.py b/scripts/object/tangible/wearables/ring/item_band_set_bh_utility_b_01_01.py new file mode 100644 index 00000000..4ec469c0 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_band_set_bh_utility_b_01_01.py @@ -0,0 +1,19 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_band_set_bh_utility_b_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_band_set_bh_utility_b_01_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_root', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_snare', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:fast_attack_line_dm_cc', 2) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_utility_b_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_bh_utility_b_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_utility_b_3') + object.setAttachment('setBonus', 'set_bonus_bh_utility_b') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/item_band_set_hero_01_01.py b/scripts/object/tangible/wearables/ring/item_band_set_hero_01_01.py new file mode 100644 index 00000000..73f173b9 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_band_set_hero_01_01.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_band_set_hero_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_band_set_hero_01_01') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 30) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_hero_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + object.setAttachment('setBonus', 'set_bonus_hero') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/item_bounty_hunter_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_bounty_hunter_ring_01_02.py new file mode 100644 index 00000000..110a5ec1 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_bounty_hunter_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_bounty_hunter_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_bounty_hunter_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 6) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_commando_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_commando_ring_01_02.py new file mode 100644 index 00000000..5e4f73c1 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_commando_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_commando_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_commando_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 6) + object.setStringAttribute('class_required', 'Commando') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_force_sensitive_ring_01_02.py b/scripts/object/tangible/wearables/ring/item_force_sensitive_ring_01_02.py new file mode 100644 index 00000000..a22d7967 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_force_sensitive_ring_01_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_force_sensitive_ring_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_force_sensitive_ring_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 6) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 6) + object.setStringAttribute('class_required', 'Jedi') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_force_sensitive_ring_02_01.py b/scripts/object/tangible/wearables/ring/item_force_sensitive_ring_02_01.py new file mode 100644 index 00000000..01a05612 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_force_sensitive_ring_02_01.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_force_sensitive_ring_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_force_sensitive_ring_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 5) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 5) + object.setStringAttribute('class_required', 'Jedi') + object.setAttachment('radial_filename', 'ring/unity') + return diff --git a/scripts/object/tangible/wearables/ring/item_ring_set_bh_utility_b_01_01.py b/scripts/object/tangible/wearables/ring/item_ring_set_bh_utility_b_01_01.py new file mode 100644 index 00000000..0d16a24a --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_ring_set_bh_utility_b_01_01.py @@ -0,0 +1,19 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_ring_set_bh_utility_b_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_ring_set_bh_utility_b_01_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_root', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:bh_dire_snare', 1) + object.setIntAttribute('cat_skill_mod_bonus.@stat_n:fast_attack_line_dm_cc', 2) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_bh_utility_b_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_bh_utility_b_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_bh_utility_b_3') + object.setAttachment('setBonus', 'set_bonus_bh_utility_b') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/item_ring_set_hero_01_01.py b/scripts/object/tangible/wearables/ring/item_ring_set_hero_01_01.py new file mode 100644 index 00000000..2a2d0124 --- /dev/null +++ b/scripts/object/tangible/wearables/ring/item_ring_set_hero_01_01.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') + object.setStfFilename('static_item_n') + object.setStfName('item_ring_set_hero_01_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_ring_set_hero_01_01') + object.setIntAttribute('required_combat_level', 85) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 30) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 30) + object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_1') + object.setStringAttribute('@set_bonus:piece_bonus_count_4', '@set_bonus:set_bonus_hero_2') + object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3') + object.setAttachment('setBonus', 'set_bonus_hero') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/ring_base.py b/scripts/object/tangible/wearables/ring/ring_base.py index ccad8904..21d2e709 100644 --- a/scripts/object/tangible/wearables/ring/ring_base.py +++ b/scripts/object/tangible/wearables/ring/ring_base.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment('objType', 'ring') + object.setAttachment('radial_filename', 'ring/unity') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/ring_gcw_imperial.py b/scripts/object/tangible/wearables/ring/ring_gcw_imperial.py index ccad8904..a7a9a10b 100644 --- a/scripts/object/tangible/wearables/ring/ring_gcw_imperial.py +++ b/scripts/object/tangible/wearables/ring/ring_gcw_imperial.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/ring_gcw_rebel.py b/scripts/object/tangible/wearables/ring/ring_gcw_rebel.py index ccad8904..a7a9a10b 100644 --- a/scripts/object/tangible/wearables/ring/ring_gcw_rebel.py +++ b/scripts/object/tangible/wearables/ring/ring_gcw_rebel.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/ring_mark_hero.py b/scripts/object/tangible/wearables/ring/ring_mark_hero.py index ccad8904..a7a9a10b 100644 --- a/scripts/object/tangible/wearables/ring/ring_mark_hero.py +++ b/scripts/object/tangible/wearables/ring/ring_mark_hero.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/ring_nightsister.py b/scripts/object/tangible/wearables/ring/ring_nightsister.py index ccad8904..a7a9a10b 100644 --- a/scripts/object/tangible/wearables/ring/ring_nightsister.py +++ b/scripts/object/tangible/wearables/ring/ring_nightsister.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/ring_s01.py b/scripts/object/tangible/wearables/ring/ring_s01.py index dc6ea0b1..f311265b 100644 --- a/scripts/object/tangible/wearables/ring/ring_s01.py +++ b/scripts/object/tangible/wearables/ring/ring_s01.py @@ -1,6 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return def equip(core, actor, object): diff --git a/scripts/object/tangible/wearables/ring/ring_s02.py b/scripts/object/tangible/wearables/ring/ring_s02.py index 2ca3d3ca..467d8fb3 100644 --- a/scripts/object/tangible/wearables/ring/ring_s02.py +++ b/scripts/object/tangible/wearables/ring/ring_s02.py @@ -1,6 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return def equip(core, actor, object): diff --git a/scripts/object/tangible/wearables/ring/ring_s03.py b/scripts/object/tangible/wearables/ring/ring_s03.py index 418b5aa4..52d2d1d2 100644 --- a/scripts/object/tangible/wearables/ring/ring_s03.py +++ b/scripts/object/tangible/wearables/ring/ring_s03.py @@ -1,6 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return def equip(core, actor, object): diff --git a/scripts/object/tangible/wearables/ring/ring_s03_quest.py b/scripts/object/tangible/wearables/ring/ring_s03_quest.py index ccad8904..a7a9a10b 100644 --- a/scripts/object/tangible/wearables/ring/ring_s03_quest.py +++ b/scripts/object/tangible/wearables/ring/ring_s03_quest.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/ring/ring_s04.py b/scripts/object/tangible/wearables/ring/ring_s04.py index 6410d76f..c00caed9 100644 --- a/scripts/object/tangible/wearables/ring/ring_s04.py +++ b/scripts/object/tangible/wearables/ring/ring_s04.py @@ -1,6 +1,8 @@ import sys def setup(core, object): + object.setAttachment('radial_filename', 'ring/unity') + object.setAttachment('objType', 'ring') return def equip(core, actor, object): diff --git a/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_01.py b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_01.py new file mode 100644 index 00000000..afb64a4b --- /dev/null +++ b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_01.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_npe_fs_robe_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_fs_robe_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 10) + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 1) + return diff --git a/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py index 74d6de38..d71c2f44 100644 --- a/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py +++ b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py @@ -1,7 +1,6 @@ import sys def setup(core, object): - object.setStfFilename('static_item_n') object.setStfName('item_npe_fs_robe_02_02') object.setDetailFilename('static_item_d') diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s01.py b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s01.py index 1d64fa57..6c8a9d3c 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s01.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s01.py @@ -1,18 +1,15 @@ import sys def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_dark_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_dark_03_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 100) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 100) + object.setStringAttribute('protection_level', 'Weak') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 40) + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') + object.setAttachment('type', 'jedi_robe') return - -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'constitution_modified', 100) - core.skillModService.addSkillMod(actor, 'precision_modified', 100) - - return - -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'constitution_modified', 100) - core.skillModService.deductSkillMod(actor, 'precision_modified', 100) - - - return - \ No newline at end of file diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s02.py b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s02.py index 0a02012a..ab11f14c 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s02.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s02.py @@ -1,18 +1,15 @@ import sys def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_dark_03_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_dark_03_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 145) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 145) + object.setStringAttribute('protection_level', 'Lucent') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 60) + object.setAttachment('type', 'jedi_robe') + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') return - -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'constitution_modified', 145) - core.skillModService.addSkillMod(actor, 'precision_modified', 145) - - - return - -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'constitution_modified', 145) - core.skillModService.deductSkillMod(actor, 'precision_modified', 145) - - return - \ No newline at end of file diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s03.py b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s03.py index 9a627b3b..101fa13f 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s03.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s03.py @@ -1,19 +1,21 @@ import sys def setup(core, object): - return + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_dark_03_03') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_dark_03_03') -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'constitution_modified', 185) - core.skillModService.addSkillMod(actor, 'precision_modified', 185) - core.skillModService.addSkillMod(actor, 'luck_modified', 185) + object.setStringAttribute('protection_level', 'Luminous') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 80) - return + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 185) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 185) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 185) -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'constitution_modified', 185) - core.skillModService.deductSkillMod(actor, 'precision_modified', 185) - core.skillModService.deductSkillMod(actor, 'luck_modified', 185) - + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') + + object.setAttachment('type', 'jedi_robe') + object.setAttachment('setBonus', 'set_bonus_jedi_robe') return - \ No newline at end of file diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s04.py b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s04.py index 8c145ab4..5b1543e3 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_dark_s04.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_dark_s04.py @@ -1,31 +1,22 @@ import sys def setup(core, object): - return + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_dark_04_04') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_dark_04_04') -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'constitution_modified', 250) - core.skillModService.addSkillMod(actor, 'precision_modified', 250) - core.skillModService.addSkillMod(actor, 'luck_modified', 250) + object.setStringAttribute('protection_level', 'Radiant') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 80) - Buff = actor.getBuffByName('proc_old_dark_jedi_gift') - if actor.getBuffList().contains(Buff): - core.buffService.removeBuffFromCreature(actor, Buff) - return - - if actor: - core.buffService.addBuffToCreature(actor, 'proc_old_dark_jedi_gift') - return - return + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 250) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 250) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:luck_modified', 250) -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'constitution_modified', 250) - core.skillModService.deductSkillMod(actor, 'precision_modified', 250) - core.skillModService.deductSkillMod(actor, 'luck_modified', 250) + object.setStringAttribute('proc_name', '@ui_buff:proc_old_dark_jedi_gift') + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') - Buff = actor.getBuffByName('proc_old_dark_jedi_gift') - if actor.getBuffList().contains(Buff): - core.buffService.removeBuffFromCreature(actor, Buff) - return - return - \ No newline at end of file + object.setAttachment('type', 'jedi_robe') + object.setAttachment('setBonus', 'set_bonus_jedi_robe') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_light_s01.py b/scripts/object/tangible/wearables/robe/robe_jedi_light_s01.py index 639eac05..bc274ef4 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_light_s01.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_light_s01.py @@ -1,18 +1,15 @@ import sys def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_light_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_light_03_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 100) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 100) + object.setStringAttribute('protection_level', 'Weak') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 40) + object.setAttachment('type', 'jedi_robe') + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') return - -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'constitution_modified', 100) - core.skillModService.addSkillMod(actor, 'strength_modified', 100) - - return - -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'constitution_modified', 100) - core.skillModService.deductSkillMod(actor, 'strength_modified', 100) - - - return - \ No newline at end of file diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_light_s02.py b/scripts/object/tangible/wearables/robe/robe_jedi_light_s02.py index 9db15ef9..7e01e7ab 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_light_s02.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_light_s02.py @@ -1,18 +1,15 @@ import sys def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_light_03_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_light_03_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 145) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 145) + object.setStringAttribute('protection_level', 'Lucent') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 60) + object.setAttachment('type', 'jedi_robe') + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') return - -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'constitution_modified', 145) - core.skillModService.addSkillMod(actor, 'strength_modified', 145) - - return - -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'constitution_modified', 145) - core.skillModService.deductSkillMod(actor, 'strength_modified', 145) - - - return - \ No newline at end of file diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_light_s03.py b/scripts/object/tangible/wearables/robe/robe_jedi_light_s03.py index 6a546a09..904d0be2 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_light_s03.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_light_s03.py @@ -1,19 +1,21 @@ import sys def setup(core, object): - return + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_light_03_03') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_light_03_03') -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'agility_modified', 185) - core.skillModService.addSkillMod(actor, 'constitution_modified', 185) - core.skillModService.addSkillMod(actor, 'strength_modified', 185) + object.setStringAttribute('protection_level', 'Luminous') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 80) - return + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 185) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 185) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 185) -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'agility_modified', 185) - core.skillModService.deductSkillMod(actor, 'constitution_modified', 185) - core.skillModService.deductSkillMod(actor, 'strength_modified', 185) - + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') + + object.setAttachment('type', 'jedi_robe') + object.setAttachment('setBonus', 'set_bonus_jedi_robe') return - \ No newline at end of file diff --git a/scripts/object/tangible/wearables/robe/robe_jedi_light_s04.py b/scripts/object/tangible/wearables/robe/robe_jedi_light_s04.py index be022790..c540ba74 100644 --- a/scripts/object/tangible/wearables/robe/robe_jedi_light_s04.py +++ b/scripts/object/tangible/wearables/robe/robe_jedi_light_s04.py @@ -1,31 +1,26 @@ import sys def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_jedi_robe_light_04_04') + object.setDetailFilename('static_item_d') + object.setDetailName('item_jedi_robe_light_04_04') + + object.setStringAttribute('protection_level', 'Radiant') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 80) + + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 250) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:strength_modified', 250) + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 250) + + + object.setStringAttribute('proc_name', '@ui_buff:proc_old_light_jedi_gift') + object.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_jedi_robe_1') + + object.setAttachment('type', 'jedi_robe') + object.setAttachment('setBonus', 'set_bonus_jedi_robe') + return - -def equip(core, actor, target): - core.skillModService.addSkillMod(actor, 'agility_modified', 250) - core.skillModService.addSkillMod(actor, 'constitution_modified', 250) - core.skillModService.addSkillMod(actor, 'strength_modified', 250) - - Buff = actor.getBuffByName('proc_old_light_jedi_gift') - if actor.getBuffList().contains(Buff): - core.buffService.removeBuffFromCreature(actor, Buff) - return - - if actor: - core.buffService.addBuffToCreature(actor, 'proc_old_light_jedi_gift') - return - return - -def unequip(core, actor, target): - core.skillModService.deductSkillMod(actor, 'agility_modified', 250) - core.skillModService.deductSkillMod(actor, 'constitution_modified', 250) - core.skillModService.deductSkillMod(actor, 'strength_modified', 250) - - Buff = actor.getBuffByName('proc_old_light_jedi_gift') - if actor.getBuffList().contains(Buff): - core.buffService.removeBuffFromCreature(actor, Buff) - return - return + \ No newline at end of file diff --git a/scripts/object/tangible/wearables/shirt/item_smuggler_shirt_02_01.py b/scripts/object/tangible/wearables/shirt/item_smuggler_shirt_02_01.py new file mode 100644 index 00000000..c331d0b1 --- /dev/null +++ b/scripts/object/tangible/wearables/shirt/item_smuggler_shirt_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_smuggler_shirt_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_smuggler_shirt_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Smuggler') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/shirt/item_spy_shirt_02_01.py b/scripts/object/tangible/wearables/shirt/item_spy_shirt_02_01.py new file mode 100644 index 00000000..8bda143e --- /dev/null +++ b/scripts/object/tangible/wearables/shirt/item_spy_shirt_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_spy_shirt_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_spy_shirt_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Spy') + return \ No newline at end of file diff --git a/scripts/object/tangible/wearables/vest/item_smuggler_vest_02_01.py b/scripts/object/tangible/wearables/vest/item_smuggler_vest_02_01.py new file mode 100644 index 00000000..35c0cd30 --- /dev/null +++ b/scripts/object/tangible/wearables/vest/item_smuggler_vest_02_01.py @@ -0,0 +1,10 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_smuggler_vest_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_smuggler_vest_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) + object.setStringAttribute('class_required', 'Smuggler') + return \ No newline at end of file diff --git a/scripts/object/weapon/creature/creature_default_weapon.py b/scripts/object/weapon/creature/creature_default_weapon.py index ccad8904..78eeaca8 100644 --- a/scripts/object/weapon/creature/creature_default_weapon.py +++ b/scripts/object/weapon/creature/creature_default_weapon.py @@ -1,4 +1,12 @@ import sys +from resources.datatables import WeaponType def setup(core, object): + object.setAttackSpeed(1) + object.setDamageType("kinetic") + object.setMinDamage(50) + object.setMaxDamage(100) + object.setMaxRange(5) + object.setWeaponType(WeaponType.UNARMED) + return \ No newline at end of file diff --git a/scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py b/scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py new file mode 100644 index 00000000..a730dfbb --- /dev/null +++ b/scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_polearm_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_polearm_02_03') + object.setIntAttribute('required_combat_level', 1) + object.setAttackSpeed(1); + object.setMaxRange(5); + object.setDamageType("kinetic"); + object.setMinDamage(43); + object.setMaxDamage(75); + object.setWeaponType(7); + return + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/carbine/weapon_acidbeam_commando_roadmap_01_02.py b/scripts/object/weapon/ranged/carbine/weapon_acidbeam_commando_roadmap_01_02.py new file mode 100644 index 00000000..8fd46b6d --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_acidbeam_commando_roadmap_01_02.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_acidbeam_commando_roadmap_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_acidbeam_commando_roadmap_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 5) + object.setStringAttribute('class_required', 'Commando') + object.setIntAttribute('required_combat_level', 30) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '109-218') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-50m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Carbine') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/carbine/weapon_carbine_bh_roadmap_01_02.py b/scripts/object/weapon/ranged/carbine/weapon_carbine_bh_roadmap_01_02.py new file mode 100644 index 00000000..eede7b59 --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_carbine_bh_roadmap_01_02.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_carbine_bh_roadmap_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_carbine_bh_roadmap_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 5) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 30) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '109-218') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-55m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Carbine') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_bh_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_bh_03_01.py new file mode 100644 index 00000000..600a05a8 --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_bh_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_carbine_bh_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_carbine_bh_03_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 1) + object.setAttackSpeed(0.6); + object.setMaxRange(35); + object.setDamageType("energy"); + object.setMinDamage(17); + object.setMaxDamage(43); + object.setWeaponType(1); + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py new file mode 100644 index 00000000..bb153176 --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_carbine_spy_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_carbine_spy_03_01') + object.setStringAttribute('class_required', 'Spy') + object.setIntAttribute('required_combat_level', 1) + object.setAttackSpeed(0.6); + object.setMaxRange(35); + object.setDamageType("energy"); + object.setMinDamage(17); + object.setMaxDamage(43); + object.setWeaponType(1); + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py new file mode 100644 index 00000000..e707e4f4 --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_commando_carbine_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_commando_carbine_03_01') + object.setStringAttribute('class_required', 'Commando') + object.setIntAttribute('required_combat_level', 1) + object.setAttackSpeed(0.6); + object.setMaxRange(35); + object.setDamageType("energy"); + object.setMinDamage(20); + object.setMaxDamage(40); + object.setWeaponType(1); + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py b/scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py new file mode 100644 index 00000000..b1c7fa0f --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_npe_officer_sidearm') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_officer_sidearm') + object.setStringAttribute('class_required', 'Officer') + object.setIntAttribute('required_combat_level', 1) + object.setAttackSpeed(0.4); + object.setMaxRange(35); + object.setDamageType("energy"); + object.setMinDamage(15); + object.setMaxDamage(25); + object.setWeaponType(2); + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/pistol/item_npe_smuggler_han_solo_gun.py b/scripts/object/weapon/ranged/pistol/item_npe_smuggler_han_solo_gun.py new file mode 100644 index 00000000..baef2e0b --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/item_npe_smuggler_han_solo_gun.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_npe_smuggler_han_solo_gun') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_smuggler_han_solo_gun') + object.setStringAttribute('class_required', 'Smuggler') + object.setIntAttribute('required_combat_level', 1) + object.setAttackSpeed(0.4); + object.setMaxRange(35); + object.setDamageType("energy"); + object.setMinDamage(13); + object.setMaxDamage(27); + object.setWeaponType(2); + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/pistol/weapon_npe_medic_pistol_03_01.py b/scripts/object/weapon/ranged/pistol/weapon_npe_medic_pistol_03_01.py new file mode 100644 index 00000000..56169960 --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/weapon_npe_medic_pistol_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_medic_pistol_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_medic_pistol_03_01') + object.setStringAttribute('class_required', 'Medic') + object.setIntAttribute('required_combat_level', 1) + object.setAttackSpeed(0.4); + object.setMaxRange(35); + object.setDamageType("energy"); + object.setMinDamage(13); + object.setMaxDamage(27); + object.setWeaponType(2); + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/pistol/weapon_pistol_02_02.py b/scripts/object/weapon/ranged/pistol/weapon_pistol_02_02.py new file mode 100644 index 00000000..055d033d --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/weapon_pistol_02_02.py @@ -0,0 +1,15 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_pistol_02_02') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_pistol_02_02') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '10-26') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Pistol') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/rifle/weapon_lightningbeam_commando_roadmap_01_02.py b/scripts/object/weapon/ranged/rifle/weapon_lightningbeam_commando_roadmap_01_02.py new file mode 100644 index 00000000..03768d96 --- /dev/null +++ b/scripts/object/weapon/ranged/rifle/weapon_lightningbeam_commando_roadmap_01_02.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_lightningbeam_commando_roadmap_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_lightningbeam_commando_roadmap_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 5) + object.setStringAttribute('class_required', 'Commando') + object.setIntAttribute('required_combat_level', 30) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.8) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '261-522') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-64m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Rifle') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file diff --git a/scripts/object/weapon/ranged/rifle/weapon_rifle_bh_roadmap_01_02.py b/scripts/object/weapon/ranged/rifle/weapon_rifle_bh_roadmap_01_02.py new file mode 100644 index 00000000..33825f81 --- /dev/null +++ b/scripts/object/weapon/ranged/rifle/weapon_rifle_bh_roadmap_01_02.py @@ -0,0 +1,17 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_rifle_bh_roadmap_01_02') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_rifle_bh_roadmap_01_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 5) + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 50) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.8) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '261-522') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-64m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Rifle') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file diff --git a/scripts/radial/creature/player.py b/scripts/radial/creature/player.py new file mode 100644 index 00000000..08fa50e0 --- /dev/null +++ b/scripts/radial/creature/player.py @@ -0,0 +1,32 @@ +from resources.common import RadialOptions +from resources.datatables import Posture +import sys + +def createRadial(core, owner, target, radials): + if target.getPosture() == Posture.SkillAnimating: + if owner.getPerformanceWatchee() == target: + if target.getPerformanceType() is True: + radials.add(RadialOptions(0, 141, 3, 'Stop Watching')) + elif owner.getPerformanceListenee() == target: + radials.add(RadialOptions(0, 141, 3, 'Stop Listening')) + else: + if target.getPerformanceType() is True: + radials.add(RadialOptions(0, 140, 3, 'Watch')) + else: + radials.add(RadialOptions(0, 140, 3, 'Listen')) + return + +def handleSelection(core, owner, target, option): + if option == 140: + if target.getPerformanceType() is True: + core.commandService.callCommand(owner, 'watch', target, '') + return + else: + # TODO: Insert callCommand /listen + return + return + + if option == 141: + core.commandService.callCommand(owner, 'stopwatching', target, '') + return + return \ No newline at end of file diff --git a/scripts/radial/creature/vehicle.py b/scripts/radial/creature/vehicle.py new file mode 100644 index 00000000..5935709d --- /dev/null +++ b/scripts/radial/creature/vehicle.py @@ -0,0 +1,31 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + master = core.objectService.getObject(target.getOwnerId()) + + radials.add(RadialOptions(0, 7, 1, '')) + if core.mountService.canMount(owner, target): + radials.add(RadialOptions(1, 40, 3, '@pet/pet_menu:menu_enter_exit')) + radials.add(RadialOptions(0, 21, 1, '')) + if target.getOwnerId() == owner.getObjectID(): + radials.add(RadialOptions(0, 60, 3, '@pet/pet_menu:menu_store')) + if core.mountService.canRepair(owner, target): + radials.add(RadialOptions(0, 114, 3, '@pet/pet_menu:menu_repair_vehicle')) + return + +def handleSelection(core, owner, target, option): + mntSvc = core.mountService + + if target: + if option == 21: + if mntSvc.isMounted(owner): + mntSvc.mount(owner, target) + else: + mntSvc.unmount(owner, target) + elif option == 60: + mntSvc.store(owner, target) + elif option == 114: + mntSvc.repair(owner, target) + return + diff --git a/scripts/radial/datapad/vehicle_pcd.py b/scripts/radial/datapad/vehicle_pcd.py new file mode 100644 index 00000000..fc880185 --- /dev/null +++ b/scripts/radial/datapad/vehicle_pcd.py @@ -0,0 +1,21 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + #if not core.mountService.getMount(target): + # radials.add(RadialOptions(0, 21, 3, '@pet_menu:menu_call')) + #else: + # radials.add(RadialOptions(0, 21, 3, '@pet_menu:menu_store')) + radials.add(RadialOptions(0, 61, 1, '')) + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 15, 1, '')) + return + +def handleSelection(core, owner, target, option): + if option == 61 and target: + core.mountService.call(owner, target) + elif option == 15 and target: + core.mountService.destroy(owner, target) + + return + \ No newline at end of file diff --git a/scripts/radial/vehicleDeed.py b/scripts/radial/deeds/deed.py similarity index 100% rename from scripts/radial/vehicleDeed.py rename to scripts/radial/deeds/deed.py diff --git a/scripts/radial/deeds/harvesterDeed.py b/scripts/radial/deeds/harvesterDeed.py new file mode 100644 index 00000000..cc8fdc7a --- /dev/null +++ b/scripts/radial/deeds/harvesterDeed.py @@ -0,0 +1,23 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 21, 1, 'Use Deed')) + #radials.add(RadialOptions(0, 7, 1, '111111')) + #radials.add(RadialOptions(0, 15, 1, '')) + #radials.add(RadialOptions(0, 61, 1, '')) + return + +def handleSelection(core, owner, target, option): + + if option == 21 and target: + owner.setAttachment('UsingHarvesterDeed', '1'); + core.harvesterService.enterStructurePlacementMode(target,owner) + if option == 61 and target: + object5 = core.harvesterService.constructionSite(owner,target) + core.objectService.useObject(owner, target) + if option == 15 and target: + core.objectService.destroyObject(target) + return + \ No newline at end of file diff --git a/scripts/radial/deeds/structureDeed.py b/scripts/radial/deeds/structureDeed.py new file mode 100644 index 00000000..0ddee9f3 --- /dev/null +++ b/scripts/radial/deeds/structureDeed.py @@ -0,0 +1,11 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + return + +def handleSelection(core, owner, target, option): + if option == 21 and target: + core.housingService.enterStructureMode(owner, target) + return + \ No newline at end of file diff --git a/scripts/radial/deeds/vehicleDeed.py b/scripts/radial/deeds/vehicleDeed.py new file mode 100644 index 00000000..033462ad --- /dev/null +++ b/scripts/radial/deeds/vehicleDeed.py @@ -0,0 +1,16 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 15, 1, '')) + radials.add(RadialOptions(0, 61, 3, '@pet_menu:menu_generate')) + return + +def handleSelection(core, owner, target, option): + if option == 61 and target: + core.objectService.useObject(owner, target) + if option == 15 and target: + core.objectService.destroyObject(target) + return + \ No newline at end of file diff --git a/scripts/radial/item.py b/scripts/radial/equipment/appearance.py similarity index 100% rename from scripts/radial/item.py rename to scripts/radial/equipment/appearance.py diff --git a/scripts/radial/equipment/wearable.py b/scripts/radial/equipment/wearable.py new file mode 100644 index 00000000..4c184296 --- /dev/null +++ b/scripts/radial/equipment/wearable.py @@ -0,0 +1,16 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.add(RadialOptions(0, 21, 1, '')) + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 15, 1, '')) + return + +def handleSelection(core, owner, target, option): + if option == 21 and target: + core.objectService.useObject(owner, target) + if option == 15 and target: + core.objectService.destroyObject(target) + return + \ No newline at end of file diff --git a/scripts/radial/lifeday_gift.py b/scripts/radial/holidays/lifeday_gift.py similarity index 100% rename from scripts/radial/lifeday_gift.py rename to scripts/radial/holidays/lifeday_gift.py diff --git a/scripts/radial/main_lifeday_tree.py b/scripts/radial/holidays/main_lifeday_tree.py similarity index 100% rename from scripts/radial/main_lifeday_tree.py rename to scripts/radial/holidays/main_lifeday_tree.py diff --git a/scripts/radial/instances/exar_kun/exar_kun_brazier.py b/scripts/radial/instances/exar_kun/exar_kun_brazier.py new file mode 100644 index 00000000..d78e1915 --- /dev/null +++ b/scripts/radial/instances/exar_kun/exar_kun_brazier.py @@ -0,0 +1,14 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.add(RadialOptions(0, 21, 1, '')) + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 21, 3, '@building_name:heroic_exar_enter')) + return + +def handleSelection(core, owner, target, option): + if option == 21 and target: + core.objectService.useObject(owner, target) + return + \ No newline at end of file diff --git a/scripts/radial/collection.py b/scripts/radial/item/collection.py similarity index 100% rename from scripts/radial/collection.py rename to scripts/radial/item/collection.py diff --git a/scripts/radial/item/item.py b/scripts/radial/item/item.py new file mode 100644 index 00000000..4c184296 --- /dev/null +++ b/scripts/radial/item/item.py @@ -0,0 +1,16 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.add(RadialOptions(0, 21, 1, '')) + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 15, 1, '')) + return + +def handleSelection(core, owner, target, option): + if option == 21 and target: + core.objectService.useObject(owner, target) + if option == 15 and target: + core.objectService.destroyObject(target) + return + \ No newline at end of file diff --git a/scripts/radial/item/lootchest.py b/scripts/radial/item/lootchest.py new file mode 100644 index 00000000..1a0c9889 --- /dev/null +++ b/scripts/radial/item/lootchest.py @@ -0,0 +1,13 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.add(RadialOptions(0, 21, 1, 'Open')) + radials.add(RadialOptions(0, 7, 1, '')) + return + +def handleSelection(core, owner, target, option): + if option == 21 and target: + owner.sendSystemMessage('RLS chest content system not yet implemented.',1) + return + \ No newline at end of file diff --git a/scripts/radial/item/resourceContainer.py b/scripts/radial/item/resourceContainer.py new file mode 100644 index 00000000..fb6fa586 --- /dev/null +++ b/scripts/radial/item/resourceContainer.py @@ -0,0 +1,18 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.add(RadialOptions(0, 49, 0, 'Split')) + radials.add(RadialOptions(0, 7, 0, 'Examine')) + radials.add(RadialOptions(0, 15, 0, 'Destroy')) + return + +def handleSelection(core, owner, target, option): + #if option == 21 and target: + #core.objectService.useObject(owner, target) + if option == 15 and target: + if target == player.getRecentContainer(): + player.setRecentContainer(None) + + core.objectService.destroyObject(target) + return \ No newline at end of file diff --git a/scripts/radial/item/survey_tool.py b/scripts/radial/item/survey_tool.py new file mode 100644 index 00000000..33e36367 --- /dev/null +++ b/scripts/radial/item/survey_tool.py @@ -0,0 +1,27 @@ +from resources.common import RadialOptions +from protocol.swg import ResourceListForSurveyMessage +from services.sui.SUIService import MessageBoxType +from services.SurveyService import createSurveyRangeSUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 21, 1, 'Use')) + radials.add(RadialOptions(0, 7, 0, 'Examine')) + radials.add(RadialOptions(0, 15, 0, 'Destroy')) + radials.add(RadialOptions(0, 132, 1, 'Tool Options')) + return + +def handleSelection(core, owner, target, option): + if option == 21 and target: + if owner is not None: + rlfsm = ResourceListForSurveyMessage(core,target,owner) + owner.getClient().getSession().write(rlfsm.serialize()) + return + if option == 132: + if owner is not None: + surSvc = core.surveyService + surSvc.createSurveyRangeSUIWindow(owner, target) + return diff --git a/scripts/radial/travel_ticket.py b/scripts/radial/item/travel_ticket.py similarity index 93% rename from scripts/radial/travel_ticket.py rename to scripts/radial/item/travel_ticket.py index a42df278..fbb150e9 100644 --- a/scripts/radial/travel_ticket.py +++ b/scripts/radial/item/travel_ticket.py @@ -2,7 +2,7 @@ from resources.common import RadialOptions import sys def createRadial(core, owner, target, radials): - radials.clear + radials.clear() radials.add(RadialOptions(0, 21, 1, 'Use Travel Ticket')) #radials.add(RadialOptions(0, 7, 1, '')) @@ -31,7 +31,7 @@ def handleSelection(core, owner, target, option): return if option == 15 and target: - core.commandService.callCommand(owner, 'serverdestroyobject', target, None) + core.objectService.destroyObject(target) return return diff --git a/scripts/radial/item/tunable.py b/scripts/radial/item/tunable.py new file mode 100644 index 00000000..f226f86b --- /dev/null +++ b/scripts/radial/item/tunable.py @@ -0,0 +1,15 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 7, 0, 'Examine')) + radials.add(RadialOptions(0, 15, 0, 'Destroy')) + radials.add(RadialOptions(0, 19, 0, 'Tune')) + return + +def handleSelection(core, owner, target, option): + if option == 19 and target: + if owner is not None: + owner.sendSystemMessage('You are not attuned enough with the force yet.',1) + return diff --git a/scripts/radial/lootitem.py b/scripts/radial/lootitem.py new file mode 100644 index 00000000..ec9ae01e --- /dev/null +++ b/scripts/radial/lootitem.py @@ -0,0 +1,19 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 11, 1, 'Pick Up')) + radials.add(RadialOptions(0, 21, 1, '')) + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 15, 1, '')) + return + +def handleSelection(core, owner, target, option): + + if option == 21 and target: + core.objectService.useObject(owner, target) + if option == 15 and target: + core.objectService.destroyObject(target) + return + \ No newline at end of file diff --git a/scripts/radial/noradialoptions.py b/scripts/radial/noradialoptions.py new file mode 100644 index 00000000..89075314 --- /dev/null +++ b/scripts/radial/noradialoptions.py @@ -0,0 +1,13 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 21, 1, '')) + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 15, 1, '')) + return + +def handleSelection(core, owner, target, option): + return + \ No newline at end of file diff --git a/scripts/radial/npc/corpse.py b/scripts/radial/npc/corpse.py new file mode 100644 index 00000000..dc93d74a --- /dev/null +++ b/scripts/radial/npc/corpse.py @@ -0,0 +1,20 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 36, 0, 'Loot')) + + return + +def handleSelection(core, owner, target, option): + if option == 36 and target: + #core.lootService.handleLootRequest(owner,target) + core.lootService.handleLootRequest(owner,target) + #lootedObjectInventory = target.getSlottedObject("inventory") + #core.simulationService.openContainer(owner, lootedObjectInventory) + #core.lootService.handleCreditDrop(owner, lootedObjectInventory) + if option == 15 and target: + core.objectService.destroyObject(target) + return + \ No newline at end of file diff --git a/scripts/radial/npc/noloot.py b/scripts/radial/npc/noloot.py new file mode 100644 index 00000000..00f0176a --- /dev/null +++ b/scripts/radial/npc/noloot.py @@ -0,0 +1,13 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 36, 0, '')) + + return + +def handleSelection(core, owner, target, option): + + return + \ No newline at end of file diff --git a/scripts/radial/npc_ticket_collector.py b/scripts/radial/npc/npc_ticket_collector.py similarity index 100% rename from scripts/radial/npc_ticket_collector.py rename to scripts/radial/npc/npc_ticket_collector.py diff --git a/scripts/radial/object/conversation.py b/scripts/radial/object/conversation.py new file mode 100644 index 00000000..ee774b7d --- /dev/null +++ b/scripts/radial/object/conversation.py @@ -0,0 +1,15 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.add(RadialOptions(0, 21, 1, '')) + radials.add(RadialOptions(0, 7, 1, '')) + radials.add(RadialOptions(0, 26, 1, '')) + return + +def handleSelection(core, owner, target, option): + if option == 26 and target: + print 'test' + core.conversationService.handleStartConversation(owner, target) + return + \ No newline at end of file diff --git a/scripts/radial/usable.py b/scripts/radial/object/usable.py similarity index 100% rename from scripts/radial/usable.py rename to scripts/radial/object/usable.py diff --git a/scripts/radial/ring/unity.py b/scripts/radial/ring/unity.py new file mode 100644 index 00000000..92940452 --- /dev/null +++ b/scripts/radial/ring/unity.py @@ -0,0 +1,108 @@ +from resources.common import RadialOptions +from services.sui.SUIWindow import Trigger +from java.util import Vector +from main import NGECore +from engine.resources.objects import SWGObject +import sys + +def createRadial(core, owner, target, radials): + + ghost = owner.getSlottedObject('ghost') + if ghost is None: + return + + if ghost.getSpouseName() is None or ghost.getSpouseName() is "": + targetPlayer = core.objectService.getObject(owner.getTargetId()) + if targetPlayer is not None and targetPlayer.getSlottedObject('ghost') is not None: + if targetPlayer.getObjectID() == owner.getObjectID(): + return + radials.add(RadialOptions(0, 69, 3, '@unity:mnu_propose')) + return + else: + radials.add(RadialOptions(0, 70, 3, '@unity:mnu_divorce')) + return + return + +def handleSelection(core, owner, target, option): + if option == 69 and target: + player = core.objectService.getObject(owner.getTargetId()) + tGhost = player.getSlottedObject('ghost') + suiSvc = core.suiService + + if tGhost.getPosition().getDistance2D(owner.getWorldPosition()) < 50: + owner.sendSystemMessage('@unity:out_of_range', 0) + return + + if tGhost.getSpouseName() is not None: + owner.sendSystemMessage('@unity:target_married', 0) + return + + if player.getAttachment("proposer") is not None: + owner.sendSystemMessage('@unity:target_proposed', 0) + return + + else: + + owner.sendSystemMessage('You propose unity to ' + player.getCustomName() + '.', 0) + targetWindow = suiSvc.createMessageBox(3, '@unity:accept_title', owner.getCustomName() + ' is proposing unity to you. Do you wish to accept?', tGhost.getContainer(), owner, 15) + returnList = Vector() + + targetWindow.addHandler(0, '', Trigger.TRIGGER_OK, returnList, handlePropose) + targetWindow.addHandler(1, '', Trigger.TRIGGER_CANCEL, returnList, handlePropose) + player.setAttachment("proposer", owner.getCustomName()) + suiSvc.openSUIWindow(targetWindow) + + target.setAttachment("unity", True) + core.equipmentService.equip(owner, target) + + core.commandService.callCommand(owner, 'kneel', None, '') + return + return + + if option == 70: + married = owner.getSlottedObject('ghost').getSpouseName() + myGhost = owner.getSlottedObject('ghost') + otherPlayer = NGECore.getInstance().objectService.getObjectByCustomName(married) + + if otherPlayer is None: + return + ghost = otherPlayer.getSlottedObject('ghost') + + if ghost is None: + return + + owner.sendSystemMessage('Your union with ' + married + ' has ended.', 0) + otherPlayer.sendSystemMessage('Your union with ' + owner.getCustomName() + ' has ended.', 0) + myGhost.setSpouseName(None) + ghost.setSpouseName(None) + + target.setAttachment("unity", None) + #TODO: Divorce offline players + return + return + +def handlePropose(owner, window, eventType, returnList): + core = NGECore.getInstance() + + if owner is None: + return + + if eventType == 0: + proposer = core.objectService.getObjectByCustomName(owner.getAttachment("proposer")) + if proposer is None: + return + + core.playerService.performUnity(owner, proposer) + return + + if eventType == 1: + proposer = core.objectService.getObjectByCustomName(owner.getAttachment("proposer")) + proposer.sendSystemMessage('@unity:declined', 0) + for SWGObject in proposer.getEquipmentList(): + if SWGObject.getAttachment("unity") is not None: + SWGObject.setAttachment("unity", None) + break + + owner.setAttachment("proposer", None) + return + return diff --git a/scripts/radial/structure/generator.py b/scripts/radial/structure/generator.py new file mode 100644 index 00000000..44d7a9b4 --- /dev/null +++ b/scripts/radial/structure/generator.py @@ -0,0 +1,53 @@ +from resources.common import RadialOptions +from protocol.swg import ResourceListForSurveyMessage +from services.sui.SUIService import MessageBoxType +from services.SurveyService import createSurveyRangeSUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def createRadial(core, owner, target, radials): + #(byte parentId, short optionId, byte optionType, String description) + radials.clear() + radials.add(RadialOptions(0, 7, 0, 'Examine')) + radials.add(RadialOptions(0, 78, 0, '@player_structure:management')) + radials.add(RadialOptions(0, 117, 0, '@player_structure:permissions')) + radials.add(RadialOptions(2, 118, 0, '@harvester:manage')) + radials.add(RadialOptions(2, 128, 0, '@player_structure:permission_destroy')) + radials.add(RadialOptions(2, 124, 0, '@player_structure:management_status')) + radials.add(RadialOptions(2, 129, 0, '@player_structure:management_pay')) + radials.add(RadialOptions(2, 50, 0, '@base_player:set_name')) + radials.add(RadialOptions(3, 121, 0, '@player_structure:permission_admin')) + radials.add(RadialOptions(3, 123, 0, '@player_structure:permissions')) + + return + +def handleSelection(core, owner, target, option): + if option == 118 and target: + if owner is not None: + core.harvesterService.handleOperateMachinery(owner,target) + return + if option == 128: + if owner is not None: + core.harvesterService.createDestroySUIPage(owner,target) + return + if option == 124: + if owner is not None: + core.harvesterService.createStatusSUIPage(owner,target) + return + if option == 129: + if owner is not None: + core.harvesterService.createPayMaintenanceSUIPage(owner,target) + return + if option == 50: + if owner is not None: + core.harvesterService.createRenameSUIPage(owner,target) + return + if option == 121: + if owner is not None: + core.harvesterService.handlePermissionAdmin(owner,target) + return + if option == 123: + if owner is not None: + core.harvesterService.handlePermissionHopper(owner,target) + return diff --git a/scripts/radial/structure/harvester.py b/scripts/radial/structure/harvester.py new file mode 100644 index 00000000..079c99ae --- /dev/null +++ b/scripts/radial/structure/harvester.py @@ -0,0 +1,58 @@ +from resources.common import RadialOptions +from protocol.swg import ResourceListForSurveyMessage +from services.sui.SUIService import MessageBoxType +from services.SurveyService import createSurveyRangeSUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def createRadial(core, owner, target, radials): + #(byte parentId, short optionId, byte optionType, String description) + radials.clear() + radials.add(RadialOptions(0, 7, 0, 'Examine')) + radials.add(RadialOptions(0, 78, 0, '@player_structure:management')) + radials.add(RadialOptions(0, 117, 0, '@player_structure:permissions')) + radials.add(RadialOptions(2, 118, 0, '@harvester:manage')) + radials.add(RadialOptions(2, 128, 0, '@player_structure:permission_destroy')) + radials.add(RadialOptions(2, 124, 0, '@player_structure:management_status')) + radials.add(RadialOptions(2, 129, 0, '@player_structure:management_pay')) + radials.add(RadialOptions(2, 50, 0, '@base_player:set_name')) + radials.add(RadialOptions(2, 51, 0, '@player_structure:management_power')) + radials.add(RadialOptions(3, 121, 0, '@player_structure:permission_admin')) + radials.add(RadialOptions(3, 123, 0, '@player_structure:permissions')) + + return + +def handleSelection(core, owner, target, option): + if option == 118 and target: + if owner is not None: + core.harvesterService.handleOperateMachinery(owner,target) + return + if option == 128: + if owner is not None: + core.harvesterService.createDestroySUIPage(owner,target) + return + if option == 124: + if owner is not None: + core.harvesterService.createStatusSUIPage(owner,target) + return + if option == 129: + if owner is not None: + core.harvesterService.createPayMaintenanceSUIPage(owner,target) + return + if option == 50: + if owner is not None: + core.harvesterService.createRenameSUIPage(owner,target) + return + if option == 51: + if owner is not None: + core.harvesterService.handleDepositPower(owner,target) + return + if option == 121: + if owner is not None: + core.harvesterService.handlePermissionAdmin(owner,target) + return + if option == 123: + if owner is not None: + core.harvesterService.handlePermissionHopper(owner,target) + return diff --git a/scripts/radial/structure/harvesterHopper.py b/scripts/radial/structure/harvesterHopper.py new file mode 100644 index 00000000..3323d45b --- /dev/null +++ b/scripts/radial/structure/harvesterHopper.py @@ -0,0 +1,21 @@ +from resources.common import RadialOptions +from protocol.swg import ResourceListForSurveyMessage +from services.sui.SUIService import MessageBoxType +from services.SurveyService import createSurveyRangeSUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def createRadial(core, owner, target, radials): + #(byte parentId, short optionId, byte optionType, String description) + radials.clear() + radials.add(RadialOptions(0, 7, 0, 'Examine')) + radials.add(RadialOptions(0, 78, 0, '@player_structure:management')) + radials.add(RadialOptions(2, 118, 0, '@harvester:manage')) + return + +def handleSelection(core, owner, target, option): + if option == 118 and target: + if owner is not None: + core.harvesterService.handleOperateMachinery(owner,target) + return diff --git a/scripts/radial/structure/moveable.py b/scripts/radial/structure/moveable.py new file mode 100644 index 00000000..4bbb4120 --- /dev/null +++ b/scripts/radial/structure/moveable.py @@ -0,0 +1,25 @@ +from resources.common import RadialOptions +import sys + +def createRadial(core, owner, target, radials): + radials.clear() + radials.add(RadialOptions(0, 11, 1, '')) + + radials.add(RadialOptions(0, 55, 0, '')) + radials.add(RadialOptions(3, 56, 1, '')) + radials.add(RadialOptions(3, 57, 1, '')) + radials.add(RadialOptions(3, 58, 1, '')) + radials.add(RadialOptions(3, 59, 1, '')) + + radials.add(RadialOptions(0, 52, 0, '')) + radials.add(RadialOptions(4, 53, 1, '')) + radials.add(RadialOptions(4, 54, 1, '')) + return + +def handleSelection(core, owner, target, option): + + if option == 56: + core.commandService.callCommand(owner, 'movefurniture', target, 'forward 10') + + return + \ No newline at end of file diff --git a/scripts/radial/structure/structure_management_terminal.py b/scripts/radial/structure/structure_management_terminal.py new file mode 100644 index 00000000..b6e7ae3a --- /dev/null +++ b/scripts/radial/structure/structure_management_terminal.py @@ -0,0 +1,77 @@ +from resources.common import RadialOptions +from protocol.swg import ResourceListForSurveyMessage +from services.sui.SUIService import MessageBoxType +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def createRadial(core, owner, target, radials): + #(byte parentId, short optionId, byte optionType, String description) + radials.clear() + radials.add(RadialOptions(0, 7, 0, 'Examine')) + radials.add(RadialOptions(0, 78, 0, '@player_structure:management')) + radials.add(RadialOptions(0, 117, 0, '@player_structure:permissions')) + radials.add(RadialOptions(2, 128, 0, '@player_structure:permission_destroy')) + radials.add(RadialOptions(2, 124, 0, '@player_structure:management_status')) + radials.add(RadialOptions(2, 129, 0, '@player_structure:management_pay')) + radials.add(RadialOptions(2, 50, 0, '@base_player:set_name')) + radials.add(RadialOptions(2, 127, 0, '@player_structure:management_residence')) + radials.add(RadialOptions(2, 125, 0, '@player_structure:management_privacy : ' + core.housingService.fetchPrivacyString(target))) + radials.add(RadialOptions(2, 171, 0, '@player_structure:find_items_find_all_house_items')) + radials.add(RadialOptions(2, 173, 0, '@player_structure:move_first_item')) + radials.add(RadialOptions(2, 174, 0, '@player_structure:find_items_search_for_house_items')) + radials.add(RadialOptions(2, 175, 0, '@player_structure:delete_all_items_title')) + radials.add(RadialOptions(2, 172, 0, 'Pack Up This Building')) + radials.add(RadialOptions(3, 121, 0, '@player_structure:permission_enter')) + radials.add(RadialOptions(3, 123, 0, '@player_structure:permission_banned')) + + return + +def handleSelection(core, owner, target, option): + + if option == 128: + if owner is not None: + core.housingService.createDestroySUIPage(owner,target) + return + if option == 124: + if owner is not None: + core.housingService.createStatusSUIPage(owner,target) + return + if option == 129: + if owner is not None: + core.housingService.createPayMaintenanceSUIPage(owner,target) + return + if option == 50: + if owner is not None: + core.housingService.createRenameSUIPage(owner,target) + return + if option == 127: + if owner is not None: + core.housingService.declareResidency(owner,target) + return + if option == 171: + if owner is not None: + core.housingService.handleListAllItems(owner,target) + return + if option == 175: + if owner is not None: + core.housingService.handleDeleteAllItems(owner,target) + return + if option == 173: + if owner is not None: + core.housingService.handleFindLostItems(owner,target) + return + if option == 174: + if owner is not None: + core.housingService.handleSearchForItems(owner,target) + return + if option == 121: + if owner is not None: + core.housingService.handlePermissionEntry(owner,target) + return + if option == 123: + if owner is not None: + core.housingService.handlePermissionBan(owner,target) + return + + diff --git a/scripts/radial/bank.py b/scripts/radial/terminal/bank.py similarity index 100% rename from scripts/radial/bank.py rename to scripts/radial/terminal/bank.py diff --git a/scripts/radial/cloning_terminal.py b/scripts/radial/terminal/cloning_terminal.py similarity index 100% rename from scripts/radial/cloning_terminal.py rename to scripts/radial/terminal/cloning_terminal.py diff --git a/scripts/radial/travel_terminal.py b/scripts/radial/terminal/travel_terminal.py similarity index 82% rename from scripts/radial/travel_terminal.py rename to scripts/radial/terminal/travel_terminal.py index eae686ca..a579af12 100644 --- a/scripts/radial/travel_terminal.py +++ b/scripts/radial/terminal/travel_terminal.py @@ -10,6 +10,9 @@ def handleSelection(core, owner, target, option): if option == 21 and target: if owner is not None: + if owner.getCombatFlag() == 1: + owner.sendSystemMessage('You can\'t use that while in combat.', 0) + return tpm = EnterTicketPurchaseModeMessage(owner.getPlanet().getName(), core.mapService.getClosestCityName(owner), owner) owner.getClient().getSession().write(tpm.serialize()) return diff --git a/scripts/radial/vehicle.py b/scripts/radial/vehicle.py deleted file mode 100644 index ca1f4311..00000000 --- a/scripts/radial/vehicle.py +++ /dev/null @@ -1,17 +0,0 @@ -from resources.common import RadialOptions -import sys - -def createRadial(core, owner, target, radials): - radials.add(RadialOptions(0, 7, 1, '')) - radials.add(RadialOptions(1, 40, 3, '@pet/pet_menu:menu_enter_exit')) - radials.add(RadialOptions(0, 21, 1, '')) - radials.add(RadialOptions(0, 60, 3, '@pet/pet_menu:menu_store')) - return - -def handleSelection(core, owner, target, option): - if target: - if option == 21 or option == 40: - core.objectService.useObject(owner, target) - if option == 60: - core.objectService.destroyObject(target) - return \ No newline at end of file diff --git a/scripts/roadmap/bounty_hunter_1a.py b/scripts/roadmap/bounty_hunter_1a.py index 7bb425e3..0c708fec 100644 --- a/scripts/roadmap/bounty_hunter_1a.py +++ b/scripts/roadmap/bounty_hunter_1a.py @@ -23,3 +23,97 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + if name == 'item_bounty_hunter_backpack_01_02': + return "object/tangible/wearables/backpack/shared_backpack_s05.iff" + + if name == 'armor_bounty_hunter_roadmap_bicep_l_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_l.iff" + + if name == 'armor_bounty_hunter_roadmap_bicep_r_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_r.iff" + + if name == 'armor_bounty_hunter_roadmap_bracer_l_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_l.iff" + + if name == 'armor_bounty_hunter_roadmap_bracer_r_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_r.iff" + + if name == 'armor_bounty_hunter_roadmap_boots_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_boots.iff" + + if name == 'armor_bounty_hunter_roadmap_chest_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_chest_plate.iff" + + if name == 'armor_bounty_hunter_roadmap_gloves_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_gloves.iff" + + if name == 'armor_bounty_hunter_roadmap_helmet_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_helmet.iff" + + if name == 'armor_bounty_hunter_roadmap_leggings_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_leggings.iff" + + if name == 'armor_wookiee_roadmap_chest_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_chestplate.iff" + + if name == 'armor_wookiee_roadmap_leggings_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_leggings.iff" + + if name == 'armor_wookiee_roadmap_bicep_l_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_l.iff" + + if name == 'armor_wookiee_roadmap_bicep_r_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_r.iff" + + if name == 'armor_wookiee_roadmap_bracer_l_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_l.iff" + + if name == 'armor_wookiee_roadmap_bracer_r_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_r.iff" + + if name == 'armor_ithorian_roadmap_chest_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_chest_plate.iff" + + if name == 'armor_ithorian_roadmap_leggings_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_leggings.iff" + + if name == 'armor_ithorian_roadmap_helmet_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_helmet.iff" + + if name == 'armor_ithorian_roadmap_bicep_l_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_l.iff" + + if name == 'armor_ithorian_roadmap_bicep_r_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_r.iff" + + if name == 'armor_ithorian_roadmap_bracer_l_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_l.iff" + + if name == 'armor_ithorian_roadmap_bracer_r_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_r.iff" + + if name == 'armor_ithorian_roadmap_boots_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_boots.iff" + + if name == 'armor_ithorian_roadmap_gloves_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff" + + if name == 'weapon_carbine_bh_roadmap_01_02': + return "object/weapon/ranged/carbine/shared_carbine_ee3.iff" + + if name == 'item_bounty_hunter_ring_01_02': + return "object/tangible/wearables/ring/shared_ring_s02.iff" + + if name == 'weapon_rifle_bh_roadmap_01_02': + return "object/weapon/ranged/rifle/shared_rifle_lightning.iff" + + if name == 'item_bounty_hunter_pendant_01_02': + return "object/tangible/wearables/necklace/shared_necklace_s02.iff" + + if name == 'item_bounty_hunter_clicky_01_02': + return "object/tangible/loot/generic_usable/shared_survey_pad_adv_generic.iff" + + if name == 'item_roadmap_belt_bounty_hunter_01_02': + return "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" \ No newline at end of file diff --git a/scripts/roadmap/commando_1a.py b/scripts/roadmap/commando_1a.py index 8d9253ae..c63fd717 100644 --- a/scripts/roadmap/commando_1a.py +++ b/scripts/roadmap/commando_1a.py @@ -23,3 +23,97 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + if name == 'item_bounty_hunter_backpack_01_02': + return "object/tangible/wearables/backpack/shared_backpack_s04.iff" + + if name == 'armor_commando_roadmap_bicep_l_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_l.iff" + + if name == 'armor_commando_roadmap_bicep_r_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_r.iff" + + if name == 'armor_commando_roadmap_bracer_l_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_l.iff" + + if name == 'armor_commando_roadmap_bracer_r_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_r.iff" + + if name == 'armor_commando_roadmap_boots_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_boots.iff" + + if name == 'armor_commando_roadmap_chest_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_chest_plate.iff" + + if name == 'armor_commando_roadmap_gloves_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_gloves.iff" + + if name == 'armor_commando_roadmap_helmet_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_helmet.iff" + + if name == 'armor_commando_roadmap_leggings_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_leggings.iff" + + if name == 'armor_wookiee_roadmap_chest_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_chestplate.iff" + + if name == 'armor_wookiee_roadmap_leggings_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_leggings.iff" + + if name == 'armor_wookiee_roadmap_bicep_l_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_l.iff" + + if name == 'armor_wookiee_roadmap_bicep_r_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_r.iff" + + if name == 'armor_wookiee_roadmap_bracer_l_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_l.iff" + + if name == 'armor_wookiee_roadmap_bracer_r_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_r.iff" + + if name == 'armor_ithorian_roadmap_chest_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_chest_plate.iff" + + if name == 'armor_ithorian_roadmap_leggings_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_leggings.iff" + + if name == 'armor_ithorian_roadmap_helmet_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_helmet.iff" + + if name == 'armor_ithorian_roadmap_bicep_l_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_l.iff" + + if name == 'armor_ithorian_roadmap_bicep_r_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_r.iff" + + if name == 'armor_ithorian_roadmap_bracer_l_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_l.iff" + + if name == 'armor_ithorian_roadmap_bracer_r_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_r.iff" + + if name == 'armor_ithorian_roadmap_boots_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_boots.iff" + + if name == 'armor_ithorian_roadmap_gloves_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff" + + if name == 'weapon_lightningbeam_commando_roadmap_01_02': + return "object/weapon/ranged/rifle/shared_rifle_dlt20.iff" + + if name == 'item_commando_ring_01_02': + return "object/tangible/wearables/ring/shared_ring_s03.iff" + + if name == 'weapon_acidbeam_commando_roadmap_01_02': + return "object/weapon/ranged/carbine/shared_carbine_e11.iff" + + if name == 'item_commando_pendant_01_02': + return "object/tangible/wearables/necklace/shared_necklace_s07.iff" + + if name == 'item_commando_clicky_01_02': + return "object/tangible/loot/generic_usable/shared_survey_pad_adv_generic.iff" + + if name == 'item_roadmap_belt_commando_01_02': + return "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" \ No newline at end of file diff --git a/scripts/roadmap/entertainer_1a.py b/scripts/roadmap/entertainer_1a.py index 0541cc93..efe33465 100644 --- a/scripts/roadmap/entertainer_1a.py +++ b/scripts/roadmap/entertainer_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/force_sensitive_1a.py b/scripts/roadmap/force_sensitive_1a.py index 2d9241b0..9fd5ca69 100644 --- a/scripts/roadmap/force_sensitive_1a.py +++ b/scripts/roadmap/force_sensitive_1a.py @@ -23,3 +23,28 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + if name == 'item_force_sensitive_ring_02_01': + return "object/tangible/wearables/ring/shared_ring_s02.iff" + + if name == 'item_npe_fs_robe_02_02': + return "object/tangible/wearables/robe/shared_robe_jedi_padawan.iff" + + if name == 'weapon_roadmap_lightsaber_02_02': + return "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s1.iff" + + if name == 'item_force_sensitive_ring_01_02': + return "object/tangible/wearables/ring/shared_ring_s01.iff" + + if name == 'item_krayt_pearl_04_01': + return "object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff" + + if name == 'item_force_sensitive_pendant_01_02': + return "object/tangible/wearables/necklace/shared_necklace_s12.iff" + + if name == 'item_force_sensitive_clicky_01_02': + return "object/tangible/loot/generic_usable/shared_generic_crystal.iff" + + if name == 'item_roadmap_belt_force_sensitive_01_02': + return "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" \ No newline at end of file diff --git a/scripts/roadmap/medic_1a.py b/scripts/roadmap/medic_1a.py index 6b84327b..e6f67dfb 100644 --- a/scripts/roadmap/medic_1a.py +++ b/scripts/roadmap/medic_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/officer_1a.py b/scripts/roadmap/officer_1a.py index 25e7254f..83bca56f 100644 --- a/scripts/roadmap/officer_1a.py +++ b/scripts/roadmap/officer_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/roadmap_rewards.py b/scripts/roadmap/roadmap_rewards.py deleted file mode 100644 index b1071bbc..00000000 --- a/scripts/roadmap/roadmap_rewards.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys - -def get(name): - - if name == 'item_npe_fs_robe_02_02': - return "object/tangible/wearables/robe/shared_robe_jedi_padawan.iff" - - if name == 'weapon_roadmap_lightsaber_02_02': - return "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s1.iff" \ No newline at end of file diff --git a/scripts/roadmap/smuggler_1a.py b/scripts/roadmap/smuggler_1a.py index 8084fcd2..2b41cce4 100644 --- a/scripts/roadmap/smuggler_1a.py +++ b/scripts/roadmap/smuggler_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/spy_1a.py b/scripts/roadmap/spy_1a.py index 6fe7c37a..079de728 100644 --- a/scripts/roadmap/spy_1a.py +++ b/scripts/roadmap/spy_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0a.py b/scripts/roadmap/trader_0a.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0a.py +++ b/scripts/roadmap/trader_0a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0b.py b/scripts/roadmap/trader_0b.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0b.py +++ b/scripts/roadmap/trader_0b.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0c.py b/scripts/roadmap/trader_0c.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0c.py +++ b/scripts/roadmap/trader_0c.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0d.py b/scripts/roadmap/trader_0d.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0d.py +++ b/scripts/roadmap/trader_0d.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/skillMods/action.py b/scripts/skillMods/action.py new file mode 100644 index 00000000..5d92ea61 --- /dev/null +++ b/scripts/skillMods/action.py @@ -0,0 +1,12 @@ +import sys + +def add(core, actor, name, base): + actor.addSkillMod(name, base) + actor.setMaxAction(actor.getMaxAction() + base) + return + +def deduct(core, actor, name, base): + actor.deductSkillMod(name, base) + actor.setMaxAction(actor.getMaxAction() - base) + return + \ No newline at end of file diff --git a/scripts/skillMods/actionPercent.py b/scripts/skillMods/actionPercent.py new file mode 100644 index 00000000..aaae3c10 --- /dev/null +++ b/scripts/skillMods/actionPercent.py @@ -0,0 +1,14 @@ +import sys + +# Temporarily disabled until the skillmod calculation system is refactored + +def add(core, actor, name, base): + #actor.addSkillMod(name, base) + #actor.setMaxAction(actor.getMaxAction() + int((float(actor.getMaxAction()) * (float(base) / float(100))))) + return + +def deduct(core, actor, name, base): + #actor.deductSkillMod(name, base) + #actor.setMaxAction(actor.getMaxAction() - int((float(actor.getMaxAction()) * (float(base) / float(100))))) + return + \ No newline at end of file diff --git a/scripts/skillMods/expertise_critical_melee.py b/scripts/skillMods/expertise_critical_melee.py index ee7769e2..fd6ebde6 100644 --- a/scripts/skillMods/expertise_critical_melee.py +++ b/scripts/skillMods/expertise_critical_melee.py @@ -1,10 +1,16 @@ import sys def add(core, actor, name, base): - actor.addSkillMod(name, base) + actor.addSkillMod("expertise_critical_1h", base) + actor.addSkillMod("expertise_critical_2h", base) + actor.addSkillMod("expertise_critical_unarmed", base) + actor.addSkillMod("expertise_critical_polearm", base) return def deduct(core, actor, name, base): - actor.deductSkillMod(name, base) + actor.deductSkillMod("expertise_critical_1h", base) + actor.deductSkillMod("expertise_critical_2h", base) + actor.deductSkillMod("expertise_critical_unarmed", base) + actor.deductSkillMod("expertise_critical_polearm", base) return \ No newline at end of file diff --git a/scripts/skillMods/expertise_focus.py b/scripts/skillMods/expertise_focus.py index 0d10255e..c73060b3 100644 --- a/scripts/skillMods/expertise_focus.py +++ b/scripts/skillMods/expertise_focus.py @@ -2,14 +2,14 @@ import sys def add(core, actor, name, base): actor.addSkillMod(name, base) - core.skillModService.addSkillMod(actor, 'stamina_modified', (actor.getSkillModBase('expertise_stance_constitution'))) + core.skillModService.addSkillMod(actor, 'stamina_modified', (actor.getSkillModBase('expertise_focus_stamina'))) core.skillModService.addSkillMod(actor, 'display_only_critical', 100 * (actor.getSkillModBase('expertise_focus_critical_buff_line'))) core.skillModService.addSkillMod(actor, 'expertise_damage_melee', 1 * (actor.getSkillModBase('expertise_focus_damage_increase'))) return def deduct(core, actor, name, base): actor.deductSkillMod(name, base) - core.skillModService.deductSkillMod(actor, 'stamina_modified', (actor.getSkillModBase('expertise_stance_constitution'))) + core.skillModService.deductSkillMod(actor, 'stamina_modified', (actor.getSkillModBase('expertise_focus_stamina'))) core.skillModService.deductSkillMod(actor, 'display_only_critical', 100 * (actor.getSkillModBase('expertise_focus_critical_buff_line'))) core.skillModService.deductSkillMod(actor, 'expertise_damage_melee', 1 * (actor.getSkillModBase('expertise_focus_damage_increase'))) return diff --git a/scripts/skillMods/expertise_focus_damage_increase.py b/scripts/skillMods/expertise_focus_damage_increase.py new file mode 100644 index 00000000..ee7769e2 --- /dev/null +++ b/scripts/skillMods/expertise_focus_damage_increase.py @@ -0,0 +1,10 @@ +import sys + +def add(core, actor, name, base): + actor.addSkillMod(name, base) + return + +def deduct(core, actor, name, base): + actor.deductSkillMod(name, base) + return + \ No newline at end of file diff --git a/scripts/skillMods/expertise_innate_protection_energy.py b/scripts/skillMods/expertise_innate_protection_energy.py index ee7769e2..5715c8bc 100644 --- a/scripts/skillMods/expertise_innate_protection_energy.py +++ b/scripts/skillMods/expertise_innate_protection_energy.py @@ -1,10 +1,12 @@ import sys def add(core, actor, name, base): + actor.addSkillMod('energy', base) actor.addSkillMod(name, base) return def deduct(core, actor, name, base): + actor.deductSkillMod('energy', base) actor.deductSkillMod(name, base) return \ No newline at end of file diff --git a/scripts/skillMods/expertise_innate_protection_kinetic.py b/scripts/skillMods/expertise_innate_protection_kinetic.py index ee7769e2..6cea2b42 100644 --- a/scripts/skillMods/expertise_innate_protection_kinetic.py +++ b/scripts/skillMods/expertise_innate_protection_kinetic.py @@ -1,10 +1,12 @@ import sys def add(core, actor, name, base): + actor.addSkillMod('kinetic', base) actor.addSkillMod(name, base) return def deduct(core, actor, name, base): + actor.deductSkillMod('kinetic', base) actor.deductSkillMod(name, base) return \ No newline at end of file diff --git a/scripts/skillMods/health.py b/scripts/skillMods/health.py new file mode 100644 index 00000000..b4a86dd4 --- /dev/null +++ b/scripts/skillMods/health.py @@ -0,0 +1,12 @@ +import sys + +def add(core, actor, name, base): + actor.addSkillMod(name, base) + actor.setMaxHealth(actor.getMaxHealth() + base) + return + +def deduct(core, actor, name, base): + actor.deductSkillMod(name, base) + actor.setMaxHealth(actor.getMaxHealth() - base) + return + \ No newline at end of file diff --git a/scripts/skillMods/healthPercent.py b/scripts/skillMods/healthPercent.py new file mode 100644 index 00000000..de8a3424 --- /dev/null +++ b/scripts/skillMods/healthPercent.py @@ -0,0 +1,14 @@ +import sys + +# Temporarily disabled until the skillmod calculation system is refactored + +def add(core, actor, name, base): + #actor.addSkillMod(name, base) + #actor.setMaxHealth(actor.getMaxHealth() + int((float(actor.getMaxHealth()) * (float(base) / float(100))))) + return + +def deduct(core, actor, name, base): + #actor.deductSkillMod(name, base) + #actor.setMaxHealth(actor.getMaxHealth() - int((actor.getMaxHealth() * (float(base) / float(100))))) + return + \ No newline at end of file diff --git a/scripts/skillMods/movement.py b/scripts/skillMods/movement.py index a842f3db..fd0ded59 100644 --- a/scripts/skillMods/movement.py +++ b/scripts/skillMods/movement.py @@ -1,11 +1,11 @@ import sys def add(core, actor, name, base): - actor.addSkillMod(name, base) - actor.setSpeedMultiplierBase(actor.getSpeedMultiplierBase() + base / 100) + #actor.addSkillMod(name, base) + actor.setSpeedMultiplierMod(actor.getSpeedMultiplierMod() + (float(base) / float(10))) return def deduct(core, actor, name, base): - actor.setSpeedMultiplierBase(actor.getSpeedMultiplierBase() - base / 100) - actor.deductSkillMod(name, base) + #actor.deductSkillMod(name, base) + actor.setSpeedMultiplierMod(actor.getSpeedMultiplierMod() - (float(base) / float(10))) return \ No newline at end of file diff --git a/scripts/starter_clothing/combat_brawler_humanoid_female.py b/scripts/starter_clothing/combat_brawler_humanoid_female.py deleted file mode 100644 index 3a176081..00000000 --- a/scripts/starter_clothing/combat_brawler_humanoid_female.py +++ /dev/null @@ -1,13 +0,0 @@ -import sys - -def CombatBrawlerHumanoidFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s24.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s24.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s25.iff', object.getPlanet()) - boots = core.objectService.createObject('object/tangible/wearables/boots/shared_boots_s05.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_01.iff', object.getPlanet()) - object._add(shirt) - object._add(jacket) - object._add(pants) - object._add(boots) - object._add(necklace) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_brawler_humanoid_male.py b/scripts/starter_clothing/combat_brawler_humanoid_male.py deleted file mode 100644 index a1ae7072..00000000 --- a/scripts/starter_clothing/combat_brawler_humanoid_male.py +++ /dev/null @@ -1,13 +0,0 @@ -import sys - -def CombatBrawlerHumanoidMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s42.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s24.iff', object.getPlanet()) - gloves = core.objectService.createObject('object/tangible/wearables/gloves/shared_gloves_s06.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s04.iff', object.getPlanet()) - boots = core.objectService.createObject('object/tangible/wearables/boots/shared_boots_s22.iff', object.getPlanet()) - object._add(shirt) - object._add(jacket) - object._add(gloves) - object._add(pants) - object._add(boots) diff --git a/scripts/starter_clothing/combat_brawler_ithorian_female.py b/scripts/starter_clothing/combat_brawler_ithorian_female.py deleted file mode 100644 index 223236bd..00000000 --- a/scripts/starter_clothing/combat_brawler_ithorian_female.py +++ /dev/null @@ -1,15 +0,0 @@ -import sys - -def CombatBrawlerIthorianFemale(core, object): - jacket = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_jacket_s06.iff', object.getPlanet()) - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s01.iff', object.getPlanet()) - bandolier = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_bandolier_s04.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_belt_s17.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s01.iff', object.getPlanet()) - gloves = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_gloves_s01.iff', object.getPlanet()) - object._add(jacket) - object._add(shirt) - object._add(bandolier) - object._add(belt) - object._add(pants) - object._add(gloves) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_brawler_ithorian_male.py b/scripts/starter_clothing/combat_brawler_ithorian_male.py deleted file mode 100644 index cd6dce81..00000000 --- a/scripts/starter_clothing/combat_brawler_ithorian_male.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys - -def CombatBrawlerIthorianMale(core, object): - jacket = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_jacket_s10.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s02.iff', object.getPlanet()) - bandolier = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_bandolier_s04.iff', object.getPlanet()) - object._add(jacket) - object._add(pants) - object._add(bandolier) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_brawler_trandoshan_female.py b/scripts/starter_clothing/combat_brawler_trandoshan_female.py deleted file mode 100644 index 1f755bfe..00000000 --- a/scripts/starter_clothing/combat_brawler_trandoshan_female.py +++ /dev/null @@ -1,11 +0,0 @@ -import sys - -def CombatBrawlerTrandoshanFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s24.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s24.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s25.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_01.iff', object.getPlanet()) - object._add(shirt) - object._add(jacket) - object._add(pants) - object._add(necklace) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_brawler_trandoshan_male.py b/scripts/starter_clothing/combat_brawler_trandoshan_male.py deleted file mode 100644 index 78b4d786..00000000 --- a/scripts/starter_clothing/combat_brawler_trandoshan_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def CombatBrawlerTrandoshanMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s42.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s24.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s04.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(jacket) - object._add(pants) diff --git a/scripts/starter_clothing/combat_brawler_wookiee_female.py b/scripts/starter_clothing/combat_brawler_wookiee_female.py deleted file mode 100644 index 917fb2d0..00000000 --- a/scripts/starter_clothing/combat_brawler_wookiee_female.py +++ /dev/null @@ -1,7 +0,0 @@ -import sys - -def CombatBrawlerWookieeFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s04.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_skirt_s02.iff', object.getPlanet()) - object._add(shirt) - object._add(skirt) diff --git a/scripts/starter_clothing/combat_brawler_wookiee_male.py b/scripts/starter_clothing/combat_brawler_wookiee_male.py deleted file mode 100644 index 8646f4e9..00000000 --- a/scripts/starter_clothing/combat_brawler_wookiee_male.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def CombatBrawlerWookieeMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s04.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_skirt_s02.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(skirt) diff --git a/scripts/starter_clothing/combat_marksman_humanoid_female.py b/scripts/starter_clothing/combat_marksman_humanoid_female.py deleted file mode 100644 index f43d084b..00000000 --- a/scripts/starter_clothing/combat_marksman_humanoid_female.py +++ /dev/null @@ -1,15 +0,0 @@ -import sys - -def CombatMarksmanHumanoidFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s28.iff', object.getPlanet()) - bandolier = core.objectService.createObject('object/tangible/wearables/bandolier/shared_npe_bandolier.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_04.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s09.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/belt/shared_npe_belt_02.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s01.iff', object.getPlanet()) - object._add(shirt) - object._add(bandolier) - object._add(necklace) - object._add(pants) - object._add(belt) - object._add(shoes) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_marksman_humanoid_male.py b/scripts/starter_clothing/combat_marksman_humanoid_male.py deleted file mode 100644 index 421fed10..00000000 --- a/scripts/starter_clothing/combat_marksman_humanoid_male.py +++ /dev/null @@ -1,12 +0,0 @@ -import sys - -def CombatMarksmanHumanoidMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_npe_shirt.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s16.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s21.iff', object.getPlanet()) - boots = core.objectService.createObject('object/tangible/wearables/boots/shared_boots_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(jacket) - object._add(pants) - object._add(boots) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_marksman_ithorian_female.py b/scripts/starter_clothing/combat_marksman_ithorian_female.py deleted file mode 100644 index 4f9903d7..00000000 --- a/scripts/starter_clothing/combat_marksman_ithorian_female.py +++ /dev/null @@ -1,12 +0,0 @@ -import sys - -def CombatMarksmanIthorianFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s09.iff', object.getPlanet()) - vest = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_vest_s01.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s01.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_belt_s17.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._addshirt) - object._add(vest) - object._add(pants) - object._add(belt) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_marksman_ithorian_male.py b/scripts/starter_clothing/combat_marksman_ithorian_male.py deleted file mode 100644 index 11db70e3..00000000 --- a/scripts/starter_clothing/combat_marksman_ithorian_male.py +++ /dev/null @@ -1,12 +0,0 @@ -import sys - -def CombatMarksmanIthorianMale(core, object): - belt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_belt_s20.iff', object.getPlanet()) - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s11.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_jacket_s07.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s04.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(belt) - object._add(shirt) - object._add(jacket) - object._add(pants) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_marksman_trandoshan_female.py b/scripts/starter_clothing/combat_marksman_trandoshan_female.py deleted file mode 100644 index 569d1ad6..00000000 --- a/scripts/starter_clothing/combat_marksman_trandoshan_female.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys - -def CombatMarksmanTrandoshanFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s28.iff', object.getPlanet()) - bandolier = core.objectService.createObject('object/tangible/wearables/bandolier/shared_npe_bandolier.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_04.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s09.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/belt/shared_npe_belt_02.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(bandolier) - object._add(necklace) - object._add(pants) - object._add(belt) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_marksman_trandoshan_male.py b/scripts/starter_clothing/combat_marksman_trandoshan_male.py deleted file mode 100644 index 724752b6..00000000 --- a/scripts/starter_clothing/combat_marksman_trandoshan_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def CombatMarksmanTrandoshanMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_npe_shirt.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s16.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s21.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(jacket) - object._add(pants) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_marksman_wookiee_female.py b/scripts/starter_clothing/combat_marksman_wookiee_female.py deleted file mode 100644 index 4c33c52a..00000000 --- a/scripts/starter_clothing/combat_marksman_wookiee_female.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def CombatMarksmanWookieeFemale(core, object): - bandolier = core.objectService.createObject('object/tangible/wearables/bandolier/shared_bandolier_s04.iff', object.getPlanet()) - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(bandolier) - object._add(shirt) \ No newline at end of file diff --git a/scripts/starter_clothing/combat_marksman_wookiee_male.py b/scripts/starter_clothing/combat_marksman_wookiee_male.py deleted file mode 100644 index b43a9f0a..00000000 --- a/scripts/starter_clothing/combat_marksman_wookiee_male.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def CombatMarksmanWookieeMale(core, object): - bandolier = core.objectService.createObject('object/tangible/wearables/bandolier/shared_bandolier_s04.iff', object.getPlanet()) - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(bandolier) - object._add(shirt) \ No newline at end of file diff --git a/scripts/starter_clothing/crafting_artisan_humanoid_female.py b/scripts/starter_clothing/crafting_artisan_humanoid_female.py deleted file mode 100644 index e02090dd..00000000 --- a/scripts/starter_clothing/crafting_artisan_humanoid_female.py +++ /dev/null @@ -1,18 +0,0 @@ -import sys - -def CraftingArtisanHumanoidFemale(core, object): - dress = core.objectService.createObject('object/tangible/wearables/dress/shared_dress_s29.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s02.iff', object.getPlanet()) - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_r.iff', object.getPlanet()) - bracelet_l_2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s06_l.iff', object.getPlanet()) - bracelet_r_2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s06_r.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s07.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - inventory.add(bracelet_l_2) - inventory.add(bracelet_r_2) - object._add(dress) - object._add(necklace) - object._add(bracelet_l) - object._add(bracelet_r) - object._add(shoes) diff --git a/scripts/starter_clothing/crafting_artisan_humanoid_male.py b/scripts/starter_clothing/crafting_artisan_humanoid_male.py deleted file mode 100644 index f140e4c1..00000000 --- a/scripts/starter_clothing/crafting_artisan_humanoid_male.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys - -def CraftingArtisanHumanoidMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s03.iff', object.getPlanet()) - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_s09.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_03.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s13.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(vest) - object._add(necklace) - object._add(pants) - object._add(shoes) diff --git a/scripts/starter_clothing/crafting_artisan_ithorian_female.py b/scripts/starter_clothing/crafting_artisan_ithorian_female.py deleted file mode 100644 index 4ae7a7ea..00000000 --- a/scripts/starter_clothing/crafting_artisan_ithorian_female.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def CraftingArtisanIthorianFemale(core, object): - dress = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_dress_s03.iff', object.getPlanet()) - hat = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_hat_s02.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(dress) - object._add(hat) diff --git a/scripts/starter_clothing/crafting_artisan_ithorian_male.py b/scripts/starter_clothing/crafting_artisan_ithorian_male.py deleted file mode 100644 index 8ecd98cf..00000000 --- a/scripts/starter_clothing/crafting_artisan_ithorian_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def CraftingArtisanIthorianMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s10.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s06.iff', object.getPlanet()) - vest = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_vest_s02.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(pants) - object._add(vest) \ No newline at end of file diff --git a/scripts/starter_clothing/crafting_artisan_trandoshan_female.py b/scripts/starter_clothing/crafting_artisan_trandoshan_female.py deleted file mode 100644 index 60acce4a..00000000 --- a/scripts/starter_clothing/crafting_artisan_trandoshan_female.py +++ /dev/null @@ -1,16 +0,0 @@ -import sys - -def CraftingArtisanTrandoshanFemale(core, object): - dress = core.objectService.createObject('object/tangible/wearables/dress/shared_dress_s29.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s02.iff', object.getPlanet()) - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_r.iff', object.getPlanet()) - bracelet_l_2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s06_l.iff', object.getPlanet()) - bracelet_r_2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s06_r.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - inventory.add(bracelet_l_2) - inventory.add(bracelet_r_2) - object._add(dress) - object._add(necklace) - object._add(bracelet_l) - object._add(bracelet_r) \ No newline at end of file diff --git a/scripts/starter_clothing/crafting_artisan_trandoshan_male.py b/scripts/starter_clothing/crafting_artisan_trandoshan_male.py deleted file mode 100644 index 3862af73..00000000 --- a/scripts/starter_clothing/crafting_artisan_trandoshan_male.py +++ /dev/null @@ -1,11 +0,0 @@ -import sys - -def CraftingArtisanTrandoshanMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_shirt_s03.iff', object.getPlanet()) - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_s09.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_03.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s13.iff', object.getPlanet()) - object._add(shirt) - object._add(vest) - object._add(necklace) - object._add(pants) diff --git a/scripts/starter_clothing/crafting_artisan_twilek_female.py b/scripts/starter_clothing/crafting_artisan_twilek_female.py deleted file mode 100644 index 77e72081..00000000 --- a/scripts/starter_clothing/crafting_artisan_twilek_female.py +++ /dev/null @@ -1,20 +0,0 @@ -import sys - -def CraftingArtisanTwilekFemale(core, object): - dress = core.objectService.createObject('object/tangible/wearables/dress/shared_dress_s29.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s02.iff', object.getPlanet()) - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_r.iff', object.getPlanet()) - bracelet_l_2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s06_l.iff', object.getPlanet()) - bracelet_r_2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s06_r.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s07.iff', object.getPlanet()) - hat = core.objectService.createObject('object/tangible/wearables/hat/shared_hat_twilek_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - inventory.add(bracelet_l_2) - inventory.add(bracelet_r_2) - object._add(dress) - object._add(necklace) - object._add(bracelet_l) - object._add(bracelet_r) - object._add(shoes) - object._add(hat) diff --git a/scripts/starter_clothing/crafting_artisan_wookiee_female.py b/scripts/starter_clothing/crafting_artisan_wookiee_female.py deleted file mode 100644 index aa6fb915..00000000 --- a/scripts/starter_clothing/crafting_artisan_wookiee_female.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def CraftingArtisanWookieeFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s02.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_skirt_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(skirt) \ No newline at end of file diff --git a/scripts/starter_clothing/crafting_artisan_wookiee_male.py b/scripts/starter_clothing/crafting_artisan_wookiee_male.py deleted file mode 100644 index 841dfd41..00000000 --- a/scripts/starter_clothing/crafting_artisan_wookiee_male.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def CraftingArtisanWookieeMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s02.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_skirt_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(skirt) \ No newline at end of file diff --git a/scripts/starter_clothing/outdoors_scout_humanoid_female.py b/scripts/starter_clothing/outdoors_scout_humanoid_female.py deleted file mode 100644 index a3347f00..00000000 --- a/scripts/starter_clothing/outdoors_scout_humanoid_female.py +++ /dev/null @@ -1,22 +0,0 @@ -import sys - -def OutdoorScoutHumanoidFemale(core, object): - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_s04.iff', object.getPlanet()) - bustier = core.objectService.createObject('object/tangible/wearables/bustier/shared_bustier_s02.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s13.iff', object.getPlanet()) - gloves = core.objectService.createObject('object/tangible/wearables/gloves/shared_gloves_s06.iff', object.getPlanet()) - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_r.iff', object.getPlanet()) - boots = core.objectService.createObject('object/tangible/wearables/boots/shared_boots_s04.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/belt/shared_npe_belt_02.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(vest) - object._add(bustier) - object._add(pants) - object._add(gloves) - object._add(bracelet_l) - object._add(bracelet_r) - object._add(boots) - object._add(belt) - object._add(necklace) diff --git a/scripts/starter_clothing/outdoors_scout_humanoid_male.py b/scripts/starter_clothing/outdoors_scout_humanoid_male.py deleted file mode 100644 index a6c8d1c4..00000000 --- a/scripts/starter_clothing/outdoors_scout_humanoid_male.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys - -def OutdoorScoutHumanoidMale(core, object): - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_hutt_gang_s01.iff', object.getPlanet()) - bracelet = core.objectService.createObject('object/tangible/wearables/bracelet/shared_primitive_bracelet.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s04.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/belt/shared_npe_belt_03.iff', object.getPlanet()) - boots = core.objectService.createObject('object/tangible/wearables/boots/shared_boots_s05.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(vest) - object._add(bracelet) - object._add(pants) - object._add(belt) - object._add(boots) diff --git a/scripts/starter_clothing/outdoors_scout_ithorian_female.py b/scripts/starter_clothing/outdoors_scout_ithorian_female.py deleted file mode 100644 index 11fd41ff..00000000 --- a/scripts/starter_clothing/outdoors_scout_ithorian_female.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def OutdoorScoutIthorianFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s05.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s16.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_jacket_s02.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(pants) - object._add(jacket) \ No newline at end of file diff --git a/scripts/starter_clothing/outdoors_scout_ithorian_male.py b/scripts/starter_clothing/outdoors_scout_ithorian_male.py deleted file mode 100644 index 6b824c94..00000000 --- a/scripts/starter_clothing/outdoors_scout_ithorian_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def OutdoorScoutIthorianMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s13.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s12.iff', object.getPlanet()) - jacket = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_jacket_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(pants) - object._add(jacket) \ No newline at end of file diff --git a/scripts/starter_clothing/outdoors_scout_trandoshan_female.py b/scripts/starter_clothing/outdoors_scout_trandoshan_female.py deleted file mode 100644 index 8bf336ed..00000000 --- a/scripts/starter_clothing/outdoors_scout_trandoshan_female.py +++ /dev/null @@ -1,18 +0,0 @@ -import sys - -def OutdoorScoutTrandoshanFemale(core, object): - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_s04.iff', object.getPlanet()) - bustier = core.objectService.createObject('object/tangible/wearables/bustier/shared_bustier_s02.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s13.iff', object.getPlanet()) - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_r.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/belt/shared_npe_belt_02.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_primitive_03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(vest) - object._add(bustier) - object._add(pants) - object._add(bracelet_l) - object._add(bracelet_r) - object._add(belt) - object._add(necklace) diff --git a/scripts/starter_clothing/outdoors_scout_trandoshan_male.py b/scripts/starter_clothing/outdoors_scout_trandoshan_male.py deleted file mode 100644 index de822de3..00000000 --- a/scripts/starter_clothing/outdoors_scout_trandoshan_male.py +++ /dev/null @@ -1,12 +0,0 @@ -import sys - -def OutdoorScoutTrandoshanMale(core, object): - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_hutt_gang_s01.iff', object.getPlanet()) - bracelet = core.objectService.createObject('object/tangible/wearables/bracelet/shared_primitive_bracelet.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s04.iff', object.getPlanet()) - belt = core.objectService.createObject('object/tangible/wearables/belt/shared_npe_belt_03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(vest) - object._add(bracelet) - object._add(pants) - object._add(belt) diff --git a/scripts/starter_clothing/outdoors_scout_wookiee_female.py b/scripts/starter_clothing/outdoors_scout_wookiee_female.py deleted file mode 100644 index c2fca3a7..00000000 --- a/scripts/starter_clothing/outdoors_scout_wookiee_female.py +++ /dev/null @@ -1,6 +0,0 @@ -import sys - -def OutdoorScoutWookieeFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) \ No newline at end of file diff --git a/scripts/starter_clothing/outdoors_scout_wookiee_male.py b/scripts/starter_clothing/outdoors_scout_wookiee_male.py deleted file mode 100644 index 63a6b6cf..00000000 --- a/scripts/starter_clothing/outdoors_scout_wookiee_male.py +++ /dev/null @@ -1,6 +0,0 @@ -import sys - -def OutdoorScoutWookieeMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_shirt_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) \ No newline at end of file diff --git a/scripts/starter_clothing/science_medic_humanoid_female.py b/scripts/starter_clothing/science_medic_humanoid_female.py deleted file mode 100644 index 5e6ba991..00000000 --- a/scripts/starter_clothing/science_medic_humanoid_female.py +++ /dev/null @@ -1,12 +0,0 @@ -import sys - -def ScienceMedicHumanoidFemale(core, object): - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s26.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s08.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s01.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(jacket) - object._add(pants) - object._add(shoes) - object._add(necklace) \ No newline at end of file diff --git a/scripts/starter_clothing/science_medic_humanoid_male.py b/scripts/starter_clothing/science_medic_humanoid_male.py deleted file mode 100644 index ca19c6e2..00000000 --- a/scripts/starter_clothing/science_medic_humanoid_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def ScienceMedicHumanoidMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_npe_shirt.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s01.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s02.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(pants) - object._add(shoes) \ No newline at end of file diff --git a/scripts/starter_clothing/science_medic_ithorian_female.py b/scripts/starter_clothing/science_medic_ithorian_female.py deleted file mode 100644 index fb7638b8..00000000 --- a/scripts/starter_clothing/science_medic_ithorian_female.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def ScienceMedicIthorianFemale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s12.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s02.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(pants) \ No newline at end of file diff --git a/scripts/starter_clothing/science_medic_ithorian_male.py b/scripts/starter_clothing/science_medic_ithorian_male.py deleted file mode 100644 index 88ec8b7a..00000000 --- a/scripts/starter_clothing/science_medic_ithorian_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def ScienceMedicIthorianMale(core, object): - jacket = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_jacket_s01.iff', object.getPlanet()) - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s04.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s18.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(jacket) - object._add(shirt) - object._add(pants) diff --git a/scripts/starter_clothing/science_medic_trandoshan_female.py b/scripts/starter_clothing/science_medic_trandoshan_female.py deleted file mode 100644 index 556e8e94..00000000 --- a/scripts/starter_clothing/science_medic_trandoshan_female.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def ScienceMedicTrandoshanFemale(core, object): - jacket = core.objectService.createObject('object/tangible/wearables/jacket/shared_jacket_s26.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s08.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(jacket) - object._add(pants) - object._add(necklace) \ No newline at end of file diff --git a/scripts/starter_clothing/science_medic_trandoshan_male.py b/scripts/starter_clothing/science_medic_trandoshan_male.py deleted file mode 100644 index 9b50dd69..00000000 --- a/scripts/starter_clothing/science_medic_trandoshan_male.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def ScienceMedicTrandoshanMale(core, object): - shirt = core.objectService.createObject('object/tangible/wearables/shirt/shared_npe_shirt.iff', object.getPlanet()) - pants = core.objectService.createObject('object/tangible/wearables/pants/shared_pants_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(shirt) - object._add(pants) \ No newline at end of file diff --git a/scripts/starter_clothing/science_medic_wookiee_female.py b/scripts/starter_clothing/science_medic_wookiee_female.py deleted file mode 100644 index 9e969888..00000000 --- a/scripts/starter_clothing/science_medic_wookiee_female.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def ScienceMedicWookieeFemale(core, object): - hood = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_hood_s02.iff', object.getPlanet()) - bandolier = core.objectService.createObject('object/tangible/wearables/bandolier/shared_bandolier_s09.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(hood) - object._add(bandolier) \ No newline at end of file diff --git a/scripts/starter_clothing/science_medic_wookiee_male.py b/scripts/starter_clothing/science_medic_wookiee_male.py deleted file mode 100644 index ba2c8845..00000000 --- a/scripts/starter_clothing/science_medic_wookiee_male.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def ScienceMedicWookieeMale(core, object): - hood = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_hood_s02.iff', object.getPlanet()) - bandolier = core.objectService.createObject('object/tangible/wearables/bandolier/shared_bandolier_s09.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(hood) - object._add(bandolier) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_humanoid_female.py b/scripts/starter_clothing/social_entertainer_humanoid_female.py deleted file mode 100644 index 0b9f5157..00000000 --- a/scripts/starter_clothing/social_entertainer_humanoid_female.py +++ /dev/null @@ -1,16 +0,0 @@ -import sys - -def SocialEntertainerHumanoidFemale(core, object): - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_r.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s12.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s07.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/skirt/shared_npe_entertainer_skirt.iff', object.getPlanet()) - bustier = core.objectService.createObject('object/tangible/wearables/bustier/shared_bustier_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(bracelet_l) - object._add(bracelet_r) - object._add(necklace) - object._add(shoes) - object._add(skirt) - object._add(bustier) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_humanoid_male.py b/scripts/starter_clothing/social_entertainer_humanoid_male.py deleted file mode 100644 index c9fcfec6..00000000 --- a/scripts/starter_clothing/social_entertainer_humanoid_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def SocialEntertainerHumanoidMale(core, object): - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_s15.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/skirt/shared_skirt_s05.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(vest) - object._add(skirt) - object._add(shoes) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_ithorian_female.py b/scripts/starter_clothing/social_entertainer_ithorian_female.py deleted file mode 100644 index 4afa5c52..00000000 --- a/scripts/starter_clothing/social_entertainer_ithorian_female.py +++ /dev/null @@ -1,16 +0,0 @@ -import sys - -def SocialEntertainerIthorianFemale(core, object): - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_r.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s12.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s07.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/skirt/shared_npe_entertainer_skirt.iff', object.getPlanet()) - bustier = core.objectService.createObject('object/tangible/wearables/bustier/shared_bustier_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(bracelet_l) - object._add(bracelet_r) - object._add(necklace) - object._add(shoes) - object._add(skirt) - object._add(bustier) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_ithorian_male.py b/scripts/starter_clothing/social_entertainer_ithorian_male.py deleted file mode 100644 index a13a5c78..00000000 --- a/scripts/starter_clothing/social_entertainer_ithorian_male.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys - -def SocialEntertainerIthorianMale(core, object): - pants = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_pants_s10.iff', object.getPlanet()) - shirt = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_shirt_s08.iff', object.getPlanet()) - dress = core.objectService.createObject('object/tangible/wearables/ithorian/shared_ith_dress_short_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(pants) - object._add(shirt) - object._add(dress) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_trandoshan_female.py b/scripts/starter_clothing/social_entertainer_trandoshan_female.py deleted file mode 100644 index b77afa50..00000000 --- a/scripts/starter_clothing/social_entertainer_trandoshan_female.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys - -def SocialEntertainerTrandoshanFemale(core, object): - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_r.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s12.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/skirt/shared_npe_entertainer_skirt.iff', object.getPlanet()) - bustier = core.objectService.createObject('object/tangible/wearables/bustier/shared_bustier_s01.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(bracelet_l) - object._add(bracelet_r) - object._add(necklace) - object._add(skirt) - object._add(bustier) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_trandoshan_male.py b/scripts/starter_clothing/social_entertainer_trandoshan_male.py deleted file mode 100644 index cd9bcc6c..00000000 --- a/scripts/starter_clothing/social_entertainer_trandoshan_male.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def SocialEntertainerTrandoshanMale(core, object): - vest = core.objectService.createObject('object/tangible/wearables/vest/shared_vest_s15.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/skirt/shared_skirt_s05.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(vest) - object._add(skirt) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_twilek_female.py b/scripts/starter_clothing/social_entertainer_twilek_female.py deleted file mode 100644 index e5dcdd36..00000000 --- a/scripts/starter_clothing/social_entertainer_twilek_female.py +++ /dev/null @@ -1,18 +0,0 @@ -import sys - -def SocialEntertainerTwilekFemale(core, object): - bracelet_l = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_l.iff', object.getPlanet()) - bracelet_r = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s05_r.iff', object.getPlanet()) - necklace = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s12.iff', object.getPlanet()) - shoes = core.objectService.createObject('object/tangible/wearables/shoes/shared_shoes_s07.iff', object.getPlanet()) - skirt = core.objectService.createObject('object/tangible/wearables/skirt/shared_npe_entertainer_skirt.iff', object.getPlanet()) - bustier = core.objectService.createObject('object/tangible/wearables/bustier/shared_bustier_s01.iff', object.getPlanet()) - hat = core.objectService.createObject('object/tangible/wearables/hat/shared_hat_twilek_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(bracelet_l) - object._add(bracelet_r) - object._add(necklace) - object._add(shoes) - object._add(skirt) - object._add(bustier) - object._add(hat) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_wookiee_female.py b/scripts/starter_clothing/social_entertainer_wookiee_female.py deleted file mode 100644 index a8cdfee0..00000000 --- a/scripts/starter_clothing/social_entertainer_wookiee_female.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def SocialEntertainerWookieeFemale(core, object): - gloves = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_gloves_s04.iff', object.getPlanet()) - hood = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_hood_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(gloves) - object._add(hood) \ No newline at end of file diff --git a/scripts/starter_clothing/social_entertainer_wookiee_male.py b/scripts/starter_clothing/social_entertainer_wookiee_male.py deleted file mode 100644 index ed797f8c..00000000 --- a/scripts/starter_clothing/social_entertainer_wookiee_male.py +++ /dev/null @@ -1,8 +0,0 @@ -import sys - -def SocialEntertainerWookieeMale(core, object): - gloves = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_gloves_s04.iff', object.getPlanet()) - hood = core.objectService.createObject('object/tangible/wearables/wookiee/shared_wke_hood_s03.iff', object.getPlanet()) - inventory = object.getSlottedObject('inventory') - object._add(gloves) - object._add(hood) \ No newline at end of file diff --git a/scripts/starterclothing.py b/scripts/starterclothing.py deleted file mode 100644 index f24afeb3..00000000 --- a/scripts/starterclothing.py +++ /dev/null @@ -1,298 +0,0 @@ - - -import sys - -def CreateStarterClothing(core, object, starterProfession, raceTemplate): - - if starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/human_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidMale", "outdoors_scout_humanoid_male", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/zabrak_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidMale", "outdoors_scout_humanoid_male", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/bothan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidMale", "outdoors_scout_humanoid_male", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/sullustan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidMale", "outdoors_scout_humanoid_male", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/twilek_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidMale", "outdoors_scout_humanoid_male", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/moncal_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidMale", "outdoors_scout_humanoid_male", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/rodian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidMale", "outdoors_scout_humanoid_male", core, object) - - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/human_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidFemale", "outdoors_scout_humanoid_female", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/zabrak_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidFemale", "outdoors_scout_humanoid_female", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/bothan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidFemale", "outdoors_scout_humanoid_female", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/sullustan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidFemale", "outdoors_scout_humanoid_female", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/twilek_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidFemale", "outdoors_scout_humanoid_female", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/moncal_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidFemale", "outdoors_scout_humanoid_female", core, object) - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/rodian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutHumanoidFemale", "outdoors_scout_humanoid_female", core, object) - - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/trandoshan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutTrandoshanMale", "outdoors_scout_trandoshan_male", core, object) - - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/trandoshan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutTrandoshanFemale", "outdoors_scout_trandoshan_female", core, object) - - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/wookiee_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutWookieeMale", "outdoors_scout_wookiee_male", core, object) - - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/wookiee_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutWookieeFemale", "outdoors_scout_wookiee_female", core, object) - - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/ithorian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutIthorianMale", "outdoors_scout_ithorian_male", core, object) - - elif starterProfession == 'outdoors_scout' and raceTemplate == 'object/creature/player/ithorian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "OutdoorScoutIthorianFemale", "outdoors_scout_ithorian_female", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/human_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidMale", "combat_brawler_humanoid_male", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/zabrak_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidMale", "combat_brawler_humanoid_male", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/bothan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidMale", "combat_brawler_humanoid_male", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/sullustan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidMale", "combat_brawler_humanoid_male", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/twilek_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidMale", "combat_brawler_humanoid_male", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/moncal_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidMale", "combat_brawler_humanoid_male", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/rodian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidMale", "combat_brawler_humanoid_male", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/human_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidFemale", "combat_brawler_humanoid_female", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/zabrak_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidFemale", "combat_brawler_humanoid_female", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/bothan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidFemale", "combat_brawler_humanoid_female", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/sullustan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidFemale", "combat_brawler_humanoid_female", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/twilek_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidFemale", "combat_brawler_humanoid_female", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/moncal_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidFemale", "combat_brawler_humanoid_female", core, object) - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/rodian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerHumanoidFemale", "combat_brawler_humanoid_female", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/trandoshan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerTrandoshanMale", "combat_brawler_trandoshan_male", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/trandoshan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerOutdoorScoutTrandoshanFemale", "combat_brawler_trandoshan_female", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/wookiee_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerWookieeMale", "combat_brawler_wookiee_male", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/wookiee_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerWookieeFemale", "combat_brawler_wookiee_female", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/ithorian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerIthorianMale", "combat_brawler_ithorian_male", core, object) - - elif starterProfession == 'combat_brawler' and raceTemplate == 'object/creature/player/ithorian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatBrawlerIthorianFemale", "combat_brawler_ithorian_female", core, object) - - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/human_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidMale", "combat_marksman_humanoid_male", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/zabrak_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidMale", "combat_marksman_humanoid_male", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/bothan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidMale", "combat_marksman_humanoid_male", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/sullustan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidMale", "combat_marksman_humanoid_male", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/twilek_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidMale", "combat_marksman_humanoid_male", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/moncal_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidMale", "combat_marksman_humanoid_male", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/rodian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidMale", "combat_marksman_humanoid_male", core, object) - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/human_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidFemale", "combat_marksman_humanoid_female", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/zabrak_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidFemale", "combat_marksman_humanoid_female", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/bothan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidFemale", "combat_marksman_humanoid_female", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/sullustan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidFemale", "combat_marksman_humanoid_female", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/twilek_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidFemale", "combat_marksman_humanoid_female", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/moncal_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidFemale", "combat_marksman_humanoid_female", core, object) - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/rodian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanHumanoidFemale", "combat_marksman_humanoid_female", core, object) - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/trandoshan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanTrandoshanMale", "combat_marksman_trandoshan_male", core, object) - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/trandoshan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanTrandoshanFemale", "combat_marksman_trandoshan_female", core, object) - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/wookiee_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanWookieeMale", "combat_marksman_wookiee_male", core, object) - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/wookiee_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanWookieeFemale", "combat_marksman_wookiee_female", core, object) - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/ithorian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanIthorianMale", "combat_marksman_ithorian_male", core, object) - - elif starterProfession == 'combat_marksman' and raceTemplate == 'object/creature/player/ithorian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CombatMarksmanIthorianFemale", "combat_marksman_ithorian_female", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/human_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidMale", "crafting_artisan_humanoid_male", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/zabrak_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidMale", "crafting_artisan_humanoid_male", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/bothan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidMale", "crafting_artisan_humanoid_male", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/sullustan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidMale", "crafting_artisan_humanoid_male", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/twilek_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidMale", "crafting_artisan_humanoid_male", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/moncal_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidMale", "crafting_artisan_humanoid_male", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/rodian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidMale", "crafting_artisan_humanoid_male", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/human_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidFemale", "crafting_artisan_humanoid_female", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/zabrak_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidFemale", "crafting_artisan_humanoid_female", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/bothan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidFemale", "crafting_artisan_humanoid_female", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/sullustan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidFemale", "crafting_artisan_humanoid_female", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/twilek_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanTwilekFemale", "crafting_artisan_twilek_female", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/moncal_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidFemale", "crafting_artisan_humanoid_female", core, object) - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/rodian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanHumanoidFemale", "crafting_artisan_humanoid_female", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/trandoshan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanTrandoshanMale", "crafting_artisan_trandoshan_male", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/trandoshan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanTrandoshanFemale", "crafting_artisan_trandoshan_female", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/wookiee_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanWookieeMale", "crafting_artisan_wookiee_male", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/wookiee_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanWookieeFemale", "crafting_artisan_wookiee_female", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/ithorian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanIthorianMale", "crafting_artisan_ithorian_male", core, object) - - elif starterProfession == 'crafting_artisan' and raceTemplate == 'object/creature/player/ithorian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "CraftingArtisanIthorianFemale", "crafting_artisan_ithorian_female", core, object) - - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/human_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidMale", "science_medic_humanoid_male", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/zabrak_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidMale", "science_medic_humanoid_male", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/bothan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidMale", "science_medic_humanoid_male", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/sullustan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidMale", "science_medic_humanoid_male", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/twilek_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidMale", "science_medic_humanoid_male", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/moncal_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidMale", "science_medic_humanoid_male", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/rodian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidMale", "science_medic_humanoid_male", core, object) - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/human_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidFemale", "science_medic_humanoid_female", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/zabrak_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidFemale", "science_medic_humanoid_female", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/bothan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidFemale", "science_medic_humanoid_female", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/sullustan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidFemale", "science_medic_humanoid_female", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/twilek_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidFemale", "science_medic_humanoid_female", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/moncal_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidFemale", "science_medic_humanoid_female", core, object) - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/rodian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicHumanoidFemale", "science_medic_humanoid_female", core, object) - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/trandoshan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicTrandoshanMale", "science_medic_trandoshan_male", core, object) - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/trandoshan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicTrandoshanFemale", "science_medic_trandoshan_female", core, object) - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/wookiee_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicWookieeMale", "science_medic_wookiee_male", core, object) - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/wookiee_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicWookieeFemale", "science_medic_wookiee_female", core, object) - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/ithorian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicIthorianMale", "science_medic_ithorian_male", core, object) - - elif starterProfession == 'science_medic' and raceTemplate == 'object/creature/player/ithorian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "ScienceMedicIthorianFemale", "science_medic_ithorian_female", core, object) - - - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/human_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidMale", "social_entertainer_humanoid_male", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/zabrak_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidMale", "social_entertainer_humanoid_male", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/bothan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidMale", "social_entertainer_humanoid_male", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/sullustan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidMale", "social_entertainer_humanoid_male", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/twilek_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidMale", "social_entertainer_humanoid_male", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/moncal_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidMale", "social_entertainer_humanoid_male", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/rodian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidMale", "social_entertainer_humanoid_male", core, object) - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/human_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidFemale", "social_entertainer_humanoid_female", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/zabrak_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidFemale", "social_entertainer_humanoid_female", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/bothan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidFemale", "social_entertainer_humanoid_female", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/sullustan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidFemale", "social_entertainer_humanoid_female", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/twilek_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerTwilekFemale", "social_entertainer_twilek_female", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/moncal_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidFemale", "social_entertainer_humanoid_female", core, object) - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/rodian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerHumanoidFemale", "social_entertainer_humanoid_female", core, object) - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/trandoshan_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerTrandoshanMale", "social_entertainer_trandoshan_male", core, object) - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/trandoshan_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerTrandoshanFemale", "social_entertainer_trandoshan_female", core, object) - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/wookiee_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerWookieeMale", "social_entertainer_wookiee_male", core, object) - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/wookiee_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerWookieeFemale", "social_entertainer_wookiee_female", core, object) - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/ithorian_male.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerIthorianMale", "social_entertainer_ithorian_male", core, object) - - elif starterProfession == 'social_entertainer' and raceTemplate == 'object/creature/player/ithorian_female.iff': - core.scriptService.callScript("scripts/starter_clothing/", "SocialEntertainerIthorianFemale", "social_entertainer_ithorian_female", core, object) - \ No newline at end of file diff --git a/scripts/staticNPCs/junk_dealer.py b/scripts/staticNPCs/junk_dealer.py new file mode 100644 index 00000000..d2965171 --- /dev/null +++ b/scripts/staticNPCs/junk_dealer.py @@ -0,0 +1,6 @@ + + + + +object = stcSvc.spawnObject('object/mobile/shared_respec_seller_f_1.iff', 'tatooine', long(0), float(3533.14), float(5), float(-4788.86), float(-0.3327), float(0.9288)) +object.setOptionsBitmask(264) \ No newline at end of file diff --git a/scripts/static_spawns/kaas.py b/scripts/static_spawns/kaas.py new file mode 100644 index 00000000..7bcd17d9 --- /dev/null +++ b/scripts/static_spawns/kaas.py @@ -0,0 +1,87 @@ +import sys +# Project SWG: Dromund Kaas: Static Spawns +# (C)2014 ProjectSWG + +# Do not make ANY changes to this script without direct approval from Levarris! + +from resources.datatables import Options +from resources.datatables import StateStatus + +def addPlanetSpawns(core, planet): + + + stcSvc = core.staticService + objSvc = core.objectService +#Dark Temple Area + #Structures + stcSvc.spawnObject('object/building/military/shared_military_base_police_station_imperial_lok_otto.iff', 'kaas', long(0), float(-5117.8), float(80.0), float(-2314.1), float(0), float(0)) + stcSvc.spawnObject('object/building/player/shared_player_house_corellia_medium_style_01.iff', 'kaas', long(0), float(-5078.6), float(80.0), float(-2302.5), float(0), float(0)) + stcSvc.spawnObject('object/building/general/shared_bunker_imperial_weapons_research_facility_01.iff', 'kaas', long(0), float(-5159.5), float(80.0), float(-2298.7), float(0), float(0)) + stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5163.9), float(79.0), float(-2369.6), float(0.71), float(0.71)) + stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5163.9), float(79.0), float(-2351.6), float(0.71), float(0.71)) + stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5072.1), float(79.0), float(-2369.6), float(-0.71), float(0.71)) + stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_pyramid_hut.iff', 'kaas', long(0), float(-5072.1), float(79.0), float(-2351.6), float(-0.71), float(0.71)) + stcSvc.spawnObject('object/building/military/shared_outpost_cloning_facility_s02.iff', long(0), 'kaas', long(0), float(-5072.1), float(80.0), float(-2279.5), float(0.71), float(0), float(-0.71), float(0)) + + #Terminals + stcSvc.spawnObject('object/tangible/terminal/shared_terminal_bank.iff', 'kaas', long(0), float(-5080.8), float(80.0), float(-2275.7), float(-0.71), float(0.71)) + stcSvc.spawnObject('object/tangible/terminal/shared_terminal_mission.iff', 'kaas', long(0), float(-5108.7), float(80.0), float(-2289.2), float(0), float(0)) + stcSvc.spawnObject('object/tangible/terminal/shared_terminal_mission.iff', 'kaas', long(0), float(-5127.3), float(80.0), float(-2289.2), float(0), float(0)) + + + #Decor + stcSvc.spawnObject('object/static/vehicle/shared_static_lambda_shuttle.iff', 'kaas', long(0), float(-5078.1), float(80.0), float(-2256.0), float(-0.70), float(0.70)) + stcSvc.spawnObject('object/building/content/aurilia/shared_aurilia_crystal_centerpiece.iff', 'kaas', long(0), float(-5121.5), float(80.0), float(-2360.5), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/tatooine/shared_antenna_tatt_style_1.iff', 'kaas', long(0), float(-5146.7), float(80.0), float(-2301.7), float(0), float(0)) + stcSvc.spawnObject('object/static/installation/shared_mockup_power_generator_fusion_style_1.iff', 'kaas', long(0), float(-5146.7), float(80.0), float(-2301.7), float(0.71), float(0.71)) + stcSvc.spawnObject('object/static/installation/shared_mockup_power_generator_photo_bio_style_1.iff', 'kaas', long(0), float(-5146.9), float(80.0), float(-2294.5), float(0), float(0)) + stcSvc.spawnObject('object/static/vehicle/shared_static_tie_bomber.iff', 'kaas', long(0), float(-5158.5), float(80.5), float(-2232.4), float(0.70), float(0.70)) + stcSvc.spawnObject('object/static/vehicle/shared_static_tie_fighter.iff', 'kaas', long(0), float(-5158.5), float(85.0), float(-2257.4), float(0.70), float(0.70)) + + + #Streetlamps + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5109.9), float(80.0), float(-2289.9), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5125.9), float(80.0), float(-2289.9), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5115.0), float(80.0), float(-2346.6), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5120.8), float(80.0), float(-2346.6), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5127.3), float(80.0), float(-2219.0), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5111.2), float(80.0), float(-2219.0), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5162.8), float(80.0), float(-2285.9), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5067.3), float(80.0), float(-2294.9), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5068.6), float(80.0), float(-2228.1), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5078.5), float(80.0), float(-2360.5), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/general/shared_streetlamp_large_blue_style_01_on.iff', 'kaas', long(0), float(-5157.5), float(80.0), float(-2360.5), float(0), float(0)) + + + #Dark Temple Interior + stcSvc.spawnObject('object/static/structure/content/shared_exar_kun_torch_01.iff', 'kaas', long(468319), float(0.0), float(-1.3), float(20.8), float(0), float(0)) + + +#Village of the Descendants Area + stcSvc.spawnObject('object/building/general/shared_cave_01.iff', 'kaas', long(0), float(3348.1), float(110), float(2562.1), float(0), float(0)) + +#Kaas City Ruins + +#Tomb of Vitiate + +#Northwest Cave + stcSvc.spawnObject('object/building/general/shared_cave_01.iff', 'kaas', long(0), float(-6135.3), float(185), float(6575.0), float(0), float(0)) + +#Abandoned Separatist Base + stcSvc.spawnObject('object/building/military/shared_military_base_police_station_rebel_style_01.iff', 'kaas', long(0), float(-3509), float(77), float(6800), float(0), float(0)) + +#Sith Meditation Chamber + stcSvc.spawnObject('object/building/player/shared_player_house_sith_meditation_room.iff', 'kaas', long(0), float(4766), float(126), float(-7307), float(0), float(0)) + +#Large Ruin + stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_main_structure.iff', 'kaas', long(0), float(-434), float(77), float(-2252), float(0), float(0)) + +#Central North Ruin + stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_wall_1.iff', 'kaas', long(0), float(-50), float(77), float(6313), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_wall_2.iff', 'kaas', long(0), float(-58), float(77), float(6304), float(0.71), float(0.71)) + stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_wall_1.iff', 'kaas', long(0), float(-58), float(77), float(6321), float(-0.71), float(0.71)) + stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_wall_2.iff', 'kaas', long(0), float(-71), float(77), float(6312), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_temple_pillar.iff', 'kaas', long(0), float(-71.0), float(78), float(6320.8), float(0), float(0)) + + return + diff --git a/scripts/static_spawns/lok.py b/scripts/static_spawns/lok.py index e84b7994..30c9163e 100644 --- a/scripts/static_spawns/lok.py +++ b/scripts/static_spawns/lok.py @@ -4,48 +4,7 @@ from resources.datatables import Options from resources.datatables import StateStatus def addPlanetSpawns(core, planet): +#This Script is no longer to be used for NPC Scripting. - Levarris - stcSvc = core.staticService -#Nym's Stronghold -Fingies - - #Outside - - nymtech = stcSvc.spawnObject('object/mobile/shared_dressed_nym_technician_2.iff', 'lok', long(0), float(372.87), float(11.99), float(4984.83), float(0.97), float(-0.21)) - nymtech.setCustomName2('Nym\'s Fuel Technician') - disgrunt1 = stcSvc.spawnObject('object/mobile/shared_nym_themepark_d_townsperson_lead.iff', 'lok', long(0), float(473.28), float(23.00), float(4945.03), float(0.043), float(0.99)) - disgrunt1.setCustomName2('a disgruntled townsperson') - guard1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_nikto_m.iff', 'lok', long(0), float(472.82), float(22.57), float(4920.00), float(0), float(0)) - guard1.setCustomName2('Nym\'s Guard') - guard2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(0), float(480.74), float(22.64), float(4920.02), float(0), float(0)) - guard2.setCustomName2('Nym\'s Guard') - - #Nym's Palace - Interior - - brawl1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_brawler_hum_f.iff', 'lok', long(6595511), float(5.7), float(1.3), float(-6.1), float(0.90), float(-0.42)) - brawl1.setCustomName2('Nym\'s Brawler') - surv1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_surveyer_rod_m.iff', 'lok', long(6595511), float(4.5), float(1.3), float(-4.1), float(0.078), float(-0.99)) - surv1.setCustomName2('Nym\'s Surveyor') - bodyg1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_bodyguard_hum_m.iff', 'lok', long(6595511), float(7.8), float(1.3), float(-6.8), float(0.782), float(0.622)) - bodyg1.setCustomName2('Nym\'s Bodyguard') - mako = stcSvc.spawnObject('object/mobile/shared_nym_themepark_mako_ghast.iff', 'lok', long(6595511), float(5.5), float(4.1), float(-13.9), float(0.309), float(0.951)) - mako.setCustomName2('Mako Ghast') - bodyg2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_bodyguard_rod_m.iff', 'lok', long(6595511), float(0.3), float(1.3), float(3.2), float(0.707), float(0.707)) - bodyg2.setCustomName2('Nym\'s Bodyguard') - bodyg3 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_bodyguard_rod_m.iff', 'lok', long(6595511), float(-1.6), float(1.3), float(3.0), float(0.707), float(-0.707)) - bodyg3.setCustomName2('Nym\'s Bodyguard') - surv2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_surveyer_rod_m.iff', 'lok', long(6595511), float(-9.1), float(1.3), float(-5.9), float(1), float(0)) - surv2.setCustomName2('Nym\'s Surveyor') - brawl2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_brawler_tran_m.iff', 'lok', long(6595511), float(-9.1), float(1.3), float(-3.1), float(0.0087), float(0.999)) - brawl2.setCustomName2('Nym\'s Brawler') - guard3 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(6595511), float(-19.7), float(2.3), float(-17.6), float(0.999), float(0.0087)) - guard3.setCustomName2('Nym\'s Guard') - creep1 = stcSvc.spawnObject('object/mobile/shared_slicer_kelson_sharphorn.iff', 'lok', long(6595511), float(-4.2), float(2.3), float(7.6), float(0.0174), float(0.9998)) - creep1.setCustomName2('Kelson Sharphorn') - guard4 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(6595511), float(24.8), float(2.3), float(7.9), float(0.0174), float(0.9998)) - guard4.setCustomName2('Nym\'s Guard') - guard5 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(6595511), float(3.7), float(4.1), float(-9.5), float(0.9998), float(0.0174)) - guard5.setCustomName2('Nym\'s Guard') - guard6 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_rod_m.iff', 'lok', long(6595511), float(-3.7), float(4.1), float(-9.5), float(1), float(0)) - guard6.setCustomName2('Nym\'s Guard') - + return diff --git a/scripts/static_spawns/naboo.py b/scripts/static_spawns/naboo.py index 46e54797..c1072308 100644 --- a/scripts/static_spawns/naboo.py +++ b/scripts/static_spawns/naboo.py @@ -3,134 +3,6 @@ import sys def addPlanetSpawns(core, planet): stcSvc = core.staticService -# Theed Spawns - # OutSide - loruna = stcSvc.spawnObject('object/mobile/shared_loruna_scathe.iff', 'naboo', long(0), float(-5149), float(6), float(4286), float(0.34), float(0.93)) - loruna.setCustomName2('Loruna Scathe') - - pooja = stcSvc.spawnObject('object/mobile/shared_dressed_pooja_naberrie.iff', 'naboo', long(0), float(-5479.1), float(14), float(4467.3), float(-0.96), float(0.25)) - pooja.setCustomName2('Pooja Naberrie') - -# Keren Spawns - # Cantina interior - lergoBrazee = stcSvc.spawnObject('object/mobile/shared_dressed_lergo_brazee.iff', 'naboo', long(5), float(2.8), float(-0.9), float(-5.3), float(0.25), float(0.96)) - lergoBrazee.setCustomName2('Lergo Brazee') - - # Starport interior - gavynSykes = stcSvc.spawnObject('object/mobile/shared_dressed_gavyn_sykes.iff', 'naboo', long(2125382), float(9.3), float(0.6), float(66.6), float(-0.90), float(0.42)) - gavynSykes.setCustomName2('Capt. Gavyn Sykes') - - #Miscellaneous Building Interiors - kritusMorven = stcSvc.spawnObject('object/mobile/shared_dressed_kritus_morven.iff', 'naboo', long(1685077), float(-3.9), float(-4.9), float(-7.5), float(0.95), float(0.30)) - kritusMorven.setCustomName2('Kritus Morven') - - Raev = stcSvc.spawnObject('object/mobile/ep3/shared_ep3_clone_relics_major_raev.iff', 'naboo', long(1393881), float(-10), float(1.7), float(-9.5), float(0.93), float(0.34)) - Raev.setCustomName2('Major Raev') - - # Outside - brennis = stcSvc.spawnObject('object/mobile/shared_dressed_brennis_doore.iff', 'naboo', long(0), float(1740), float(12), float(2657), float(-0.99), float(0)) - brennis.setCustomName2('Brennis Doore') - - demitri = stcSvc.spawnObject('object/mobile/shared_dressed_herald_servant_naboo_human_male.iff', 'naboo', long(0), float(1673), float(12), float(2582), float(0.31), float(0.94)) - demitri.setCustomName2('Demitri Firewatcher') - - ogden = stcSvc.spawnObject('object/mobile/shared_smuggler_broker_ogden.iff', 'naboo', long(0), float(1907), float(12), float(2352), float(0.97), float(0.22)) - ogden.setCustomName2('Ogden') - -# Kaadara Spawns - #Miscellaneous Building Interiors - barnSinkko = stcSvc.spawnObject('object/mobile/shared_dressed_imperial_trainer_space_03.iff', 'naboo', long(1741494), float(-1.3), float(1.8), float(-14), float(-0.34), float(0.93)) - barnSinkko.setCustomName2('Lt. Barn Sinkko') - - # OutSide - dakk = stcSvc.spawnObject('object/mobile/shared_dressed_acklay_dakk.iff', 'naboo', long(0), float(5167), float(-192), float(6674), float(-0.99), float(0.04)) - dakk.setCustomName2('Dakk') - - panaka = stcSvc.spawnObject('object/mobile/shared_panaka.iff', 'naboo', long(0), float(5196.6), float(-192), float(6712.8), float(0.99), float(0.04)) - -# Dejaa Peak Spawns - - # OutSide - arvenWendik = stcSvc.spawnObject('object/mobile/shared_dressed_arven_wendik.iff', 'naboo', long(0), float(4710), float(330), float(-1432), float(-0.70), float(0.70)) - arvenWendik.setCustomName2('Arven Wendik') - - damaliaKorde = stcSvc.spawnObject('object/mobile/shared_dressed_damalia_korde.iff', 'naboo', long(0), float(5139), float(346.5), float(-1530.9), float(0.34), float(0.93)) - damaliaKorde.setCustomName2('Damalia Korde') - - hermanPate = stcSvc.spawnObject('object/mobile/shared_naboo_herman_pate.iff', 'naboo', long(0), float(4871.1), float(360.6), float(-1442.1), float(0), float(1)) - hermanPate.setCustomName2('Herman Pate') - - kimaNazith = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_female_03.iff', 'naboo', long(0), float(4972), float(360), float(-1583), float(-0.95), float(0.28)) - kimaNazith.setCustomName2('Kima Nazith') - - kippyMartin = stcSvc.spawnObject('object/mobile/shared_naboo_kippy_martin.iff', 'naboo', long(0), float(4324), float(295.1), float(-1250), float(0.55), float(0.82)) - kippyMartin.setCustomName2('Kippy Martin') - - ruab = stcSvc.spawnObject('object/mobile/shared_smuggler_fence_ruab.iff', 'naboo', long(0), float(4998), float(360), float(-1485), float(-0.34), float(0.93)) - ruab.setCustomName2('Ruab') - - tanoaVills = stcSvc.spawnObject('object/mobile/shared_naboo_tanoa_vills.iff', 'naboo', long(0), float(4740), float(330), float(-1322), float(-0.96), float(0.27)) - tanoaVills.setCustomName2('Tanoa Vills') - - vanceGroten = stcSvc.spawnObject('object/mobile/shared_naboo_vance_groten.iff', 'naboo', long(0), float(5144), float(346.5), float(-1530), float(-0.17), float(0.98)) - vanceGroten.setCustomName2('Vance Groten') - - walker = stcSvc.spawnObject('object/mobile/shared_naboo_walker_luskeske.iff', 'naboo', long(0), float(4994), float(360), float(-1506), float(-0.97), float(0.21)) - walker.setCustomName2('Walker Luskeske') - - zanier = stcSvc.spawnObject('object/mobile/shared_naboo_professor_hudmasse.iff', 'naboo', long(0), float(4690), float(330.2), float(-1391), float(0.52), float(0.84)) - zanier.setCustomName2('Professor Zanier Hudmasse') - -# Moenia Spawns - # Cantina interior - borvo = stcSvc.spawnObject('object/mobile/shared_borvo.iff', 'naboo', long(121), float(-29), float(-0.5), float(7.9), float(0.44), float(0.89)) - borvo.setCustomName2('Borvo The Hutt') - - # OutSide - c3tc = stcSvc.spawnObject('object/mobile/shared_3po_protocol_droid_silver.iff', 'naboo', long(0), float(4723), float(3.8), float(-4935), float(-0.99), float(0)) - c3tc.setCustomName2('C-3TC') - - dilvin = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_male_03.iff', 'naboo', long(0), float(4893), float(3.8), float(-4998), float(0.96), float(0.27)) - dilvin.setCustomName2('Dilvin Lormurojo') - - ebenn = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_male_02.iff', 'naboo', long(0), float(4869), float(3.8), float(-4875), float(-0.70), float(0.70)) - ebenn.setCustomName2('Ebenn Q3 Baobab') - - v3fx = stcSvc.spawnObject('object/mobile/shared_space_rebel_tier1_naboo_v3fx.iff', 'naboo', long(0), float(4764.2), float(6.1), float(-4795), float(0.99), float(0.08)) - v3fx.setCustomName2('V3-FX') - -# Emperor's Retreat interior - kaja = stcSvc.spawnObject('object/mobile/shared_kaja_orzee.iff', 'naboo', long(1418872), float(1.9), float(0.2), float(-13.4), float(0), float(1)) - kaja.setCustomName2('Kaja Or\'Zee') - - ltVelso = stcSvc.spawnObject('object/mobile/shared_dressed_corvette_imperial_velso.iff', 'naboo', long(1418874), float(23.6), float(0.2), float(-19), float(-0.93), float(0.34)) - ltVelso.setCustomName2('Lt. Velso') - - royalGuard1 = stcSvc.spawnObject('object/mobile/shared_royal_guard.iff', 'naboo', long(1418874), float(17), float(0.2), float(-31), float(0), float(1)) - royalGuard2 = stcSvc.spawnObject('object/mobile/shared_royal_guard.iff', 'naboo', long(1418874), float(9), float(0.2), float(-31), float(0), float(1)) - - vrke = stcSvc.spawnObject('object/mobile/shared_space_imperial_tier3_naboo_vrke.iff', 'naboo', long(1418875), float(24.3), float(0.2), float(-39.6), float(0), float(1)) - vrke.setCustomName2('Inquisitor Vrke') - - loamRedge = stcSvc.spawnObject('object/mobile/shared_loam_redge.iff', 'naboo', long(1418875), float(18.6), float(0.2), float(-42), float(0.34), float(0.93)) - loamRedge.setCustomName2('Loam Redge') - - hethrir = stcSvc.spawnObject('object/mobile/shared_lord_hethrir.iff', 'naboo', long(1418876), float(4.6), float(0.2), float(-41.3), float(0), float(1)) - hethrir.setCustomName2('Lord Hethrir') - - jaceYiaso = stcSvc.spawnObject('object/mobile/shared_space_imperial_tier4_naboo_inquisitor.iff', 'naboo', long(1418884), float(-44), float(0.2), float(-31.9), float(0), float(1)) - jaceYiaso.setCustomName2('Grand Inquisitor Ja\'ce Yiaso') - - vader = stcSvc.spawnObject('object/mobile/shared_darth_vader.iff', 'naboo', long(1418884), float(-57), float(0.2), float(-24), float(0.70), float(0.70)) - - # Outside Emperor's Retreat - veers = stcSvc.spawnObject('object/mobile/naboo_npc/shared_veers.iff', 'naboo', long(0), float(2368), float(291), float(-3921), float(0.64), float(0.76)) - veers.setCustomName2('Maximilian Veers') - - thrawn = stcSvc.spawnObject('object/mobile/naboo_npc/shared_thrawn.iff', 'naboo', long(0), float(2369), float(291), float(-3922), float(0.34), float(0.93)) - thrawn.setCustomName2('Captain Thrawn') - - fazoll = stcSvc.spawnObject('object/mobile/shared_space_imperial_tier2_naboo.iff', 'naboo', long(0), float(2444), float(292), float(-3896), float(-0.996194), float(0.087155)) - fazoll.setCustomName2('Inquisitor Fa\'Zoll') + #this script is no longer for NPC spawning - Levarris return \ No newline at end of file diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index bd521e16..c059c589 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -5,228 +5,18 @@ from resources.datatables import StateStatus def addPlanetSpawns(core, planet): stcSvc = core.staticService -# Wayfar Life Day, by Wefi, modified by Fingies - - stcSvc.spawnObject('object/mobile/shared_lifeday_saun_dann.iff', 'tatooine', long(0), float(-5037.00), float(75), float(-6561), float(-0.75), float(0)) # Life Day - figlife = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan.iff', 'tatooine', long(0), float(-5046.00), float(75), float(-6560), float(-0.75), float(0)) # LD Figrin - figlife.setCustomName2('Figrin D\'an') - bandtat1 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5040.00), float(75), float(-6557), float(-0.75), float(0)) # LD Band 1 - bandtat1.setCustomName2('Doikk Nats') - bandtat2 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6559), float(-0.75), float(0)) # LD band 2 - bandtat2.setCustomName2('Tech Mor') - bandtat3 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5048.00), float(75), float(-6557), float(-0.75), float(0)) # LD Band 3 - bandtat3.setCustomName2('Nalan Cheel') - bandtat4 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5045.00), float(75), float(-6555), float(-0.75), float(0)) # LD band 4 - bandtat4.setCustomName2('Sunil Eide') - reblifevendor = stcSvc.spawnObject('object/mobile/shared_life_day_rebel_vendor.iff', 'tatooine', long(0), float(-5212.2), float(75.0), float(-6571.7), float(0.656), float(-0.7547)) #Rebel Wookiee Vendor - reblifevendor.setCustomName2('Oolovv \(Wookiee Freedom Fighter)') - reblifesold1 = stcSvc.spawnObject('object/mobile/shared_rebel_snow_m_01.iff', 'tatooine', long(0), float(-5208.8), float(75.0), float(-6569.6), float(0.669), float(-0.743)) #Rebel Vendor Guard 1 - reblifesold1.setCustomName2('a Rebel Soldier') - reblifesold2 = stcSvc.spawnObject('object/mobile/shared_rebel_snow_m_01.iff', 'tatooine', long(0), float(-5208.8), float(75.0), float(-6573.1), float(0.669), float(-0.743)) #Rebel Vendor Guard 2 - reblifesold2.setCustomName2('a Rebel Soldier') - implifevendor = stcSvc.spawnObject('object/mobile/shared_life_day_imperial_vendor.iff', 'tatooine', long(0), float(-5097.1), float(75.0), float(-6570.7), float(0.0087), float(-0.9999)) #Imp Vendor - implifevendor.setCustomName2('Sstrigge \(Trandoshan \'Trader\')') - implifesold1 = stcSvc.spawnObject('object/mobile/shared_snowtrooper_s01.iff', 'tatooine', long(0), float(-5092.2), float(75.0), float(-6569.0), float(0.0087), float(-0.9999)) #Imp Vendor Guard 1 - implifesold1.setCustomName2('a Stormtrooper') - implifesold2 = stcSvc.spawnObject('object/mobile/shared_snowtrooper_s01.iff', 'tatooine', long(0), float(-5100.8), float(75.0), float(-6569.4), float(0.0087), float(-0.9999)) #Imp Vendor Guard 2 - implifesold2.setCustomName2('a Stormtrooper') - stcSvc.spawnObject('object/tangible/instrument/shared_nalargon.iff', 'tatooine', long(0), float(-5045.00), float(75), float(-6555), float(0.999132931232), float(-0.0416347384453)) # Drums - stcSvc.spawnObject('object/tangible/instrument/shared_ommni_box.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6559), float(0.999132931232), float(-0.0416347384453)) # Box + #this script is no longer for NPC spawning usage. - Levarris -# Mos Eisley Spawns: WORK IN PROGRESS by Levarris + #stcSvc.spawnObject('object/mobile/shared_3po_protocol_droid_red.iff', 'tatooine', long(26582), float(-14.3), float(2.0), float(47.4), float(0.70), float(0.71)) + stcSvc.spawnObject('object/tangible/terminal/shared_terminal_character_builder.iff', 'tatooine', long(0), float(3525), float(4), float(-4801), float(0.70), float(0.71)) + #object = stcSvc.spawnObject('object/mobile/shared_respec_seller_f_1.iff', 'tatooine', long(0), float(3533.14), float(5), float(-4788.86), float(-0.3327), float(0.9288)) + #object.setOptionsBitmask(264) - #Cantina Interior - wuher = stcSvc.spawnObject('object/mobile/shared_wuher.iff', 'tatooine', long(1082877), float(8.6), float(-0.9), float(0.4), float(0.71), float(0.71)) - wuher.setCustomName2('Wuher') - wuher.addOption(Options.INVULNERABLE) - wuher.setStateBitmask(StateStatus.SittingOnChair) - - chadraFanFemale = stcSvc.spawnObject('object/mobile/shared_chadra_fan_female.iff', 'tatooine', long(1082877), float(10.6), float(-0.9), float(-1.5), float(0.42), float(0.90)) - chadraFanFemale.setCustomName2('a Chadra Fan Female') - - chadraFanMale = stcSvc.spawnObject('object/mobile/shared_chadra_fan_male.iff', 'tatooine', long(1082877), float(10.7), float(-0.9), float(-0.3), float(0.64), float(0.77)) - chadraFanMale.setCustomName2('a Chadra Fan Male') - - muftak = stcSvc.spawnObject('object/mobile/shared_muftak.iff', 'tatooine', long(1082877), float(20.3), float(-0.9), float(4.9), float(0.82), float(0.57)) - muftak.setCustomName2('Muftak') - - chissMale1 = stcSvc.spawnObject('object/mobile/ep3/shared_ep3_etyyy_chiss_poacher_01.iff', 'tatooine', long(1082877), float(1.7), float(-0.9), float(-5.0), float(0.71), float(0.71)) - chissMale1.setCustomName2('a Chiss Male') - - chissMale2 = stcSvc.spawnObject('object/mobile/ep3/shared_ep3_etyyy_chiss_poacher_02.iff', 'tatooine', long(1082877), float(3.4), float(-0.9), float(-4.8), float(0), float(0)) - chissMale2.setCustomName2('a Chiss Male') - - cantinaStorm = stcSvc.spawnObject('object/mobile/shared_stormtrooper.iff', 'tatooine', long(1082877), float(2.9), float(-0.9), float(-6.5), float(0.71), float(0.71)) - cantinaStorm.setCustomName2('a Stormtrooper') - - cantinaStormL = stcSvc.spawnObject('object/mobile/shared_stormtrooper_groupleader.iff', 'tatooine', long(1082877), float(3.6), float(-0.9), float(-7.9), float(0.71), float(0.71)) - cantinaStormL.setCustomName2('a Stormtrooper Squad Leader') - - figrinDan = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(3.7), float(-0.9), float(-14.4), float(0.42), float(0.91)) - figrinDan.setCustomName2('Figrin D\'an') - - techMor = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(4.0), float(-0.9), float(-17.0), float(0.42), float(0.91)) - techMor.setCustomName2('Tech M\'or') - - doikkNats = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(2.2), float(-0.9), float(-16.4), float(0.42), float(0.91)) - doikkNats.setCustomName2('Doikk Na\'ts') - - tednDahai = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(1.3), float(-0.9), float(-15.2), float(0.42), float(0.91)) - tednDahai.setCustomName2('Tedn Dahai') - - nalanCheel = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(0.5), float(-0.9), float(-17.1), float(0.42), float(0.91)) - nalanCheel.setCustomName2('Nalan Cheel') - - businessman1 = stcSvc.spawnObject('object/mobile/shared_dressed_businessman_human_male_01.iff', 'tatooine', long(1082877), float(11.0), float(-0.9), float(2.1), float(0.38), float(-0.92)) - businessman1.setCustomName2('a Businessman') - - commoner1 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_aqualish_male_01.iff', 'tatooine', long(1082877), float(10.3), float(-0.9), float(2.7), float(0.82), float(0.57)) - commoner1.setCustomName2('a Commoner') - - entertainer1 = stcSvc.spawnObject('object/mobile/shared_dressed_entertainer_trainer_twk_female_01.iff', 'tatooine', long(1082877), float(9.4), float(-0.9), float(3.9), float(0.38), float(-0.92)) - entertainer1.setCustomName2('an Entertainer') - - noble1 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_trandoshan_male_01.iff', 'tatooine', long(1082877), float(8.6), float(-0.9), float(4.8), float(0.82), float(0.57)) - noble1.setCustomName2('a Noble') - - commoner2 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_trandoshan_female_01.iff', 'tatooine', long(1082877), float(4.1), float(-0.9), float(5.7), float(1), float(0)) - commoner2.setCustomName2('a Commoner') - - commoner3 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_bothan_female_01.iff', 'tatooine', long(1082877), float(3.1), float(-0.9), float(5.9), float(1), float(0)) - commoner3.setCustomName2('a Commoner') - - commoner4 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_twilek_male_01.iff', 'tatooine', long(1082877), float(1.7), float(-0.9), float(6.0), float(1), float(0)) - commoner4.setCustomName2('a Commoner') - - commoner5 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_bothan_male_01.iff', 'tatooine', long(1082877), float(-0.4), float(-0.9), float(5.9), float(1), float(0)) - commoner5.setCustomName2('a Commoner') - - commoner6 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_05.iff', 'tatooine', long(1082877), float(16.0), float(-0.9), float(4.1), float(0), float(0)) - commoner6.setCustomName2('a Commoner') - - commoner7 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_zabrak_male_01.iff', 'tatooine', long(1082877), float(8.8), float(-0.9), float(-6.0), float(0.98), float(-0.22)) - commoner7.setCustomName2('a Patron') - - commoner8 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_08.iff', 'tatooine', long(1082877), float(6.8), float(-0.9), float(-6.5), float(0.98), float(-0.22)) - commoner8.setCustomName2('a Patron') - - commoner9 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_aqualish_male_09.iff', 'tatooine', long(1082877), float(1.1), float(-0.9), float(-7.7), float(0.42), float(0.91)) - commoner9.setCustomName2('a Commoner') - - commoner10 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_nikto_male_04.iff', 'tatooine', long(1082877), float(2.1), float(-0.9), float(-8.4), float(0.42), float(0.91)) - commoner10.setCustomName2('a Commoner') - - #Starport Interior - - #City Hall Interior - - #Lucky Despot Interior - - #Medical Center Interior - - #Theater Interior - - #Miscellaneous Building Interiors - - #Outside - businessman2 = stcSvc.spawnObject('object/mobile/shared_dressed_businessman_human_male_01.iff', 'tatooine', long(0), float(3663.3), float(4.0), float(-4738.6), float(0), float(0)) - businessman2.setCustomName2('a Businessman') - - noble2 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_01.iff', 'tatooine', long(0), float(3542.3), float(5.0), float(-4826.0), float(0.42), float(0.91)) - noble2.setCustomName2('a Noble') - - commoner11 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_06.iff', 'tatooine', long(0), float(3529.1), float(5.0), float(-4900.4), float(0.42), float(0.91)) - commoner11.setCustomName2('a Commoner') - - businessman3 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_trandoshan_male_02.iff', 'tatooine', long(0), float(3595.7), float(5.0), float(-4740.1), float(0), float(0)) - businessman3.setCustomName2('a Businessman') - - jawa1 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3663.3), float(5.0), float(-4858.6), float(0), float(0)) - jawa1.setCustomName2('a Jawa') - - commoner12 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_moncal_male_01.iff', 'tatooine', long(0), float(3512.2), float(5.0), float(-4764.2), float(0), float(0)) - commoner12.setCustomName2('a Scientist') - - commoner13 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_zabrak_female_02.iff', 'tatooine', long(0), float(3559.7), float(5.0), float(-4725.9), float(0), float(0)) - commoner13.setCustomName2('a Commoner') - - commoner14 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_devaronian_male_01.iff', 'tatooine', long(0), float(3527.7), float(5.0), float(-4721.1), float(0.71), float(0.71)) - commoner14.setCustomName2('a Commoner') - - commoner15 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_aqualish_female_01.iff', 'tatooine', long(0), float(3514.9), float(5.0), float(-4737.8), float(0), float(0)) - commoner15.setCustomName2('a Commoner') - - jawa2 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3485.2), float(4.9), float(-4859.2), float(0), float(0)) - jawa2.setCustomName2('a Jawa') - - jawa3 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3465.3), float(5.0), float(-4860.1), float(0.71), float(-0.71)) - jawa3.setCustomName2('a Jawa') - - jawa4 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3486.8), float(5.0), float(-4884.7), float(0.43051), float(-0.9025)) - jawa4.setCustomName2('a Jawa') - - jawa5 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3487.1), float(5.0), float(-4886.0), float(0.95105), float(0.3090)) - jawa5.setCustomName2('a Jawa') - - jawa6 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3488.8), float(5.0), float(-4884.4), float(0.3255), float(-0.9455)) - jawa6.setCustomName2('a Jawa') - - jawa7 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3472.2), float(5.0), float(-4918.4), float(0), float(0)) - jawa7.setCustomName2('a Jawa') - - jawa8 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3471.4), float(5.0), float(-4919.5), float(0), float(0)) - jawa8.setCustomName2('a Jawa') - - jawa9 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3470.3), float(5.0), float(-4918.7), float(0), float(0)) - jawa9.setCustomName2('a Jawa') - - bib = stcSvc.spawnObject('object/mobile/shared_bib_fortuna.iff', 'tatooine', long(0), float(3552.4), float(5.0), float(-4933.2), float(0.31730), float(-0.9483)) - bib.setCustomName2('Bib Fortuna') - - commoner16 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_06.iff', 'tatooine', long(0), float(3398.2), float(4.0), float(-4654.2), float(0.42), float(0.91)) - commoner16.setCustomName2('a Commoner') - - noble3 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_01.iff', 'tatooine', long(0), float(3396.3), float(4.0), float(-4774.1), float(0.42), float(0.91)) - noble3.setCustomName2('a Noble') - - entertainer1 = stcSvc.spawnObject('object/mobile/shared_dressed_entertainer_trainer_twk_female_01.iff', 'tatooine', long(0), float(3305.7), float(5.6), float(-4771.7), float(0), float(0)) - entertainer1.setCustomName2('an Entertainer') - - r3m6 = stcSvc.spawnObject('object/mobile/shared_r3.iff', 'tatooine', long(0), float(3460.1), float(4.0), float(-4898.2), float(0.38), float(-0.92)) - r3m6.setCustomName2('R3-M6') - - eg1 = stcSvc.spawnObject('object/mobile/shared_eg6_power_droid.iff', 'tatooine', long(0), float(3463.8), float(4.0), float(-4882.6), float(-0.38), float(0.92)) - eg1.setCustomName2('an EG-6 Power Droid') - - commoner17 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_zabrak_female_02.iff', 'tatooine', long(0), float(3452.6), float(4.0), float(-4937.1), float(0), float(0)) - commoner17.setCustomName2('a Commoner') - - lifter1 = stcSvc.spawnObject('object/mobile/shared_cll8_binary_load_lifter.iff', 'tatooine', long(0), float(3547), float(5.0), float(-4768.9), float(0), float(0)) - lifter1.setCustomName2('a CLL-8 Binary Load Lifter') - - r3j7 = stcSvc.spawnObject('object/mobile/shared_r3.iff', 'tatooine', long(0), float(3311.1), float(4.0), float(-4820.2), float(0.38), float(-0.92)) - r3j7.setCustomName2('R3-J7') - - noble4 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_03.iff', 'tatooine', long(0), float(3255.3), float(4.0), float(-4848.1), float(0.42), float(0.91)) - noble4.setCustomName2('a Noble') - - - #Eisley Ship Controller - stcSvc.spawnObject('object/mobile/shared_distant_ship_controller.iff', 'tatooine', long(0), float(3542.3), float(5.0), float(-4826.0), float(0.42), float(0.91)) - -# Mos Espa NPC Spawns - -# Mos Entha NPC Spawns - -# Bestine NPC Spawns - -# Anchorhead NPC Spawns - -# Mos Taike NPC Spawns - -# Wayfar NPC Spawns - -# Jabba's Palace Theme Park Spawns + junkdealer = stcSvc.spawnObject('object/mobile/shared_junk_dealer_m_01.iff', 'tatooine', long(0), float(3525), float(4), float(-4804), float(0.70), float(0.71)) + junkdealer.setOptionsBitmask(264) + junkdealer.setCustomName('a Junk Dealer') + junkdealer.setAttachment('radial_filename', 'conversation'); + junkdealer.setAttachment('conversationFile','junk_dealer') return diff --git a/scripts/static_travel_points.py b/scripts/static_travel_points.py index 26ac3f85..b1814ec9 100644 --- a/scripts/static_travel_points.py +++ b/scripts/static_travel_points.py @@ -49,8 +49,8 @@ def corelliaPoints(core, planet): def dantooinePoints(core, planet): trvSvc = core.travelService - trvSvc.addTravelPoint(planet, "Imperial Outpost", -635, 3, 2507) - trvSvc.addTravelPoint(planet, "Mining Outpost", -4208, 3, -2350) + trvSvc.addTravelPoint(planet, "Mining Outpost", -635, 3, 2507) + trvSvc.addTravelPoint(planet, "Imperial Outpost", -4208, 3, -2350) trvSvc.addTravelPoint(planet, "Agro Outpost", 1569, 4, -6415) return @@ -149,4 +149,4 @@ def mustafarPoints(core, planet): trvSvc = core.travelService trvSvc.addTravelPoint(planet, "Mensix Mining Facility", 405, 230, -1352) - return \ No newline at end of file + return diff --git a/src/main/NGECore.java b/src/main/NGECore.java index b053a018..f67ac8b0 100644 --- a/src/main/NGECore.java +++ b/src/main/NGECore.java @@ -24,7 +24,10 @@ package main; import java.io.IOException; import java.sql.PreparedStatement; import java.sql.SQLException; +import java.util.ArrayList; import java.util.HashMap; +import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; @@ -37,7 +40,10 @@ import java.util.concurrent.TimeUnit; import org.apache.mina.core.service.IoHandler; import org.apache.mina.core.session.IoSession; -import protocol.swg.ChatSystemMessage; +import com.sleepycat.je.Transaction; +import com.sleepycat.persist.EntityCursor; + +import protocol.swg.chat.ChatSystemMessage; import net.engio.mbassy.bus.config.BusConfiguration; import resources.common.RadialOptions; import resources.common.ThreadMonitor; @@ -46,10 +52,15 @@ import services.AttributeService; import services.BuffService; import services.CharacterService; import services.ConnectionService; +import services.ConversationService; +import services.DevService; import services.EntertainmentService; import services.EquipmentService; import services.GroupService; +import services.housing.HousingService; +import services.InstanceService; import services.LoginService; +import services.LootService; import services.MissionService; import services.PlayerService; import services.ScriptService; @@ -57,9 +68,11 @@ import services.SimulationService; import services.SkillModService; import services.SkillService; import services.StaticService; +import services.SurveyService; import services.TerrainService; import services.WeatherService; import services.ai.AIService; +import services.bazaar.BazaarService; import services.chat.ChatService; import services.collections.CollectionService; import services.combat.CombatService; @@ -72,6 +85,9 @@ import services.LoginService; import services.map.MapService; import services.object.ObjectService; import services.object.UpdateService; +import services.pet.MountService; +import services.resources.HarvesterService; +import services.resources.ResourceService; import services.retro.RetroService; import services.spawn.SpawnService; import services.sui.SUIService; @@ -91,6 +107,7 @@ import engine.resources.common.CRC; import engine.resources.common.PHPBB3Auth; import engine.resources.config.Config; import engine.resources.config.DefaultConfig; +import engine.resources.container.Traverser; import engine.resources.database.DatabaseConnection; import engine.resources.database.ObjectDatabase; import engine.resources.objects.SWGObject; @@ -107,7 +124,7 @@ import engine.servers.PingServer; public class NGECore { public static boolean didServerCrash = false; - + private static NGECore instance; private Config config = null; @@ -156,6 +173,17 @@ public class NGECore { public SpawnService spawnService; public AIService aiService; public MissionService missionService; + public InstanceService instanceService; + public DevService devService; + public SurveyService surveyService; + public ResourceService resourceService; + public ConversationService conversationService; + public BazaarService bazaarService; + public HousingService housingService; + public LootService lootService; + public HarvesterService harvesterService; + public MountService mountService; + // Login Server public NetworkDispatch loginDispatch; @@ -172,10 +200,22 @@ public class NGECore { private ObjectDatabase creatureODB; private ObjectDatabase mailODB; private ObjectDatabase guildODB; + private ObjectDatabase objectIdODB; + private ObjectDatabase duplicateIdODB; + private ObjectDatabase chatRoomODB; private BusConfiguration eventBusConfig = BusConfiguration.Default(1, new ThreadPoolExecutor(1, 4, 1, TimeUnit.MINUTES, new LinkedBlockingQueue())); private ObjectDatabase buildingODB; + private ObjectDatabase auctionODB; + private ObjectDatabase resourcesODB; + private ObjectDatabase resourceRootsODB; + private ObjectDatabase resourceHistoryODB; + + public static boolean PACKET_DEBUG = false; + + + public NGECore() { @@ -185,7 +225,6 @@ public class NGECore { public void start() { instance = this; - final ThreadMonitor deadlockDetector = new ThreadMonitor(); Thread deadlockMonitor = new Thread(new Runnable() { @Override @@ -204,6 +243,11 @@ public class NGECore { if (!(config.loadConfigFile())) { config = DefaultConfig.getConfig(); } + + Config options = new Config(); + options.setFilePath("options.cfg"); + boolean optionsConfigLoaded = options.loadConfigFile(); + // Database databaseConnection = new DatabaseConnection(); databaseConnection.connect(config.getString("DB.URL"), config.getString("DB.NAME"), config.getString("DB.USER"), config.getString("DB.PASS"), "postgresql"); @@ -221,6 +265,14 @@ public class NGECore { buildingODB = new ObjectDatabase("building", true, false, true); mailODB = new ObjectDatabase("mails", true, false, true); guildODB = new ObjectDatabase("guild", true, false, true); + objectIdODB = new ObjectDatabase("oids", true, false, false); + duplicateIdODB = new ObjectDatabase("doids", true, false, true); + chatRoomODB = new ObjectDatabase("chatRooms", true, false, true); + resourcesODB = new ObjectDatabase("resources", true, false, true); + resourceRootsODB = new ObjectDatabase("resourceroots", true, false, true); + resourceHistoryODB = new ObjectDatabase("resourcehistory", true, false, true); + auctionODB = new ObjectDatabase("auction", true, false, true); + // Services loginService = new LoginService(this); retroService = new RetroService(this); @@ -246,6 +298,13 @@ public class NGECore { skillModService = new SkillModService(this); equipmentService = new EquipmentService(this); entertainmentService = new EntertainmentService(this); + devService = new DevService(this); + conversationService = new ConversationService(this); + bazaarService = new BazaarService(this); + housingService = new HousingService(this); + lootService = new LootService(this); + harvesterService = new HarvesterService(this); + mountService = new MountService(this); if (config.keyExists("JYTHONCONSOLE.PORT")) { int jythonPort = config.getInt("JYTHONCONSOLE.PORT"); @@ -262,6 +321,11 @@ public class NGECore { aiService = new AIService(this); missionService = new MissionService(this); + if (optionsConfigLoaded && options.getInt("LOAD.RESOURCE.SYSTEM") == 1) { + surveyService = new SurveyService(this); + resourceService = new ResourceService(this); + } + // Ping Server try { PingServer pingServer = new PingServer(config.getInt("PING.PORT")); @@ -293,12 +357,20 @@ public class NGECore { zoneDispatch.addService(buffService); zoneDispatch.addService(entertainmentService); zoneDispatch.addService(missionService); - + zoneDispatch.addService(bazaarService); + zoneDispatch.addService(lootService); + zoneDispatch.addService(mountService); + + if (optionsConfigLoaded && options.getInt("LOAD.RESOURCE.SYSTEM") == 1) { + zoneDispatch.addService(surveyService); + zoneDispatch.addService(resourceService); + } + zoneServer = new MINAServer(zoneDispatch, config.getInt("ZONE.PORT")); zoneServer.start(); staticService = new StaticService(this); - - // Planets + //Start terrainList + // Original Planets terrainService.addPlanet(1, "tatooine", "terrain/tatooine.trn", true); terrainService.addPlanet(2, "naboo", "terrain/naboo.trn", true); terrainService.addPlanet(3, "corellia", "terrain/corellia.trn", true); @@ -311,6 +383,51 @@ public class NGECore { terrainService.addPlanet(10, "dathomir", "terrain/dathomir.trn", true); terrainService.addPlanet(11, "mustafar", "terrain/mustafar.trn", true); terrainService.addPlanet(12, "kashyyyk_main", "terrain/kashyyyk_main.trn", true); + //Dungeon Terrains + // TODO: Fix BufferUnderFlow Errors on loaded of dungeon instances. + terrainService.addPlanet(13, "kashyyyk_dead_forest", "terrain/kashyyyk_dead_forest.trn", true); + terrainService.addPlanet(14, "kashyyyk_hunting", "terrain/kashyyyk_hunting.trn", true); + terrainService.addPlanet(15, "kashyyyk_north_dungeons", "terrain/kashyyyk_north_dungeons.trn", true); + terrainService.addPlanet(16, "kashyyyk_rryatt_trail", "terrain/kashyyyk_rryatt_trail.trn", true); + terrainService.addPlanet(17, "kashyyyk_south_dungeons", "terrain/kashyyyk_south_dungeons.trn", true); + terrainService.addPlanet(18, "adventure1", "terrain/adventure1.trn", true); + terrainService.addPlanet(19, "adventure2", "terrain/adventure2.trn", true); + terrainService.addPlanet(20, "dungeon1", "terrain/dungeon1.trn", true); + //Space Zones + // NOTE: Commented out for now until space is implemented. No need to be loaded into memory when space is not implemented. + /*terrainService.addPlanet(21, "space_corellia", "terrain/space_corellia.trn", true); + terrainService.addPlanet(22, "space_corellia_2", "terrain/space_corellia_2.trn", true); + terrainService.addPlanet(23, "space_dantooine", "terrain/space_dantooine.trn", true); + terrainService.addPlanet(24, "space_dathomir", "terrain/space_dathomir.trn", true); + terrainService.addPlanet(25, "space_endor", "terrain/space_endor.trn", true); + terrainService.addPlanet(26, "space_env", "terrain/space_env.trn", true); + terrainService.addPlanet(27, "space_halos", "terrain/space_halos.trn", true); + terrainService.addPlanet(28, "space_heavy1", "terrain/space_heavy1.trn", true); + terrainService.addPlanet(29, "space_kashyyyk", "terrain/space_kashyyyk.trn", true); + terrainService.addPlanet(30, "space_light1", "terrain/space_light1.trn", true); + terrainService.addPlanet(31, "space_lok", "terrain/space_lok.trn", true); + terrainService.addPlanet(32, "space_naboo", "terrain/space_naboo.trn", true); + terrainService.addPlanet(33, "space_naboo_2", "terrain/space_naboo_2.trn", true); + terrainService.addPlanet(34, "space_nova_orion", "terrain/space_nova_orion.trn", true); + terrainService.addPlanet(35, "space_npe_falcon", "terrain/space_npe_falcon.trn", true); // TODO: New Player Tutorial + terrainService.addPlanet(36, "space_npe_falcon_2", "terrain/space_npe_falcon_2.trn", true); // TODO: New Player Tutorial + terrainService.addPlanet(37, "space_ord_mantell", "terrain/space_ord_mantell.trn", true); + terrainService.addPlanet(38, "space_ord_mantell_2", "terrain/space_ord_mantell_2.trn", true); + terrainService.addPlanet(39, "space_ord_mantell_3", "terrain/space_ord_mantell_3.trn", true); + terrainService.addPlanet(40, "space_ord_mantell_4", "terrain/space_ord_mantell_4.trn", true); + terrainService.addPlanet(41, "space_ord_mantell_5", "terrain/space_ord_mantell_5.trn", true); + terrainService.addPlanet(42, "space_ord_mantell_6", "terrain/space_ord_mantell_6.trn", true); + terrainService.addPlanet(43, "space_tatooine", "terrain/space_tatooine.trn", true); + terrainService.addPlanet(44, "space_tatooine_2", "terrain/space_tatooine_2.trn", true); + terrainService.addPlanet(45, "space_yavin4", "terrain/space_yavin4.trn", true);*/ + //PSWG New Content Terrains (WARNING Keep commented out unless you have the current build of kaas!) + + //terrainService.addPlanet(46, "kaas", "terrain/kaas.trn", true); + + //end terrainList + + chatService.loadChatRooms(); + spawnService = new SpawnService(this); terrainService.loadClientPois(); // Travel Points @@ -318,9 +435,16 @@ public class NGECore { simulationService = new SimulationService(this); objectService.loadBuildings(); - terrainService.loadSnapShotObjects(); - simulationService.insertSnapShotObjects(); + if (optionsConfigLoaded && options.getInt("LOAD.RESOURCE.SYSTEM") > 0) { + objectService.loadResourceRoots(); + objectService.loadResources(); + } + + terrainService.loadSnapShotObjects(); + objectService.loadServerTemplates(); + simulationService.insertSnapShotObjects(); + simulationService.insertPersistentBuildings(); // Zone services that need to be loaded after the above zoneDispatch.addService(simulationService); @@ -342,23 +466,52 @@ public class NGECore { zoneDispatch.addService(skillService); - //travelService.startShuttleSchedule(); + instanceService = new InstanceService(this); + zoneDispatch.addService(instanceService); + weatherService = new WeatherService(this); weatherService.loadPlanetSettings(); - // spawnService.loadLairTemplates(); - // spawnService.loadLairGroups(); - // spawnService.loadSpawnAreas(); + spawnService.loadMobileTemplates(); + spawnService.loadLairTemplates(); + spawnService.loadLairGroups(); + spawnService.loadSpawnAreas(); + + housingService.loadHousingTemplates(); + equipmentService.loadBonusSets(); retroService.run(); didServerCrash = false; System.out.println("Started Server."); + cleanupCreatureODB(); setGalaxyStatus(2); } + private void cleanupCreatureODB() { + EntityCursor cursor = creatureODB.getCursor(Long.class, CreatureObject.class); + + Iterator it = cursor.iterator(); + List deletedObjects = new ArrayList(); + + while(it.hasNext()) { + CreatureObject creature = it.next(); + if(!characterService.playerExists(creature.getObjectID())) + deletedObjects.add(creature); + } + + cursor.close(); + + Transaction txn = creatureODB.getEnvironment().beginTransaction(null, null); + for(CreatureObject creature : deletedObjects) { + creatureODB.delete(creature.getObjectID(), Long.class, CreatureObject.class, txn); + } + txn.commitSync(); + System.out.println("Deleted " + deletedObjects.size() + " creatures."); + } + public void stop() { System.out.println("Stopping Servers and Connections."); databaseConnection.close(); @@ -457,6 +610,34 @@ public class NGECore { return buildingODB; } + public ObjectDatabase getObjectIdODB() { + return objectIdODB; + } + + public ObjectDatabase getDuplicateIdODB() { + return duplicateIdODB; + } + + public ObjectDatabase getChatRoomODB() { + return chatRoomODB; + } + + public ObjectDatabase getResourcesODB() { + return resourcesODB; + } + + public ObjectDatabase getResourceRootsODB() { + return resourceRootsODB; + } + + public ObjectDatabase getResourceHistoryODB() { + return resourceHistoryODB; + } + + public ObjectDatabase getAuctionODB() { + return auctionODB; + } + public int getActiveClients() { int connections = 0; for (Map.Entry c : clients.entrySet()) { @@ -520,22 +701,22 @@ public class NGECore { try { for(int minutes = 15; minutes > 1; minutes--) { - simulationService.notifyAllClients(new ChatSystemMessage("The server will be shutting down soon. Please find a safe place to logout. (" + minutes + " minutes left)", (byte) 0 ).serialize()); + chatService.broadcastGalaxy("The server will be shutting down soon. Please find a safe place to logout. (" + minutes + " minutes left)"); Thread.sleep(60000); } setGalaxyStatus(3); - simulationService.notifyAllClients(new ChatSystemMessage("The server will be shutting down soon. Please find a safe place to logout. (" + 1 + " minutes left)", (byte) 0 ).serialize()); + chatService.broadcastGalaxy("The server will be shutting down soon. Please find a safe place to logout. (" + 1 + " minutes left)"); Thread.sleep(30000); - simulationService.notifyAllClients(new ChatSystemMessage("You will be disconnected in 30 seconds so the server can perform a final save before shutting down. Please find a safe place to logout now.", (byte) 0 ).serialize()); + chatService.broadcastGalaxy("You will be disconnected in 30 seconds so the server can perform a final save before shutting down. Please find a safe place to logout now."); Thread.sleep(20000); - simulationService.notifyAllClients(new ChatSystemMessage("You will be disconnected in 10 seconds so the server can perform a final save before shutting down. Please find a safe place to logout now.", (byte) 0 ).serialize()); + chatService.broadcastGalaxy("You will be disconnected in 10 seconds so the server can perform a final save before shutting down. Please find a safe place to logout now."); Thread.sleep(10000); - simulationService.notifyAllClients(new ChatSystemMessage("You will now be disconnected so the server can perform a final save before shutting down.", (byte) 0 ).serialize()); + chatService.broadcastGalaxy("You will now be disconnected so the server can perform a final save before shutting down."); synchronized(getActiveConnectionsMap()) { for(Client client : getActiveConnectionsMap().values()) { client.getSession().close(true); - connectionService.disconnect(client.getSession()); + connectionService.disconnect(client); } } diff --git a/src/protocol/swg/AttributeListMessage.java b/src/protocol/swg/AttributeListMessage.java index da681a16..55721a52 100644 --- a/src/protocol/swg/AttributeListMessage.java +++ b/src/protocol/swg/AttributeListMessage.java @@ -22,7 +22,6 @@ package protocol.swg; import java.nio.ByteOrder; -import java.util.Map.Entry; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.buffer.SimpleBufferAllocator; @@ -47,7 +46,7 @@ public class AttributeListMessage extends SWGMessage { @Override public IoBuffer serialize() { - IoBuffer result = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); + final IoBuffer result = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); result.setAutoExpand(true); result.putShort((short) 5); @@ -58,17 +57,16 @@ public class AttributeListMessage extends SWGMessage { synchronized(target.getMutex()) { result.putInt(target.getAttributes().size()); - - for(Entry e : target.getAttributes().entrySet()) { - result.put(getAsciiString(e.getKey())); - result.put(getUnicodeString(e.getValue())); - } + target.getAttributes().forEach((key, value) -> { + result.put(getAsciiString(key)); + result.put(getUnicodeString(value)); + }); } result.putInt(0); int size = result.position(); - result = bufferPool.allocate(size, false).put(result.array(), 0, size); + IoBuffer result2 = bufferPool.allocate(size, false).put(result.array(), 0, size); - return result.flip(); + return result2.flip(); } diff --git a/src/protocol/swg/CharacterSheetResponseMessage.java b/src/protocol/swg/CharacterSheetResponseMessage.java new file mode 100644 index 00000000..70e14124 --- /dev/null +++ b/src/protocol/swg/CharacterSheetResponseMessage.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.nio.ByteOrder; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import resources.objects.creature.CreatureObject; +import resources.objects.player.PlayerObject; +import engine.resources.common.CRC; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Point3D; + +public class CharacterSheetResponseMessage extends SWGMessage { + + private PlayerObject player; + public CharacterSheetResponseMessage(PlayerObject player) { + this.player = player; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + CreatureObject creature = (CreatureObject) player.getContainer(); + + if (creature != null) { + + SWGObject desCloner = null; + if (creature.getAttachment("preDesignatedCloner") != null) + desCloner = NGECore.getInstance().objectService.getObject((long) creature.getAttachment("preDesignatedCloner")); + + String clonerPlanet = ""; + String spouse = ""; + + if (desCloner != null) + clonerPlanet = desCloner.getPlanet().getName(); + + if (player.getSpouseName() != null) + spouse = player.getSpouseName(); + + IoBuffer buffer = IoBuffer.allocate(82 + clonerPlanet.length() + (spouse.length() * 2)).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putShort((short) 12); + buffer.putInt(CRC.StringtoCRC("CharacterSheetResponseMessage")); + + buffer.putInt(0); + buffer.putInt(0); + + if (desCloner != null) { + Point3D loc = desCloner.getPosition(); + buffer.putFloat(loc.x); // bind x + buffer.putFloat(loc.y); // bind z + buffer.putFloat(loc.z); // bind y + buffer.put(getAsciiString(clonerPlanet)); // bind planet + } else { + buffer.putFloat(0); // bind x + buffer.putFloat(0); // bind z + buffer.putFloat(0); // bind y + buffer.put(getAsciiString("")); // bind planet + } + + buffer.putFloat(0); // bank x + buffer.putFloat(0); // bank z + buffer.putFloat(0); // bank y + buffer.put(getAsciiString("tatooine")); + + buffer.putFloat(0); // home x + buffer.putFloat(0); // home z + buffer.putFloat(0); // home y + buffer.put(getAsciiString("")); // home planet + + buffer.put(getAsciiString("")); // Name of city player resides in + + buffer.put(getUnicodeString(spouse)); + + buffer.putInt(creature.getPlayerObject().getLotsRemaining()); // lots remaining + + return buffer.flip(); + } + return null; + } + +} diff --git a/src/protocol/swg/ChatSystemMessage.java b/src/protocol/swg/ChatSystemMessage.java deleted file mode 100644 index e12aa1f4..00000000 --- a/src/protocol/swg/ChatSystemMessage.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package protocol.swg; - -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.common.Opcodes; - -public class ChatSystemMessage extends SWGMessage{ - - private String stfFilename; - private String stfName; - private int stat; - private String message; - private byte displayType; - - public ChatSystemMessage(String message, byte displayType) { - this.message = message; - this.displayType = displayType; - } - - public ChatSystemMessage(String stfFilename, String stfName, int stat, byte displayType) { - this.stfFilename = stfFilename; - this.stfName = stfName; - this.stat = stat; - this.displayType = displayType; - } - - public void deserialize(IoBuffer data) { - - } - - public IoBuffer serialize() { - if (message != null) { - IoBuffer result = IoBuffer.allocate(15 + message.length() * 2).order(ByteOrder.LITTLE_ENDIAN); - result.putShort((short) 2); - result.putInt(Opcodes.ChatSystemMessage); - result.put(displayType); // 0x00 = Chat and Screen // 0x02 = Chat only - result.put(getUnicodeString(message)); - result.putInt(0); - return result.flip(); - } else { - IoBuffer result = IoBuffer.allocate(99 + stfFilename.length() + stfName.length()).order(ByteOrder.LITTLE_ENDIAN); - result.putShort((short) 4); - result.putInt(Opcodes.ChatSystemMessage); - result.put((byte) 0); //result.put((byte) displayType); // 0x00 = Chat and Screen // 0x02 = Chat only - result.putInt(0); - result.putInt(54); - result.putShort((short) 0); - result.put((byte) 1); - result.putInt(-1); - result.put(getAsciiString(stfFilename)); - result.putInt(0); - result.put(getAsciiString(stfName)); - result.putInt(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putInt(stat); - result.putInt(0); - result.put((byte) 0); - return result.flip(); - } - } - -} diff --git a/src/protocol/swg/CollectionServerFirstListRequest.java b/src/protocol/swg/CollectionServerFirstListRequest.java new file mode 100644 index 00000000..cc053664 --- /dev/null +++ b/src/protocol/swg/CollectionServerFirstListRequest.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import org.apache.mina.core.buffer.IoBuffer; + +public class CollectionServerFirstListRequest extends SWGMessage { + + private String server; + + public CollectionServerFirstListRequest() { + } + + @Override + public void deserialize(IoBuffer data) { + data.getShort(); + data.getInt(); + setServer(getAsciiString(data)); + } + + public String getServer() { + return server; + } + + @Override + public IoBuffer serialize() { + return null; + } + + public void setServer(String server) { + this.server = server; + } + +} diff --git a/src/protocol/swg/CollectionServerFirstListResponse.java b/src/protocol/swg/CollectionServerFirstListResponse.java new file mode 100644 index 00000000..0373dc5a --- /dev/null +++ b/src/protocol/swg/CollectionServerFirstListResponse.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.nio.ByteOrder; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.mina.core.buffer.IoBuffer; + +import services.collections.ServerFirst; +import engine.resources.common.CRC; + +public class CollectionServerFirstListResponse extends SWGMessage { + + private Map sfList; + private String server; + + public CollectionServerFirstListResponse(String server, Map serverFirstList){ + this.sfList = serverFirstList; + this.server = server; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer; + + int size = 0; + + synchronized (sfList) { + for (Entry entry : sfList.entrySet()) { + size += entry.getValue().getBytes().length; + } + + buffer = IoBuffer.allocate(12 + server.length() + size).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 2); + buffer.putInt(CRC.StringtoCRC("CollectionServerFirstListResponse")); + + buffer.put(getAsciiString(server)); + buffer.putInt(sfList.size()); + + for (Entry entry : sfList.entrySet()) { + buffer.put(entry.getValue().getBytes()); + + } + return buffer.flip(); + } + } +} diff --git a/src/protocol/swg/CommPlayerMessage.java b/src/protocol/swg/CommPlayerMessage.java new file mode 100644 index 00000000..5d1274c8 --- /dev/null +++ b/src/protocol/swg/CommPlayerMessage.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import resources.common.Console; +import resources.common.OutOfBand; +import resources.common.StringUtilities; + +public class CommPlayerMessage extends SWGMessage { + + private long objectId; + private OutOfBand outOfBand; + + public CommPlayerMessage(long objectId, OutOfBand outOfBand) { + this.objectId = objectId; + this.outOfBand = outOfBand; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(200).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 2); + buffer.putInt(0x594AD258); + buffer.put((byte) 0); // aurebesh borders on comm, space version? Can cause crashes + buffer.putLong(objectId); + /* Seen numbers: + * 52 (Starting Station Comms) + * 54 (Tansarii Comms) + * 57 (Supply Drops) + * 58 (Faction Covert->Overt) + * 68 (Imperial stop) + */ + buffer.put(outOfBand.serialize().array()); + // Officer Supply Drop: 0x3E894347 + // Rebel Faction Dude: 0x528CB3D7 + buffer.putInt(0x528CB3D7); // model crc, can be anything w/o crashing + buffer.putInt(0); // sound + buffer.putShort((short) 0); // unk + buffer.putShort((short) 16576); // comm display time, unsure on how it's calculated (probably milliseconds) + buffer.flip(); + Console.println("CPM: " + StringUtilities.bytesToHex(buffer.array())); + return buffer; + } + +} diff --git a/src/protocol/swg/CreateClientPathMessage.java b/src/protocol/swg/CreateClientPathMessage.java new file mode 100644 index 00000000..37a6d571 --- /dev/null +++ b/src/protocol/swg/CreateClientPathMessage.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.nio.ByteOrder; +import java.util.List; + +import org.apache.mina.core.buffer.IoBuffer; + +import resources.common.StringUtilities; +import engine.resources.common.CRC; +import engine.resources.scene.Point3D; + +public class CreateClientPathMessage extends SWGMessage { + + private List coordinates; + + public CreateClientPathMessage(List coordinates) { + this.coordinates = coordinates; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate((coordinates.size() * 12) + 10).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putShort((short) 2); + buffer.putInt(CRC.StringtoCRC("CreateClientPathMessage")); + + buffer.putInt(coordinates.size()); + for(Point3D point : coordinates) { + buffer.putFloat(point.x); + buffer.putFloat(point.z); + buffer.putFloat(point.y); + } + + buffer.flip(); + StringUtilities.printBytes(buffer.array()); + return buffer; + } + +} diff --git a/src/resources/z/exp/group/Member.java b/src/protocol/swg/EnterStructurePlacementModeMessage.java similarity index 59% rename from src/resources/z/exp/group/Member.java rename to src/protocol/swg/EnterStructurePlacementModeMessage.java index 93c5b64b..3f12cf0a 100644 --- a/src/resources/z/exp/group/Member.java +++ b/src/protocol/swg/EnterStructurePlacementModeMessage.java @@ -19,52 +19,46 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.group; +package protocol.swg; import java.nio.ByteOrder; +import main.NGECore; + import org.apache.mina.core.buffer.IoBuffer; -import com.sleepycat.persist.model.Persistent; - +import services.travel.TravelPoint; import engine.resources.objects.SWGObject; -import resources.objects.Delta; +@SuppressWarnings("unused") +public class EnterStructurePlacementModeMessage extends SWGMessage { -@Persistent -public class Member extends Delta { + private SWGObject deed; + private String structureTemplate; - private SWGObject member; - - public Member(SWGObject member) { - this.member = member; + public EnterStructurePlacementModeMessage(SWGObject deed, String structureTemplate) { + this.deed = deed; + this.structureTemplate = structureTemplate; } - public Member() { + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(16 + structureTemplate.length()).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 3); + result.putInt(0xE8A54DC1); + + result.putLong(deed.getObjectID()); + + deed.setAttachment("structureTemplate", structureTemplate); + result.put(getAsciiString(structureTemplate)); + + return result.flip(); } - - public SWGObject getMember() { - synchronized(objectMutex) { - return member; - } - } - - public long getObjectId() { - return member.getObjectID(); - } - - public String getCustomName() { - return member.getCustomName(); - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(8 + getAsciiString(getCustomName()).length, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putLong(getObjectId()); - buffer.put(getAsciiString(getCustomName())); - return buffer.array(); - } - } - -} + +} \ No newline at end of file diff --git a/src/protocol/swg/GuildRequestMessage.java b/src/protocol/swg/GuildRequestMessage.java new file mode 100644 index 00000000..d9f1f368 --- /dev/null +++ b/src/protocol/swg/GuildRequestMessage.java @@ -0,0 +1,31 @@ +package protocol.swg; + +import org.apache.mina.core.buffer.IoBuffer; + +public class GuildRequestMessage extends SWGMessage { + + private long characterId; + + public GuildRequestMessage() { + } + + @Override + public void deserialize(IoBuffer data) { + //data.getShort(); + setCharacterId(data.getLong()); + } + + @Override + public IoBuffer serialize() { + return null; + } + + public long getCharacterId() { + return characterId; + } + + public void setCharacterId(long characterId) { + this.characterId = characterId; + } + +} diff --git a/src/resources/z/exp/objects/building/BuildingMessageBuilder.java b/src/protocol/swg/GuildResponseMessage.java similarity index 62% rename from src/resources/z/exp/objects/building/BuildingMessageBuilder.java rename to src/protocol/swg/GuildResponseMessage.java index b6905d33..f98e6713 100644 --- a/src/resources/z/exp/objects/building/BuildingMessageBuilder.java +++ b/src/protocol/swg/GuildResponseMessage.java @@ -19,31 +19,38 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.building; +package protocol.swg; -import java.util.Map; +import java.nio.ByteOrder; -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.tangible.TangibleMessageBuilder; +import org.apache.mina.core.buffer.IoBuffer; -public class BuildingMessageBuilder extends TangibleMessageBuilder { +public class GuildResponseMessage extends SWGMessage { + + private long player; + private String guildName; - public BuildingMessageBuilder(BuildingObject object) { - super(object); - } - - public BuildingMessageBuilder() { - super(); + public GuildResponseMessage(long player, String guild) { + this.player = player; + this.guildName = guild; } @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(deltaBuilders, deltaBuilders); + public void deserialize(IoBuffer data) { + + } - + @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(deltaBuilders, deltaBuilders); + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(18 + guildName.length()).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putShort((short) 4); + buffer.putInt(0x32263F20); + + buffer.putLong(player); + buffer.put(getAsciiString(guildName)); + + return buffer.flip(); } - } diff --git a/src/protocol/swg/ObjControllerMessage.java b/src/protocol/swg/ObjControllerMessage.java index 2aa76b4e..a9f541b8 100644 --- a/src/protocol/swg/ObjControllerMessage.java +++ b/src/protocol/swg/ObjControllerMessage.java @@ -26,6 +26,7 @@ import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; + import protocol.swg.objectControllerObjects.CommandEnqueue; import protocol.swg.objectControllerObjects.DataTransform; import protocol.swg.objectControllerObjects.DataTransformWithParent; @@ -53,8 +54,26 @@ public class ObjControllerMessage extends SWGMessage { public static final int SHOW_FLY_TEXT = 0x01BD; public static final int START_TASK = 0x448; public static final int ANIMATION = 0x00F2; - public static final int BUFF_BUILDER_START = 0x025C; public static final int BUFF_BUILDER_CHANGE = 0x025A; + public static final int BUFF_BUILDER_END = 0x025B; + public static final int BUFF_BUILDER_START = 0x025C; + public static final int UI_PLAY_EFFECT = 0x0401; + public static final int SHOW_LOOT_BOX = 0x04BC; + public static final int IMAGE_DESIGN_START = 0x023A; + public static final int IMAGE_DESIGN_CHANGE = 0x0238; + public static final int IMAGE_DESIGN_END = 0x0239; + public static final int START_CONVERSATION = 0x00DD; + public static final int STOP_CONVERSATION = 0x00DE; + public static final int CONVERSATION_MESSAGE = 0x00DF; + public static final int CONVERSATION_OPTIONS = 0x00E0; + public static final int DRAFT_SCHEMATICS = 0x0102; + public static final int DRAFT_SLOTS = 0x0103; + public static final int CRAFT_EXPERIMENT = 0x0106; + public static final int CRAFT_ACKNOWLEDGE = 0x010C; + public static final int CRAFT_CUSTOMIZATION = 0x015A; + public static final int NEXT_CRAFTING_STAGE_RESULT = 0x01BE; + public static final int DRAFT_SLOTS_QUERY_RESPONSE = 0x01BF; + public static final int RESOURCE_WEIGHTS = 0x0207; public ObjControllerMessage() { @@ -72,13 +91,14 @@ public class ObjControllerMessage extends SWGMessage { } public IoBuffer serialize() { - IoBuffer buffer = IoBuffer.allocate(1024).order(ByteOrder.LITTLE_ENDIAN); - + //IoBuffer buffer = IoBuffer.allocate(1024).order(ByteOrder.LITTLE_ENDIAN); -> java.nio.BufferOverflowException + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); buffer.putShort((short)5); buffer.putInt(0x80CE5E46); buffer.putInt(update); buffer.put(objControllerObject.serialize()); - //System.out.println("OBJMSG: " + buffer.flip().getHexDump()); + //System.out.println("OBJMSG: " + StringUtilities.bytesToHex(buffer.flip().array())); int size = buffer.position(); return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); } diff --git a/src/protocol/swg/ParametersMessage.java b/src/protocol/swg/ParametersMessage.java index fbc87a36..0d4abb53 100644 --- a/src/protocol/swg/ParametersMessage.java +++ b/src/protocol/swg/ParametersMessage.java @@ -40,7 +40,7 @@ public class ParametersMessage extends SWGMessage { IoBuffer packet = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); packet.putShort((short) 2); - packet.putInt(0x7102B15F); + packet.putInt(0x487652DA); packet.putInt(0x00000384); return packet.flip(); diff --git a/src/protocol/swg/PlayClientEffectObjectMessage.java b/src/protocol/swg/PlayClientEffectObjectMessage.java index 5e9dead4..ad94129f 100644 --- a/src/protocol/swg/PlayClientEffectObjectMessage.java +++ b/src/protocol/swg/PlayClientEffectObjectMessage.java @@ -36,7 +36,6 @@ public class PlayClientEffectObjectMessage extends SWGMessage { this.effectFile = effectFile; this.objectId = objectId; this.commandString = commandString; - } @Override @@ -47,9 +46,18 @@ public class PlayClientEffectObjectMessage extends SWGMessage { result.putShort((short) 5); result.putInt(0x8855434A); result.put(getAsciiString(effectFile)); - result.putShort((short) 0); - result.putLong(objectId); - result.put(getAsciiString(commandString)); + + if(!effectFile.startsWith("clienteffect/holoemote_")) + { + result.putShort((short) 0); // Because waverunner is a dweeb + result.putLong(objectId); + result.put(getAsciiString(commandString)); + } + else + { + result.put(getAsciiString(commandString)); + result.putLong(objectId); + } return result.flip(); diff --git a/src/protocol/swg/PlayClientEffectObjectTransformMessage.java b/src/protocol/swg/PlayClientEffectObjectTransformMessage.java new file mode 100644 index 00000000..e5a0e7d4 --- /dev/null +++ b/src/protocol/swg/PlayClientEffectObjectTransformMessage.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; +import org.apache.mina.core.buffer.SimpleBufferAllocator; + +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; + +public class PlayClientEffectObjectTransformMessage extends SWGMessage { + + private long objectId; + private String effectFile; + private String commandString; + private Point3D effectorPosition; + private Quaternion effectorOrientation; + public SimpleBufferAllocator bufferPool = new SimpleBufferAllocator(); + + public PlayClientEffectObjectTransformMessage(String effectFile, long objectId, String commandString, Point3D effectorPosition, Quaternion effectorOrientation) { + + this.effectFile = effectFile; + this.objectId = objectId; + this.commandString = commandString; + this.effectorPosition = effectorPosition; + this.effectorOrientation = effectorOrientation; + } + + @Override + public IoBuffer serialize() { + + IoBuffer result = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + result.putShort((short) 5); + result.putInt(0x4F5E09B6); + result.put(getAsciiString(effectFile)); + result.putFloat(effectorOrientation.w); // qw + result.putFloat(effectorOrientation.x); // qx + result.putFloat(effectorOrientation.y); // qy + result.putFloat(effectorOrientation.z); // qz + result.putFloat(effectorPosition.x); // pos.x + result.putFloat(effectorPosition.y); // pos.y + result.putFloat(effectorPosition.z); // pos.z + result.putLong(objectId); + result.put(getAsciiString(commandString)); + + int size = result.position(); + result.flip(); + result = bufferPool.allocate(size, false).put(result.array(), 0, size); + + return IoBuffer.allocate(size).put(result.array(), 0, size).flip(); + } + + /* + 00 09 54 6C 05 00 B6 09-5E 4F 1B 00 61 70 70 65 + 61 72 61 6E 63 65 2F 70-74 5F 6C 6F 6F 74 5F 64 + 69 73 63 2E 70 72 74 00-00 00 00 00 00 00 00 00 + 00 00 00 00 00 80 3F 00-00 00 00 24 F8 AA 3F 00 + 00 00 00 3B 54 E1 3E 33-00 00 00 06 00 6C 6F 6F + 74 4D 65 01 EB 3C + */ + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/protocol/swg/PlayerMoneyResponse.java b/src/protocol/swg/PlayerMoneyResponse.java new file mode 100644 index 00000000..0438dd02 --- /dev/null +++ b/src/protocol/swg/PlayerMoneyResponse.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +public class PlayerMoneyResponse extends SWGMessage { + + int cash; + int bank; + + public PlayerMoneyResponse(int cash, int bank) { + this.cash = cash; + this.bank = bank; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(14).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putShort((short) 3); + buffer.putInt(0x367E737E); + + buffer.putInt(bank); + buffer.putInt(cash); + + buffer.flip(); + return buffer; + } + +} diff --git a/src/protocol/swg/ResourceListForSurveyMessage.java b/src/protocol/swg/ResourceListForSurveyMessage.java new file mode 100644 index 00000000..e1c9c886 --- /dev/null +++ b/src/protocol/swg/ResourceListForSurveyMessage.java @@ -0,0 +1,119 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Vector; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; +import resources.objects.creature.CreatureObject; +import resources.objects.resource.GalacticResource; +import resources.objects.tangible.TangibleObject; + +public class ResourceListForSurveyMessage extends SWGMessage { + + private TangibleObject tool; + private List resourceList; + + public ResourceListForSurveyMessage(TangibleObject tool, List resourceList) { + this.tool = tool; + this.resourceList = resourceList; + } + + public ResourceListForSurveyMessage(NGECore core, TangibleObject tool, CreatureObject surveyor) { + this.tool = tool; + this.resourceList = new ArrayList(); + byte generalType = 0; + String toolName = tool.getDetailName(); + if (toolName.equals("survey_tool_mineral")) + generalType = (byte) 0; + if (toolName.equals("survey_tool_inorganic")) + generalType = (byte) 1; + if (toolName.equals("survey_tool_organic") || toolName.equals("survey_tool_lumber")) + generalType = (byte) 2; + if (toolName.equals("survey_tool_gas")) + generalType = (byte) 3; + if (toolName.equals("survey_tool_moisture")) + generalType = (byte) 4; + if (toolName.equals("survey_tool_solar")) + generalType = (byte) 5; + if (toolName.equals("survey_tool_wind")) + generalType = (byte) 6; + if (toolName.equals("survey_tool_liquid")) + generalType = (byte) 7; + + Vector planetVector = core.resourceService.getSpawnedResourcesByPlanetAndType(surveyor.getPlanetId(),generalType); + + resourceList = new ArrayList(planetVector); + + } + + public void deserialize(IoBuffer data) { + + } + + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + result.putShort((short)4); + result.putInt(0x8A64B1D5); + result.putInt(resourceList.size()); + GalacticResource resourceElement = null; + for (int i = 0; i < resourceList.size(); i++) { + resourceElement = resourceList.get(i); + try { + result.putShort((short)resourceElement.getName().length()); // CStringesque length ahead + result.put(resourceElement.getName().getBytes("US-ASCII")); + result.putLong(resourceElement.getId()); + result.putShort((short)resourceElement.getFileName().length()); + result.put(resourceElement.getFileName().getBytes("US-ASCII")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + e.getMessage(); + e.getCause(); + } + } + if (resourceElement != null) { + try { + result.putShort((short)resourceElement.getCategory().length()); + result.put(resourceElement.getCategory().getBytes("US-ASCII")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } else { + result.putShort((short)0); + } + + result.putLong(tool.getObjectID()); + + int size = result.position(); + result.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(result.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(result.array(), 0, size).flip(); + } +} diff --git a/src/protocol/swg/SWGMessageFactory.java b/src/protocol/swg/SWGMessageFactory.java index fc5bd8c3..640b019e 100644 --- a/src/protocol/swg/SWGMessageFactory.java +++ b/src/protocol/swg/SWGMessageFactory.java @@ -24,6 +24,7 @@ package protocol.swg; import java.nio.ByteBuffer; import protocol.Message; +import protocol.swg.chat.ChatInstantMessageToCharacter; public class SWGMessageFactory { diff --git a/src/protocol/swg/SceneDestroyObject.java b/src/protocol/swg/SceneDestroyObject.java index e5fbfd02..2048f614 100644 --- a/src/protocol/swg/SceneDestroyObject.java +++ b/src/protocol/swg/SceneDestroyObject.java @@ -45,6 +45,7 @@ public class SceneDestroyObject extends SWGMessage { result.putInt(0x4D45D504); result.putLong(objectId); + result.put((byte) 0); // unk return result.flip(); } } diff --git a/src/protocol/swg/SetWaypointColor.java b/src/protocol/swg/SetWaypointColor.java index bb53cd75..f7a418d9 100644 --- a/src/protocol/swg/SetWaypointColor.java +++ b/src/protocol/swg/SetWaypointColor.java @@ -26,8 +26,6 @@ import java.nio.ByteBuffer; import org.apache.mina.core.buffer.IoBuffer; -import resources.common.StringUtilities; - public class SetWaypointColor extends SWGMessage { private long objectId; diff --git a/src/protocol/swg/ShowBackpack.java b/src/protocol/swg/ShowBackpack.java new file mode 100644 index 00000000..04ba5b3b --- /dev/null +++ b/src/protocol/swg/ShowBackpack.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import org.apache.mina.core.buffer.IoBuffer; + +public class ShowBackpack extends SWGMessage { + + private long objectId; + private boolean showBackpack; + + public ShowBackpack() { } + + @Override + public void deserialize(IoBuffer data) { + setObjectId(data.getLong()); + setShowBackpack((data.get() == 1) ? true : false); + } + + public long getObjectId() { + return objectId; + } + + public boolean isShowBackpack() { + return showBackpack; + } + + @Override + public IoBuffer serialize() { + return null; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + public void setShowBackpack(boolean showBackpack) { + this.showBackpack = showBackpack; + } + +} diff --git a/src/protocol/swg/ShowHelmet.java b/src/protocol/swg/ShowHelmet.java new file mode 100644 index 00000000..4c5c2ecb --- /dev/null +++ b/src/protocol/swg/ShowHelmet.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import org.apache.mina.core.buffer.IoBuffer; + +public class ShowHelmet extends SWGMessage { + + private long objectId; + private boolean showHelmet; + + public ShowHelmet() { } + + @Override + public void deserialize(IoBuffer data) { + setObjectId(data.getLong()); + setShowHelmet((data.get() == 1) ? true : false); + } + + public long getObjectId() { + return objectId; + } + + public boolean isShowHelmet() { + return showHelmet; + } + + @Override + public IoBuffer serialize() { + return null; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + public void setShowHelmet(boolean showHelmet) { + this.showHelmet = showHelmet; + } + +} diff --git a/src/protocol/swg/SurveyMapUpdateMessage.java b/src/protocol/swg/SurveyMapUpdateMessage.java new file mode 100644 index 00000000..21a2728f --- /dev/null +++ b/src/protocol/swg/SurveyMapUpdateMessage.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg; + +import java.nio.ByteOrder; +import java.util.Vector; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; +import resources.objects.resource.ResourceConcentration; + +public class SurveyMapUpdateMessage extends SWGMessage { + + private IoBuffer buffer; + private float highestConcentration; + float highestX; + float highestZ; + + public SurveyMapUpdateMessage(Vector concentrationMap, int pointsAmount) { + //this.buffer = buffer; + + this.buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putInt(pointsAmount); + highestX = 0; + highestZ = 0; + highestConcentration = 0; + for (int i = 0; i < pointsAmount; i++) { + ResourceConcentration cursorConcentration = concentrationMap.get(i); + float concentration = 0.01f*cursorConcentration.getConcentration(); // percentage + float markerX = cursorConcentration.getCoordsX(); + float markerZ = cursorConcentration.getCoordsZ(); +// System.out.println("markerX " + markerX); +// System.out.println("markerZ " + markerZ); +// System.out.println("concentration " + concentration); + buffer.putFloat(markerX); + buffer.putFloat(0); + buffer.putFloat(markerZ); + buffer.putFloat(concentration); + if (highestConcentration baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); + public void deserialize(IoBuffer data) { + } - + @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(18).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 3); + result.putInt(0xC58A446E); + result.putLong(itemId); + result.putInt(error); + return result.flip(); } - + } diff --git a/src/protocol/swg/auctionManagerClientListener/AuctionItemDescriptionMessage.java b/src/protocol/swg/auctionManagerClientListener/AuctionItemDescriptionMessage.java new file mode 100644 index 00000000..bdb7e95e --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/AuctionItemDescriptionMessage.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class AuctionItemDescriptionMessage extends SWGMessage { + + private long itemId; + private String description; + + public AuctionItemDescriptionMessage(long itemId, String description) { + this.itemId = itemId; + this.description = description; + } + + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(26 + (description.length() * 2)).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 2); + result.putInt(0xFE0E644B); + result.putLong(itemId); + result.put(getUnicodeString(description)); + result.putInt(0); + result.putInt(0); + return result.flip(); + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersMessage.java b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersMessage.java new file mode 100644 index 00000000..e0ce1fd6 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersMessage.java @@ -0,0 +1,183 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class AuctionQueryHeadersMessage extends SWGMessage { + + private int range; + private int counter; + private int screen; + private int category; + private int itemTypeCRC; + private String searchString; + private int unkInt; + private int minPrice; + private int maxPrice; + private byte includeEntranceFee; + private long vendorId; + private byte vendorFlag; + private short offset; + + @Override + public void deserialize(IoBuffer data) { + data.skip(6); + setRange(data.getInt()); + setCounter(data.getInt()); + setScreen(data.getInt()); + setCategory(data.getInt()); + setItemTypeCRC(data.getInt()); + int size = data.getInt(); + try { + setSearchString(new String(ByteBuffer.allocate(size * 2).put(data.array(), data.position(), size * 2).array(), "UTF-16LE")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + data.position(data.position() + size * 2); + setUnkInt(data.getInt()); + setMinPrice(data.getInt()); + setMaxPrice(data.getInt()); + setIncludeEntranceFee(data.get()); + data.skip(6); // unk + setVendorId(data.getLong()); + setVendorFlag(data.get()); + setOffset(data.getShort()); + + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public int getRange() { + return range; + } + + public void setRange(int range) { + this.range = range; + } + + public int getCounter() { + return counter; + } + + public void setCounter(int counter) { + this.counter = counter; + } + + public int getScreen() { + return screen; + } + + public void setScreen(int screen) { + this.screen = screen; + } + + public int getCategory() { + return category; + } + + public void setCategory(int category) { + this.category = category; + } + + public int getItemTypeCRC() { + return itemTypeCRC; + } + + public void setItemTypeCRC(int itemTypeCRC) { + this.itemTypeCRC = itemTypeCRC; + } + + public String getSearchString() { + return searchString; + } + + public void setSearchString(String searchString) { + this.searchString = searchString; + } + + public int getUnkInt() { + return unkInt; + } + + public void setUnkInt(int unkInt) { + this.unkInt = unkInt; + } + + public int getMinPrice() { + return minPrice; + } + + public void setMinPrice(int minPrice) { + this.minPrice = minPrice; + } + + public int getMaxPrice() { + return maxPrice; + } + + public void setMaxPrice(int maxPrice) { + this.maxPrice = maxPrice; + } + + public byte getIncludeEntranceFee() { + return includeEntranceFee; + } + + public void setIncludeEntranceFee(byte includeEntranceFee) { + this.includeEntranceFee = includeEntranceFee; + } + + public long getVendorId() { + return vendorId; + } + + public void setVendorId(long vendorId) { + this.vendorId = vendorId; + } + + public byte getVendorFlag() { + return vendorFlag; + } + + public void setVendorFlag(byte vendorFlag) { + this.vendorFlag = vendorFlag; + } + + public short getOffset() { + return offset; + } + + public void setOffset(short offset) { + this.offset = offset; + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersResponseMessage.java b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersResponseMessage.java new file mode 100644 index 00000000..a36bb523 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersResponseMessage.java @@ -0,0 +1,179 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.TreeSet; +import java.util.Vector; + +import org.apache.mina.core.buffer.IoBuffer; + +import engine.resources.common.CRC; +import protocol.swg.SWGMessage; +import services.bazaar.AuctionItem; + +public class AuctionQueryHeadersResponseMessage extends SWGMessage { + + private int screen; + private int counter; + private LinkedHashSet locationList = new LinkedHashSet(); + private LinkedHashSet itemList = new LinkedHashSet(); + private long playerId; + private short offset; + private boolean continues; + + public AuctionQueryHeadersResponseMessage(long playerId, int screen, int counter, short offset, boolean continues) { + this.playerId = playerId; + this.screen = screen; + this.counter = counter; + this.offset = offset; + this.continues = continues; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + public void addItem(AuctionItem item) { + locationList.add(item.getVuid()); + locationList.add(item.getOwnerName()); + + if(item.isAuction() && item.getStatus() == AuctionItem.FORSALE) + locationList.add(item.getBidderName()); + else + locationList.add(""); + + itemList.add(item); + } + + @Override + public IoBuffer serialize() { + final IoBuffer result = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + + result.putShort((short) 8); + result.putInt(0xFA500E52); + result.putInt(counter); + result.putInt(screen); + + result.putInt(locationList.size()); + + for(String str : locationList) { + result.put(getAsciiString(str)); + } + + result.putInt(itemList.size()); + + for(AuctionItem item : itemList) { + result.put(getUnicodeString(item.getItemName())); + } + + result.putInt(itemList.size()); + + int i = 0; + for(AuctionItem item : itemList) { + + result.putLong(item.getObjectId()); + result.put((byte) i); + result.putInt(item.getPrice()); + result.putInt((int) ((item.getExpireTime() - System.currentTimeMillis()) / 1000)); + result.putInt(item.getPrice()); + result.putShort((short) 0); + result.put((byte) 0); + result.putInt(CRC.StringtoCRC(item.getItem().getTemplate())); + result.putShort((short) 0); + result.put((byte) 0); + result.put((byte) 1); + result.putInt(0); + result.putInt(0); + result.put((byte) 0); + result.putInt(2); + result.putInt(0); + result.putShort((short) 0); + result.putInt(item.getItemType()); + result.putInt(0); + result.putInt(0); + result.putInt(0); + +/* + result.put((byte) (item.isAuction() ? 0 : 1)); + result.putShort((short) getStringIndex(item.getVuid())); + result.putLong(item.getOwnerId()); + result.putShort((short) getStringIndex(item.getOwnerName())); + + if(item.isAuction() && item.getStatus() == AuctionItem.FORSALE) { + result.putLong(item.getBuyerId()); + result.putShort((short) getStringIndex(item.getBidderName())); + } else { + result.putLong(0); + result.putShort((short) getStringIndex("")); + } + + result.putInt(item.getProxyBid()); + result.putInt(item.getPrice()); + result.putInt(item.getItemType()); + + int options = 0; + + if(item.getOwnerId() == playerId && (item.getStatus() == AuctionItem.OFFERED || item.getStatus() == AuctionItem.FORSALE)) + options |= 0x800; + + result.putInt(item.getAuctionOptions() | options); + result.putInt(0); + */ + i++; + + } + + result.putShort(offset); + + if(continues) + result.put((byte) 1); + else + result.put((byte) 0); + + int size = result.position(); + IoBuffer result2 = IoBuffer.allocate(size).put(result.array(), 0, size); + + return result2.flip(); + } + + private int getStringIndex(String str) { + int i = 0; + for(String string : locationList) { + if(str.equals(string)) + return i; + i++; + } + return i; + } + + public void setContinues(boolean continues) { + this.continues = continues; + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/BidAuctionMessage.java b/src/protocol/swg/auctionManagerClientListener/BidAuctionMessage.java new file mode 100644 index 00000000..b065b56e --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/BidAuctionMessage.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class BidAuctionMessage extends SWGMessage { + + private long auctionId; + private long vendorId; + private int myPrice; + private int proxyPrice; + + + @Override + public void deserialize(IoBuffer data) { + data.skip(6); + setAuctionId(data.getLong()); + setVendorId(data.getLong()); + setMyPrice(data.getInt()); + setProxyPrice(data.getInt()); + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public long getAuctionId() { + return auctionId; + } + + public void setAuctionId(long auctionId) { + this.auctionId = auctionId; + } + + public int getMyPrice() { + return myPrice; + } + + public void setMyPrice(int myPrice) { + this.myPrice = myPrice; + } + + public int getProxyPrice() { + return proxyPrice; + } + + public void setProxyPrice(int proxyPrice) { + this.proxyPrice = proxyPrice; + } + + public long getVendorId() { + return vendorId; + } + + public void setVendorId(long vendorId) { + this.vendorId = vendorId; + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/BidAuctionResponseMessage.java b/src/protocol/swg/auctionManagerClientListener/BidAuctionResponseMessage.java new file mode 100644 index 00000000..06eff2f5 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/BidAuctionResponseMessage.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class BidAuctionResponseMessage extends SWGMessage { + + private long objectId; + private int status; + + public static final int SUCCESS = 0; + public static final int INVALIDAUCTIONER = 1; + public static final int INVALIDITEM = 2; + public static final int INVALIDPRICE = 4; + public static final int NOTENOUGHCREDITS = 9; + public static final int PURCHASEFAILED = 10; + public static final int PURCHASEREJECTED = 11; + public static final int PRICETOOHIGH = 13; + public static final int PRICEOVERFLOW = 14; + + public BidAuctionResponseMessage(long objectId, int status) { + this.objectId = objectId; + this.status = status; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(18).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 3); + result.putInt(0x8FCBEF4A); + result.putLong(objectId); + result.putInt(status); + return result.flip(); + } + + public void setStatus(int status) { + this.status = status; + } + + +} diff --git a/src/protocol/swg/auctionManagerClientListener/CancelLiveAuctionMessage.java b/src/protocol/swg/auctionManagerClientListener/CancelLiveAuctionMessage.java new file mode 100644 index 00000000..cc3705a1 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/CancelLiveAuctionMessage.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class CancelLiveAuctionMessage extends SWGMessage { + + private long objectId; + + @Override + public void deserialize(IoBuffer data) { + data.skip(6); + setObjectId(data.getLong()); + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public long getObjectId() { + return objectId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + +} diff --git a/src/resources/z/exp/group/MemberInfo.java b/src/protocol/swg/auctionManagerClientListener/CancelLiveAuctionResponseMessage.java similarity index 55% rename from src/resources/z/exp/group/MemberInfo.java rename to src/protocol/swg/auctionManagerClientListener/CancelLiveAuctionResponseMessage.java index a19fce7c..55e1ce02 100644 --- a/src/resources/z/exp/group/MemberInfo.java +++ b/src/protocol/swg/auctionManagerClientListener/CancelLiveAuctionResponseMessage.java @@ -19,64 +19,50 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.group; +package protocol.swg.auctionManagerClientListener; import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; -import com.sleepycat.persist.model.Persistent; +import protocol.swg.SWGMessage; -import resources.objects.Delta; - -@Persistent -public class MemberInfo extends Delta { +public class CancelLiveAuctionResponseMessage extends SWGMessage { - private long info; - private int memberId; + public static final int SUCCESS = 0; + public static final int NOTALLOWED = 1; + public static final int INVALIDITEM = 2; + public static final int NOTOWNER = 8; + public static final int ALREADYCOMPLETED = 15; + private long itemId; + private int status; - public MemberInfo(long info, int memberId) { - this.info = info; - this.memberId = memberId; + public CancelLiveAuctionResponseMessage(long itemId, int status) { + this.itemId = itemId; + this.status = status; } - - public MemberInfo() { + + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub } - - public long getInfo() { - synchronized(objectMutex) { - return info; - } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(19).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 4); + result.putInt(0x7DA2246C); + result.putLong(itemId); + result.putInt(status); + result.put((byte) 0); // unk + return result.flip(); } - public MemberInfo setInfo(long info) { - synchronized(objectMutex) { - this.info = info; - return this; - } + public void setStatus(int status) { + this.status = status; } - - public int getMemberId() { - synchronized(objectMutex) { - return memberId; - } - } - - public MemberInfo setMemberId(int memberId) { - synchronized(objectMutex) { - this.memberId = memberId; - return this; - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(12, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putLong(info); - buffer.putInt(memberId); - return buffer.array(); - } - } - + + } diff --git a/src/protocol/swg/auctionManagerClientListener/CommoditiesItemTypeListResponse.java b/src/protocol/swg/auctionManagerClientListener/CommoditiesItemTypeListResponse.java new file mode 100644 index 00000000..d299a44e --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/CommoditiesItemTypeListResponse.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class CommoditiesItemTypeListResponse extends SWGMessage { + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + // TODO: research how categories work + String galaxy = NGECore.getInstance().getGalaxyName(); + IoBuffer result = IoBuffer.allocate(14 + galaxy.length()).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 2); + result.putInt(0xD4E937FC); + result.put(getAsciiString(galaxy + ".0")); + result.putInt(0); + return result.flip(); + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/CommoditiesResourceTypeListResponse.java b/src/protocol/swg/auctionManagerClientListener/CommoditiesResourceTypeListResponse.java new file mode 100644 index 00000000..f898ade4 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/CommoditiesResourceTypeListResponse.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; +import java.util.Vector; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class CommoditiesResourceTypeListResponse extends SWGMessage { + + private Vector resNames; + + public CommoditiesResourceTypeListResponse(Vector resNames) { + this.resNames = resNames; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + String galaxyName = NGECore.getInstance().getGalaxyName(); + final IoBuffer result = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + + result.putShort((short) 2); + result.putInt(0x5EDD19CB); + + result.put(getAsciiString(galaxyName + "." + String.valueOf(resNames.size()))); + result.putInt(479); + result.putLong(0); + + // wrong struct, TODO: research + resNames.forEach(s -> result.put(getAsciiString(s))); + + int size = result.position(); + IoBuffer result2 = IoBuffer.allocate(size).put(result.array(), 0, size); + + return result2.flip(); + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/CreateAuctionMessage.java b/src/protocol/swg/auctionManagerClientListener/CreateAuctionMessage.java new file mode 100644 index 00000000..d05a6756 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/CreateAuctionMessage.java @@ -0,0 +1,115 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; + +import org.apache.mina.core.buffer.IoBuffer; + +import engine.resources.common.Utilities; +import protocol.swg.SWGMessage; + +public class CreateAuctionMessage extends SWGMessage { + + private long objectId; + private long vendorId; + private int price; + private int duration; + private String description; + private byte premium; + + @Override + public void deserialize(IoBuffer data) { + data.skip(6); + setObjectId(data.getLong()); + int size = data.getInt(); + try { + setDescription(new String(ByteBuffer.allocate(size * 2).put(data.array(), data.position(), size * 2).array(), "UTF-16LE")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + data.position(data.position() + size * 2); + + setVendorId(data.getLong()); + setPrice(data.getInt()); + setDuration(data.getInt()); // in minutes + setPremium(data.get()); + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public long getObjectId() { + return objectId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + public long getVendorId() { + return vendorId; + } + + public void setVendorId(long vendorId) { + this.vendorId = vendorId; + } + + public int getPrice() { + return price; + } + + public void setPrice(int price) { + this.price = price; + } + + public int getDuration() { + return duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public boolean getPremium() { + if(premium == 1) + return true; + return false; + } + + public void setPremium(byte premium) { + this.premium = premium; + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/CreateAuctionResponseMessage.java b/src/protocol/swg/auctionManagerClientListener/CreateAuctionResponseMessage.java new file mode 100644 index 00000000..8a067dff --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/CreateAuctionResponseMessage.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class CreateAuctionResponseMessage extends SWGMessage { + + public static final int SUCCESS = 0; + public static final int INVALIDAUCTIONER = 1; + public static final int INVALIDITEM = 2; + public static final int BADVENDOR = 3; + public static final int INVALIDPRICE = 4; + public static final int INVALIDDURATION = 5; + public static final int ALREADYFORSALE = 6; + public static final int UNKERROR = 6; + public static final int DONTOWNITEM = 8; + public static final int NOTENOUGHCREDITS = 9; + public static final int TOOMANYITEMS = 13; + public static final int PRICETOOHIGH = 14; + public static final int CANTSELLTRADINGITEM = 19; + public static final int VENDORFULL = 25; + + private long objectId; + private int status; + + public CreateAuctionResponseMessage(long objectId, int status) { + this.objectId = objectId; + this.status = status; + } + + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(20).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 4); + result.putInt(0x0E61CC92); + result.putLong(objectId); + result.putInt(status); + result.putShort((short) 0); + return result.flip(); + } + + public void setStatus(int status) { + this.status = status; + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/CreateImmediateAuctionMessage.java b/src/protocol/swg/auctionManagerClientListener/CreateImmediateAuctionMessage.java new file mode 100644 index 00000000..33307c41 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/CreateImmediateAuctionMessage.java @@ -0,0 +1,111 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class CreateImmediateAuctionMessage extends SWGMessage { + + private long objectId; + private long vendorId; + private int price; + private int duration; + private String description; + private byte premium; + + @Override + public void deserialize(IoBuffer data) { + data.skip(6); + setObjectId(data.getLong()); + setVendorId(data.getLong()); + setPrice(data.getInt()); + setDuration(data.getInt()); // in minutes + int size = data.getInt(); + try { + setDescription(new String(ByteBuffer.allocate(size * 2).put(data.array(), data.position(), size * 2).array(), "UTF-16LE")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + data.position(data.position() + size * 2); + setPremium(data.get()); + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public long getObjectId() { + return objectId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + public long getVendorId() { + return vendorId; + } + + public void setVendorId(long vendorId) { + this.vendorId = vendorId; + } + + public int getPrice() { + return price; + } + + public void setPrice(int price) { + this.price = price; + } + + public int getDuration() { + return duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public byte getPremium() { + return premium; + } + + public void setPremium(byte premium) { + this.premium = premium; + } + +} diff --git a/src/resources/z/exp/objects/factorycrate/FactoryCrateMessageBuilder.java b/src/protocol/swg/auctionManagerClientListener/GetAuctionDetails.java similarity index 67% rename from src/resources/z/exp/objects/factorycrate/FactoryCrateMessageBuilder.java rename to src/protocol/swg/auctionManagerClientListener/GetAuctionDetails.java index a3558047..946c0a06 100644 --- a/src/resources/z/exp/objects/factorycrate/FactoryCrateMessageBuilder.java +++ b/src/protocol/swg/auctionManagerClientListener/GetAuctionDetails.java @@ -19,8 +19,34 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.factorycrate; +package protocol.swg.auctionManagerClientListener; -public class FactoryCrateMessageBuilder { +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class GetAuctionDetails extends SWGMessage { + + private long objectId; + + @Override + public void deserialize(IoBuffer data) { + data.skip(6); + setObjectId(data.getLong()); + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public long getObjectId() { + return objectId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } } diff --git a/src/protocol/swg/auctionManagerClientListener/GetAuctionDetailsResponse.java b/src/protocol/swg/auctionManagerClientListener/GetAuctionDetailsResponse.java new file mode 100644 index 00000000..458c59d6 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/GetAuctionDetailsResponse.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import engine.resources.objects.SWGObject; +import protocol.swg.SWGMessage; +import resources.objects.tangible.TangibleObject; +import services.bazaar.AuctionItem; + +public class GetAuctionDetailsResponse extends SWGMessage { + + private AuctionItem target; + + public GetAuctionDetailsResponse(AuctionItem target) { + this.target = target; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + final IoBuffer result = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + + result.putShort((short) 2); + result.putInt(0xFE0E644B); + result.putLong(target.getObjectId()); + result.put(getUnicodeString(target.getItemDescription())); + result.putInt(target.getItem().getAttributes().size()); + target.getItem().getAttributes().forEach((key, value) -> { + result.put(getAsciiString(key)); + result.put(getUnicodeString(value)); + }); + result.put(getAsciiString(target.getItem().getTemplate())); + if(((TangibleObject) target.getItem()).getCustomization() != null) { + result.putShort((short) ((TangibleObject) target.getItem()).getCustomization().length); + result.put(((TangibleObject) target.getItem()).getCustomization()); + } else + result.putShort((short) 0); + + + int size = result.position(); + IoBuffer result2 = IoBuffer.allocate(size).put(result.array(), 0, size); + + return result2.flip(); + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/IsVendorOwnerMessage.java b/src/protocol/swg/auctionManagerClientListener/IsVendorOwnerMessage.java new file mode 100644 index 00000000..35b3b498 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/IsVendorOwnerMessage.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class IsVendorOwnerMessage extends SWGMessage { + + private long terminalId; + + @Override + public void deserialize(IoBuffer data) { + data.skip(6); + setTerminalId(data.getLong()); + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public long getTerminalId() { + return terminalId; + } + + public void setTerminalId(long terminalId) { + this.terminalId = terminalId; + } + +} diff --git a/src/protocol/swg/auctionManagerClientListener/IsVendorOwnerResponseMessage.java b/src/protocol/swg/auctionManagerClientListener/IsVendorOwnerResponseMessage.java new file mode 100644 index 00000000..cfc73637 --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/IsVendorOwnerResponseMessage.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class IsVendorOwnerResponseMessage extends SWGMessage { + + private int permission; + private int errorCode; + private long terminalId; + private String terminalString; + + public IsVendorOwnerResponseMessage(int permission, int errorCode, long terminalId, String terminalString) { + this.permission = permission; + this.errorCode = errorCode; + this.terminalId = terminalId; + this.terminalString = terminalString; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(26 + terminalString.length()).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 6); + result.putInt(0xCE04173E); + result.putInt(permission); + result.putInt(errorCode); + result.putLong(terminalId); + result.put(getAsciiString(terminalString)); + result.putShort((short) 0x64); // unk + return result.flip(); + } + +} diff --git a/src/resources/z/exp/objects/group/GroupMessageBuilder.java b/src/protocol/swg/auctionManagerClientListener/RetrieveAuctionItemMessage.java similarity index 62% rename from src/resources/z/exp/objects/group/GroupMessageBuilder.java rename to src/protocol/swg/auctionManagerClientListener/RetrieveAuctionItemMessage.java index 807b0a2a..af2f0c0c 100644 --- a/src/resources/z/exp/objects/group/GroupMessageBuilder.java +++ b/src/protocol/swg/auctionManagerClientListener/RetrieveAuctionItemMessage.java @@ -19,31 +19,44 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.group; +package protocol.swg.auctionManagerClientListener; -import java.util.Map; +import org.apache.mina.core.buffer.IoBuffer; -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.universe.UniverseMessageBuilder; +import protocol.swg.SWGMessage; + +public class RetrieveAuctionItemMessage extends SWGMessage { + + private long objectId; + private long vendorId; -public class GroupMessageBuilder extends UniverseMessageBuilder { - - public GroupMessageBuilder(GroupObject groupObject) { - super(groupObject); - } - - public GroupMessageBuilder() { - super(); - } - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); + public void deserialize(IoBuffer data) { + data.skip(6); + setObjectId(data.getLong()); + setVendorId(data.getLong()); } - + @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; } - + + public long getObjectId() { + return objectId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + public long getVendorId() { + return vendorId; + } + + public void setVendorId(long vendorId) { + this.vendorId = vendorId; + } + } diff --git a/src/protocol/swg/auctionManagerClientListener/RetrieveAuctionItemResponseMessage.java b/src/protocol/swg/auctionManagerClientListener/RetrieveAuctionItemResponseMessage.java new file mode 100644 index 00000000..ad9093da --- /dev/null +++ b/src/protocol/swg/auctionManagerClientListener/RetrieveAuctionItemResponseMessage.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.auctionManagerClientListener; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class RetrieveAuctionItemResponseMessage extends SWGMessage { + + private long objectId; + private int status; + + public static final int SUCCESS = 0; + public static final int NOTALLOWED = 1; + public static final int FULLINVENTORY = 12; + public static final int TOOFAR = 0x100; + public static final int DONTRETRIEVE = 0x200; + + public RetrieveAuctionItemResponseMessage(long objectId, int status) { + this.objectId = objectId; + this.status = status; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(18).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 3); + result.putInt(0x9499EF8C); + result.putLong(objectId); + result.putInt(status); + return result.flip(); + } + + public void setStatus(int status) { + this.status = status; + } + + +} diff --git a/src/protocol/swg/chat/ChatCreateRoom.java b/src/protocol/swg/chat/ChatCreateRoom.java new file mode 100644 index 00000000..841c1614 --- /dev/null +++ b/src/protocol/swg/chat/ChatCreateRoom.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + + +public class ChatCreateRoom extends SWGMessage { + + private String address, title; + private boolean privacy, moderatorOnly; + private int request; + + public ChatCreateRoom() { } + @Override + public void deserialize(IoBuffer data) { + + this.privacy = (boolean) ((data.get() == 1) ? false : true); + this.moderatorOnly = (boolean) ((data.get() == 1) ? true : false); + data.getShort(); // unk + this.address = getAsciiString(data); + this.title = getAsciiString(data); + this.request = data.getInt(); + } + + @Override + public IoBuffer serialize() { + return null; + } + + public String getAddress() { + return address; + } + public String getTitle() { + return title; + } + public boolean isPrivacy() { + return privacy; + } + public boolean isModeratorOnly() { + return moderatorOnly; + } + + public int getRequest() { + return request; + } + +} diff --git a/src/protocol/swg/ChatDeletePersistentMessage.java b/src/protocol/swg/chat/ChatDeletePersistentMessage.java similarity index 96% rename from src/protocol/swg/ChatDeletePersistentMessage.java rename to src/protocol/swg/chat/ChatDeletePersistentMessage.java index 1e812255..3f0d1b70 100644 --- a/src/protocol/swg/ChatDeletePersistentMessage.java +++ b/src/protocol/swg/chat/ChatDeletePersistentMessage.java @@ -19,10 +19,12 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; + public class ChatDeletePersistentMessage extends SWGMessage { diff --git a/src/resources/z/exp/objects/staticobject/StaticMessageBuilder.java b/src/protocol/swg/chat/ChatEnterRoomById.java similarity index 63% rename from src/resources/z/exp/objects/staticobject/StaticMessageBuilder.java rename to src/protocol/swg/chat/ChatEnterRoomById.java index 5156390b..2e2ec8e5 100644 --- a/src/resources/z/exp/objects/staticobject/StaticMessageBuilder.java +++ b/src/protocol/swg/chat/ChatEnterRoomById.java @@ -19,31 +19,44 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.staticobject; +package protocol.swg.chat; -import java.util.Map; +import org.apache.mina.core.buffer.IoBuffer; -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.ObjectMessageBuilder; +import protocol.swg.SWGMessage; -public class StaticMessageBuilder extends ObjectMessageBuilder { - - public StaticMessageBuilder(StaticObject object) { - super(object); - } - - public StaticMessageBuilder() { - super(); - } +public class ChatEnterRoomById extends SWGMessage { + + private int roomId; + private int requestId; + private String roomName; + + public ChatEnterRoomById() { } @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); + public void deserialize(IoBuffer data) { + data.getShort(); + data.getInt(); + + this.requestId = data.getInt(); + this.roomId = data.getInt(); + this.roomName = getAsciiString(data); } - + @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); + public IoBuffer serialize() { + return null; + } + + public int getRequestId() { + return requestId; + } + + public int getRoomId() { + return roomId; } + public String getRoomname() { + return roomName; + } } diff --git a/src/protocol/swg/ChatFriendsListUpdate.java b/src/protocol/swg/chat/ChatFriendsListUpdate.java similarity index 94% rename from src/protocol/swg/ChatFriendsListUpdate.java rename to src/protocol/swg/chat/ChatFriendsListUpdate.java index 313235d7..f3a17a34 100644 --- a/src/protocol/swg/ChatFriendsListUpdate.java +++ b/src/protocol/swg/chat/ChatFriendsListUpdate.java @@ -1,4 +1,4 @@ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; @@ -6,6 +6,7 @@ import main.NGECore; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; public class ChatFriendsListUpdate extends SWGMessage { diff --git a/src/protocol/swg/ChatInstantMessageToCharacter.java b/src/protocol/swg/chat/ChatInstantMessageToCharacter.java similarity index 98% rename from src/protocol/swg/ChatInstantMessageToCharacter.java rename to src/protocol/swg/chat/ChatInstantMessageToCharacter.java index 1d0efccd..8a1414f9 100644 --- a/src/protocol/swg/ChatInstantMessageToCharacter.java +++ b/src/protocol/swg/chat/ChatInstantMessageToCharacter.java @@ -19,13 +19,15 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; + @SuppressWarnings("unused") public class ChatInstantMessageToCharacter extends SWGMessage { diff --git a/src/protocol/swg/ChatInstantMessagetoClient.java b/src/protocol/swg/chat/ChatInstantMessagetoClient.java similarity index 97% rename from src/protocol/swg/ChatInstantMessagetoClient.java rename to src/protocol/swg/chat/ChatInstantMessagetoClient.java index f87c0da8..f11903fc 100644 --- a/src/protocol/swg/ChatInstantMessagetoClient.java +++ b/src/protocol/swg/chat/ChatInstantMessagetoClient.java @@ -19,12 +19,14 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; + public class ChatInstantMessagetoClient extends SWGMessage{ diff --git a/src/protocol/swg/ChatOnAddFriend.java b/src/protocol/swg/chat/ChatOnAddFriend.java similarity index 96% rename from src/protocol/swg/ChatOnAddFriend.java rename to src/protocol/swg/chat/ChatOnAddFriend.java index 0b84e6ff..44b0b8ac 100644 --- a/src/protocol/swg/ChatOnAddFriend.java +++ b/src/protocol/swg/chat/ChatOnAddFriend.java @@ -19,12 +19,14 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; + public class ChatOnAddFriend extends SWGMessage { @Override diff --git a/src/protocol/swg/ChatOnChangeFriendStatus.java b/src/protocol/swg/chat/ChatOnChangeFriendStatus.java similarity index 97% rename from src/protocol/swg/ChatOnChangeFriendStatus.java rename to src/protocol/swg/chat/ChatOnChangeFriendStatus.java index a11c85bb..1c770233 100644 --- a/src/protocol/swg/ChatOnChangeFriendStatus.java +++ b/src/protocol/swg/chat/ChatOnChangeFriendStatus.java @@ -19,7 +19,7 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; @@ -27,6 +27,7 @@ import main.NGECore; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; import engine.resources.config.Config; public class ChatOnChangeFriendStatus extends SWGMessage { diff --git a/src/resources/z/exp/objects/harvester/HarvesterMessageBuilder.java b/src/protocol/swg/chat/ChatOnConnectAvatar.java similarity index 67% rename from src/resources/z/exp/objects/harvester/HarvesterMessageBuilder.java rename to src/protocol/swg/chat/ChatOnConnectAvatar.java index 06f08e30..faebcf9d 100644 --- a/src/resources/z/exp/objects/harvester/HarvesterMessageBuilder.java +++ b/src/protocol/swg/chat/ChatOnConnectAvatar.java @@ -1,26 +1,48 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.harvester; - -public class HarvesterMessageBuilder { - -} +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class ChatOnConnectAvatar extends SWGMessage { + + public ChatOnConnectAvatar() { } + + @Override + public void deserialize(IoBuffer data) { + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(6).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putShort((short) 1); + buffer.putInt(0xD72FE9BE); + + return buffer.flip(); + } + +} diff --git a/src/protocol/swg/chat/ChatOnCreateRoom.java b/src/protocol/swg/chat/ChatOnCreateRoom.java new file mode 100644 index 00000000..fc690fae --- /dev/null +++ b/src/protocol/swg/chat/ChatOnCreateRoom.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; +import services.chat.ChatRoom; + +public class ChatOnCreateRoom extends SWGMessage { + + private ChatRoom room; + private int error; + private int requestId; + + public ChatOnCreateRoom(ChatRoom room, int error, int requestId) { + this.room = room; + this.error = error; + this.requestId = requestId; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + String server = NGECore.getInstance().getGalaxyName(); + IoBuffer data = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); + data.setAutoExpand(true); + + data.putShort((short) 4); + data.putInt(0x35D7CC9F); + + data.putInt(error); + data.putInt(room.getRoomId()); + data.putInt(room.isPrivateRoom() ? 0 : 1); + data.put((byte) (room.isModeratorsOnly() ? 1 : 0)); + data.put(getAsciiString(room.getRoomAddress())); + data.put(getAsciiString("SWG")); + data.put(getAsciiString(server)); + data.put(getAsciiString(room.getCreator())); + data.put(getAsciiString("SWG")); + data.put(getAsciiString(server)); + data.put(getAsciiString(room.getOwner())); + data.put(getUnicodeString(room.getDescription())); + + data.putInt(0); + /*if (room.getModeratorList().size() > 0) { + for (CreatureObject creo : room.getModeratorList()) { + data.put(getAsciiString("SWG")); + data.put(getAsciiString(server)); + data.put(getAsciiString(creo.getCustomName())); + } + }*/ + + data.putInt(0); + /*if (room.getUserList().size() > 0) { + for (CreatureObject creo : room.getUserList()) { + data.put(getAsciiString("SWG")); + data.put(getAsciiString(server)); + data.put(getAsciiString(creo.getCustomName())); + } + }*/ + + data.putInt(requestId); + return data.flip(); + } + +} diff --git a/src/protocol/swg/chat/ChatOnEnteredRoom.java b/src/protocol/swg/chat/ChatOnEnteredRoom.java new file mode 100644 index 00000000..fe82b29c --- /dev/null +++ b/src/protocol/swg/chat/ChatOnEnteredRoom.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; +import engine.resources.common.CRC; +import resources.common.Opcodes; + +public class ChatOnEnteredRoom extends SWGMessage { + + private String characterName; + private int success; + private int roomId; + private boolean join; + + public ChatOnEnteredRoom(String characterName, int success, int roomId, boolean join) { + this.characterName = characterName; + this.success = success; + this.roomId = roomId; + this.join = join; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + String galaxy = NGECore.getInstance().getGalaxyName(); + IoBuffer buffer = IoBuffer.allocate(27 + galaxy.length() + characterName.length()).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 5); + if (join) + buffer.putInt(Opcodes.ChatOnEnteredRoom); + else + buffer.putInt(CRC.StringtoCRC("ChatOnLeaveRoom")); + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(galaxy)); + buffer.put(getAsciiString(characterName.toLowerCase())); + buffer.putInt(success); + buffer.putInt(roomId); + buffer.putInt(0); + return buffer.flip(); + } + + public static final int JOIN_SUCCESS = 0; + public static final int JOIN_FAIL_NO_INVITE = 0x10; +} diff --git a/src/protocol/swg/ChatOnGetFriendsList.java b/src/protocol/swg/chat/ChatOnGetFriendsList.java similarity index 95% rename from src/protocol/swg/ChatOnGetFriendsList.java rename to src/protocol/swg/chat/ChatOnGetFriendsList.java index 3e497bf1..14d5ac8f 100644 --- a/src/protocol/swg/ChatOnGetFriendsList.java +++ b/src/protocol/swg/chat/ChatOnGetFriendsList.java @@ -1,4 +1,4 @@ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; import java.util.List; @@ -7,6 +7,7 @@ import main.NGECore; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; import resources.objects.player.PlayerObject; // This is possibly unused diff --git a/src/protocol/swg/chat/ChatOnLeaveRoom.java b/src/protocol/swg/chat/ChatOnLeaveRoom.java new file mode 100644 index 00000000..1fecfe5f --- /dev/null +++ b/src/protocol/swg/chat/ChatOnLeaveRoom.java @@ -0,0 +1,125 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; +import resources.common.StringUtilities; + +public class ChatOnLeaveRoom extends SWGMessage { + + private String server; + private String character; + private String channelAddress; + private int errorId; + private int channelId; + private int requestId; + + public ChatOnLeaveRoom() { } + + public ChatOnLeaveRoom(String server, String character) { + this.server = server; + this.character = character; + this.errorId = 0; + this.requestId = 0; + } + + @Override + public void deserialize(IoBuffer data) { + data.getShort(); + data.getInt(); + getAsciiString(data); + getAsciiString(data); + character = getAsciiString(data); + channelAddress = getAsciiString(data); + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(28 + server.length() + character.length()).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putShort((short) 5); + buffer.putInt(0x60B5098B); + + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(character)); + + buffer.putInt(errorId); + buffer.putInt(channelId); + buffer.putInt(requestId); + + return buffer.flip(); + } + + public String getServer() { + return server; + } + + public void setServer(String server) { + this.server = server; + } + + public String getCharacter() { + return character; + } + + public void setCharacter(String character) { + this.character = character; + } + + public String getChannelAddress() { + return channelAddress; + } + + public void setChannelAddress(String channelAddress) { + this.channelAddress = channelAddress; + } + + public int getErrorId() { + return errorId; + } + + public void setErrorId(int errorId) { + this.errorId = errorId; + } + + public int getChannelId() { + return channelId; + } + + public void setChannelId(int channelId) { + this.channelId = channelId; + } + + public int getRequestId() { + return requestId; + } + + public void setRequestId(int requestId) { + this.requestId = requestId; + } + +} diff --git a/src/protocol/swg/ChatOnSendInstantMessage.java b/src/protocol/swg/chat/ChatOnSendInstantMessage.java similarity index 96% rename from src/protocol/swg/ChatOnSendInstantMessage.java rename to src/protocol/swg/chat/ChatOnSendInstantMessage.java index 9bcb41da..f1be9e0a 100644 --- a/src/protocol/swg/ChatOnSendInstantMessage.java +++ b/src/protocol/swg/chat/ChatOnSendInstantMessage.java @@ -19,12 +19,14 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; + public class ChatOnSendInstantMessage extends SWGMessage { private int errorType; diff --git a/src/protocol/swg/ChatOnSendPersistentMessage.java b/src/protocol/swg/chat/ChatOnSendPersistentMessage.java similarity index 96% rename from src/protocol/swg/ChatOnSendPersistentMessage.java rename to src/protocol/swg/chat/ChatOnSendPersistentMessage.java index 3d8a3a48..9dc28eff 100644 --- a/src/protocol/swg/ChatOnSendPersistentMessage.java +++ b/src/protocol/swg/chat/ChatOnSendPersistentMessage.java @@ -19,12 +19,14 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; + public class ChatOnSendPersistentMessage extends SWGMessage { diff --git a/src/protocol/swg/chat/ChatOnSendRoomMessage.java b/src/protocol/swg/chat/ChatOnSendRoomMessage.java new file mode 100644 index 00000000..21d03390 --- /dev/null +++ b/src/protocol/swg/chat/ChatOnSendRoomMessage.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class ChatOnSendRoomMessage extends SWGMessage { + + private int errorCode; + private int msgId; + + public ChatOnSendRoomMessage(int errorCode, int msgId) { + this.errorCode = errorCode; + this.msgId = msgId; + } + + @Override + public void deserialize(IoBuffer data) { + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(14).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 3); + buffer.putInt(0xE7B61633); + buffer.putInt(errorCode); + buffer.putInt(msgId); // msg id + return buffer.flip(); + } + + public static final int SUCCESS = 0; + public static final int FAILED_MODERATOR = 9; + public static final int FAILED_LENGTH = 16; + +} diff --git a/src/protocol/swg/ChatPersistentMessageToClient.java b/src/protocol/swg/chat/ChatPersistentMessageToClient.java similarity index 98% rename from src/protocol/swg/ChatPersistentMessageToClient.java rename to src/protocol/swg/chat/ChatPersistentMessageToClient.java index 3db681b6..a5013ab8 100644 --- a/src/protocol/swg/ChatPersistentMessageToClient.java +++ b/src/protocol/swg/chat/ChatPersistentMessageToClient.java @@ -19,11 +19,14 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.nio.ByteOrder; import java.util.List; + import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; import services.chat.WaypointAttachment; diff --git a/src/protocol/swg/ChatPersistentMessageToServer.java b/src/protocol/swg/chat/ChatPersistentMessageToServer.java similarity index 98% rename from src/protocol/swg/ChatPersistentMessageToServer.java rename to src/protocol/swg/chat/ChatPersistentMessageToServer.java index a8602f83..84fa1e52 100644 --- a/src/protocol/swg/ChatPersistentMessageToServer.java +++ b/src/protocol/swg/chat/ChatPersistentMessageToServer.java @@ -19,13 +19,16 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; + import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; import services.chat.WaypointAttachment; diff --git a/src/protocol/swg/chat/ChatQueryRoom.java b/src/protocol/swg/chat/ChatQueryRoom.java new file mode 100644 index 00000000..25e94d27 --- /dev/null +++ b/src/protocol/swg/chat/ChatQueryRoom.java @@ -0,0 +1,130 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; +import java.util.Vector; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; +import services.chat.ChatRoom; + +public class ChatQueryRoom extends SWGMessage { + + private ChatRoom room; + private String roomAddress; + private int requestId; + + public ChatQueryRoom() { } + public ChatQueryRoom(ChatRoom room, int requestId) { + this.room = room; + this.requestId = requestId; + } + + @Override + public void deserialize(IoBuffer data) { + data.getShort(); + data.getInt(); + requestId = data.getInt(); + roomAddress = getAsciiString(data); + } + + @Override + public IoBuffer serialize() { + String server = NGECore.getInstance().getGalaxyName(); + IoBuffer buffer = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putShort((short) 7); + buffer.putInt(0xC4DE864E); + + Vector users = room.getUserList(); + + buffer.putInt(users.size()); + if (users.size() > 0) { + for (String str : users) { + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(str)); + } + } + + buffer.putInt(0); // TODO: Invited list for chat rooms + + Vector moderators = room.getModeratorList(); + + buffer.putInt(moderators.size()); + if (moderators.size() > 0) { + for (String str : moderators) { + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(str)); + } + } + + Vector banned = room.getBanList(); + buffer.putInt(banned.size()); + if (banned.size() > 0) { + for (String str : banned) { + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(str)); + } + } + + buffer.putInt(requestId); + buffer.putInt(room.getRoomId()); + buffer.putInt(room.isPrivateRoom() ? 0 : 1); + buffer.put((byte) (room.isModeratorsOnly() ? 1 : 0)); + + buffer.put(getAsciiString(room.getRoomAddress())); + + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(room.getOwner())); + + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(room.getCreator())); + + buffer.put(getUnicodeString(room.getDescription())); + + buffer.putInt(0); // moderator list + buffer.putInt(0); // user list + return buffer.flip(); + } + public String getRoomAddress() { + return roomAddress; + } + public void setRoomAddress(String roomAddress) { + this.roomAddress = roomAddress; + } + public int getRequestId() { + return requestId; + } + public void setRequestId(int requestId) { + this.requestId = requestId; + } +} diff --git a/src/protocol/swg/ChatRequestPersistentMessage.java b/src/protocol/swg/chat/ChatRequestPersistentMessage.java similarity index 96% rename from src/protocol/swg/ChatRequestPersistentMessage.java rename to src/protocol/swg/chat/ChatRequestPersistentMessage.java index d52b4afd..dd9ec88f 100644 --- a/src/protocol/swg/ChatRequestPersistentMessage.java +++ b/src/protocol/swg/chat/ChatRequestPersistentMessage.java @@ -19,10 +19,12 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package protocol.swg; +package protocol.swg.chat; import org.apache.mina.core.buffer.IoBuffer; +import protocol.swg.SWGMessage; + public class ChatRequestPersistentMessage extends SWGMessage { diff --git a/src/protocol/swg/chat/ChatRoomList.java b/src/protocol/swg/chat/ChatRoomList.java new file mode 100644 index 00000000..3021f72f --- /dev/null +++ b/src/protocol/swg/chat/ChatRoomList.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; +import java.util.concurrent.ConcurrentHashMap; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; +import services.chat.ChatRoom; + +public class ChatRoomList extends SWGMessage { + + private ConcurrentHashMap chatRooms; + private ChatRoom room; + + public ChatRoomList(ConcurrentHashMap chatRooms) { + this.chatRooms = chatRooms; + } + + public ChatRoomList(ChatRoom room) { + this.room = room; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + String server = NGECore.getInstance().getGalaxyName(); + IoBuffer buffer = IoBuffer.allocate(53).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putShort((short) 2); + buffer.putInt(0x70DEB197); + + if (room != null) { + buffer.putInt(1); + + buffer.putInt(room.getRoomId()); + buffer.putInt((int) ((room.isPrivateRoom() ? 1 : 0))); + buffer.put((byte) ((room.isModeratorsOnly() ? 1 : 0))); + buffer.put(getAsciiString(room.getRoomAddress())); + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(room.getOwner())); + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(room.getCreator())); + buffer.put(getUnicodeString(room.getDescription())); + buffer.putInt(0); // moderator list (not used by client) + buffer.putInt(0); // user list (not used by client) + } else { + buffer.putInt(chatRooms.size()); + chatRooms.forEach((key, value) -> { + if (value.isVisible()) { + buffer.putInt(value.getRoomId()); + buffer.putInt((int) ((value.isPrivateRoom() ? 1 : 0))); + buffer.put((byte) ((value.isModeratorsOnly() ? 1 : 0))); + buffer.put(getAsciiString(value.getRoomAddress())); + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(value.getOwner())); + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(value.getCreator())); + buffer.put(getUnicodeString(value.getDescription())); + buffer.putInt(0); // moderator list (not used by client) + buffer.putInt(0); // user list (not used by client) + } + }); + } + buffer.flip(); + //StringUtilities.printBytes(buffer.array()); + return buffer; + } + +} diff --git a/src/protocol/swg/chat/ChatRoomMessage.java b/src/protocol/swg/chat/ChatRoomMessage.java new file mode 100644 index 00000000..616d019d --- /dev/null +++ b/src/protocol/swg/chat/ChatRoomMessage.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class ChatRoomMessage extends SWGMessage { + + private String character; + private String message; + private int roomId; + + public ChatRoomMessage(int roomId, String player, String message) { + this.roomId = roomId; + this.character = player; + this.message = message; + } + + @Override + public void deserialize(IoBuffer data) { + } + + @Override + public IoBuffer serialize() { + String server = NGECore.getInstance().getGalaxyName(); + + IoBuffer buffer = IoBuffer.allocate(27 + server.length() + character.length() + (message.length() * 2)).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putShort((short) 5); + buffer.putInt(0xCD4CE444); + buffer.put(getAsciiString("SWG")); + buffer.put(getAsciiString(server)); + buffer.put(getAsciiString(character)); + buffer.putInt(roomId); + buffer.put(getUnicodeString(message)); + buffer.putInt(0); // out of band package ? + return buffer.flip(); + } + +} diff --git a/src/resources/z/exp/gcw/OtherServerGCWZonePercent.java b/src/protocol/swg/chat/ChatSendToRoom.java similarity index 52% rename from src/resources/z/exp/gcw/OtherServerGCWZonePercent.java rename to src/protocol/swg/chat/ChatSendToRoom.java index 8411980d..1c603c3c 100644 --- a/src/resources/z/exp/gcw/OtherServerGCWZonePercent.java +++ b/src/protocol/swg/chat/ChatSendToRoom.java @@ -19,66 +19,67 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.gcw; +package protocol.swg.chat; -import java.nio.ByteOrder; +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; import org.apache.mina.core.buffer.IoBuffer; -import com.sleepycat.persist.model.Persistent; +import protocol.swg.SWGMessage; +import resources.common.StringUtilities; -import resources.objects.Delta; - -@Persistent -public class OtherServerGCWZonePercent extends Delta implements Cloneable { +public class ChatSendToRoom extends SWGMessage { - private String zone = ""; - private int percent = 50; - - public OtherServerGCWZonePercent(String zone) { - this.zone = zone; - } + private String message; + private int roomId; + private int msgId; - public OtherServerGCWZonePercent() { - - } - - public String getZone() { - synchronized(objectMutex) { - return zone; - } - } - - public int getPercent() { - synchronized(objectMutex) { - return percent; - } - } - - public OtherServerGCWZonePercent setPercent(double percent) { - synchronized(objectMutex) { - this.percent = (int) percent; - return this; - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate((2 + zone.length() + 4), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put(getAsciiString(zone)); - buffer.putInt(percent); - return buffer.array(); - } - } + public ChatSendToRoom() { } @Override - public OtherServerGCWZonePercent clone() { + public void deserialize(IoBuffer data) { try { - return (OtherServerGCWZonePercent) super.clone(); - } catch (CloneNotSupportedException e) { + data.getShort(); + data.getInt(); + int size = data.getInt(); + message = new String(ByteBuffer.allocate(size * 2).put(data.array(), data.position(), size * 2).array(), "UTF-16LE"); + data.position(data.position() + size * 2); + data.getInt(); + setRoomId(data.getInt()); + setMsgId(data.getInt()); + } catch (UnsupportedEncodingException e) { e.printStackTrace(); - return null; } } - + + @Override + public IoBuffer serialize() { + return null; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public int getRoomId() { + return roomId; + } + + public void setRoomId(int roomId) { + this.roomId = roomId; + } + + public int getMsgId() { + return msgId; + } + + public void setMsgId(int msgId) { + this.msgId = msgId; + } + } diff --git a/src/protocol/swg/chat/ChatServerStatus.java b/src/protocol/swg/chat/ChatServerStatus.java new file mode 100644 index 00000000..2de0db65 --- /dev/null +++ b/src/protocol/swg/chat/ChatServerStatus.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class ChatServerStatus extends SWGMessage { + + public ChatServerStatus() { } + + @Override + public void deserialize(IoBuffer data) { + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(7).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 2); + buffer.putInt(0x7102B15F); + buffer.put((byte) 1); + return buffer.flip(); + } +} diff --git a/src/resources/z/exp/manufacture/Property.java b/src/protocol/swg/chat/ChatSystemMessage.java similarity index 53% rename from src/resources/z/exp/manufacture/Property.java rename to src/protocol/swg/chat/ChatSystemMessage.java index 254c1689..277eb596 100644 --- a/src/resources/z/exp/manufacture/Property.java +++ b/src/protocol/swg/chat/ChatSystemMessage.java @@ -19,66 +19,41 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.manufacture; +package protocol.swg.chat; import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; -import com.sleepycat.persist.model.Persistent; +import protocol.swg.SWGMessage; +import resources.common.Opcodes; +import resources.common.OutOfBand; -import resources.objects.Delta; - -@Persistent -public class Property extends Delta { +public class ChatSystemMessage extends SWGMessage { - private int unused = 0; - private String key = ""; - private float value = 0; + private String message; + private byte displayType; + private OutOfBand outOfBand; - public Property(String key, float value) { - this.key = key; - this.value = value; + public ChatSystemMessage(String message, OutOfBand outOfBand, byte displayType) { + this.message = message; + this.displayType = displayType; + this.outOfBand = outOfBand; } - public Property() { + public void deserialize(IoBuffer data) { } - public String getKey() { - synchronized(objectMutex) { - return key; - } - } - - public Property setKey(String key) { - synchronized(objectMutex) { - this.key = key; - return this; - } - } - - public float getValue() { - synchronized(objectMutex) { - return value; - } - } - - public Property setValue(float value) { - synchronized(objectMutex) { - this.value = value; - return this; - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(8 + getAsciiString(key).length, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(unused); - buffer.put(getAsciiString(key)); - buffer.putFloat(value); - return buffer.array(); - } + public IoBuffer serialize() { + IoBuffer outOfBandBuffer = outOfBand.serialize(); + IoBuffer result = IoBuffer.allocate(7 + getUnicodeString(message).length + outOfBandBuffer.array().length).order(ByteOrder.LITTLE_ENDIAN); + result.putShort((short) 2); + result.putInt(Opcodes.ChatSystemMessage); + result.put(displayType); + result.put(getUnicodeString(message)); + result.put(outOfBandBuffer.array()); + return result.flip(); } } diff --git a/src/protocol/swg/chat/VoiceChatStatus.java b/src/protocol/swg/chat/VoiceChatStatus.java new file mode 100644 index 00000000..97936a19 --- /dev/null +++ b/src/protocol/swg/chat/VoiceChatStatus.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.chat; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.SWGMessage; + +public class VoiceChatStatus extends SWGMessage { + + public VoiceChatStatus() { } + + @Override + public void deserialize(IoBuffer data) { + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 2); + buffer.putInt(0x9E601905); + buffer.putInt(1); + return buffer.flip(); + } + +} diff --git a/src/protocol/swg/objectControllerObjects/Animation.java b/src/protocol/swg/objectControllerObjects/Animation.java index c3475969..957cf7d2 100644 --- a/src/protocol/swg/objectControllerObjects/Animation.java +++ b/src/protocol/swg/objectControllerObjects/Animation.java @@ -26,7 +26,6 @@ import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; import protocol.swg.ObjControllerMessage; -import protocol.swg.SWGMessage; public class Animation extends ObjControllerObject { @@ -45,7 +44,7 @@ public class Animation extends ObjControllerObject { @Override public IoBuffer serialize() { - IoBuffer result = IoBuffer.allocate(36).order(ByteOrder.LITTLE_ENDIAN); + IoBuffer result = IoBuffer.allocate(20 + animation.length()).order(ByteOrder.LITTLE_ENDIAN); result.putInt(ObjControllerMessage.ANIMATION); diff --git a/src/protocol/swg/objectControllerObjects/BiographyUpdate.java b/src/protocol/swg/objectControllerObjects/BiographyUpdate.java new file mode 100644 index 00000000..290d4580 --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/BiographyUpdate.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +public class BiographyUpdate extends ObjControllerObject { + + private long objectId; + private long targetObjectId; + + private String biography; + + public BiographyUpdate(long objectId, long targetObjectId, String biography) { + this.objectId = objectId; + this.biography = biography; + this.targetObjectId = targetObjectId; + } + + @Override + public void deserialize(IoBuffer data) { + + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(28 + (biography.length() * 2)).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putInt(0x000001DB); + buffer.putLong(objectId); // requester + buffer.putInt(0); + buffer.putLong(targetObjectId); + buffer.put(getUnicodeString(biography)); + + return buffer.flip(); + } + + +} diff --git a/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java b/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java index a877944a..b522ee35 100644 --- a/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java +++ b/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java @@ -6,28 +6,26 @@ import java.util.Vector; import org.apache.mina.core.buffer.IoBuffer; import protocol.swg.ObjControllerMessage; -import resources.common.ObjControllerOpcodes; -import resources.common.StringUtilities; import resources.objects.BuffItem; public class BuffBuilderChangeMessage extends ObjControllerObject { + private boolean accepted; private int buffCost; - private int time; + + private long bufferId; + private int buffRecipientAccepted; + private long buffRecipientId; private long objectId; - private long bufferId; - private long buffRecipientId; - - private boolean accepted; - private int buffRecipientAccepted; - private Vector statBuffs = new Vector(); - + + private int time; + public BuffBuilderChangeMessage() { - + } - + public BuffBuilderChangeMessage(long objectId, long bufferId, long buffRecipientId, Vector statBuffs) { this.objectId = objectId; this.bufferId = bufferId; @@ -35,136 +33,130 @@ public class BuffBuilderChangeMessage extends ObjControllerObject { this.statBuffs = statBuffs; } - + @Override - public void deserialize(IoBuffer buffer) { - setObjectId(buffer.getLong()); - buffer.getInt(); - setBufferId(buffer.getLong()); - setBuffRecipientId(buffer.getLong()); - setTime(buffer.getInt()); - setBuffCost(buffer.getInt()); - - byte value = buffer.get(); + public void deserialize(IoBuffer data) { + setObjectId(data.getLong()); + data.getInt(); + setBufferId(data.getLong()); + setBuffRecipientId(data.getLong()); + setTime(data.getInt()); + setBuffCost(data.getInt()); + + byte value = data.get(); if (value == (byte) 0) setAccepted(false); else if (value == (byte) 1) setAccepted(true); - - setBuffRecipientAccepted(buffer.getInt()); - - int statSize = buffer.getInt(); + + setBuffRecipientAccepted(data.getInt()); + + int statSize = data.getInt(); for (int i = 0; i < statSize; i++) { BuffItem item = new BuffItem(); - - String statName = getAsciiString(buffer); - item.setSkillName(statName); - - int investedPoints = buffer.getInt(); - item.setInvested(investedPoints); - - int maxAmount = buffer.getInt(); - item.setBonusAmount(maxAmount); - + + item.setSkillName(getAsciiString(data)); + item.setInvested(data.getInt()); + item.setEntertainerBonus(data.getInt()); + statBuffs.add(item); - System.out.println("Added buff item with " + investedPoints + " invested points " + " which has a bonus amount of " + maxAmount); } } - @Override - public IoBuffer serialize() { - IoBuffer result = IoBuffer.allocate(65 + statBuffs.size()).order(ByteOrder.LITTLE_ENDIAN); - result.setAutoExpand(true); - - result.putInt(ObjControllerMessage.BUFF_BUILDER_CHANGE); - result.putLong(objectId); - - result.putInt(0); - - result.putLong(bufferId); - result.putLong(buffRecipientId); - - result.putInt(time); - result.putInt(buffCost); - - result.put((byte) ((accepted) ? 1 : 0)); - result.putInt(buffRecipientAccepted); - - result.putInt(statBuffs.size()); - - if (!statBuffs.isEmpty()) { - for (BuffItem item : statBuffs) { - result.put(getAsciiString(item.getSkillName())); - result.putInt(item.getInvested()); - result.putInt(item.getBonusAmount()); - } - } - - return result.flip(); - } - - public int getBuffCost() { - return buffCost; - } - - public void setBuffCost(int buffCost) { - this.buffCost = buffCost; - } - - public int getTime() { - return time; - } - - public void setTime(int time) { - this.time = time; - } - - public long getObjectId() { - return objectId; - } - - public void setObjectId(long objectId) { - this.objectId = objectId; - } - - public long getBufferId() { - return bufferId; - } - - public void setBufferId(long bufferId) { - this.bufferId = bufferId; - } - - public long getBuffRecipientId() { - return buffRecipientId; - } - - public void setBuffRecipientId(long buffRecipientId) { - this.buffRecipientId = buffRecipientId; - } - public boolean getAccepted() { return accepted; } - public void setAccepted(boolean accepted) { - this.accepted = accepted; + public int getBuffCost() { + return buffCost; + } + + public long getBufferId() { + return bufferId; } public int getBuffRecipientAccepted() { return buffRecipientAccepted; } - public void setBuffRecipientAccepted(int buffRecipientAccepted) { - this.buffRecipientAccepted = buffRecipientAccepted; + public long getBuffRecipientId() { + return buffRecipientId; + } + + public long getObjectId() { + return objectId; } public Vector getStatBuffs() { return statBuffs; } + public int getTime() { + return time; + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(65 + statBuffs.size()).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + + result.putInt(ObjControllerMessage.BUFF_BUILDER_CHANGE); + result.putLong(objectId); + + result.putInt(0); + + result.putLong(bufferId); + result.putLong(buffRecipientId); + + result.putInt(time); + result.putInt(buffCost); + + result.put((byte) ((accepted) ? 1 : 0)); + result.putInt(buffRecipientAccepted); + + result.putInt(statBuffs.size()); + + if (!statBuffs.isEmpty()) { + for (BuffItem item : statBuffs) { + result.put(getAsciiString(item.getSkillName())); + result.putInt(item.getInvested()); + result.putInt(item.getEntertainerBonus()); + } + } + + return result.flip(); + } + + public void setAccepted(boolean accepted) { + this.accepted = accepted; + } + + public void setBuffCost(int buffCost) { + this.buffCost = buffCost; + } + + public void setBufferId(long bufferId) { + this.bufferId = bufferId; + } + + public void setBuffRecipientAccepted(int buffRecipientAccepted) { + this.buffRecipientAccepted = buffRecipientAccepted; + } + + public void setBuffRecipientId(long buffRecipientId) { + this.buffRecipientId = buffRecipientId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + public void setStatBuffs(Vector statBuffs) { this.statBuffs = statBuffs; } + public void setTime(int time) { + this.time = time; + } + } diff --git a/src/protocol/swg/objectControllerObjects/BuffBuilderEndMessage.java b/src/protocol/swg/objectControllerObjects/BuffBuilderEndMessage.java new file mode 100644 index 00000000..96a959db --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/BuffBuilderEndMessage.java @@ -0,0 +1,197 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; +import java.util.Vector; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.ObjControllerMessage; +import resources.objects.BuffItem; + +public class BuffBuilderEndMessage extends ObjControllerObject { + + private boolean accepted; + private int buffCost; + + private long bufferId; + private int buffRecipientAccepted; + private long buffRecipientId; + + private long objectId; + private Vector statBuffs = new Vector(); + + private int time; + + public BuffBuilderEndMessage() { + + } + + public BuffBuilderEndMessage(BuffBuilderEndMessage endMessage) { + this.buffCost = endMessage.getBuffCost(); + this.time = endMessage.getTime(); + this.accepted = endMessage.getAccepted(); + this.buffRecipientAccepted = endMessage.getBuffRecipientAccepted(); + this.statBuffs = endMessage.getStatBuffs(); + } + + public BuffBuilderEndMessage(BuffBuilderChangeMessage changeMessage) { + this.buffRecipientId = changeMessage.getBuffRecipientId(); + this.bufferId = changeMessage.getBufferId(); + this.buffCost = changeMessage.getBuffCost(); + this.time = changeMessage.getTime(); + this.accepted = changeMessage.getAccepted(); + this.buffRecipientAccepted = changeMessage.getBuffRecipientAccepted(); + this.statBuffs = changeMessage.getStatBuffs(); + } + @Override + public void deserialize(IoBuffer data) { + setObjectId(data.getLong()); + data.getInt(); + setBufferId(data.getLong()); + setBuffRecipientId(data.getLong()); + setTime(data.getInt()); + setBuffCost(data.getInt()); + + byte value = data.get(); + if (value == (byte) 0) + setAccepted(false); + else if (value == (byte) 1) + setAccepted(true); + + setBuffRecipientAccepted(data.getInt()); + + int statSize = data.getInt(); + for (int i = 0; i < statSize; i++) { + BuffItem item = new BuffItem(); + + String statName = getAsciiString(data); + item.setSkillName(statName); + + int investedPoints = data.getInt(); + item.setInvested(investedPoints); + + int entBonus = data.getInt(); + item.setEntertainerBonus(entBonus); + + statBuffs.add(item); + } + } + + public boolean getAccepted() { + return accepted; + } + + public int getBuffCost() { + return buffCost; + } + + public long getBufferId() { + return bufferId; + } + + public int getBuffRecipientAccepted() { + return buffRecipientAccepted; + } + + public long getBuffRecipientId() { + return buffRecipientId; + } + + public long getObjectId() { + return objectId; + } + + public Vector getStatBuffs() { + return statBuffs; + } + + public int getTime() { + return time; + } + + @Override + public IoBuffer serialize() { + IoBuffer result = IoBuffer.allocate(65 + statBuffs.size()).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + + result.putInt(ObjControllerMessage.BUFF_BUILDER_END); + result.putLong(objectId); + + result.putInt(0); + + result.putLong(bufferId); + result.putLong(buffRecipientId); + + result.putInt(time); + result.putInt(buffCost); + + result.put((byte) ((accepted) ? 1 : 0)); + result.putInt(buffRecipientAccepted); + + result.putInt(statBuffs.size()); + + if (!statBuffs.isEmpty()) { + for (BuffItem item : statBuffs) { + result.put(getAsciiString(item.getSkillName())); + result.putInt(item.getInvested()); + result.putInt(item.getEntertainerBonus()); + } + } + + return result.flip(); + } + + public void setAccepted(boolean accepted) { + this.accepted = accepted; + } + + public void setBuffCost(int buffCost) { + this.buffCost = buffCost; + } + + public void setBufferId(long bufferId) { + this.bufferId = bufferId; + } + + public void setBuffRecipientAccepted(int buffRecipientAccepted) { + this.buffRecipientAccepted = buffRecipientAccepted; + } + + public void setBuffRecipientId(long buffRecipientId) { + this.buffRecipientId = buffRecipientId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + public void setStatBuffs(Vector statBuffs) { + this.statBuffs = statBuffs; + } + + public void setTime(int time) { + this.time = time; + } + +} diff --git a/src/protocol/swg/objectControllerObjects/ChangeRoleIconChoice.java b/src/protocol/swg/objectControllerObjects/ChangeRoleIconChoice.java index 2cb16f10..7a458ead 100644 --- a/src/protocol/swg/objectControllerObjects/ChangeRoleIconChoice.java +++ b/src/protocol/swg/objectControllerObjects/ChangeRoleIconChoice.java @@ -21,12 +21,8 @@ ******************************************************************************/ package protocol.swg.objectControllerObjects; -import java.nio.ByteOrder; - import org.apache.mina.core.buffer.IoBuffer; -import engine.resources.common.Utilities; - public class ChangeRoleIconChoice extends ObjControllerObject { private long objectId = 0; diff --git a/src/protocol/swg/objectControllerObjects/CombatSpam.java b/src/protocol/swg/objectControllerObjects/CombatSpam.java index 75eaf9cd..fbf836de 100644 --- a/src/protocol/swg/objectControllerObjects/CombatSpam.java +++ b/src/protocol/swg/objectControllerObjects/CombatSpam.java @@ -33,9 +33,9 @@ public class CombatSpam extends ObjControllerObject{ private long attackerId; private long defenderId; private int damage; - private String file; - private String text; - private byte colorFlag; + //private String file; + //private String text; + //private byte colorFlag; private boolean hit = true; private boolean critical = false; private boolean dodge = false; diff --git a/src/protocol/swg/objectControllerObjects/ImageDesignMessage.java b/src/protocol/swg/objectControllerObjects/ImageDesignMessage.java new file mode 100644 index 00000000..8c99498e --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/ImageDesignMessage.java @@ -0,0 +1,361 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; +import java.util.Vector; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.ObjControllerMessage; +import resources.common.IDAttribute; + +public class ImageDesignMessage extends ObjControllerObject { + + private long designerId; + private long targetId; + private long objectId; + private byte unkByte; + private String hair; + private String unk; + private int sessionId; + private int moneyDemanded; + private int moneyOffered; + private boolean designerCommited; + private boolean customerAccepted; + private byte flagStatMigration; + + private int bodyFormSkill1; + private int faceFormSkill1; + private int bodyFormSkill2; + private int faceFormSkill2; + + private String holoEmote; + + private Vector bodyAttributes; + private Vector colorAttributes; + + private boolean endMessage; + + public ImageDesignMessage() { } + + public ImageDesignMessage(long objectId, long designerId, long targetId) { + this.objectId = objectId; + this.designerId = designerId; + this.targetId = targetId; + } + + @Override + public void deserialize(IoBuffer data) { + + setObjectId(data.getLong()); + data.getInt(); + setDesignerId(data.getLong()); + setTargetId(data.getLong()); + data.getLong(); // tent id + + setUnkByte(data.get()); + setHair(getAsciiString(data)); + + setUnk(getAsciiString(data)); + data.getInt(); // timer + setSessionId(data.getInt()); + setMoneyDemanded(data.getInt()); + setMoneyOffered(data.getInt()); + setDesignerCommited((boolean) ((data.get() == 1) ? true : false)); + setCustomerAccepted((boolean) ((data.getInt() == 1) ? true : false)); + + setBodyFormSkill1(data.getInt()); + setFaceFormSkill1(data.getInt()); + + setBodyFormSkill2(data.getInt()); + setFaceFormSkill2(data.getInt()); + + int bodyAttributesSize = data.getInt(); + + if (bodyAttributesSize > 0) { + Vector bodyAttributes = new Vector(); + + for (int i = 0; i < bodyAttributesSize; i++) { + + IDAttribute atr = new IDAttribute(); + + atr.setName(getAsciiString(data)); + atr.setFloatValue(data.getFloat()); + + bodyAttributes.add(atr); + } + setBodyAttributes(bodyAttributes); + } + + int colorAttributesSize = data.getInt(); + + if (colorAttributesSize > 0) { + Vector colorAttributes = new Vector(); + + for (int i = 0; i < colorAttributesSize; i++) { + + IDAttribute atr = new IDAttribute(); + + atr.setName(getAsciiString(data)); + atr.setValue(data.getInt()); + + colorAttributes.add(atr); + } + setColorAttributes(colorAttributes); + } + + setHoloEmote(getAsciiString(data)); + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + if (endMessage) + buffer.putInt(ObjControllerMessage.IMAGE_DESIGN_END); + else + buffer.putInt(ObjControllerMessage.IMAGE_DESIGN_CHANGE); + + buffer.putLong(objectId); + buffer.putInt(0); + + buffer.putLong(designerId); + buffer.putLong(targetId); + buffer.putLong(0); // tent id + + buffer.put(unkByte); + if (hair != null) + buffer.put(getAsciiString(hair)); + else + buffer.putShort((short) 0); + + if (unk != null) + buffer.put(getAsciiString(unk)); + else + buffer.putShort((short) 0); + + buffer.putInt(0); // timer + + buffer.putInt(sessionId); + + buffer.putInt(moneyDemanded); + buffer.putInt(moneyOffered); + + buffer.put((byte) ((designerCommited) ? 1 : 0)); + buffer.putInt((int) ((customerAccepted) ? 1 : 0)); + + buffer.putInt(bodyFormSkill1); + buffer.putInt(faceFormSkill1); + buffer.putInt(bodyFormSkill2); + buffer.putInt(faceFormSkill2); + + if(bodyAttributes != null && bodyAttributes.size() > 0) { + buffer.putInt(bodyAttributes.size()); + for (IDAttribute atr : bodyAttributes) { + buffer.put(getAsciiString(atr.getName())); + buffer.putFloat(atr.getFloatValue()); + } + } else { + buffer.putInt(0); + } + + if (colorAttributes != null && colorAttributes.size() > 0) { + buffer.putInt(colorAttributes.size()); + for (IDAttribute atr : colorAttributes) { + buffer.put(getAsciiString(atr.getName())); + buffer.putInt(atr.getValue()); + } + } else { + buffer.putInt(0); + } + + if (holoEmote != null) + buffer.put(getAsciiString(holoEmote)); + else + buffer.putShort((short) 0); + + return buffer.flip(); + } + + public long getDesignerId() { + return designerId; + } + + public void setDesignerId(long designerId) { + this.designerId = designerId; + } + + public long getTargetId() { + return targetId; + } + + public void setTargetId(long targetId) { + this.targetId = targetId; + } + + public long getObjectId() { + return objectId; + } + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + public byte getUnkByte() { + return unkByte; + } + + public void setUnkByte(byte unkByte) { + this.unkByte = unkByte; + } + + public String getHair() { + return hair; + } + + public void setHair(String hair) { + this.hair = hair; + } + + public String getUnk() { + return unk; + } + + public void setUnk(String unk) { + this.unk = unk; + } + + public int getSessionId() { + return sessionId; + } + + public void setSessionId(int sessionId) { + this.sessionId = sessionId; + } + + public int getMoneyDemanded() { + return moneyDemanded; + } + + public void setMoneyDemanded(int moneyDemanded) { + this.moneyDemanded = moneyDemanded; + } + + public int getMoneyOffered() { + return moneyOffered; + } + + public void setMoneyOffered(int moneyOffered) { + this.moneyOffered = moneyOffered; + } + + public boolean isDesignerCommited() { + return designerCommited; + } + + public void setDesignerCommited(boolean designerCommited) { + this.designerCommited = designerCommited; + } + + public boolean isCustomerAccepted() { + return customerAccepted; + } + + public void setCustomerAccepted(boolean customerAccepted) { + this.customerAccepted = customerAccepted; + } + + public byte getFlagStatMigration() { + return flagStatMigration; + } + + public void setFlagStatMigration(byte flagStatMigration) { + this.flagStatMigration = flagStatMigration; + } + + public int getBodyFormSkill1() { + return bodyFormSkill1; + } + + public void setBodyFormSkill1(int bodyFormSkill1) { + this.bodyFormSkill1 = bodyFormSkill1; + } + + public int getFaceFormSkill1() { + return faceFormSkill1; + } + + public void setFaceFormSkill1(int faceFormSkill1) { + this.faceFormSkill1 = faceFormSkill1; + } + + public int getBodyFormSkill2() { + return bodyFormSkill2; + } + + public void setBodyFormSkill2(int bodyFormSkill2) { + this.bodyFormSkill2 = bodyFormSkill2; + } + + public int getFaceFormSkill2() { + return faceFormSkill2; + } + + public void setFaceFormSkill2(int faceFormSkill2) { + this.faceFormSkill2 = faceFormSkill2; + } + + public String getHoloEmote() { + return holoEmote; + } + + public void setHoloEmote(String holoEmote) { + this.holoEmote = holoEmote; + } + + public Vector getBodyAttributes() { + return bodyAttributes; + } + + public void setBodyAttributes(Vector bodyAttributes) { + this.bodyAttributes = bodyAttributes; + } + + public Vector getColorAttributes() { + return colorAttributes; + } + + public void setColorAttributes(Vector colorAttributes) { + this.colorAttributes = colorAttributes; + } + + public boolean isEndMessage() { + return endMessage; + } + + public void setEndMessage(boolean endMessage) { + this.endMessage = endMessage; + } + +} diff --git a/src/protocol/swg/objectControllerObjects/ImageDesignStartMessage.java b/src/protocol/swg/objectControllerObjects/ImageDesignStartMessage.java new file mode 100644 index 00000000..fdada211 --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/ImageDesignStartMessage.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.ObjControllerMessage; + +public class ImageDesignStartMessage extends ObjControllerObject { + + private long objectId; + private long designer; + private long target; + + public ImageDesignStartMessage(long objectId, long designer, long target) { + this.designer = designer; + this.target = target; + this.objectId = objectId; + } + + @Override + public void deserialize(IoBuffer data) { + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(46).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putInt(ObjControllerMessage.IMAGE_DESIGN_START); + buffer.putLong(objectId); + + buffer.putInt(0); + buffer.putLong(designer); + buffer.putLong(target); + buffer.putLong(0); + buffer.putShort((short) 0); + return buffer.flip(); + } + +} diff --git a/src/protocol/swg/objectControllerObjects/MissionListRequest.java b/src/protocol/swg/objectControllerObjects/MissionListRequest.java index 6a2878cd..5e7aa208 100644 --- a/src/protocol/swg/objectControllerObjects/MissionListRequest.java +++ b/src/protocol/swg/objectControllerObjects/MissionListRequest.java @@ -21,11 +21,8 @@ ******************************************************************************/ package protocol.swg.objectControllerObjects; -import java.nio.ByteOrder; - import org.apache.mina.core.buffer.IoBuffer; -import protocol.swg.ObjControllerMessage; import resources.common.Console; import resources.common.StringUtilities; diff --git a/src/protocol/swg/objectControllerObjects/NpcConversationMessage.java b/src/protocol/swg/objectControllerObjects/NpcConversationMessage.java new file mode 100644 index 00000000..eceff19c --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/NpcConversationMessage.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.ObjControllerMessage; +import resources.common.OutOfBand; + +public class NpcConversationMessage extends ObjControllerObject { + + private long objectId; + private OutOfBand outOfBand; + + public NpcConversationMessage(long objectId, OutOfBand outOfBand) { + this.objectId = objectId; + this.outOfBand = outOfBand; + outOfBand.setHeaderBytes(2); + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + IoBuffer outOfBandBuffer = outOfBand.serialize(); + IoBuffer buffer = IoBuffer.allocate(16 + outOfBandBuffer.array().length).order(ByteOrder.LITTLE_ENDIAN); + buffer.putInt(ObjControllerMessage.CONVERSATION_MESSAGE); + buffer.putLong(objectId); + buffer.putInt(0); + buffer.put(outOfBandBuffer.array()); + return buffer.flip(); + } + +} diff --git a/src/resources/z/exp/gcw/CurrentServerGCWZoneHistory.java b/src/protocol/swg/objectControllerObjects/NpcConversationOptions.java similarity index 53% rename from src/resources/z/exp/gcw/CurrentServerGCWZoneHistory.java rename to src/protocol/swg/objectControllerObjects/NpcConversationOptions.java index 3171a5eb..092b2556 100644 --- a/src/resources/z/exp/gcw/CurrentServerGCWZoneHistory.java +++ b/src/protocol/swg/objectControllerObjects/NpcConversationOptions.java @@ -19,59 +19,47 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.gcw; +package protocol.swg.objectControllerObjects; import java.nio.ByteOrder; +import java.util.Vector; import org.apache.mina.core.buffer.IoBuffer; -import com.sleepycat.persist.model.Persistent; - +import protocol.swg.ObjControllerMessage; +import resources.common.ConversationOption; import resources.objects.Delta; -@Persistent -public class CurrentServerGCWZoneHistory extends Delta implements Cloneable { +public class NpcConversationOptions extends ObjControllerObject { - private int lastUpdateTime; - private int percent; - - public CurrentServerGCWZoneHistory(CurrentServerGCWZonePercent zone) { - this.percent = zone.getPercent().intValue(); - this.lastUpdateTime = zone.getLastUpdateTime(); - } - - public CurrentServerGCWZoneHistory() { - - } - - public int getLastUpdateTime() { - synchronized(objectMutex) { - return lastUpdateTime; - } + private long objectId; + private Vector conversationOptions = new Vector(); + + public NpcConversationOptions(long objectId) { + this.objectId = objectId; } - public int getPercent() { - synchronized(objectMutex) { - return percent; - } + @Override + public void deserialize(IoBuffer data) { } - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate((8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(lastUpdateTime); - buffer.putInt(percent); - return buffer.array(); - } + public void addOption(ConversationOption option) { + conversationOptions.add(option); } - - public CurrentServerGCWZoneHistory clone() { - try { - return (CurrentServerGCWZoneHistory) super.clone(); - } catch (CloneNotSupportedException e) { - e.printStackTrace(); - return null; + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(17).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putInt(ObjControllerMessage.CONVERSATION_OPTIONS); + buffer.putLong(objectId); + buffer.putInt(0); + buffer.put((byte) conversationOptions.size()); + for (ConversationOption option : conversationOptions) { + option.getOutOfBand().setHeaderBytes(2); + buffer.put(option.getOutOfBand().serialize().array()); } + return Delta.resizeBuffer(buffer); } - + } diff --git a/src/protocol/swg/objectControllerObjects/ObjectMenuResponse.java b/src/protocol/swg/objectControllerObjects/ObjectMenuResponse.java index 1d1ae2c5..fd833068 100644 --- a/src/protocol/swg/objectControllerObjects/ObjectMenuResponse.java +++ b/src/protocol/swg/objectControllerObjects/ObjectMenuResponse.java @@ -59,41 +59,31 @@ public class ObjectMenuResponse extends ObjControllerObject { @Override public IoBuffer serialize() { + int size = 37; + byte counter = 0; - IoBuffer result = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); - result.setAutoExpand(true); + for (RadialOptions radialOption : radialOptions) { + size += 5 + getUnicodeString(radialOption.getDescription()).length; + } + IoBuffer result = IoBuffer.allocate(size).order(ByteOrder.LITTLE_ENDIAN); result.putInt(ObjControllerMessage.OBJECT_MENU_RESPONSE); result.putLong(ownerId); result.putInt(0); result.putLong(targetId); result.putLong(ownerId); - - int size = radialOptions.size(); - result.putInt(size); - - if(size > 0) { - byte counter = 0; - for(RadialOptions radialOption : radialOptions) { - result.put(++counter); - result.put(radialOption.getParentId()); - result.putShort(radialOption.getOptionId()); - //result.put(radialOption.getOptionType()); - result.put((byte) 3); - - if(radialOption.getDescription().length() > 0) - result.put(getUnicodeString(radialOption.getDescription())); - else - result.putInt(0); - - } + result.putInt(radialOptions.size()); + for (RadialOptions radialOption : radialOptions) { + result.put(++counter); + result.put(radialOption.getParentId()); + result.putShort(radialOption.getOptionId()); + //result.put(radialOption.getOptionType()); + result.put((byte) 3); + result.put(getUnicodeString(radialOption.getDescription())); } result.put(radialCount); - int packetSize = result.position(); - result = IoBuffer.allocate(packetSize).put(result.array(), 0, packetSize); return result.flip(); - } } diff --git a/src/protocol/swg/objectControllerObjects/Posture.java b/src/protocol/swg/objectControllerObjects/Posture.java index c08ffaad..905a66b3 100644 --- a/src/protocol/swg/objectControllerObjects/Posture.java +++ b/src/protocol/swg/objectControllerObjects/Posture.java @@ -47,9 +47,9 @@ public class Posture extends ObjControllerObject { result.putInt(ObjControllerMessage.POSTURE); result.putLong(objectId); - result.putInt(0); //unk + result.putInt(0); // tick count ? result.put((byte) posture); - result.put((byte) 0); + result.put((byte) 0); // seen also as 1 return result.flip(); } diff --git a/src/protocol/swg/objectControllerObjects/SecureTrade.java b/src/protocol/swg/objectControllerObjects/SecureTrade.java index e621072f..3f48253c 100644 --- a/src/protocol/swg/objectControllerObjects/SecureTrade.java +++ b/src/protocol/swg/objectControllerObjects/SecureTrade.java @@ -1,3 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ package protocol.swg.objectControllerObjects; import java.nio.ByteOrder; @@ -27,8 +48,7 @@ public class SecureTrade extends ObjControllerObject{ @Override public IoBuffer serialize() { - IoBuffer result = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); - result.setAutoExpand(true); + IoBuffer result = IoBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN); result.putInt(ObjControllerMessage.SPACIAL_CHAT); result.putInt(1); diff --git a/src/protocol/swg/objectControllerObjects/SetProfessionTemplate.java b/src/protocol/swg/objectControllerObjects/SetProfessionTemplate.java new file mode 100644 index 00000000..f9c0bb77 --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/SetProfessionTemplate.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; + +import org.apache.mina.core.buffer.IoBuffer; + +public class SetProfessionTemplate extends ObjControllerObject { + + private String profession; + + @Override + public void deserialize(IoBuffer data) { + data.getLong(); + data.getInt(); + short size = data.getShort(); + try { + profession = new String(ByteBuffer.allocate(size).put(data.array(), data.position(), size).array(), "US-ASCII"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + data.position(data.position() + size); + } + + @Override + public IoBuffer serialize() { + // TODO Auto-generated method stub + return null; + } + + public String getProfession() { + return profession; + } + + public void setProfession(String profession) { + this.profession = profession; + } + +} diff --git a/src/protocol/swg/objectControllerObjects/ShowFlyText.java b/src/protocol/swg/objectControllerObjects/ShowFlyText.java index 41325368..39530a87 100644 --- a/src/protocol/swg/objectControllerObjects/ShowFlyText.java +++ b/src/protocol/swg/objectControllerObjects/ShowFlyText.java @@ -26,50 +26,28 @@ import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; import protocol.swg.ObjControllerMessage; +import resources.common.OutOfBand; import resources.common.RGB; +import resources.common.Stf; public class ShowFlyText extends ObjControllerObject { - private long recieverId; + private long receiverId; private long objectId; - private int unknownInt1; - private short unknownShort1; - private byte unknownByte1; - private int unknownInt2; - private String stfFile; - private String stfString; - private short xp; + private Stf stf; + private OutOfBand outOfBand; private float scale; private RGB color; private int displayType; - private boolean alternativeStructure; - private String customText; - public ShowFlyText(long recieverId, long objectId, String stfFile, String stfString, float scale, RGB color, int displayType) { - this.recieverId = recieverId; + public ShowFlyText(long receiverId, long objectId, String stf, OutOfBand outOfBand, float scale, RGB color, int displayType) { + this.receiverId = receiverId; this.objectId = objectId; - this.stfFile = stfFile; - this.stfString = stfString; + this.stf = new Stf(stf); + this.outOfBand = outOfBand; this.scale = scale; this.color = color; this.displayType = displayType; - this.alternativeStructure = false; - } - - public ShowFlyText(long recieverId, long objectId, int unknownInt1, int unknownShort1, int unknownByte1, int unknownInt2, String stfFile, String stfString, String customText, int xp, float scale, RGB color, int displayType) { - this.recieverId = recieverId; - this.objectId = objectId; - this.unknownInt1 = unknownInt1; - this.unknownShort1 = (short) unknownShort1; - this.unknownByte1 = (byte) unknownByte1; - this.unknownInt2 = unknownInt2; - this.stfFile = stfFile; - this.stfString = stfString; - this.customText = customText; - this.xp = (short) xp; - this.scale = scale; - this.color = color; - this.alternativeStructure = true; } @Override @@ -80,51 +58,20 @@ public class ShowFlyText extends ObjControllerObject { @Override public IoBuffer serialize() { - if (!alternativeStructure) { - IoBuffer result = IoBuffer.allocate(47 + stfFile.length() + stfString.length()).order(ByteOrder.LITTLE_ENDIAN); - result.setAutoExpand(true); - result.putInt(ObjControllerMessage.SHOW_FLY_TEXT); - result.putLong(recieverId); - result.putInt(0); - result.putLong(objectId); - result.put(getAsciiString(stfFile)); - result.putInt(0); - result.put(getAsciiString(stfString)); - result.putInt(0); - result.putFloat(scale); - result.put(color.getBytes()); - result.putInt(displayType); - return result.flip(); - } else { - IoBuffer result = IoBuffer.allocate(124 + stfFile.length() + stfString.length()).order(ByteOrder.LITTLE_ENDIAN); - result.setAutoExpand(true); - result.putInt(ObjControllerMessage.SHOW_FLY_TEXT); - result.putLong(recieverId); - result.putInt(0); - result.putLong(objectId); - result.putLong(0); - result.putInt(unknownInt1); - result.putShort(unknownShort1); - result.put(unknownByte1); - result.putInt(unknownInt2); - result.put(getAsciiString(stfFile)); - result.putInt(0); - result.put(getAsciiString(stfString)); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.putLong(0); - result.put(getUnicodeString(customText)); - result.putShort(xp); - result.putLong(0); - result.putFloat(scale); - result.put(color.getBytes()); - result.putInt(displayType); - return result.flip(); - } + IoBuffer outOfBandBuffer = outOfBand.serialize(); + IoBuffer result = IoBuffer.allocate(35 + outOfBandBuffer.array().length).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + result.putInt(ObjControllerMessage.SHOW_FLY_TEXT); + result.putLong(receiverId); + result.putInt(0); + result.putLong(objectId); + result.put(stf.getBytes()); + result.put(outOfBandBuffer.array()); + result.putFloat(scale); + result.put(color.getBytes()); + result.putInt(displayType); + result.flip(); + return result; } } diff --git a/src/protocol/swg/objectControllerObjects/ShowLootBox.java b/src/protocol/swg/objectControllerObjects/ShowLootBox.java new file mode 100644 index 00000000..c20121a3 --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/ShowLootBox.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; +import java.util.Vector; + +import org.apache.mina.core.buffer.IoBuffer; + +import engine.resources.objects.SWGObject; +import protocol.swg.ObjControllerMessage; + +public class ShowLootBox extends ObjControllerObject { + + private long playerId; + private Vector rewards; + private SWGObject reward; + + public ShowLootBox(long playerId, SWGObject reward) { + this.playerId = playerId; + this.reward = reward; + } + + public ShowLootBox(long playerId, Vector rewards) { + this.playerId = playerId; + this.rewards = rewards; + } + + @Override + public void deserialize(IoBuffer data) { + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer; + + if (rewards != null) + buffer = IoBuffer.allocate(20 + (rewards.size() * 8)).order(ByteOrder.LITTLE_ENDIAN); + + else + buffer = IoBuffer.allocate(28).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putInt(ObjControllerMessage.SHOW_LOOT_BOX); + buffer.putLong(playerId); + + buffer.putInt(0); // 1 for a black background on icon, 0 or 2 for transparent (default) + + if (rewards == null) { + buffer.putInt(1); + buffer.putLong(reward.getObjectId()); + } else { + buffer.putInt(rewards.size()); + for(SWGObject obj : rewards) { + buffer.putLong(obj.getObjectID()); + } + } + return buffer.flip(); + } + +} diff --git a/src/protocol/swg/objectControllerObjects/SpatialChat.java b/src/protocol/swg/objectControllerObjects/SpatialChat.java index 1d2ac34e..bf86de8f 100644 --- a/src/protocol/swg/objectControllerObjects/SpatialChat.java +++ b/src/protocol/swg/objectControllerObjects/SpatialChat.java @@ -26,12 +26,12 @@ import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; import protocol.swg.ObjControllerMessage; +import resources.common.OutOfBand; @SuppressWarnings("unused") - public class SpatialChat extends ObjControllerObject { - private long audienceId; + private long destinationId; private long sourceId; private long targetId; private String chatMessage; @@ -40,15 +40,19 @@ public class SpatialChat extends ObjControllerObject { private short balloonType = 1; private short chatType; private short moodId; + private byte languageId = 1; + private OutOfBand outOfBand; - public SpatialChat(long sourceId, long targetId, String chatMessage, short chatType, short moodId) { + public SpatialChat(long destinationId, long sourceId, long targetId, String chatMessage, short chatType, short moodId, int languageId, OutOfBand outOfBand) { try { - this.audienceId = sourceId; + this.destinationId = destinationId; this.sourceId = sourceId; this.targetId = targetId; this.chatMessage = chatMessage; this.chatType = chatType; this.moodId = moodId; + this.languageId = (byte) languageId; + this.outOfBand = ((outOfBand == null) ? new OutOfBand() : outOfBand); /*String[] chatMessageParse = chatMessage.split(" ", 6); @@ -62,19 +66,20 @@ public class SpatialChat extends ObjControllerObject { } } - public void setDestinationId(long audienceId) { - this.audienceId = audienceId; + public void setDestinationId(long destinationId) { + this.destinationId = destinationId; } - + public void deserialize(IoBuffer data) { } public IoBuffer serialize() { - IoBuffer result = IoBuffer.allocate(55 + chatMessage.length() * 2).order(ByteOrder.LITTLE_ENDIAN); - + outOfBand.setHeaderBytes(2); + IoBuffer outOfBandBuffer = outOfBand.serialize(); + IoBuffer result = IoBuffer.allocate(51 + (chatMessage.length() * 2) + outOfBandBuffer.array().length).order(ByteOrder.LITTLE_ENDIAN); result.putInt(ObjControllerMessage.SPACIAL_CHAT); - result.putLong(audienceId); + result.putLong(destinationId); result.putInt(0); result.putLong(sourceId); result.putLong(targetId); @@ -83,11 +88,9 @@ public class SpatialChat extends ObjControllerObject { result.putShort((short) 0x32); result.putShort(chatType); result.putShort(moodId); - result.put((byte) 1); - + result.put(languageId); result.putInt(0); - result.putInt(0); - + result.put(outOfBandBuffer.array()); return result.flip(); } diff --git a/src/protocol/swg/objectControllerObjects/StartNpcConversation.java b/src/protocol/swg/objectControllerObjects/StartNpcConversation.java new file mode 100644 index 00000000..a696ca70 --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/StartNpcConversation.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.ObjControllerMessage; + +public class StartNpcConversation extends ObjControllerObject { + + private long npcId; + private long objectId; + + public StartNpcConversation(long objectId, long npcId) { + this.objectId = objectId; + this.npcId = npcId; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(31).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putInt(ObjControllerMessage.START_CONVERSATION); + buffer.putLong(objectId); + + buffer.putInt(0); + buffer.putLong(npcId); + buffer.putInt(0); + buffer.putShort((short) 0); + buffer.put((byte) 0); + + return buffer.flip(); + } + +} diff --git a/src/protocol/swg/objectControllerObjects/StopNpcConversation.java b/src/protocol/swg/objectControllerObjects/StopNpcConversation.java new file mode 100644 index 00000000..4690140d --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/StopNpcConversation.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.ObjControllerMessage; + +public class StopNpcConversation extends ObjControllerObject { + + private long npcId; + private long objectId; + private String stfFile; + private String stfLabel; + + public StopNpcConversation(long objectId, long npcId, String stfFile, String stfLabel) { + this.objectId = objectId; + this.npcId = npcId; + this.stfFile = stfFile; + this.stfLabel = stfLabel; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(40 + stfFile.length() + stfLabel.length()).order(ByteOrder.LITTLE_ENDIAN); + + buffer.putInt(ObjControllerMessage.STOP_CONVERSATION); + buffer.putLong(objectId); + + buffer.putInt(0); + buffer.putLong(npcId); + buffer.put(getAsciiString(stfFile)); + buffer.putInt(0); + buffer.put(getAsciiString(stfLabel)); + buffer.putLong(0); + + return buffer.flip(); + } +} diff --git a/src/protocol/swg/objectControllerObjects/TargetUpdate.java b/src/protocol/swg/objectControllerObjects/TargetUpdate.java index bfac2b1b..bd01c8a8 100644 --- a/src/protocol/swg/objectControllerObjects/TargetUpdate.java +++ b/src/protocol/swg/objectControllerObjects/TargetUpdate.java @@ -39,7 +39,7 @@ public class TargetUpdate extends ObjControllerObject { @Override public IoBuffer serialize() { - // TODO Auto-generated method stub + return null; } diff --git a/src/protocol/swg/objectControllerObjects/UiPlayEffect.java b/src/protocol/swg/objectControllerObjects/UiPlayEffect.java new file mode 100644 index 00000000..a4b776fd --- /dev/null +++ b/src/protocol/swg/objectControllerObjects/UiPlayEffect.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package protocol.swg.objectControllerObjects; + +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import protocol.swg.ObjControllerMessage; + +public class UiPlayEffect extends ObjControllerObject { + + private long objectId; + private String uiString; + + public UiPlayEffect(long objectId, String uiString) { + this.uiString = uiString; + this.objectId = objectId; + } + + @Override + public void deserialize(IoBuffer data) { + // TODO Auto-generated method stub + + } + + @Override + public IoBuffer serialize() { + + IoBuffer result = IoBuffer.allocate(26 + uiString.length()).order(ByteOrder.LITTLE_ENDIAN); + + result.putInt(ObjControllerMessage.UI_PLAY_EFFECT); + result.putLong(objectId); + result.putInt(0); + result.putLong(objectId); + result.put(getAsciiString(uiString)); + + return result.flip(); + + } +} diff --git a/src/resources/common/BuffBuilder.java b/src/resources/common/BuffBuilder.java index c376ae5a..83b2d9fb 100644 --- a/src/resources/common/BuffBuilder.java +++ b/src/resources/common/BuffBuilder.java @@ -1,70 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ package resources.common; public class BuffBuilder { - private String statName; - private String statAffects; - private int maxTimesApplied; private int affectAmount; - private String requiredExperience; - - private int entBonus; - + private String category; + private int cost; + private int maxTimesApplied; + private String requiredExpertise; + private String statAffects; + private String statName; + public BuffBuilder() { - - } - public String getStatName() { - return statName; - } - - public void setStatName(String statName) { - this.statName = statName; - } - - public String getStatAffects() { - return statAffects; - } - - public void setStatAffects(String statAffects) { - this.statAffects = statAffects; - } - - public int getMaxTimesApplied() { - return maxTimesApplied; - } - - public void setMaxTimesApplied(int maxTimesApplied) { - this.maxTimesApplied = maxTimesApplied; } public int getAffectAmount() { return affectAmount; } + public String getCategory() { + return category; + } + + public int getCost() { + return this.cost; + } + + public int getMaxTimesApplied() { + return maxTimesApplied; + } + + public String getRequiredExpertise() { + return requiredExpertise; + } + + public String getStatAffects() { + return statAffects; + } + + public String getStatName() { + return statName; + } + public void setAffectAmount(int affectAmount) { this.affectAmount = affectAmount; } - public String getRequiredExperience() { - return requiredExperience; + public void setCategory(String category) { + this.category = category; } - public void setRequiredExperience(String requiredExperience) { - this.requiredExperience = requiredExperience; - } - - public int getTotalAffected() { - // 10 * 10 = 100 - int totalAffected = getMaxTimesApplied() * getAffectAmount(); - Console.println("Total Affected: " + totalAffected + getEntBonus()); - return totalAffected + getEntBonus(); + public void setCost(int cost) { + this.cost = cost; } - public int getEntBonus() { - return entBonus; + public void setMaxTimesApplied(int maxTimesApplied) { + this.maxTimesApplied = maxTimesApplied; } - public void setEntBonus(int entBonus) { - this.entBonus = entBonus; + public void setRequiredExpertise(String requiredExpertise) { + this.requiredExpertise = requiredExpertise; + } + + public void setStatAffects(String statAffects) { + this.statAffects = statAffects; + } + + public void setStatName(String statName) { + this.statName = statName; } } diff --git a/src/resources/common/ConversationOption.java b/src/resources/common/ConversationOption.java new file mode 100644 index 00000000..840fdcba --- /dev/null +++ b/src/resources/common/ConversationOption.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.common; + +public class ConversationOption { + + private OutOfBand outOfBand; + private int index; + + public ConversationOption(OutOfBand outOfBand, int index) { + this.setOutOfBand(outOfBand); + this.setIndex(index); + } + + public OutOfBand getOutOfBand() { + return outOfBand; + } + + public void setOutOfBand(OutOfBand outOfBand) { + this.outOfBand = outOfBand; + } + + public int getIndex() { + return index; + } + + public void setIndex(int index) { + this.index = index; + } + +} diff --git a/src/resources/common/Cooldown.java b/src/resources/common/Cooldown.java new file mode 100644 index 00000000..2c7e2240 --- /dev/null +++ b/src/resources/common/Cooldown.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.common; + +import java.util.concurrent.ScheduledFuture; + +public class Cooldown { + private long startTimestamp; + private long endTimestamp; + + private ScheduledFuture removalTask; + + public Cooldown(long end) { + startTimestamp = System.currentTimeMillis(); + endTimestamp = startTimestamp + end; + } + + public long getStartTimestamp() { + return startTimestamp; + } + + public void setStartTimestamp(long startTimestamp) { + this.startTimestamp = startTimestamp; + } + + public long getEndTimestamp() { + return endTimestamp; + } + + public void setEndTimestamp(long endTimestamp) { + this.endTimestamp = endTimestamp; + } + + public ScheduledFuture getRemovalTask() { + return removalTask; + } + + public void setRemovalTask(ScheduledFuture removalTask) { + this.removalTask = removalTask; + } +} diff --git a/src/resources/z/exp/objects/harvester/HarvesterObject.java b/src/resources/common/IDAttribute.java similarity index 67% rename from src/resources/z/exp/objects/harvester/HarvesterObject.java rename to src/resources/common/IDAttribute.java index a09905cb..b17edf9d 100644 --- a/src/resources/z/exp/objects/harvester/HarvesterObject.java +++ b/src/resources/common/IDAttribute.java @@ -16,11 +16,41 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.harvester; +package resources.common; -public class HarvesterObject { +public class IDAttribute { -} + private float floatValue; + private String name; + private int value; + + public IDAttribute() { } + + public float getFloatValue() { + return floatValue; + } + + public String getName() { + return name; + } + + public int getValue() { + return value; + } + + public void setFloatValue(float floatValue) { + this.floatValue = floatValue; + } + + public void setName(String name) { + this.name = name; + } + + public void setValue(int value) { + this.value = value; + } + +} \ No newline at end of file diff --git a/src/resources/common/MathUtilities.java b/src/resources/common/MathUtilities.java index 8cf73cc0..8decf30b 100644 --- a/src/resources/common/MathUtilities.java +++ b/src/resources/common/MathUtilities.java @@ -21,6 +21,8 @@ ******************************************************************************/ package resources.common; +import java.math.BigDecimal; + import engine.resources.scene.*; public class MathUtilities { @@ -43,5 +45,27 @@ public class MathUtilities { q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); } + + /** + * Converts seconds to a whole hour. + * @author Waverunner + * @param seconds + * @return hour(s) + */ + public static int secondsToWholeHours(int seconds) { + BigDecimal dec = new BigDecimal(seconds); + return dec.divide(new BigDecimal(3600), BigDecimal.ROUND_FLOOR).intValue(); + } + + /** + * Converts seconds to minutes of the hour. + * @author Waverunner + * @param seconds + * @return hour(s) + */ + public static int secondsToHourMinutes(int seconds) { + BigDecimal dec = new BigDecimal(seconds); + return dec.remainder(new BigDecimal(3600)).divide(new BigDecimal(60), BigDecimal.ROUND_FLOOR).intValue(); + } } diff --git a/src/resources/common/ObjControllerOpcodes.java b/src/resources/common/ObjControllerOpcodes.java index 7d6e6b21..8cc142fd 100644 --- a/src/resources/common/ObjControllerOpcodes.java +++ b/src/resources/common/ObjControllerOpcodes.java @@ -26,12 +26,33 @@ public class ObjControllerOpcodes { public static final int DATA_TRANSFORM = 0x71000000; public static final int DATA_TRANSFORM_WITH_PARENT = 0xF1000000; public static final int COMMAND_QUEUE_ENQUEUE = 0x16010000; - public static final int HOVER_TARGET = 0x26010000; // lookAtTarget - public static final int TARGET_UPDATE = 0xC5040000; // intendedTarget + public static final int COMMAND_QUEUE_REMOVE = 0x17010000; + public static final int lookAtTarget = 0x26010000; + public static final int intendedTarget = 0xC5040000; public static final int OBJECT_MENU_REQUEST = 0x46010000; public static final int SECURE_TRADE = 0x15010000; public static final int BUFF_BUILDER_CHANGE = 0x5A020000; + public static final int BUFF_BUILDER_END = 0x5B020000; public static final int MISSION_LIST_REQUEST = 0xF5000000; public static final int ChangeRoleIconChoice = 0x4D040000; + public static final int IMAGE_DESIGN_CHANGE = 0x38020000; + public static final int IMAGE_DESIGN_END = 0x39020000; + public static final int NPC_CONVERSATION_MESSAGE = 0xDF000000; + public static final int START_NPC_CONVERSATION = 0xDD000000; + public static final int STOP_NPC_CONVERSATION = 0xDE000000; + public static final int NPC_CONVERSATION_OPTIONS = 0xE0000000; + public static final int SET_PROFESSION_TEMPLATE = 0x5C040000; + public static final int RESOURCE_EMPTY_HOPPER = 0xED000000; + public static final int DRAFT_SCHEMATICS = 0x0102; + public static final int DRAFT_SLOTS = 0x0103; + public static final int CRAFT_EXPERIMENT = 0x0106; + public static final int CRAFT_FILLSLOT = 0x7010000; + public static final int CRAFT_EMPTYSLOT = 0x8010000; + public static final int CRAFT_ACKNOWLEDGE = 0x010C; + public static final int CRAFT_CUSTOMIZATION = 0x5a010000; + public static final int NEXT_CRAFTING_STAGE_RESULT = 0x01BE; + public static final int DRAFT_SLOTS_QUERY_RESPONSE = 0x01BF; + public static final int RESOURCE_WEIGHTS = 0x0207; + } diff --git a/src/resources/common/Opcodes.java b/src/resources/common/Opcodes.java index b9284791..8a8cc6d8 100644 --- a/src/resources/common/Opcodes.java +++ b/src/resources/common/Opcodes.java @@ -25,12 +25,21 @@ import engine.resources.common.CRC; public class Opcodes { + public static int AuctionQueryHeadersMessage = CRC.StringtoCRC("AuctionQueryHeadersMessage"); + public static int CreateImmediateAuctionMessage = CRC.StringtoCRC("CreateImmediateAuctionMessage"); + public static int ChatLeaveRoom = 0x493E3FFA; + public static int ChatEnterRoomById = CRC.StringtoCRC("ChatEnterRoomById"); + public static int ChatSendToRoom = CRC.StringtoCRC("ChatSendToRoom"); public static int ChatDeletePersistentMessage = 0x8F251641; public static int ChatInstantMessageToCharacter = 0x84BB21F7; public static int ChatPersistentMessageToServer = 0x25A29FA6; public static int ChatRequestPersistentMessage = 0x07E3559F; + public static int ChatRequestRoomList = 0x4C3D2CFA; public static int ChatSystemMessage = CRC.StringtoCRC("ChatSystemMessage"); public static int ClientOpenContainerMessage = 0x2D2D6EE1; + public static int CommoditiesItemTypeListRequest = 0x48F493C5; + public static int CommoditiesResourceTypeListRequest = 0xCB1AE82D; + public static int NewbieTutorialResponse = 0xCA88FBAD; public static int CmdSceneReady = 0x43FD1C22; public static int ConnectPlayerMessage = 0x2E365218; public static int ClientCreateCharacter = 0xB97F3074; @@ -39,6 +48,7 @@ public class Opcodes { public static int ClientVerifyAndLockNameRequest = 0x9eb04b9f; public static int DeleteCharacterMessage = 0xE87AD031; public static int GetMapLocationsMessage = 0x1A7AB839; + public static int IsVendorOwnerMessage = CRC.StringtoCRC("IsVendorOwnerMessage"); public static int LagRequest = 0x31805EE0; public static int LoginClientId = 0x41131F96; public static int ObjControllerMessage = 0x80CE5E46; @@ -59,5 +69,27 @@ public class Opcodes { public static int FactionRequestMessage = CRC.StringtoCRC("FactionRequestMessage"); public static int FactionResponseMessage = CRC.StringtoCRC("FactionResponseMessage"); public static int SetWaypointColor = CRC.StringtoCRC("SetWaypointColor"); - + public static int GuildRequestMessage = CRC.StringtoCRC("GuildRequestMessage"); + public static int PlayerMoneyRequest = CRC.StringtoCRC("PlayerMoneyRequest"); + public static int LagReport = CRC.StringtoCRC("LagReport"); + public static int GetSpecificMapLocationsMessage = CRC.StringtoCRC("GetSpecificMapLocationsMessage"); + public static int SetCombatSpamFilter = CRC.StringtoCRC("SetCombatSpamFilter"); + public static int SetCombatSpamRangeFilter = CRC.StringtoCRC("SetCombatSpamRangeFilter"); + public static int SetLfgInterests = CRC.StringtoCRC("SetLfgInterests"); + public static int SetFurnitureRoationDegree = CRC.StringtoCRC("SetFurnitureRotationDegree"); + public static int SetJediSlotInfo = CRC.StringtoCRC("SetJediSlotInfo"); + public static int CollectionServerFirstListRequest = CRC.StringtoCRC("CollectionServerFirstListRequest"); + public static int ShowHelmet = CRC.StringtoCRC("ShowHelmet"); + public static int ShowBackpack = CRC.StringtoCRC("ShowBackpack"); + public static int CreateAuctionMessage = CRC.StringtoCRC("CreateAuctionMessage"); + public static int ChatOnEnteredRoom = CRC.StringtoCRC("ChatOnEnteredRoom"); + public static int ChatCreateRoom = CRC.StringtoCRC("ChatCreateRoom"); + public static int ChatQueryRoom = 0x9CF2B192; + public static int Unknown = 0x173B91C2; // packet sent to server on every character load-in + public static int GetAuctionDetails = CRC.StringtoCRC("GetAuctionDetails"); + public static int CancelLiveAuctionMessage = CRC.StringtoCRC("CancelLiveAuctionMessage"); + public static int BidAuctionMessage = CRC.StringtoCRC("BidAuctionMessage"); + public static int RetrieveAuctionItemMessage = CRC.StringtoCRC("RetrieveAuctionItemMessage"); + + } diff --git a/src/resources/common/OutOfBand.java b/src/resources/common/OutOfBand.java new file mode 100644 index 00000000..be36d672 --- /dev/null +++ b/src/resources/common/OutOfBand.java @@ -0,0 +1,133 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.common; + +import java.nio.ByteOrder; +import java.util.Vector; + +import resources.common.StringUtilities; +import resources.objects.Delta; + +import org.apache.mina.core.buffer.IoBuffer; + +public class OutOfBand { + + private Vector prosePackages = new Vector(); + private int headerBytes = 0; + + public OutOfBand(Vector prosePackages) { + setProsePackages(prosePackages); + } + + public OutOfBand(ProsePackage prosePackage) { + addProsePackage(prosePackage); + } + + public OutOfBand() { + + } + + public static OutOfBand ProsePackage(Object ... objects) { + return new OutOfBand(new ProsePackage(objects)); + } + + public void addProsePackage(ProsePackage prosePackage) { + prosePackages.add(prosePackage); + } + + public IoBuffer serialize() { + IoBuffer buffer = IoBuffer.allocate(50).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + // The short that was here is only in conversation OutOfBands. + // Count doesn't seem to be count. It seems to be indicating if there's an extra byte. + + for (ProsePackage prosePackage : prosePackages) { + buffer.put((byte) 1); + buffer.putInt(-1); + buffer.put(prosePackage.getStf().getBytes()); + + buffer.putLong(prosePackage.getTuObjectId()); + buffer.put(prosePackage.getTuStf().getBytes()); + buffer.put(StringUtilities.getUnicodeString(prosePackage.getTuCustomString())); + + buffer.putLong(prosePackage.getTtObjectId()); + buffer.put(prosePackage.getTtStf().getBytes()); + buffer.put(StringUtilities.getUnicodeString(prosePackage.getTtCustomString())); + + buffer.putLong(prosePackage.getToObjectId()); + buffer.put(prosePackage.getToStf().getBytes()); + buffer.put(StringUtilities.getUnicodeString(prosePackage.getToCustomString())); + + buffer.putInt(prosePackage.getDiInteger()); + buffer.putFloat(prosePackage.getDfFloat()); + + buffer.put((byte) 0); + } + + int size = buffer.position(); + + if (size > 0) { + if ((size % 2) == 1) { + size++; + buffer.put((byte) 0); + buffer = Delta.createBuffer(size + 2).putShort((short) 1).put(buffer.flip().array(), 0, size); + } else { + buffer = Delta.createBuffer(size + 2).putShort((short) 0).put(buffer.flip().array(), 0, size); + } + + size += 2; + } else { + return Delta.createBuffer(4).putInt(size); + } + + if (headerBytes > 0) { + IoBuffer result = Delta.createBuffer(size + headerBytes); + + for (int i = 0; i < headerBytes; i++) { + result.put((byte) 0); + } + + buffer = result.put(buffer.flip().array(), 0, size); + size += headerBytes; + } + + return Delta.resizeBuffer(Delta.createBuffer(size + 4).putInt(size / 2).put(buffer.flip().array())); + } + + /* + * No idea what the extra short in conversation OutOfBands is. + * It's not in any of the other packets that use OutOfBand. + */ + public void setHeaderBytes(int headerBytes) { + this.headerBytes = headerBytes; + } + + public Vector getProsePackages() { + return prosePackages; + } + + public void setProsePackages(Vector prosePackages) { + this.prosePackages = prosePackages; + } + +} diff --git a/src/resources/common/Performance.java b/src/resources/common/Performance.java index 9100e2f2..4179f4be 100644 --- a/src/resources/common/Performance.java +++ b/src/resources/common/Performance.java @@ -1,3 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ package resources.common; public class Performance { diff --git a/src/resources/common/PerformanceEffect.java b/src/resources/common/PerformanceEffect.java new file mode 100644 index 00000000..09afddd0 --- /dev/null +++ b/src/resources/common/PerformanceEffect.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.common; + +public class PerformanceEffect { + + private int effectActionCost; + private float effectDuration; + private String name; + private String performanceType; + private boolean requiredPerforming; + private int requiredSkillModValue; + private int targetType; + private boolean music; + private boolean dance; + + public PerformanceEffect() { } + + public int getEffectActionCost() { + return effectActionCost; + } + public float getEffectDuration() { + return effectDuration; + } + public String getName() { + return name; + } + public int getRequiredSkillModValue() { + return requiredSkillModValue; + } + public int getTargetType() { + return targetType; + } + public String getPerformanceType() { + return performanceType; + } + public boolean isRequiredPerforming() { + return requiredPerforming; + } + public void setEffectActionCost(int effectActionCost) { + this.effectActionCost = effectActionCost; + } + public void setEffectDuration(float effectDuration) { + this.effectDuration = effectDuration; + } + public void setName(String name) { + this.name = name; + } + public void setPerformanceType(String performanceType) { + this.performanceType = performanceType; + + if (performanceType.contains(",")) { + String[] array = performanceType.split(","); + if(array.length < 2) + return; + + this.dance = true; + this.music = true; + } + else if (performanceType.equals("music")) { this.music = true; } + else if (performanceType.equals("dance")) { this.dance = true; } + } + public void setRequiredPerforming(boolean requiredPerforming) { + this.requiredPerforming = requiredPerforming; + } + public void setRequiredSkillModValue(int requiredSkillModValue) { + this.requiredSkillModValue = requiredSkillModValue; + } + public void setTargetType(int targetType) { + this.targetType = targetType; + } + + public boolean isMusic() { + return music; + } + + public void setMusic(boolean music) { + this.music = music; + } + + public boolean isDance() { + return dance; + } + + public void setDance(boolean dance) { + this.dance = dance; + } + +} diff --git a/src/resources/common/ProsePackage.java b/src/resources/common/ProsePackage.java new file mode 100644 index 00000000..b461bb8e --- /dev/null +++ b/src/resources/common/ProsePackage.java @@ -0,0 +1,234 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.common; + +public class ProsePackage { + + /* + * TU = Text User + * TT = Text Target + * TO = Text Object + * DI = Decimal Integer + * DF = Decimal Float + */ + + private Stf stf = new Stf(); + + private long tuObjectId = 0; + private Stf tuStf = new Stf(); + private String tuCustomString = ""; + + private long ttObjectId = 0; + private Stf ttStf = new Stf(); + private String ttCustomString = ""; + + private long toObjectId = 0; + private Stf toStf = new Stf(); + private String toCustomString = ""; + + private int diInteger = 0; + private float dfFloat = 0; + + // TODO: Add more constructors + + public ProsePackage(String stfFile, String stfLabel) { + stf.setStfFilename(stfFile); + stf.setStfName(stfLabel); + } + + public ProsePackage(String stfFile, String stfLabel, long tuObjectId, String tuStfFile, String tuStfLabel, String tuCustomString) { + stf.setStfFilename(stfFile); + stf.setStfName(stfLabel); + this.tuObjectId = tuObjectId; + tuStf.setStfFilename(tuStfFile); + tuStf.setStfName(tuStfLabel); + this.tuCustomString = tuCustomString; + } + + /* + * Any parameters can be entered. + * + * Any integers set diInteger + * Any floats set dfFloat + * Any "@stfFile:label" sets the default stf + * "TU" followed by objectId, "@stfFile:label" or customString + * "TT" followed by objectId, "@stfFile:label" or customString + * "TO" followed by objectId, "@stfFile:label" or customString + */ + public ProsePackage(Object ... objects) { + for (Object object: objects) { + if (object instanceof Object[]) { + objects = (Object[]) object; + break; + } + } + + for (int i = 0; i < objects.length; i++) { + Object object = objects[i]; + + if (object instanceof String) { + String string = (String) object; + + if ((i + 1) < objects.length) { + long objectId = 0; + Stf stf = null; + String customString = null; + + if (objects[i + 1] instanceof Long) { + objectId = (Long) objects[i + 1]; + } else if (objects[i + 1] instanceof String) { + String str = (String) objects[i + 1]; + + if (str.startsWith("@") && str.contains(":") && !str.contains(" ")) { + stf = new Stf(str); + } else { + customString = str; + } + } + + switch (string.toUpperCase()) { + case "TU": + tuObjectId = (objectId == 0) ? tuObjectId : objectId; + tuStf = (stf == null) ? tuStf : stf; + tuCustomString = (customString == null) ? tuCustomString : customString; + continue; + case "TT": + ttObjectId = (objectId == 0) ? ttObjectId : objectId; + ttStf = (stf == null) ? ttStf : stf; + ttCustomString = (customString == null) ? ttCustomString : customString; + continue; + case "TO": + toObjectId = (objectId == 0) ? toObjectId : objectId; + toStf = (stf == null) ? toStf : stf; + toCustomString = (customString == null) ? toCustomString : customString; + continue; + default: + // + } + } + + stf.setString((String) object); + } else if (object instanceof Integer) { + diInteger = (Integer) object; + } else if (object instanceof Float) { + dfFloat = (Float) object; + } + } + } + + public Stf getStf() { + return stf; + } + + public void setStf(Stf stf) { + this.stf = stf; + } + + public long getTuObjectId() { + return tuObjectId; + } + + public void setTuObjectId(long tuObjectId) { + this.tuObjectId = tuObjectId; + } + + public Stf getTuStf() { + return tuStf; + } + + public void setTuStf(Stf tuStf) { + this.tuStf = tuStf; + } + + public String getTuCustomString() { + return tuCustomString; + } + + public void setTuCustomString(String tuCustomString) { + this.tuCustomString = tuCustomString; + } + + public long getTtObjectId() { + return ttObjectId; + } + + public void setTtObjectId(long ttObjectId) { + this.ttObjectId = ttObjectId; + } + + public Stf getTtStf() { + return ttStf; + } + + public void setTtStf(Stf ttStf) { + this.ttStf = ttStf; + } + + public String getTtCustomString() { + return ttCustomString; + } + + public void setTtCustomString(String ttCustomString) { + this.ttCustomString = ttCustomString; + } + + public long getToObjectId() { + return toObjectId; + } + + public void setToObjectId(long toObjectId) { + this.toObjectId = toObjectId; + } + + public Stf getToStf() { + return toStf; + } + + public void setToStf(Stf toStf) { + this.toStf = toStf; + } + + public String getToCustomString() { + return toCustomString; + } + + public void setToCustomString(String toCustomString) { + this.toCustomString = toCustomString; + } + + public int getDiInteger() { + return diInteger; + } + + public void setDiInteger(int diInteger) { + this.diInteger = diInteger; + } + + public float getDfFloat() { + return dfFloat; + } + + public void setDfFloat(float dfFloat) { + this.dfFloat = dfFloat; + } + +} diff --git a/src/resources/common/Stf.java b/src/resources/common/Stf.java index 191b2a60..8907ecba 100644 --- a/src/resources/common/Stf.java +++ b/src/resources/common/Stf.java @@ -23,7 +23,6 @@ package resources.common; import org.apache.mina.core.buffer.IoBuffer; -import resources.z.exp.objects.Baseline; import resources.objects.Delta; import com.sleepycat.persist.model.Persistent; @@ -31,9 +30,9 @@ import com.sleepycat.persist.model.Persistent; @Persistent public class Stf extends Delta { - private AString stfFilename; + private AString stfFilename = new AString(""); private int spacer = 0; - private AString stfName; + private AString stfName = new AString(""); public Stf(String stfFilename, int spacer, String stfName) { this.stfFilename = new AString(stfFilename); @@ -41,6 +40,10 @@ public class Stf extends Delta { this.stfName = new AString(stfName); } + public Stf(String stf) { + setString(stf); + } + public Stf() { } @@ -81,11 +84,30 @@ public class Stf extends Delta { } } + public String getString() { + synchronized(objectMutex) { + return ("@" + stfFilename.get() + ":" + stfName.get()); + } + } + + public void setString(String stf) { + synchronized(objectMutex) { + if (stf == null || stf.equals("")) { + stfFilename.set(""); + stfName.set(""); + } else if (stf.contains(":")) { + stf = stf.replace("@", ""); + stfFilename.set(stf.split(":")[0]); + stfName.set(stf.split(":")[1]); + } + } + } + public byte[] getBytes() { synchronized(objectMutex) { int size = stfFilename.getBytes().length + 4 + stfName.getBytes().length; - IoBuffer buffer = Baseline.createBuffer(size); + IoBuffer buffer = createBuffer(size); buffer.put(stfFilename.getBytes()); buffer.putInt(spacer); buffer.put(stfName.getBytes()); diff --git a/src/resources/common/StringUtilities.java b/src/resources/common/StringUtilities.java index a28bf368..e7d34d3a 100644 --- a/src/resources/common/StringUtilities.java +++ b/src/resources/common/StringUtilities.java @@ -27,6 +27,8 @@ import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; +import engine.resources.common.Utilities; + public class StringUtilities { final protected static char[] hexArray = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; @@ -166,16 +168,20 @@ public class StringUtilities { } public static String bytesToHex(byte[] bytes) { - char[] hexChars = new char[bytes.length * 2]; - int v; - - for ( int j = 0; j < bytes.length; j++ ) { - v = bytes[j] & 0xFF; - hexChars[j * 2] = hexArray[v >>> 4]; - hexChars[j * 2 + 1] = hexArray[v & 0x0F]; - } - - return new String(hexChars); + char[] hexChars = new char[bytes.length * 2]; + int v; + + for ( int j = 0; j < bytes.length; j++ ) { + v = bytes[j] & 0xFF; + hexChars[j * 2] = hexArray[v >>> 4]; + hexChars[j * 2 + 1] = hexArray[v & 0x0F]; + } + + return new String(hexChars); + } + + public static void printBytes(byte[] bytes) { + System.out.println(Utilities.getHexString(bytes)); } } diff --git a/src/resources/common/ThreadMonitor.java b/src/resources/common/ThreadMonitor.java index 19c83baa..bf5c2cb8 100644 --- a/src/resources/common/ThreadMonitor.java +++ b/src/resources/common/ThreadMonitor.java @@ -187,7 +187,8 @@ public class ThreadMonitor { return true; } - private void parseMBeanInfo() throws IOException { + @SuppressWarnings("unused") + private void parseMBeanInfo() throws IOException { try { MBeanOperationInfo[] mopis = server.getMBeanInfo(objname).getOperations(); diff --git a/src/resources/common/UString.java b/src/resources/common/UString.java index 5aa290dc..dec215af 100644 --- a/src/resources/common/UString.java +++ b/src/resources/common/UString.java @@ -22,9 +22,6 @@ package resources.common; import java.io.UnsupportedEncodingException; -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; import com.sleepycat.persist.model.Persistent; @@ -64,7 +61,7 @@ public final class UString extends Delta { public byte[] getBytes() { synchronized(objectMutex) { try { - return IoBuffer.allocate(4 + string.length(), false).order(ByteOrder.LITTLE_ENDIAN).putInt(string.length()).put(string.getBytes("UTF-16LE")).flip().array(); + return createBuffer(4 + (string.length() * 2)).putInt(string.length()).put(string.getBytes("UTF-16LE")).flip().array(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return new byte[] { 0x00, 0x00, 0x00, 0x00 }; diff --git a/src/resources/common/collidables/AbstractCollidable.java b/src/resources/common/collidables/AbstractCollidable.java index 443903b7..b7f9a157 100644 --- a/src/resources/common/collidables/AbstractCollidable.java +++ b/src/resources/common/collidables/AbstractCollidable.java @@ -60,6 +60,8 @@ public abstract class AbstractCollidable { } public void removeCollidedObject(SWGObject obj) { + if(!collidedObjects.contains(obj)) + return; collidedObjects.remove(obj); ExitEvent event = new ExitEvent(); event.object = obj; diff --git a/src/resources/datatables/DisplayType.java b/src/resources/datatables/DisplayType.java new file mode 100644 index 00000000..0e13f62a --- /dev/null +++ b/src/resources/datatables/DisplayType.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.datatables; + +public class DisplayType { + + public static byte Broadcast = 0; // Level up. combatspam/skill_up + //public static byte Screen = 1; // Screen? XP gain + public static byte Chat = 2; + //public static byte Overhead = 3; // Flytext? Seen on ent duration + //public static byte Combat = 4; // CombatSpam? + //public static byte Combat = 5; // Seen in combat flytext + //public static byte Combat = 11; // Seen when blocking + +} + diff --git a/src/resources/datatables/Elemental.java b/src/resources/datatables/Elemental.java new file mode 100644 index 00000000..007f04c0 --- /dev/null +++ b/src/resources/datatables/Elemental.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.datatables; + +public enum Elemental { + + KINETIC(1), ENERGY(2), BLAST(4), STUN(8), HEAT(32), COLD(64), ACID(128), ELECTRICITY(256); + + private int element; + + private Elemental(int element) { + this.element = element; + } + + @Override + public String toString() { + switch(this) { + case KINETIC: + return "kinetic"; + case ENERGY: + return "energy"; + case BLAST: + return "blast"; + case STUN: + return "stun"; + case HEAT: + return "heat"; + case COLD: + return "cold"; + case ACID: + return "acid"; + case ELECTRICITY: + return "electricity"; + } + return null; + } + + public int getValue() { + return element; + } + + public static int getElementalNum(String element) { + switch(element) { + case "kinetic": + return 1; + case "energy": + return 2; + case "blast": + return 4; + case "stun": + return 8; + case "heat": + return 32; + case "cold": + return 64; + case "acid": + return 128; + case "electricity": + return 256; + } + return 0; + } + + public static String getElementalName(int elementalType) { + for (Elemental element : Elemental.values()) { + if (element.getValue() == elementalType) { + return element.toString(); + } + } + return null; + } +} \ No newline at end of file diff --git a/src/resources/datatables/Posture.java b/src/resources/datatables/Posture.java new file mode 100644 index 00000000..f319ea46 --- /dev/null +++ b/src/resources/datatables/Posture.java @@ -0,0 +1,23 @@ +package resources.datatables; + +public class Posture { + + // Posture.iff + public static final byte Invalid = -1; + public static final byte Upright = 0; + public static final byte Crouched = 1; + public static final byte Prone = 2; + public static final byte Sneaking = 3; + public static final byte Blocking = 4; + public static final byte Climbing = 5; + public static final byte Flying = 6; + public static final byte LyingDown = 7; + public static final byte Sitting = 8; + public static final byte SkillAnimating = 9; + public static final byte DrivingVehicle = 10; + public static final byte RidingCreature = 11; + public static final byte KnockedDown = 12; + public static final byte Incapacitated = 13; + public static final byte Dead = 14; + +} diff --git a/src/resources/datatables/State.java b/src/resources/datatables/State.java new file mode 100644 index 00000000..dafd0c64 --- /dev/null +++ b/src/resources/datatables/State.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.datatables; + +public class State { + + public static long Invalid = 0x00L; + public static long Cover = 0x1L; + public static long Combat = 0x2L; + public static long Peace = 0x4L; + public static long Aiming = 0x8L; + public static long Alert = 0x10L; + public static long Berserk = 0x20L; + public static long FeignDeath = 0x40L; + public static long CombatAttitudeEvasive = 0x80L; + public static long CombatAttitudeNormal = 0x100L; + public static long CombatAttitudeAggressive = 0x200L; + public static long Tumbling = 0x400L; + public static long Rallied = 0x800L; + public static long Stunned = 0x1000L; + public static long Blinded = 0x2000L; + public static long Dizzy = 0x4000L; + public static long Intimidated = 0x8000L; + public static long Immobilized = 0x10000L; + public static long Frozen = 0x20000L; + public static long Swimming = 0x40000L; + public static long SittingOnChair = 0x80000L; + public static long Crafting = 0x100000L; + public static long GlowingJedi = 0x200000L; + public static long MaskScent = 0x400000L; + public static long Poisoned = 0x800000L; + public static long Bleeding = 0x1000000L; + public static long Diseased = 0x2000000L; + public static long OnFire = 0x4000000L; + public static long RidingMount = 0x8000000L; + public static long MountedCreature = 0x10000000L; + public static long PilotingShip = 0x20000000L; + public static long ShipOperations = 0x40000000L; + public static long ShipGunner = 0x80000000L; + public static long ShipInterior = 0x100000000L; + public static long PilotingPobShip = 0x200000000L; + public static long PerformingDeathBlow = 0x400000000L; + public static long Disguised = 0x800000000L; + public static long ElectricBurned = 0x1000000000L; + public static long ColdBurned = 0x2000000000L; + public static long AcidBurned = 0x4000000000L; + public static long EnergyBurned = 0x8000000000L; + public static long KineticBurned = 0x10000000000L; + +} diff --git a/src/resources/datatables/WeaponType.java b/src/resources/datatables/WeaponType.java new file mode 100644 index 00000000..187332a4 --- /dev/null +++ b/src/resources/datatables/WeaponType.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.datatables; + +public class WeaponType { + + public static final int RIFLE = 0; + public static final int CARBINE = 1; + public static final int PISTOL = 2; + public static final int ONEHANDEDMELEE = 4; + public static final int TWOHANDEDMELEE = 5; + public static final int UNARMED = 6; + public static final int POLEARMMELEE = 7; + public static final int THROWN = 8; + public static final int ONEHANDEDSABER = 9; + public static final int TWOHANDEDSABER = 10; + public static final int POLEARMSABER = 11; + public static final int HEAVYWEAPON = 12; + public static final int FLAMETHROWER = 13; + +} diff --git a/src/resources/gcw/CurrentServerGCWZoneHistory.java b/src/resources/gcw/CurrentServerGCWZoneHistory.java index a7a77e98..66874d64 100644 --- a/src/resources/gcw/CurrentServerGCWZoneHistory.java +++ b/src/resources/gcw/CurrentServerGCWZoneHistory.java @@ -21,15 +21,13 @@ ******************************************************************************/ package resources.gcw; -import java.nio.ByteOrder; - import org.apache.mina.core.buffer.IoBuffer; import com.sleepycat.persist.model.Persistent; import resources.objects.Delta; -@Persistent +@Persistent(version=0) public class CurrentServerGCWZoneHistory extends Delta implements Cloneable { private int lastUpdateTime; @@ -40,6 +38,10 @@ public class CurrentServerGCWZoneHistory extends Delta implements Cloneable { this.lastUpdateTime = zone.getLastUpdateTime(); } + public CurrentServerGCWZoneHistory() { + + } + public int getLastUpdateTime() { synchronized(objectMutex) { return lastUpdateTime; @@ -54,7 +56,7 @@ public class CurrentServerGCWZoneHistory extends Delta implements Cloneable { public byte[] getBytes() { synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate((8), false).order(ByteOrder.LITTLE_ENDIAN); + IoBuffer buffer = createBuffer(8); buffer.putInt(lastUpdateTime); buffer.putInt(percent); return buffer.array(); diff --git a/src/resources/gcw/CurrentServerGCWZonePercent.java b/src/resources/gcw/CurrentServerGCWZonePercent.java index 09034cf6..ea825d7a 100644 --- a/src/resources/gcw/CurrentServerGCWZonePercent.java +++ b/src/resources/gcw/CurrentServerGCWZonePercent.java @@ -23,7 +23,6 @@ package resources.gcw; import java.math.BigDecimal; import java.math.MathContext; -import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; @@ -33,7 +32,7 @@ import engine.resources.scene.Point2D; import resources.objects.Delta; -@Persistent +@Persistent(version=0) public class CurrentServerGCWZonePercent extends Delta implements Cloneable { private Point2D position; @@ -53,6 +52,10 @@ public class CurrentServerGCWZonePercent extends Delta implements Cloneable { this.percent = new BigDecimal("50.0", MathContext.DECIMAL128); } + public CurrentServerGCWZonePercent() { + + } + public Point2D getPosition() { synchronized(objectMutex) { return position.clone(); @@ -148,7 +151,7 @@ public class CurrentServerGCWZonePercent extends Delta implements Cloneable { public byte[] getBytes() { synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN); + IoBuffer buffer = createBuffer(4); buffer.putInt(percent.intValue()); return buffer.array(); } diff --git a/src/resources/gcw/OtherServerGCWZonePercent.java b/src/resources/gcw/OtherServerGCWZonePercent.java index a006d7a8..ab8048eb 100644 --- a/src/resources/gcw/OtherServerGCWZonePercent.java +++ b/src/resources/gcw/OtherServerGCWZonePercent.java @@ -21,15 +21,13 @@ ******************************************************************************/ package resources.gcw; -import java.nio.ByteOrder; - import org.apache.mina.core.buffer.IoBuffer; import com.sleepycat.persist.model.Persistent; import resources.objects.Delta; -@Persistent +@Persistent(version=0) public class OtherServerGCWZonePercent extends Delta implements Cloneable { private String zone = ""; @@ -39,6 +37,10 @@ public class OtherServerGCWZonePercent extends Delta implements Cloneable { this.zone = zone; } + public OtherServerGCWZonePercent() { + + } + public String getZone() { synchronized(objectMutex) { return zone; @@ -60,7 +62,7 @@ public class OtherServerGCWZonePercent extends Delta implements Cloneable { public byte[] getBytes() { synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate((2 + zone.length() + 4), false).order(ByteOrder.LITTLE_ENDIAN); + IoBuffer buffer = createBuffer((2 + zone.length() + 4)); buffer.put(getAsciiString(zone)); buffer.putInt(percent); return buffer.array(); diff --git a/src/resources/guild/Guild.java b/src/resources/guild/Guild.java index 1cebf0f6..5651c2d0 100644 --- a/src/resources/guild/Guild.java +++ b/src/resources/guild/Guild.java @@ -21,15 +21,17 @@ ******************************************************************************/ package resources.guild; -import java.nio.ByteOrder; import java.util.List; import org.apache.mina.core.buffer.IoBuffer; +import com.sleepycat.persist.model.Persistent; + import resources.objects.Delta; import engine.resources.objects.SWGObject; +@Persistent(version=0) public class Guild extends Delta { private int id; @@ -46,6 +48,10 @@ public class Guild extends Delta { this.members.add(leader); } + public Guild() { + + } + public int getId() { synchronized(objectMutex) { return id; @@ -83,17 +89,19 @@ public class Guild extends Delta { } public String getString() { - synchronized(objectMutex) { - return (Integer.toString(id) + ":" + abbreviation); - } + return (Integer.toString(getId()) + ":" + getAbbreviation()); } public SWGObject getLeader() { - return leader; + synchronized(objectMutex) { + return leader; + } } public void setLeader(SWGObject leader) { - this.leader = leader; + synchronized(objectMutex) { + this.leader = leader; + } } public List getMembers() { @@ -102,7 +110,7 @@ public class Guild extends Delta { public byte[] getBytes() { synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate((getString().length() + 2), false).order(ByteOrder.LITTLE_ENDIAN); + IoBuffer buffer = createBuffer((getString().length() + 2)); buffer.put(getAsciiString(getString())); return buffer.array(); } diff --git a/src/resources/objects/Buff.java b/src/resources/objects/Buff.java index c545b5a0..fd6aa4e0 100644 --- a/src/resources/objects/Buff.java +++ b/src/resources/objects/Buff.java @@ -36,16 +36,14 @@ import resources.objects.creature.CreatureObject; import com.sleepycat.persist.model.NotPersistent; import com.sleepycat.persist.model.Persistent; -import engine.clientdata.ClientFileManager; -import engine.clientdata.visitors.DatatableVisitor; import engine.resources.common.CRC; -@Persistent(version=8) +@Persistent(version=10) public class Buff implements IDelta { @NotPersistent private SimpleBufferAllocator bufferPool = new SimpleBufferAllocator(); - private String group1; + private String group1, group2; private int priority; private float duration; private String buffName; @@ -69,12 +67,43 @@ public class Buff implements IDelta { private ScheduledFuture removalTask; private int stacks = 1; private long groupBufferId; + private int buffCRC; - public Buff(String buffName, long ownerId) { + public Buff(Buff baseBuff, long ownerId) { + this.buffName = baseBuff.getBuffName(); + this.buffCRC = baseBuff.getBuffCRC(); + this.group1 = baseBuff.getGroup1(); + this.group2 = baseBuff.getGroup2(); + this.priority = baseBuff.getPriority(); + this.duration = baseBuff.getDuration(); + this.effect1Name = baseBuff.getEffect1Name(); + this.effect1Value = baseBuff.getEffect1Value(); + this.effect2Name = baseBuff.getEffect2Name(); + this.effect2Value = baseBuff.getEffect2Value(); + this.effect3Name = baseBuff.getEffect3Name(); + this.effect3Value = baseBuff.getEffect3Value(); + this.effect4Name = baseBuff.getEffect4Name(); + this.effect4Value = baseBuff.getEffect4Value(); + this.effect5Name = baseBuff.getEffect5Name(); + this.effect5Value = baseBuff.getEffect5Value(); + this.callback = baseBuff.getCallback(); + this.particleEffect = baseBuff.getParticleEffect(); + this.isDebuff = baseBuff.isDebuff(); + this.removeOnDeath = baseBuff.isRemoveOnDeath(); + this.isRemovableByPlayer = baseBuff.isRemovableByPlayer(); + this.maxStacks = baseBuff.getMaxStacks(); + this.isPersistent = baseBuff.isPersistent(); + this.removeOnRespec = baseBuff.isRemoveOnRespec(); + this.aiRemoveOnEndCombat = baseBuff.isAiRemoveOnEndCombat(); + this.decayOnPvPDeath = baseBuff.isDecayOnPvPDeath(); + } + + /*public Buff(String buffName, long ownerId) { this.buffName = buffName; this.ownerId = ownerId; - + this.buffCRC = CRC.StringtoCRC(buffName); + DatatableVisitor visitor; try { @@ -86,6 +115,7 @@ public class Buff implements IDelta { if(((String) visitor.getObject(i, 0)).equalsIgnoreCase(buffName)) { group1 = (String) visitor.getObject(i, 1); + group2 = (String) visitor.getObject(i, 2); priority = (int) visitor.getObject(i, 4); duration = (Float) visitor.getObject(i, 6); effect1Name = (String) visitor.getObject(i, 7); @@ -116,12 +146,8 @@ public class Buff implements IDelta { } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); } - - + }*/ - - } - public Buff() { } @Override @@ -156,7 +182,7 @@ public class Buff implements IDelta { this.group1 = group1; } - public float getPriority() { + public int getPriority() { return priority; } @@ -429,7 +455,7 @@ public class Buff implements IDelta { } public boolean isGroupBuff() { - return effect1Name.equals("group"); + return effect1Name == null ? false : effect1Name.equals("group"); } public long getGroupBufferId() { @@ -440,4 +466,20 @@ public class Buff implements IDelta { this.groupBufferId = groupBufferId; } + public String getGroup2() { + return group2; + } + + public void setGroup2(String group2) { + this.group2 = group2; + } + + public int getBuffCRC() { + return buffCRC; + } + + public void setBuffCRC(int buffCRC) { + this.buffCRC = buffCRC; + } + } diff --git a/src/resources/objects/BuffItem.java b/src/resources/objects/BuffItem.java index 8d647d4a..b87ce0af 100644 --- a/src/resources/objects/BuffItem.java +++ b/src/resources/objects/BuffItem.java @@ -16,47 +16,59 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ package resources.objects; +import com.sleepycat.persist.model.Persistent; + +@Persistent public class BuffItem { - private String skillName; + private int affectAmount; + private int entertainerBonus; private int invested; - private int bonusAmount; // expertise bonus (50%*4 = 200) which would then result in bonusAmount + (maxTimesApplied * affectAmount) = result - + private String skillName; + public BuffItem() { - + } - - public BuffItem(String skillName, int invested, int amount) { + + public BuffItem(String skillName, int invested, int entBonus) { this.skillName = skillName; this.invested = invested; - this.bonusAmount = amount; + this.entertainerBonus = entBonus; } - public String getSkillName() { - return skillName; + public int getAffectAmount() { + return affectAmount; } - public void setSkillName(String skillName) { - this.skillName = skillName; + public int getEntertainerBonus() { + return entertainerBonus; } public int getInvested() { return invested; } + public String getSkillName() { + return skillName; + } + + public void setAffectAmount(int amount) { + this.affectAmount = amount; + } + + public void setEntertainerBonus(int entertainerBonus) { + this.entertainerBonus = entertainerBonus; + } + public void setInvested(int invested) { this.invested = invested; } - public int getBonusAmount() { - return bonusAmount; - } - - public void setBonusAmount(int amount) { - this.bonusAmount = amount; + public void setSkillName(String skillName) { + this.skillName = skillName; } } diff --git a/src/resources/objects/Delta.java b/src/resources/objects/Delta.java index 8b1e7f18..35ef4299 100644 --- a/src/resources/objects/Delta.java +++ b/src/resources/objects/Delta.java @@ -22,19 +22,27 @@ package resources.objects; import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.buffer.SimpleBufferAllocator; +import com.sleepycat.persist.model.NotPersistent; +import com.sleepycat.persist.model.Persistent; import resources.common.StringUtilities; - +@Persistent public abstract class Delta implements IDelta { - public Delta() { } - + @NotPersistent protected final Object objectMutex = new Object(); - public SimpleBufferAllocator bufferPool = new SimpleBufferAllocator(); + @NotPersistent + private static SimpleBufferAllocator bufferPool = new SimpleBufferAllocator(); + + public Delta() { + + } protected String getAsciiString(ByteBuffer buffer) { return StringUtilities.getAsciiString(buffer); @@ -56,4 +64,13 @@ public abstract class Delta implements IDelta { return ((byte) ((variable) ? 1 : 0)); } + public static IoBuffer createBuffer(int size) { + return IoBuffer.allocate(size, false).order(ByteOrder.LITTLE_ENDIAN); + } + + public static IoBuffer resizeBuffer(IoBuffer buffer) { + int size = buffer.position(); + return buffer == null ? createBuffer(0) : createBuffer(size).put(buffer.flip().array(), 0, size).flip(); + } + } diff --git a/src/resources/objects/SWGList.java b/src/resources/objects/SWGList.java index ae185112..7471305c 100644 --- a/src/resources/objects/SWGList.java +++ b/src/resources/objects/SWGList.java @@ -24,11 +24,18 @@ package resources.objects; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.Collection; +import java.util.Comparator; import java.util.Iterator; import java.util.List; import java.util.ListIterator; +import java.util.Spliterator; +import java.util.function.Consumer; +import java.util.function.Predicate; +import java.util.function.UnaryOperator; +import java.util.stream.Stream; import org.apache.mina.core.buffer.IoBuffer; +import org.python.google.common.collect.Lists; import com.sleepycat.persist.model.NotPersistent; import com.sleepycat.persist.model.Persistent; @@ -384,5 +391,51 @@ public class SWGList implements List { messageBuilder.sendListDelta(viewType, updateType, buffer); } + + @Override + public boolean removeIf(Predicate filter) { + return false; + } + + public List reverseGet() + { + return Lists.reverse(list); + } + + @Override + public Stream stream() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Stream parallelStream() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void forEach(Consumer action) { + // TODO Auto-generated method stub + + } + + @Override + public void replaceAll(UnaryOperator operator) { + // TODO Auto-generated method stub + + } + + @Override + public void sort(Comparator c) { + // TODO Auto-generated method stub + + } + + @Override + public Spliterator spliterator() { + // TODO Auto-generated method stub + return null; + } } diff --git a/src/resources/objects/SWGMap.java b/src/resources/objects/SWGMap.java index 57e6e7a9..b8f9610d 100644 --- a/src/resources/objects/SWGMap.java +++ b/src/resources/objects/SWGMap.java @@ -29,6 +29,9 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.Map.Entry; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Function; import org.apache.mina.core.buffer.IoBuffer; @@ -116,7 +119,9 @@ public class SWGMap implements Map { if (map.containsKey(key)) { V oldValue = map.put(key, value); - queue(item(2, (String) key, ((IDelta) value).getBytes(), true, true)); + if (oldValue != null) { + queue(item(2, (String) key, ((IDelta) value).getBytes(), true, true)); + } return oldValue; } else { @@ -167,7 +172,9 @@ public class SWGMap implements Map { key instanceof Integer || key instanceof Float || key instanceof Long) { V value = map.remove(key); - queue(item(1, key, ((IDelta) map.get(key)).getBytes(), true, true)); + if (value != null) { + queue(item(1, (String) key, ((IDelta) value).getBytes(), true, true)); + } return value; } @@ -227,6 +234,7 @@ public class SWGMap implements Map { } } if (useData) buffer.put(data); + buffer.flip(); updateCounter++; @@ -238,6 +246,7 @@ public class SWGMap implements Map { buffer.putInt(1); buffer.putInt(updateCounter); buffer.put(data); + buffer.flip(); messageBuilder.sendListDelta(viewType, updateType, buffer); } @@ -252,8 +261,80 @@ public class SWGMap implements Map { buffer.putInt(data.size()); buffer.putInt(updateCounter); for (byte[] queued : data) buffer.put(queued); + buffer.flip(); messageBuilder.sendListDelta(viewType, updateType, buffer); } + + @Override + public V getOrDefault(Object key, V defaultValue) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void forEach(BiConsumer action) { + // TODO Auto-generated method stub + + } + + @Override + public void replaceAll( + BiFunction function) { + // TODO Auto-generated method stub + + } + + @Override + public V putIfAbsent(K key, V value) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean remove(Object key, Object value) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean replace(K key, V oldValue, V newValue) { + // TODO Auto-generated method stub + return false; + } + + @Override + public V replace(K key, V value) { + // TODO Auto-generated method stub + return null; + } + + @Override + public V computeIfAbsent(K key, + Function mappingFunction) { + // TODO Auto-generated method stub + return null; + } + + @Override + public V computeIfPresent(K key, + BiFunction remappingFunction) { + // TODO Auto-generated method stub + return null; + } + + @Override + public V compute(K key, + BiFunction remappingFunction) { + // TODO Auto-generated method stub + return null; + } + + @Override + public V merge(K key, V value, + BiFunction remappingFunction) { + // TODO Auto-generated method stub + return null; + } } diff --git a/src/resources/z/exp/manufacture/SubList.java b/src/resources/objects/SkillMod.java similarity index 61% rename from src/resources/z/exp/manufacture/SubList.java rename to src/resources/objects/SkillMod.java index 4a65aaa9..a9550ce4 100644 --- a/src/resources/z/exp/manufacture/SubList.java +++ b/src/resources/objects/SkillMod.java @@ -19,45 +19,58 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.manufacture; - -import java.nio.ByteOrder; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; +package resources.objects; import org.apache.mina.core.buffer.IoBuffer; import com.sleepycat.persist.model.Persistent; -import resources.objects.Delta; -import resources.z.exp.objects.Baseline; +@Persistent(version=1) +public class SkillMod extends Delta { -@Persistent -public class SubList extends Delta { - - private List list = new CopyOnWriteArrayList(); - - public SubList() { - + private int base; + private float modifier; + private String name; + + public SkillMod() { } - public List getList() { - return list; + public SkillMod(String name, int base, int modifier) { + this.name = name; + this.base = base; + this.modifier = modifier; } + public int getBase() { + return base; + } + + public void setBase(int base) { + this.base = base; + } + + public float getModifier() { + return modifier; + } + + public void setModifier(float modifier) { + this.modifier = modifier; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override public byte[] getBytes() { - synchronized(objectMutex) { - int size = 4; - for (o object : list) size += Baseline.toBytes(object).length; - - IoBuffer buffer = bufferPool.allocate(size, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(list.size()); - for (o object : list) { - buffer.put(Baseline.toBytes(object)); - } - - return buffer.array(); - } + IoBuffer buffer = createBuffer(8); + buffer.putInt(base); + buffer.putInt((int) modifier); + return buffer.array(); } - + } diff --git a/src/resources/objects/building/BuildingMessageBuilder.java b/src/resources/objects/building/BuildingMessageBuilder.java index d044e0ac..8dbf7ec8 100644 --- a/src/resources/objects/building/BuildingMessageBuilder.java +++ b/src/resources/objects/building/BuildingMessageBuilder.java @@ -22,7 +22,10 @@ package resources.objects.building; import java.nio.ByteOrder; +import java.util.Vector; + import org.apache.mina.core.buffer.IoBuffer; + import resources.objects.ObjectMessageBuilder; public class BuildingMessageBuilder extends ObjectMessageBuilder { @@ -107,7 +110,7 @@ public class BuildingMessageBuilder extends ObjectMessageBuilder { int size = buffer.position(); buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); buffer.flip(); - buffer = createBaseline("TANO", (byte) 8, buffer, size); + buffer = createBaseline("BUIO", (byte) 8, buffer, size); return buffer; } @@ -118,10 +121,30 @@ public class BuildingMessageBuilder extends ObjectMessageBuilder { int size = buffer.position(); buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); buffer.flip(); - buffer = createBaseline("TANO", (byte) 9, buffer, size); + buffer = createBaseline("BUIO", (byte) 9, buffer, size); return buffer; } + + public IoBuffer buildPermissionListCreate(Vector permissionList, String listName) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + int listSize = permissionList.size(); + buffer.putShort((short)4); + buffer.putInt(0x52F364B8); + buffer.putInt(listSize); + for (String name : permissionList){ + buffer.put(getUnicodeString(name)); + } + //buffer.putInt(0x61); + buffer.putInt(0); + //buffer.putShort((short)0); + buffer.put(getUnicodeString(listName)); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } @Override diff --git a/src/resources/objects/building/BuildingObject.java b/src/resources/objects/building/BuildingObject.java index 15d84777..36486462 100644 --- a/src/resources/objects/building/BuildingObject.java +++ b/src/resources/objects/building/BuildingObject.java @@ -21,38 +21,57 @@ ******************************************************************************/ package resources.objects.building; +import java.util.Vector; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; + +import main.NGECore; import resources.objects.cell.CellObject; +import resources.objects.creature.CreatureObject; + import com.sleepycat.je.Environment; import com.sleepycat.je.Transaction; + import resources.objects.tangible.TangibleObject; + import com.sleepycat.persist.model.Entity; import com.sleepycat.persist.model.NotPersistent; + import engine.clients.Client; -import engine.resources.container.Traverser; import engine.resources.objects.IPersistent; -import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; -@Entity(version=0) +@Entity(version=6) public class BuildingObject extends TangibleObject implements IPersistent { @NotPersistent private BuildingMessageBuilder messageBuilder; @NotPersistent private Transaction txn; + + private float maintenanceAmount = 0; + private int BMR = 0; + private String deedTemplate=""; + private boolean residency=false; + private byte privacy=(byte)0; + public static byte PRIVATE = (byte)0; + public static byte PUBLIC = (byte)1; + private short maximumStorageCapacity=0; + private Vector entryList = new Vector(); // Preferably the OIDs should be stored, because of name changes + private Vector banList = new Vector(); public BuildingObject() { super(); messageBuilder = new BuildingMessageBuilder(this); + this.setConditionDamage(100); } public BuildingObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { super(objectID, planet, Template, position, orientation); messageBuilder = new BuildingMessageBuilder(this); + this.setConditionDamage(100); } public CellObject getCellByCellNumber(final int cellNumber) { @@ -60,24 +79,143 @@ public class BuildingObject extends TangibleObject implements IPersistent { final AtomicReference ref = new AtomicReference(); synchronized(objectMutex) { - - this.viewChildren(this, true, false, new Traverser() { - - @Override - public void process(SWGObject obj) { - - if(obj instanceof CellObject && ((CellObject) obj).getCellNumber() == cellNumber) - ref.set((CellObject) obj); - - } - + this.viewChildren(this, true, false, (obj) -> { + if(obj instanceof CellObject && ((CellObject) obj).getCellNumber() == cellNumber) + ref.set((CellObject) obj); }); - } return ref.get(); } + + public float getMaintenanceAmount() { + return maintenanceAmount; + } + + public void setMaintenanceAmount(float maintenanceAmount) { + this.maintenanceAmount = maintenanceAmount; + } + + public void setDeedTemplate(String deedTemplate){ + this.deedTemplate = deedTemplate; + } + + public String getDeedTemplate(){ + return this.deedTemplate; + } + + public String getBuildingName() { + return this.getCustomName(); + } + + public void setBuildingName(String buildingName, CreatureObject owner) { + //owner.getClient().getSession().write(messageBuilder.buildCustomNameDelta(this,buildingName)); + this.setCustomName(buildingName); + ((CreatureObject)owner).sendSystemMessage("Structure renamed.", (byte) 0); + } + + public int getBMR() { + return BMR; + } + + public void setBMR(int BMR) { + this.BMR = BMR; + } + + public void setResidency(CreatureObject owner){ + owner.sendSystemMessage("@player_structure:declared_residency", (byte) 1); + residency = true; + } + + public boolean getResidency(){ + return this.residency; + } + + public byte getPrivacy() { + return privacy; + } + + public String getPrivacyString() { + if (privacy==PRIVATE) + return "private"; + if (privacy==PUBLIC) + return "public"; + return "42"; + } + + public void setPrivacy(byte privacy) { + this.privacy = privacy; + } + + public Vector getItemsList() { + Vector items = new Vector(); + getCells().forEach(c -> c.viewChildren(c, true, false, (item) -> { + if(!(item instanceof CreatureObject) && item.getTemplate() != "object/tangible/terminal/shared_terminal_player_structure.iff") + items.add((TangibleObject) item); + })); + return items; + } + + public short getMaximumStorageCapacity() { + return maximumStorageCapacity; + } + + public void setMaximumStorageCapacity(short maximumStorageCapacity) { + this.maximumStorageCapacity = maximumStorageCapacity; + } + + public void setPermissionEntry(String name,CreatureObject owner){ + Vector entryListFirstNames = new Vector(); + for (long oid : entryList){ + String firstName = NGECore.getInstance().characterService.getPlayerFirstName(oid); + entryListFirstNames.add(firstName); + } + entryListFirstNames.add("Peter"); + entryListFirstNames.add("Jackson"); + owner.getClient().getSession().write(messageBuilder.buildPermissionListCreate(entryListFirstNames, name)); + } + + public void setPermissionBan(String name,CreatureObject owner){ + Vector banListFirstNames = new Vector(); + for (long oid : banList){ + String firstName = NGECore.getInstance().characterService.getPlayerFirstName(oid); + banListFirstNames.add(firstName); + } + banListFirstNames.add("Peter"); + banListFirstNames.add("Smith"); + owner.getClient().getSession().write(messageBuilder.buildPermissionListCreate(banListFirstNames, name)); + } + + public void addPlayerToEntryList(CreatureObject owner,long oid, String firstName){ + if (!entryList.contains(oid)){ + this.entryList.add(oid); + owner.sendSystemMessage(firstName+ " added to the list.", (byte)1); // player_added %NO added to the list. + } + } + + public void removePlayerFromEntryList(CreatureObject owner,long oid, String firstName){ + if (entryList.contains(oid)){ + this.entryList.remove(oid); + owner.sendSystemMessage(firstName+ " removed to the list.", (byte)1); // player_removed %NO removed from the list. + } + } + + public void addPlayerToBanList(CreatureObject owner,long oid, String firstName){ + if (!banList.contains(oid)){ + this.banList.add(oid); + owner.sendSystemMessage(firstName+ " added to the list.", (byte)1); + } + } + + public void removePlayerFromBanList(CreatureObject owner,long oid, String firstName){ + if (banList.contains(oid)){ + this.banList.remove(oid); + owner.sendSystemMessage(firstName+ " removed to the list.", (byte)1); + } + } + + @Override public void sendBaselines(Client destination) { @@ -100,5 +238,14 @@ public class BuildingObject extends TangibleObject implements IPersistent { txn = env.beginTransaction(null, null); txn.setLockTimeout(500, TimeUnit.MILLISECONDS); } - + + public Vector getCells() { + final Vector cells = new Vector(); + this.viewChildren(this, true, false, (obj) -> { + if(obj instanceof CellObject) + cells.add((CellObject) obj); + }); + return cells; + } + } diff --git a/src/resources/objects/craft/DraftSchematic.java b/src/resources/objects/craft/DraftSchematic.java new file mode 100644 index 00000000..3e47ae31 --- /dev/null +++ b/src/resources/objects/craft/DraftSchematic.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.craft; + +import com.sleepycat.persist.model.Persistent; +import engine.clients.Client; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; + +@Persistent +public class DraftSchematic extends SWGObject { + + + public DraftSchematic(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, position, orientation, template); + } + + @Override + public void sendBaselines(Client arg0) { + // TODO Auto-generated method stub + + } + + +} diff --git a/src/resources/objects/creature/CreatureMessageBuilder.java b/src/resources/objects/creature/CreatureMessageBuilder.java index 5582100e..8d6a01c6 100644 --- a/src/resources/objects/creature/CreatureMessageBuilder.java +++ b/src/resources/objects/creature/CreatureMessageBuilder.java @@ -24,6 +24,7 @@ package resources.objects.creature; import java.nio.ByteOrder; + import org.apache.mina.core.buffer.IoBuffer; import com.sleepycat.persist.model.Persistent; @@ -31,9 +32,8 @@ import com.sleepycat.persist.model.Persistent; import engine.resources.common.CRC; import resources.objects.Buff; import resources.objects.ObjectMessageBuilder; +import resources.objects.SkillMod; import engine.resources.objects.SWGObject; -import engine.resources.objects.SkillMod; - import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import resources.objects.weapon.WeaponObject; @@ -72,7 +72,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { } else { buffer.putInt(creature.getSkills().size()); buffer.putInt(creature.getSkillsUpdateCounter()); - for(String skill : creature.getSkills().get()) + for(String skill : creature.getSkills()) buffer.put(getAsciiString(skill)); } int size = buffer.position(); @@ -89,6 +89,11 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { CreatureObject creature = (CreatureObject) object; IoBuffer buffer = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); buffer.setAutoExpand(true); + + if(creature.getStfName() == null || creature.getStfFilename() == null) { + creature.setStfName(""); + creature.setStfFilename(""); + } buffer.putShort((short) 19); // Object Count buffer.putFloat(1); @@ -97,7 +102,8 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { buffer.put(getAsciiString(creature.getStfName())); if (creature.getCustomName() == null) { creature.setCustomName(""); }//Not all CreatureObjects have CustomName (Shuttles) buffer.put(getUnicodeString(creature.getCustomName())); - buffer.putInt(0x000F4240); // volume + // buffer.putInt(0x000F4240); // volume + buffer.putInt(1); buffer.putInt(CRC.StringtoCRC(creature.getFaction())); buffer.putInt(creature.getFactionStatus()); @@ -110,11 +116,11 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { buffer.putShort((short) customizationData.length); buffer.put(customizationData); } - buffer.putInt(1); + //buffer.putInt(1); buffer.putInt(0); // TANO Data buffer.putInt(0); - // buffer.putInt(creature.getOptionsBitmask()); // 0x80 = Player, 0x08 = Quest NPC, - buffer.putInt(0x80); + buffer.putInt(creature.getOptionsBitmask()); // 0x80 = Player, 0x08 = Quest NPC, + //buffer.putInt(0x80); buffer.putInt(creature.getIncapTimer()); buffer.putInt(0); buffer.putInt(0x3A98); @@ -126,8 +132,8 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { buffer.putLong(creature.getOwnerId()); float height = creature.getHeight(); - if (height < 0.7 || height > 1.5) - height = 1; + //if (height < 0.7 || height > 1.5) + // height = 1; buffer.putFloat(height); buffer.putInt(0); // battle fatigue buffer.putLong(creature.getStateBitmask()); @@ -152,23 +158,21 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { buffer.putInt(0); // HAM Encumberance List unused in NGE buffer.putInt(0); - if(creature.getSkillMods().isEmpty()) { - buffer.putInt(0); - buffer.putInt(0); - } else { - buffer.putInt(creature.getSkillMods().size()); - buffer.putInt(creature.getSkillModsUpdateCounter()); - - for(SkillMod skillMod : creature.getSkillMods().get()) { - buffer.put((byte) 0); - buffer.put(getAsciiString(skillMod.getSkillModString())); - buffer.putInt(skillMod.getBase()); - buffer.putInt(skillMod.getModifier()); - } + buffer.putInt(creature.getSkillMods().size()); + buffer.putInt(creature.getSkillMods().getUpdateCounter()); + for (SkillMod skillMod : creature.getSkillMods().values()) { + buffer.put((byte) 0); + buffer.put(getAsciiString(skillMod.getName())); + buffer.put(skillMod.getBytes()); } + buffer.putFloat(creature.getSpeedMultiplierBase()); buffer.putFloat(creature.getSpeedMultiplierMod()); - buffer.putLong(creature.getListenToId()); + + if(creature.getPerformanceListenee() != null) + buffer.putLong(creature.getPerformanceListenee().getObjectId()); + else + buffer.putLong(0); buffer.putFloat(creature.getRunSpeed()); @@ -195,7 +199,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { buffer.putInt(1); } } - buffer.putInt(0); // unk + buffer.putInt(creature.getXpBarValue()); // xp bar value int size = buffer.position(); buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); @@ -212,21 +216,23 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { IoBuffer buffer = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); buffer.setAutoExpand(true); buffer.putShort((short) 0x23); - buffer.putInt(0x43); + buffer.putInt(0x43); // serverId - buffer.putInt(0); // defenders list unused in NGE - buffer.putInt(0); + buffer.putShort((short) 0); // detaiLStfFilename + buffer.putInt(0); // detailStfSpacer + buffer.putShort((short) 0); // detailStfName + + // TANO 6 lists TODO: research buffer.put(creature.getCombatFlag()); - - buffer.putLong(0); - buffer.putLong(0); - buffer.putLong(0); // Vehicle vars or TANO 6 vars TODO: research - buffer.putLong(0); - buffer.putInt(0); + + buffer.putLong(0); //List possibly defenders list + buffer.putInt(0); //Int + buffer.putLong(0); //List + buffer.putLong(0); //List + buffer.putLong(0); //List buffer.putShort(creature.getLevel()); - //buffer.putShort((short) 90); buffer.putInt(creature.getGrantedHealth()); // From player_level.iff. Ranges from 0-2000 as you level, consistent with that table. //0A @@ -252,8 +258,9 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { buffer.putLong(creature.getInviteCounter()); buffer.putInt(creature.getGuildId()); - //10 - buffer.putLong(creature.getTargetId()); + + buffer.putLong(creature.getLookAtTarget()); // lookAtTarget 0x10 + buffer.putLong(creature.getIntendedTarget()); // intendedTarget 0x11 buffer.put(creature.getMoodId()); buffer.putInt(creature.getPerformanceCounter()); /* @@ -261,9 +268,6 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { * in the CREO, otherwise the evul note bubbles appear */ buffer.putInt((creature.getPerformanceType()) ? 0 : creature.getPerformanceId()); - - buffer.putInt(0); // unks - buffer.putInt(0); buffer.putInt(6); // Current HAM buffer.putInt(creature.getHamListCounter()); @@ -296,7 +300,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { for(SWGObject obj : creature.getEquipmentList().get()) { - if(obj instanceof TangibleObject) { + if(obj instanceof TangibleObject && !(obj instanceof WeaponObject)) { TangibleObject tangible = (TangibleObject) obj; if(tangible.getCustomization() == null || tangible.getCustomization().length == 0) { buffer.putShort((short) 0); @@ -331,9 +335,9 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { } - buffer.putShort((short) 0); + buffer.putShort((short) 0); // costume //buffer.put(getAsciiString("appearance/gungan_m.sat")); - buffer.put((byte) 1); // 0 = cloak + buffer.put((byte) (creature.isInStealth() ? 0 : 1)); if(creature.getBuffList().isEmpty()) { buffer.putInt(0); @@ -353,11 +357,14 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); for(Buff buff : creature.getBuffList().get()) { - - buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000)); + + if(player != null) + buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000)); + else + buff.setTotalPlayTime(0); buffer.put((byte) 1); buffer.putInt(0); - buffer.putInt(CRC.StringtoCRC(buff.getBuffName())); + buffer.putInt(CRC.StringtoCRC(buff.getBuffName().toLowerCase())); if(buff.getDuration() > 0) { buffer.putInt((int) (buff.getTotalPlayTime() + buff.getRemainingDuration())); buffer.putInt(0); @@ -376,10 +383,15 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { } - buffer.put((byte) 0); // crashes if 1 + buffer.put((byte) (creature.isStationary() ? 1 : 0)); // if the server accepts transforms from the object buffer.put(creature.getDifficulty()); - buffer.putInt(0xFFFFFFFF); // -1 normal appearance, 0 hologram - buffer.put((byte) 1); // crashes if 0 + + if(creature.isHologram()) + buffer.putInt(0); + else + buffer.putInt(0xFFFFFFFF); + + buffer.put((byte) (creature.isRadarVisible() ? 1 : 0)); buffer.put((byte) 0); // no effect for 1? buffer.put((byte) 0); // no effect for 1? @@ -412,8 +424,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { } } - buffer.putInt(0); // unk list - buffer.putInt(0); + buffer.putLong(0); // unk long int size = buffer.position(); buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); @@ -664,16 +675,22 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { } - public IoBuffer buildTargetDelta(long targetId) { - + public IoBuffer buildLookAtTargetDelta(long targetId) { IoBuffer buffer = bufferPool.allocate(8, false).order(ByteOrder.LITTLE_ENDIAN); buffer.putLong(targetId); int size = buffer.position(); buffer.flip(); buffer = createDelta("CREO", (byte) 6, (short) 1, (short) 0x10, buffer, size + 4); - return buffer; - + } + + public IoBuffer buildIntendedTargetDelta(long targetId) { + IoBuffer buffer = bufferPool.allocate(8, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putLong(targetId); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("CREO", (byte) 6, (short) 1, (short) 0x11, buffer, size + 4); + return buffer; } public IoBuffer buildHealthDelta(int health) { @@ -758,7 +775,10 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { IoBuffer buffer = bufferPool.allocate(37, false).order(ByteOrder.LITTLE_ENDIAN); buffer.putInt(1); buffer.putInt(creature.getBuffListCounter()); - buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000)); + if(player != null) + buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000)); + else + buff.setTotalPlayTime(0); buffer.put((byte) 0); buffer.put(buff.getBytes()); int size = buffer.position(); @@ -794,7 +814,10 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { IoBuffer buffer = bufferPool.allocate(37, false).order(ByteOrder.LITTLE_ENDIAN); buffer.putInt(1); buffer.putInt(creature.getBuffListCounter()); - buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000)); + if(player != null) + buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000)); + else + buff.setTotalPlayTime(0); buffer.put((byte) 2); buffer.put(buff.getBytes()); int size = buffer.position(); @@ -822,46 +845,6 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { } - public IoBuffer buildAddSkillModDelta(String name, int base) { - - CreatureObject creature = (CreatureObject) object; - - IoBuffer buffer = bufferPool.allocate(19 + name.length(), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(1); - buffer.putInt(creature.getSkillModsUpdateCounter()); - buffer.put((byte) 0); - buffer.put(getAsciiString(name)); - buffer.putInt(base); - buffer.putInt(0); - - int size = buffer.position(); - buffer.flip(); - buffer = createDelta("CREO", (byte) 4, (short) 1, (short) 3, buffer, size + 4); - - return buffer; - - } - - public IoBuffer buildRemoveSkillModDelta(String name, int base) { - - CreatureObject creature = (CreatureObject) object; - - IoBuffer buffer = bufferPool.allocate(19 + name.length(), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(1); - buffer.putInt(creature.getSkillModsUpdateCounter()); - buffer.put((byte) 1); - buffer.put(getAsciiString(name)); - buffer.putInt(base); - buffer.putInt(0); - - int size = buffer.position(); - buffer.flip(); - buffer = createDelta("CREO", (byte) 4, (short) 1, (short) 3, buffer, size + 4); - - return buffer; - - } - public IoBuffer buildAddSkillDelta(String name) { CreatureObject creature = (CreatureObject) object; @@ -1049,13 +1032,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { buffer = createDelta("CREO", (byte) 6, (short) 1, (short) 0x1C, buffer, size + 4); return buffer; } - - @Override - public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { - // TODO Auto-generated method stub - - } - + public IoBuffer buildAddEquipmentDelta(TangibleObject item) { CreatureObject creature = (CreatureObject) object; @@ -1156,12 +1133,73 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder { return buffer; } + + public IoBuffer buildXPBarDelta(int xpBarValue) { + IoBuffer buffer = bufferPool.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putInt(xpBarValue); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("CREO", (byte) 4, (short) 1, (short) 0x0F, buffer, size + 4); + return buffer; + } + + // TODO: This seems to be somehow related to chairs as well. + public IoBuffer buildOwnerIdDelta(long ownerId) { + IoBuffer buffer = bufferPool.allocate(8, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putLong(ownerId); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("CREO", (byte) 3, (short) 1, (short) 0x0F, buffer, size + 4); // This is the correct one + return buffer; + } + + public IoBuffer buildStealthFlagDelta(boolean flag) { + IoBuffer buffer = bufferPool.allocate(8, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.put((byte) (flag ? 0 : 1)); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("CREO", (byte) 6, (short) 1, (short) 0x19, buffer, size + 4); + return buffer; + } + + public IoBuffer buildRadarVisibleFlagDelta(boolean flag) { + IoBuffer buffer = bufferPool.allocate(1, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.put((byte) (flag ? 1 : 0)); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("CREO", (byte) 6, (short) 1, (short) 0x1E, buffer, size + 4); + return buffer; + } + public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { + switch (viewType) { + case 4: { + switch (updateType) { + case 3: { + buffer = createDelta("CREO", (byte) 4, (short) 1, (byte) 3, buffer, buffer.array().length + 4); + + if (object.getClient() != null && object.getClient().getSession() != null) { + object.getClient().getSession().write(buffer); + } + + break; + } + } + } + case 1: + case 3: + case 6: + case 8: + case 9: + default: { + return; + } + } + } + @Override public void sendBaselines() { } - - } diff --git a/src/resources/objects/creature/CreatureObject.java b/src/resources/objects/creature/CreatureObject.java index 9bb8186f..7680d9bd 100644 --- a/src/resources/objects/creature/CreatureObject.java +++ b/src/resources/objects/creature/CreatureObject.java @@ -21,42 +21,53 @@ ******************************************************************************/ package resources.objects.creature; +import java.lang.System; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.atomic.LongAdder; import org.apache.mina.core.buffer.IoBuffer; -import protocol.swg.ChatSystemMessage; import protocol.swg.ObjControllerMessage; import protocol.swg.PlayMusicMessage; import protocol.swg.UpdatePostureMessage; import protocol.swg.UpdatePVPStatusMessage; +import protocol.swg.chat.ChatSystemMessage; import protocol.swg.objectControllerObjects.Animation; import protocol.swg.objectControllerObjects.Posture; +import protocol.swg.objectControllerObjects.StartTask; import com.sleepycat.je.Environment; import com.sleepycat.je.Transaction; import com.sleepycat.persist.model.Entity; import com.sleepycat.persist.model.NotPersistent; +import main.NGECore; import engine.clients.Client; +import resources.common.Cooldown; +import resources.common.OutOfBand; import resources.objects.Buff; import resources.objects.DamageOverTime; import resources.objects.SWGList; +import resources.objects.SWGMap; +import resources.objects.SkillMod; +import engine.resources.common.CRC; import engine.resources.objects.IPersistent; import engine.resources.objects.MissionCriticalObject; import engine.resources.objects.SWGObject; -import engine.resources.objects.SkillMod; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; +import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; -import resources.objects.weapon.WeaponObject; +import services.command.BaseSWGCommand; -@Entity(version=0) +@Entity(version=9) public class CreatureObject extends TangibleObject implements IPersistent { @NotPersistent @@ -65,13 +76,12 @@ public class CreatureObject extends TangibleObject implements IPersistent { // CREO 1 private int bankCredits = 0; private int cashCredits = 0; - private SWGList skills; + private List skills; @NotPersistent private int skillsUpdateCounter = 0; // CREO 3 private byte posture = 0; - private int factionStatus = 0; private float height; private int battleFatigue = 0; private long stateBitmask = 0; @@ -80,20 +90,18 @@ public class CreatureObject extends TangibleObject implements IPersistent { // CREO 4 private float accelerationMultiplierBase = 1; private float accelerationMultiplierMod = 1; - private SWGList skillMods; - @NotPersistent - private int skillModsUpdateCounter = 0; + private SWGMap skillMods; private float speedMultiplierBase = 1; private float speedMultiplierMod = 1; - private long listenToId = 0; private float runSpeed = (float) 7.3; private float slopeModAngle = 1; private float slopeModPercent = 1; private float turnRadius = 1; - private float walkSpeed = (float) 2.75; - private float waterModPercent = 1; + private float walkSpeed = (float) 1.549; + private float waterModPercent = (float) 0.75; private SWGList abilities; private int abilitiesUpdateCounter = 0; + private int xpBarValue = 0; private SWGList missionCriticalObjects; @NotPersistent @@ -112,20 +120,21 @@ public class CreatureObject extends TangibleObject implements IPersistent { private String inviteSenderName; private long inviteCounter = 0; private int guildId = 0; + private long lookAtTarget = 0; private long targetId = 0; private byte moodId = 0; private int performanceCounter = 0; private int performanceId = 0; - //FIXME: this is a bit of a hack. + private boolean hologram = false; private boolean performanceType = false; - //FIXME: hmm.. or persistent? - @NotPersistent private boolean acceptBandflourishes = true; - @NotPersistent private boolean groupDance = true; + @NotPersistent private CreatureObject performanceWatchee; + @NotPersistent private CreatureObject performanceListenee; - private SWGList performanceAudience = new SWGList(); + @NotPersistent + private Vector performanceAudience = new Vector(); private int health = 1000; private int action = 300; @NotPersistent @@ -145,7 +154,11 @@ public class CreatureObject extends TangibleObject implements IPersistent { private SWGList appearanceEquipmentList; @NotPersistent private int appearanceEquipmentListUpdateCounter = 0; - + + private boolean inStealth = false; + private boolean radarVisible = true; // radar + private boolean stationary = false; + // non-baseline vars @NotPersistent private List duelList = Collections.synchronizedList(new ArrayList()); @@ -159,15 +172,30 @@ public class CreatureObject extends TangibleObject implements IPersistent { @NotPersistent private ScheduledFuture inspirationTick; + @NotPersistent + private ScheduledFuture spectatorTask; + private boolean staticNPC = false; // temp @NotPersistent private int flourishCount = 0; + @NotPersistent + private boolean performingEffect; + @NotPersistent + private boolean performingFlourish; + private int coverCharge; + @NotPersistent + private TangibleObject conversingNpc; + @NotPersistent + private ConcurrentHashMap cooldowns = new ConcurrentHashMap(); + @NotPersistent + private long tefTime = System.currentTimeMillis(); public CreatureObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { super(objectID, planet, Template, position, orientation); messageBuilder = new CreatureMessageBuilder(this); - skills = new SWGList(messageBuilder, 1, 3); - skillMods = new SWGList(messageBuilder, 4, 3); + loadTemplateData(); + skills = new ArrayList(); + skillMods = new SWGMap(messageBuilder, 4, 3); abilities = new SWGList(messageBuilder, 4, 14); missionCriticalObjects = new SWGList(messageBuilder, 4, 13); equipmentList = new SWGList(messageBuilder, 6, 0x17); @@ -180,6 +208,19 @@ public class CreatureObject extends TangibleObject implements IPersistent { messageBuilder = new CreatureMessageBuilder(this); } + private void loadTemplateData() { + + /*if(getTemplateData().getAttribute("scale") != null) + setHeight((float) getTemplateData().getAttribute("scale")); + if(getTemplateData().getAttribute("speed") != null) { + //System.out.println(getTemplateData().getAttribute("speed")); + setRunSpeed((float) getTemplateData().getAttribute("speed")); + } + if(getTemplateData().getAttribute("turnRate") != null) + setTurnRadius((float) getTemplateData().getAttribute("turnRate"));*/ + + } + public void setCustomName2(String customName) { setCustomName(customName); @@ -226,12 +267,12 @@ public class CreatureObject extends TangibleObject implements IPersistent { } } - public SWGList getSkills() { + public List getSkills() { return skills; } public boolean hasSkill(String name) { - synchronized(objectMutex) { + /*synchronized(objectMutex) { for (String skill : skills) { if (skill.equals(name)) { return true; @@ -239,7 +280,8 @@ public class CreatureObject extends TangibleObject implements IPersistent { } return false; - } + }*/ + return skills.contains(name); } public short getSkillsUpdateCounter() { @@ -328,56 +370,53 @@ public class CreatureObject extends TangibleObject implements IPersistent { } public void setPosture(byte posture) { - boolean needsStopPerformance = false; synchronized(objectMutex) { if (this.posture == 0x09) { - needsStopPerformance = true; + stopPerformance(); } + if(this.posture == posture) + return; this.posture = posture; } - - IoBuffer postureDelta = messageBuilder.buildPostureDelta(posture); + Posture postureUpdate = new Posture(getObjectID(), posture); ObjControllerMessage objController = new ObjControllerMessage(0x1B, postureUpdate); - notifyObservers(postureDelta, true); + notifyObservers(messageBuilder.buildPostureDelta(posture), true); notifyObservers(objController, true); - if (needsStopPerformance) { - stopPerformance(); - } - } public void startPerformance() { - - getClient().getSession().write(messageBuilder.buildStartPerformance(true)); - + setStationary(true); } public void stopPerformance() { String type = ""; + synchronized(objectMutex) { - setPerformanceId(0,true); + // Some reason this prevents the animation for playing an instrument when stopping (unless that's what "" does) + setCurrentAnimation(getCurrentAnimation()); + setPerformanceCounter(0); - setCurrentAnimation(""); + setPerformanceId(0,true); + type = (performanceType) ? "dance" : "music"; + if (entertainerExperience != null) { entertainerExperience.cancel(true); entertainerExperience = null; } } - sendSystemMessage("@performance:" + type + "_stop_self",(byte)0); + sendSystemMessage("@performance:" + type + "_stop_self",(byte)0); stopAudience(); - - getClient().getSession().write(messageBuilder.buildStartPerformance(false)); + setStationary(false); } public void stopAudience() { - String type = ""; synchronized(objectMutex) { - type = (performanceType) ? "dance" : "music"; + //String type = (performanceType) ? "dance" : "music"; if (performanceAudience == null) { return; } @@ -394,10 +433,10 @@ public class CreatureObject extends TangibleObject implements IPersistent { next.setMoodAnimation(""); } if (next == this) { continue; } - next.sendSystemMessage("@performance:" + type + "_stop_other",(byte)0); + if(performanceType) { next.sendSystemMessage("You stop watching " + getCustomName() + ".",(byte)0); } + else { next.sendSystemMessage("You stop listening to " + getCustomName() + ".",(byte)0); } + next.getSpectatorTask().cancel(true); } - //not sure if this behaviour is correct. might need fixing later. - performanceAudience = new SWGList(); } } public ScheduledFuture getEntertainerExperience() { @@ -409,11 +448,15 @@ public class CreatureObject extends TangibleObject implements IPersistent { } public ScheduledFuture getInspirationTick() { - return inspirationTick; + synchronized(objectMutex) { + return inspirationTick; + } } public void setInspirationTick(ScheduledFuture inspirationTick) { - this.inspirationTick = inspirationTick; + synchronized(objectMutex) { + this.inspirationTick = inspirationTick; + } } @Override @@ -423,23 +466,30 @@ public class CreatureObject extends TangibleObject implements IPersistent { } notifyObservers(messageBuilder.buildFactionDelta(faction), true); - setPvpStatus(0, true); - } + - public int getFactionStatus() { - synchronized(objectMutex) { - return factionStatus; + CreatureObject companion = NGECore.getInstance().mountService.getCompanion(this); + + if (companion != null) { + companion.setFaction(faction); } } - + + @Override public void setFactionStatus(int factionStatus) { synchronized(objectMutex) { this.factionStatus = factionStatus; } notifyObservers(messageBuilder.buildFactionStatusDelta(factionStatus), true); + + CreatureObject companion = NGECore.getInstance().mountService.getCompanion(this); + + if (companion != null) { + companion.setFactionStatus(factionStatus); + } } - + public float getHeight() { synchronized(objectMutex) { return height; @@ -485,7 +535,25 @@ public class CreatureObject extends TangibleObject implements IPersistent { notifyObservers(stateDelta, true); } - + + public void setState(long state, boolean add) { + synchronized(objectMutex) { + if (state != 0) { + if (add) { + stateBitmask = (stateBitmask | state); + } else { + stateBitmask = (stateBitmask & ~state); + } + } + } + } + + public boolean getState(long state) { + synchronized(objectMutex) { + return ((stateBitmask & state) == state); + } + } + public long getOwnerId() { synchronized(objectMutex) { return ownerId; @@ -496,6 +564,10 @@ public class CreatureObject extends TangibleObject implements IPersistent { synchronized(objectMutex) { this.ownerId = ownerId; } + + setStringAttribute("owner", NGECore.getInstance().objectService.getObject(ownerId).getCustomName()); + + notifyObservers(messageBuilder.buildOwnerIdDelta(ownerId), true); } public float getAccelerationMultiplierBase() { @@ -521,20 +593,13 @@ public class CreatureObject extends TangibleObject implements IPersistent { this.accelerationMultiplierMod = accelerationMultiplierMod; } } - - public SWGList getSkillMods() { + + public SWGMap getSkillMods() { return skillMods; } public SkillMod getSkillMod(String name) { - synchronized(skillMods.getMutex()) { - for(SkillMod skillMod : skillMods.get()) { - if(skillMod.getSkillModString().equals(name)) - return skillMod; - } - } - - return null; + return skillMods.get(name); } public int getSkillModBase(String name) { @@ -543,66 +608,41 @@ public class CreatureObject extends TangibleObject implements IPersistent { } public void addSkillMod(String name, int base) { - if(getSkillMod(name) == null) { - SkillMod skillMod = new SkillMod(); - skillMod.setBase(base); - skillMod.setSkillModString(name); - skillMod.setModifier(0); - skillMods.add(skillMod); + SkillMod mod; + + if (getSkillMod(name) == null) { + mod = new SkillMod(); + mod.setBase(base); + mod.setName(name); + mod.setModifier(0); } else { - SkillMod mod = getSkillMod(name); + mod = getSkillMod(name); mod.setBase(mod.getBase() + base); - if(getClient() != null) { - setSkillModsUpdateCounter((short) (getSkillModsUpdateCounter() + 1)); - getClient().getSession().write(messageBuilder.buildAddSkillModDelta(name, mod.getBase())); - } } + skillMods.put(name, mod); } public void deductSkillMod(String name, int base) { - - if(getSkillMod(name) == null) + if (getSkillMod(name) == null) { return; + } SkillMod mod = getSkillMod(name); mod.setBase(mod.getBase() - base); - if(mod.getBase() <= 0) { + if (mod.getBase() <= 0) { removeSkillMod(mod); } else { - if(getClient() != null) { - setSkillModsUpdateCounter((short) (getSkillModsUpdateCounter() + 1)); - getClient().getSession().write(messageBuilder.buildAddSkillModDelta(name, mod.getBase())); - } - } - - } - - public void removeSkillMod(SkillMod mod) { - - skillMods.remove(mod); - - if(getClient() != null) { - setSkillModsUpdateCounter((short) (getSkillModsUpdateCounter() + 1)); - getClient().getSession().write(messageBuilder.buildRemoveSkillModDelta(mod.getSkillModString(), mod.getBase())); - } - - - } - - public short getSkillModsUpdateCounter() { - synchronized(objectMutex) { - return (short) skillModsUpdateCounter; + skillMods.put(name, mod); } } - public void setSkillModsUpdateCounter(short skillModsUpdateCounter) { - synchronized(objectMutex) { - this.skillModsUpdateCounter = skillModsUpdateCounter; + public void removeSkillMod(SkillMod mod) { + if (mod != null) { + skillMods.remove(mod.getName()); } } - public float getSpeedMultiplierBase() { synchronized(objectMutex) { @@ -635,18 +675,6 @@ public class CreatureObject extends TangibleObject implements IPersistent { notifyObservers(speedDelta, true); } - public long getListenToId() { - synchronized(objectMutex) { - return listenToId; - } - } - - public void setListenToId(long listenToId) { - synchronized(objectMutex) { - this.listenToId = listenToId; - } - } - public float getRunSpeed() { synchronized(objectMutex) { return runSpeed; @@ -939,23 +967,43 @@ public class CreatureObject extends TangibleObject implements IPersistent { this.guildId = guildId; } } - - public long getTargetId() { + + public long getLookAtTarget() { + synchronized(objectMutex) { + return lookAtTarget; + } + } + + public void setLookAtTarget(long lookAtTarget) { + synchronized(objectMutex) { + this.lookAtTarget = lookAtTarget; + } + + notifyObservers(messageBuilder.buildLookAtTargetDelta(lookAtTarget), true); + } + + public long getIntendedTarget() { synchronized(objectMutex) { return targetId; } } - public void setTargetId(long targetId) { + public void setIntendedTarget(long intendedTarget) { synchronized(objectMutex) { - this.targetId = targetId; + this.targetId = intendedTarget; } - IoBuffer targetDelta = messageBuilder.buildTargetDelta(targetId); - notifyObservers(targetDelta, false); - + notifyObservers(messageBuilder.buildIntendedTargetDelta(intendedTarget), true); } - + + public long getTargetId() { + return getIntendedTarget(); + } + + public void setTargetId(long targetId) { + setIntendedTarget(targetId); + } + public long getInviteCounter() { synchronized(objectMutex) { return inviteCounter; @@ -1015,7 +1063,9 @@ public class CreatureObject extends TangibleObject implements IPersistent { } public SWGList getEquipmentList() { + synchronized(objectMutex) { return equipmentList; + } } public SWGList getBuffList() { @@ -1045,7 +1095,7 @@ public class CreatureObject extends TangibleObject implements IPersistent { } public void removeObjectFromEquipList(SWGObject object) { - if(object instanceof TangibleObject) { + if(object instanceof TangibleObject && equipmentList.contains(object)) { setEquipmentListUpdateCounter(getEquipmentListUpdateCounter() + 1); notifyObservers(messageBuilder.buildRemoveEquipmentDelta((TangibleObject) object), true); equipmentList.get().remove(object); @@ -1061,14 +1111,13 @@ public class CreatureObject extends TangibleObject implements IPersistent { } public void removeObjectFromAppearanceEquipList(SWGObject object) { - if(object instanceof TangibleObject) { + if(object instanceof TangibleObject && appearanceEquipmentList.contains(object)) { setAppearanceEquipmentListUpdateCounter(getAppearanceEquipmentListUpdateCounter() + 1); notifyObservers(messageBuilder.buildRemoveAppearanceEquipmentDelta((TangibleObject) object), true); appearanceEquipmentList.get().remove(object); } } - - @SuppressWarnings("unused") + @Override public void sendBaselines(Client destination) { @@ -1085,71 +1134,27 @@ public class CreatureObject extends TangibleObject implements IPersistent { } //destination.getSession().write(messageBuilder.buildBaseline8()); //destination.getSession().write(messageBuilder.buildBaseline9()); - - UpdatePostureMessage upm = new UpdatePostureMessage(getObjectID(), (byte) 0); - destination.getSession().write(upm.serialize()); - + if(destination != getClient()) { - UpdatePVPStatusMessage upvpm = new UpdatePVPStatusMessage(getObjectID(), getPvPBitmask(), getFaction()); - if(getSlottedObject("ghost") != null) - upvpm.setStatus(16); - /* - if (factionStatus == 1 && faction == "imperial") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Imperial); - upvpm.setStatus(16); - if ((getOptionsBitmask() & 128) == 128) upvpm.setStatus(0); - if (getOwnerId() != 0) upvpm.setStatus(256); - } - - if (factionStatus == 1 && faction == "rebel") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Rebel); - upvpm.setStatus(16); - if ((getOptionsBitmask() & 128) == 128) upvpm.setStatus(0); - if (getOwnerId() != 0) upvpm.setStatus(256); - } - - if (factionStatus == 2 && faction == "imperial") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Imperial); - upvpm.setStatus(55); - if ((getOptionsBitmask() & 128) == 128) upvpm.setStatus(39); - if (getOwnerId() != 0) upvpm.setStatus(295); - } - if (factionStatus == 2 && faction == "rebel") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Rebel); - upvpm.setStatus(55); - if ((getOptionsBitmask() & 128) == 128) upvpm.setStatus(39); - if (getOwnerId() != 0) upvpm.setStatus(295); - } - if(factionStatus == 0 && faction == "neutral") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Neutral); - upvpm.setStatus(16); - if ((getOptionsBitmask() & 128) == 128) upvpm.setStatus(0); - if (getOwnerId() != 0) upvpm.setStatus(256); - } else { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Neutral); - upvpm.setStatus(16); - if ((getOptionsBitmask() & 128) == 128) upvpm.setStatus(0); - if (getOwnerId() != 0) upvpm.setStatus(256); - } - */ - + UpdatePVPStatusMessage upvpm = new UpdatePVPStatusMessage(getObjectID(), NGECore.getInstance().factionService.calculatePvpStatus((CreatureObject) destination.getParent(), this), getFaction()); destination.getSession().write(upvpm.serialize()); + UpdatePostureMessage upm = new UpdatePostureMessage(getObjectID(), getPosture()); + destination.getSession().write(upm.serialize()); } } public void sendSystemMessage(String message, byte displayType) { - - if(getClient() != null && getClient().getSession() != null) { - ChatSystemMessage systemMsg = new ChatSystemMessage(message, displayType); - getClient().getSession().write(systemMsg.serialize()); - } - + sendSystemMessage(message, new OutOfBand(), displayType); } - public void sendSystemMessage(String stfFilename, String stfName, int stat, int displayType) { + public void sendSystemMessage(OutOfBand outOfBand, byte displayType) { + sendSystemMessage("", outOfBand, displayType); + } + + public void sendSystemMessage(String message, OutOfBand outOfBand, byte displayType) { if(getClient() != null && getClient().getSession() != null) { - ChatSystemMessage systemMsg = new ChatSystemMessage(stfFilename, stfName, stat, (byte) displayType); + ChatSystemMessage systemMsg = new ChatSystemMessage(message, outOfBand, displayType); getClient().getSession().write(systemMsg.serialize()); } @@ -1204,14 +1209,18 @@ public class CreatureObject extends TangibleObject implements IPersistent { IoBuffer delta; synchronized(objectMutex) { + if (this.health == health) return; if(health > maxHealth) - health = maxHealth; + { + setHealth(maxHealth); + return; + } setHamListCounter(getHamListCounter() + 1); delta = messageBuilder.buildHealthDelta(health); - notifyObservers(delta, true); this.health = health; } + notifyObservers(delta, true); } @@ -1222,15 +1231,21 @@ public class CreatureObject extends TangibleObject implements IPersistent { } public void setAction(int action) { + IoBuffer delta; synchronized(objectMutex) { + if (this.action == action) return; if(action > maxAction) - action = maxAction; + { + setAction(maxAction); + return; + } setHamListCounter(getHamListCounter() + 1); delta = messageBuilder.buildActionDelta(action); - notifyObservers(delta, true); this.action = action; - } + } + notifyObservers(delta, true); + } public int getHamListCounter() { @@ -1253,6 +1268,8 @@ public class CreatureObject extends TangibleObject implements IPersistent { public void setMaxHealth(int maxHealth) { synchronized(objectMutex) { + if(this.maxHealth == maxHealth) return; + this.maxHealth = maxHealth; setMaxHAMListCounter(getMaxHAMListCounter() + 1); if(maxHealth < getHealth()) @@ -1269,6 +1286,8 @@ public class CreatureObject extends TangibleObject implements IPersistent { public void setMaxAction(int maxAction) { synchronized(objectMutex) { + if(this.maxAction == maxAction) return; + this.maxAction = maxAction; setMaxHAMListCounter(getMaxHAMListCounter() + 1); if(maxAction < getAction()) @@ -1349,6 +1368,17 @@ public class CreatureObject extends TangibleObject implements IPersistent { return null; } + public Buff getBuffByCRC(int crc) { + synchronized(objectMutex) { + for (Buff buff : buffList.get()) { + if (buff.getBuffCRC() == crc) { + return buff; + } + } + } + return null; + } + public void updateGroupInviteInfo() { if(getClient() == null || getClient().getSession() == null) @@ -1475,19 +1505,20 @@ public class CreatureObject extends TangibleObject implements IPersistent { } } - public void addAudience(CreatureObject audienceMember) { + public void addSpectator(CreatureObject audienceMember) { synchronized(objectMutex) { - if (performanceAudience == null) { - performanceAudience = new SWGList(); - } performanceAudience.add(audienceMember); } } - public void removeAudience(CreatureObject audienceMember) { + public void removeSpectator(CreatureObject audienceMember) { synchronized(objectMutex) { if (performanceAudience == null) { return; } - performanceAudience.remove(audienceMember); + if (audienceMember.getInspirationTick() != null) + audienceMember.getInspirationTick().cancel(true); + + if(performanceAudience.contains(audienceMember)) + performanceAudience.remove(audienceMember); } } @@ -1501,9 +1532,9 @@ public class CreatureObject extends TangibleObject implements IPersistent { synchronized(objectMutex) { this.performanceWatchee = performanceWatchee; } - // not sure at this point if it makes a difference really. - // on Live, an empty CREO4 was sent, at least when listenToId was empty. - //getClient().getSession().write(messageBuilder.buildListenToId(0)); + + //if(this.performanceListenee == null) + //getClient().getSession().write(messageBuilder.buildListenToId(0)); } public CreatureObject getPerformanceListenee() { @@ -1515,10 +1546,9 @@ public class CreatureObject extends TangibleObject implements IPersistent { public void setPerformanceListenee(CreatureObject performanceListenee) { synchronized(objectMutex) { this.performanceListenee = performanceListenee; - //possibly redundant, need to research this further. - this.listenToId = performanceListenee.getObjectId(); } - getClient().getSession().write(messageBuilder.buildListenToId(this.listenToId)); + if(getClient() != null) + getClient().getSession().write(messageBuilder.buildListenToId(performanceListenee.getObjectId())); } @@ -1602,5 +1632,215 @@ public class CreatureObject extends TangibleObject implements IPersistent { this.appearanceEquipmentListUpdateCounter = appearanceEquipmentListUpdateCounter; } } + public int getXpBarValue() { + synchronized(objectMutex) { + return xpBarValue; + } + } + + public void setXpBarValue(int xpBarValue) { + synchronized(objectMutex) { + this.xpBarValue = xpBarValue; + } + getClient().getSession().write(messageBuilder.buildXPBarDelta(xpBarValue)); + } + + public ScheduledFuture getSpectatorTask() { + synchronized(objectMutex) { + return spectatorTask; + } + } + + public void setSpectatorTask(ScheduledFuture spectatorTask) { + synchronized(objectMutex) { + this.spectatorTask = spectatorTask; + } + } + + public boolean isPerformingEffect() { + synchronized(objectMutex) { + return performingEffect; + } + } + + public void setPerformingEffect(boolean hasEffect) { + synchronized(objectMutex) { + this.performingEffect = hasEffect; + } + } + + public void setHologram(boolean isHologram) { + synchronized(objectMutex) { + this.hologram = isHologram; + } + } + + public boolean isHologram() { + synchronized(objectMutex) { + return hologram; + } + } + + public int getCoverCharge() { + synchronized(objectMutex) { + return coverCharge; + } + } + + public void setCoverCharge(int coverCharge) { + synchronized (objectMutex) { + this.coverCharge = coverCharge; + } + } + + public boolean isPerformingFlourish() { + synchronized(objectMutex){ + return performingFlourish; + } + } + + public void setPerformingFlourish(boolean performingFlourish) { + synchronized(objectMutex) { + this.performingFlourish = performingFlourish; + } + } + + public boolean isInStealth() { + synchronized(objectMutex) { + return inStealth; + } + } + + public void setInStealth(boolean inStealth) { + synchronized(objectMutex) { + this.inStealth = inStealth; + } + + if (getClient() != null && getClient().getSession() != null) { + getClient().getSession().write(messageBuilder.buildStealthFlagDelta(inStealth)); + } + notifyObservers(messageBuilder.buildStealthFlagDelta(inStealth), false); + + } + + public boolean isRadarVisible() { + synchronized(objectMutex) { + return radarVisible; + } + } + + public void setRadarVisible(boolean radarVisible) { + synchronized(objectMutex) { + this.radarVisible = radarVisible; + } + notifyObservers(messageBuilder.buildRadarVisibleFlagDelta(radarVisible), false); + } + + public boolean isStationary() { + synchronized(objectMutex) { + return stationary; + } + } + + public void setStationary(boolean stationary) { + synchronized(objectMutex) { + this.stationary = stationary; + } + + notifyObservers(messageBuilder.buildStartPerformance(stationary), true); + } + + public TangibleObject getConversingNpc() { + synchronized(objectMutex) { + return conversingNpc; + } + } + + public void setConversingNpc(TangibleObject conversingNpc) { + synchronized(objectMutex) { + this.conversingNpc = conversingNpc; + } + } + + public void addCooldown(String cooldownGroup, float cooldownTime) { + if (cooldowns.containsKey(cooldownGroup)) { + cooldowns.remove(cooldownGroup); + } + + long duration = System.currentTimeMillis() + ((long) (cooldownTime * 1000F)); + + cooldowns.put(cooldownGroup, duration); + } + + public boolean hasCooldown(String cooldownGroup) { + if (cooldowns.containsKey(cooldownGroup)) { + if (System.currentTimeMillis() < cooldowns.get(cooldownGroup)) { + return true; + } else { + cooldowns.remove(cooldownGroup); + } + } + + return false; + } + + public boolean removeCooldown(int actionCounter, BaseSWGCommand command) { + if (cooldowns.containsKey(command.getCooldownGroup())) { + cooldowns.remove(command.getCooldownGroup()); + getClient().getSession().write(new ObjControllerMessage(0x0B, new StartTask(actionCounter, getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), -1)).serialize()); + return true; + } + + return false; + } + + public Cooldown getCooldown(String cooldownGroup) { + return new Cooldown(getRemainingCooldown(cooldownGroup)); + } + + public long getRemainingCooldown(String cooldownGroup) { + if (cooldowns.containsKey(cooldownGroup)) { + if (System.currentTimeMillis() < cooldowns.get(cooldownGroup)) { + return (long) (cooldowns.get(cooldownGroup) - System.currentTimeMillis()); + } else { + cooldowns.remove(cooldownGroup); + } + } + + return 0L; + } + + public PlayerObject getPlayerObject() + { + return (PlayerObject) this.getSlottedObject("ghost"); + } + + //public float getCooldown(String cooldownGroup) { + //return ((float) getCooldown(cooldownGroup) / (float) 1000); + //} + + public long getTefTime() { + synchronized(objectMutex) { + return (((tefTime - System.currentTimeMillis()) > 0) ? (tefTime - System.currentTimeMillis()) : 0); + } + } + + public void setTefTime(long tefTime) { + synchronized(objectMutex) { + this.tefTime = tefTime + System.currentTimeMillis(); + } + } + + public int getInventoryItemCount() { + if(getSlottedObject("inventory") == null) + return 0; + LongAdder adder = new LongAdder(); + getSlottedObject("inventory").viewChildren(this, true, true, (obj) -> adder.increment()); + return adder.intValue(); + } + + //public float getCooldown(String cooldownGroup) { + //return ((float) getCooldown(cooldownGroup) / (float) 1000); + //} } diff --git a/src/resources/z/exp/objects/factorycrate/FactoryCrateObject.java b/src/resources/objects/deed/Deed.java similarity index 71% rename from src/resources/z/exp/objects/factorycrate/FactoryCrateObject.java rename to src/resources/objects/deed/Deed.java index e69c6c15..f98c6398 100644 --- a/src/resources/z/exp/objects/factorycrate/FactoryCrateObject.java +++ b/src/resources/objects/deed/Deed.java @@ -19,8 +19,19 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.factorycrate; +package resources.objects.deed; -public class FactoryCrateObject { +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import resources.objects.tangible.TangibleObject; +/** + * @author Charon + */ +public class Deed extends TangibleObject { + + public Deed(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, template, position, orientation); + } } diff --git a/src/resources/objects/deed/Harvester_Deed.java b/src/resources/objects/deed/Harvester_Deed.java new file mode 100644 index 00000000..945d9eb3 --- /dev/null +++ b/src/resources/objects/deed/Harvester_Deed.java @@ -0,0 +1,121 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.deed; +import com.sleepycat.persist.model.Persistent; + +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; + +/** + * @author Charon + */ +@Persistent(version=0) +public class Harvester_Deed extends Deed { + + private String name; + private String structureTemplate; + private String constructorTemplate; + private int outputHopperCapacity=0; + private int BER=0; + private int BMR=0; + private int surplusMaintenance=0; + private int surplusPower=0; + private int lotRequirement; + + + public Harvester_Deed(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, template, position, orientation); + } + + public int getOutputHopperCapacity() { + return outputHopperCapacity; + } + public void setOutputHopperCapacity(int outputHopperCapacity) { + this.outputHopperCapacity = outputHopperCapacity; + } + public int getBER() { + return BER; + } + public void setBER(int bER) { + this.BER = bER; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getStructureTemplate() { + return structureTemplate; + } + public void setStructureTemplate(String structureTemplate) { + this.structureTemplate = structureTemplate; + } + public int getLotRequirement() { + return lotRequirement; + } + public void setLotRequirement(int lotRequirement) { + this.lotRequirement = lotRequirement; + } + public String getConstructorTemplate() { + return constructorTemplate; + } + public void setConstructorTemplate(String constructorTemplate) { + this.constructorTemplate = constructorTemplate; + } + public int getBMR() { + return BMR; + } + public void setBMR(int BMR) { + this.BMR = BMR; + } + public int getSurplusMaintenance() { + return surplusMaintenance; + } + public void setSurplusMaintenance(int surplusMaintenance) { + this.surplusMaintenance = surplusMaintenance; + } + + public int getSurplusPower() { + return surplusPower; + } + + public void setSurplusPower(int surplusPower) { + this.surplusPower = surplusPower; + } + + + public void setAttributes() { + this.getAttributes().put("@obj_attr_n:volume", "1"); + this.getAttributes().put("@obj_attr_n:examine_maintenance_rate", ""+this.getBMR() + "/hour"); + if (this.getSurplusMaintenance()>0) + this.getAttributes().put("@obj_attr_n:examine_maintenance", ""+this.getSurplusMaintenance()); + + //this.getAttributes().put("@obj_attr_n:energy_maintenance", "0"); + if (this.getSurplusPower()>0) + this.getAttributes().put("@obj_attr_n:examine_power", ""+this.getSurplusPower()); + + this.getAttributes().put("@obj_attr_n:examine_hoppersize", ""+this.getOutputHopperCapacity()); + this.getAttributes().put("@obj_attr_n:examine_extractionrate", ""+this.getBER()); + } +} diff --git a/src/resources/objects/deed/Player_House_Deed.java b/src/resources/objects/deed/Player_House_Deed.java new file mode 100644 index 00000000..448f3da9 --- /dev/null +++ b/src/resources/objects/deed/Player_House_Deed.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.deed; +import com.sleepycat.persist.model.Persistent; + +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; + +/** + * @author Seefo + * @author Charon + */ + +@Persistent(version=0) +public class Player_House_Deed extends Deed { + + private String name; + private String structureTemplate; + private String constructorTemplate; + private int BMR=0; + private int surplusMaintenance=0; + private int lotRequirement; + + + public Player_House_Deed(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, template, position, orientation); + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getStructureTemplate() { + return structureTemplate; + } + public void setStructureTemplate(String structureTemplate) { + this.structureTemplate = structureTemplate; + } + public int getLotRequirement() { + return lotRequirement; + } + public void setLotRequirement(int lotRequirement) { + this.lotRequirement = lotRequirement; + } + public String getConstructorTemplate() { + return constructorTemplate; + } + public void setConstructorTemplate(String constructorTemplate) { + this.constructorTemplate = constructorTemplate; + } + public int getBMR() { + return BMR; + } + public void setBMR(int BMR) { + this.BMR = BMR; + } + public int getSurplusMaintenance() { + return surplusMaintenance; + } + public void setSurplusMaintenance(int surplusMaintenance) { + this.surplusMaintenance = surplusMaintenance; + } + + public void setAttributes() { + this.getAttributes().put("@obj_attr_n:volume", "1"); + this.getAttributes().put("@obj_attr_n:examine_maintenance_rate", ""+this.getBMR() + "/hour"); + if (this.getSurplusMaintenance()>0) + this.getAttributes().put("@obj_attr_n:examine_maintenance", ""+this.getSurplusMaintenance()); + + + } +} diff --git a/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java b/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java index dbb1e565..59c39cbe 100644 --- a/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java +++ b/src/resources/objects/factorycrate/FactoryCrateMessageBuilder.java @@ -21,6 +21,156 @@ ******************************************************************************/ package resources.objects.factorycrate; -public class FactoryCrateMessageBuilder { +import java.nio.ByteOrder; +import org.apache.mina.core.buffer.IoBuffer; + +import resources.objects.ObjectMessageBuilder; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceContainerObject; + +/** + * @author Charon + */ + +public class FactoryCrateMessageBuilder extends ObjectMessageBuilder{ + + public FactoryCrateMessageBuilder(FactoryCrateObject factoryCrateObject) { + setObject(factoryCrateObject); + } + + + public IoBuffer buildBaseline3() { + FactoryCrateObject factoryCrateObject = (FactoryCrateObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putShort((short)0x0D); + buffer.putFloat(1.0f); //op0 + buffer.put(getAsciiString("factory_n")); + buffer.putInt(0); + buffer.put(getAsciiString("food_crate")); + + if (factoryCrateObject.getCustomName().length()>0) + buffer.put(getUnicodeString(factoryCrateObject.getCustomName())); + else + buffer.putInt(0); + + buffer.putInt(1); + buffer.putShort((short)0); + + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + + buffer.putInt(0x2100); // optionsbitmask + buffer.putInt((int)factoryCrateObject.getQuantity()); // Quantity // op9 + buffer.putInt(0); + buffer.putInt(0x64); // condition maybe + + buffer.put((byte)1); + + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("TYCF", (byte) 3, buffer, size); + + return buffer; + +// 01 00 00 00 +// 00 00 +// 00 00 00 00 +// 00 00 00 00 +// 00 00 00 00 +// 00 00 00 00 +// 00 21 00 00 +// 2A 00 00 00 +// 00 00 00 00 +// 64 00 00 00 +// 01 + + } + + public IoBuffer buildBaseline6() { + FactoryCrateObject factoryCrateObject = (FactoryCrateObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putShort((short)6); + buffer.putInt(3); + + buffer.putInt(0); + buffer.putInt(0); + + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + + buffer.put((byte)0); + + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("TYCF", (byte) 6, buffer, size); + + return buffer; + } + + + public IoBuffer buildBaseline8() { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)0); + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + buffer.flip(); + buffer = createBaseline("RCNO", (byte) 8, buffer, size); + return buffer; + } + + public IoBuffer buildBaseline9() { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)0); + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + buffer.flip(); + buffer = createBaseline("TYCF", (byte) 9, buffer, size); + return buffer; + } + + public IoBuffer buildDelta3() { + FactoryCrateObject factoryCrateObject = (FactoryCrateObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putInt(factoryCrateObject.getQuantity()); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("TYCF", (byte) 3, (short) 1, (short) 9, buffer, size + 4); + + return buffer; + } + + @Override + public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { + // TODO Auto-generated method stub + + } + + + @Override + public void sendBaselines() { + // TODO Auto-generated method stub + + } } diff --git a/src/resources/objects/factorycrate/FactoryCrateObject.java b/src/resources/objects/factorycrate/FactoryCrateObject.java index 8e7d3c75..d7b7b7d6 100644 --- a/src/resources/objects/factorycrate/FactoryCrateObject.java +++ b/src/resources/objects/factorycrate/FactoryCrateObject.java @@ -21,11 +21,250 @@ ******************************************************************************/ package resources.objects.factorycrate; +import java.util.Map; +import java.util.Vector; + +import main.NGECore; + +import protocol.swg.SceneCreateObjectByCrc; +import protocol.swg.SceneDestroyObject; +import protocol.swg.SceneEndBaselines; +import protocol.swg.UpdateContainmentMessage; +import protocol.swg.UpdatePVPStatusMessage; + +import com.sleepycat.persist.model.NotPersistent; import com.sleepycat.persist.model.Persistent; +import engine.clients.Client; +import engine.resources.common.CRC; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; + +import resources.objects.creature.CreatureObject; import resources.objects.tangible.TangibleObject; +/** + * @author Charon + */ + @Persistent(version=0) public class FactoryCrateObject extends TangibleObject { + + private Vector contents; + private byte capacity; + private byte contentObjectQuantity; + private int contentCRC; + private TangibleObject contentObjectType; + + @NotPersistent + private FactoryCrateMessageBuilder messageBuilder; + + public FactoryCrateObject() { + + } + + public FactoryCrateObject(long objectID, Planet planet, String template, Point3D position, Quaternion orientation) { + super(objectID, planet, template, position, orientation); + this.messageBuilder = new FactoryCrateMessageBuilder(this); + this.contents = new Vector(); + this.contentObjectQuantity = 0; + this.capacity = 25; + this.getAttributes().put("@obj_attr_n:condition", "100/100"); + this.getAttributes().put("@obj_attr_n:volume", "1"); + this.getAttributes().put("@obj_attr_n:quantity", "1"); + this.getAttributes().put("@obj_attr_n:factory_count", "1"); + this.getAttributes().put("@obj_attr_n:factory_attribs", "------------"); + this.getAttributes().put("@obj_attr_n:type", "@got_n:component"); + this.getAttributes().put("@obj_attr_n:serial_number", "123"); + + + } + + public boolean setContentType(TangibleObject contentObject) { + synchronized(objectMutex) { + this.contentObjectType = contentObject; + if (contentObject.getTemplate().length()>0) + this.contentCRC = CRC.StringtoCRC(contentObject.getTemplate()); + else + this.contentCRC = 0; + + Map contentAttributes = contentObject.getAttributes(); + for (Map.Entry entry : contentAttributes.entrySet()) + { + //if (!entry.getKey().equals(@obj_attr_n:condition)) + this.getAttributes().put(entry.getKey(), entry.getValue()); + } + + return true; + } + } + + public TangibleObject getContentType() { + return this.contentObjectType; + } + + public boolean setContentTypeAndQuantity(TangibleObject contentObject, int quantity) { + synchronized(objectMutex) { + this.contentObjectType = contentObject; + if (contentObject.getTemplate().length()>0) + this.contentCRC = CRC.StringtoCRC(contentObject.getTemplate()); + else{ + this.contentCRC = 0; + return false; // Does it make sense to continue anyway? + } + + Map contentAttributes = contentObject.getAttributes(); + for (Map.Entry entry : contentAttributes.entrySet()) + { + //if (!entry.getKey().equals(@obj_attr_n:condition)) + this.getAttributes().put(entry.getKey(), entry.getValue()); + System.out.println(entry.getKey() + " " + entry.getValue()); + } + if (quantity0){ + TangibleObject contentType = this.getContentType(); + if (contentType==null) + return; // Bad, crate had no content type set + TangibleObject contentItem = (TangibleObject) core.objectService.createObject(contentType.getTemplate(), player.getPlanet()); + contentItem.setOptions(resources.datatables.Options.SERIAL, true); + int crc = this.getContentCRC();//CRC.StringtoCRC("object/tangible/food/crafted/shared_drink_alcohol.iff"); + SceneCreateObjectByCrc createObjectMsg = new SceneCreateObjectByCrc(contentItem.getObjectID(), player.getOrientation().x, player.getOrientation().y, player.getOrientation().z, player.getOrientation().w, player.getPosition().x, player.getPosition().y, player.getPosition().z, crc, (byte) 0); + player.getClient().getSession().write(createObjectMsg.serialize()); + contentItem.sendBaselines(player.getClient()); // TANO 3,6,8,9 Baselines + SceneEndBaselines sceneEndBaselinesMsg = new SceneEndBaselines(contentItem.getObjectID()); + player.getClient().getSession().write(sceneEndBaselinesMsg.serialize()); + + long parentId = this.getParentId(); + SWGObject parentContainer = core.objectService.getObject(parentId); + if (parentContainer==null) + return; // crate has no parent, error + UpdateContainmentMessage updateContainmentMessage= new UpdateContainmentMessage(contentItem.getObjectID(), parentContainer.getObjectID(), -1); + player.getClient().getSession().write(updateContainmentMessage.serialize()); + + this.sendSetQuantity(player.getClient(),this.getQuantity()-1); + if (this.getQuantity()==0){ // Crate is empty now, delete it + parentContainer._remove(this); + SceneDestroyObject destroyObjectMsg = new SceneDestroyObject(this.getObjectID()); + player.getClient().getSession().write(destroyObjectMsg.serialize()); + core.objectService.destroyObject(this); + } + } else { // should give players the chance to clean faulty, empty crates from their containers + long parentId = this.getParentId(); + SWGObject parentContainer = core.objectService.getObject(parentId); + if (parentContainer==null) + return; // crate has no parent, error + parentContainer._remove(this); + SceneDestroyObject destroyObjectMsg = new SceneDestroyObject(this.getObjectID()); + player.getClient().getSession().write(destroyObjectMsg.serialize()); + core.objectService.destroyObject(this); + } + } + } + + public byte getQuantity() { + return contentObjectQuantity; + } + + public String getSerialNumber() { + if (!contents.isEmpty()) { + return contents.firstElement().getSerialNumber(); + } + return ""; + } + + public int getContentCRC() { + return contentCRC; + } -} + public void setContentCRC(int contentCRC) { + synchronized(objectMutex) { + this.contentCRC = contentCRC; + } + } + + public void handleSplit(){ + + } + + public void sendAddItem(Client destination) { + destination.getSession().write(messageBuilder.buildDelta3()); + this.getAttributes().put("@obj_attr_n:factory_count", ""+this.getQuantity()); + this.getAttributes().put("@obj_attr_n:quantity", ""+this.getQuantity()); + //services.CharonPacketUtils.printAnalysis(messageBuilder.buildDelta3(),"FCYT3 Delta"); + } + + public void sendSetQuantity(Client destination,int quantity) { + contentObjectQuantity = (byte) quantity; + destination.getSession().write(messageBuilder.buildDelta3()); + this.getAttributes().put("@obj_attr_n:factory_count", ""+quantity); + this.getAttributes().put("@obj_attr_n:quantity", ""+this.getQuantity()); + //services.CharonPacketUtils.printAnalysis(messageBuilder.buildDelta3(),"FCYT3 Delta"); + } + + + @Override + public void sendBaselines(Client destination) { + + + if(destination == null || destination.getSession() == null) { + System.out.println("NULL destination"); + return; + } + + destination.getSession().write(messageBuilder.buildBaseline3()); + destination.getSession().write(messageBuilder.buildBaseline6()); + destination.getSession().write(messageBuilder.buildBaseline8()); + destination.getSession().write(messageBuilder.buildBaseline9()); + +// services.CharonPacketUtils.printAnalysis(messageBuilder.buildBaseline3(),"FCYT3 Baseline"); +// services.CharonPacketUtils.printAnalysis(messageBuilder.buildBaseline6(),"FCYT6 Baseline"); +// services.CharonPacketUtils.printAnalysis(messageBuilder.buildBaseline8(),"FCYT8 Baseline"); +// services.CharonPacketUtils.printAnalysis(messageBuilder.buildBaseline9(),"FCYT9 Baseline"); + } + + public void sendDelta3(Client destination) { + destination.getSession().write(messageBuilder.buildDelta3()); + this.getAttributes().put("@obj_attr_n:factory_count", ""+this.getQuantity()); + //services.CharonPacketUtils.printAnalysis(messageBuilder.buildDelta3(),"FCYT3 Delta"); + } +} \ No newline at end of file diff --git a/src/resources/objects/group/GroupObject.java b/src/resources/objects/group/GroupObject.java index ec9b215c..0f5c4622 100644 --- a/src/resources/objects/group/GroupObject.java +++ b/src/resources/objects/group/GroupObject.java @@ -39,9 +39,15 @@ public class GroupObject extends UniverseObject { private short groupLevel; private int lootMode; private GroupMessageBuilder messageBuilder; + private int chatRoomId; + + public static int FREE_FOR_ALL = 0; + public static int MASTER_LOOTER = 1; + public static int LOTTERY = 2; + public GroupObject(long objectId) { - super(objectId, null, new Point3D(0, 0, 0), new Quaternion(0, 0, 0, 1), "object/group/shared_group_object.iff"); + super(objectId, null, new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), "object/group/shared_group_object.iff"); messageBuilder = new GroupMessageBuilder(this); } @@ -108,7 +114,19 @@ public class GroupObject extends UniverseObject { this.lootMode = lootMode; } } - + + public int getChatRoomId() { + synchronized(objectMutex) { + return chatRoomId; + } + } + + public void setChatRoomId(int chatRoomId) { + synchronized(objectMutex) { + this.chatRoomId = chatRoomId; + } + } + public void addMember(SWGObject member) { if(memberList.size() >= 8 || member.getClient() == null) @@ -147,5 +165,4 @@ public class GroupObject extends UniverseObject { destination.getSession().write(messageBuilder.buildBaseline6()); } - } diff --git a/src/resources/objects/guild/GuildObject.java b/src/resources/objects/guild/GuildObject.java index a1fe7edb..5890756b 100644 --- a/src/resources/objects/guild/GuildObject.java +++ b/src/resources/objects/guild/GuildObject.java @@ -46,12 +46,11 @@ import com.sleepycat.persist.model.NotPersistent; import engine.clients.Client; import engine.resources.objects.IPersistent; -import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; -@Entity(version=0) +@Entity(version=1) public class GuildObject extends UniverseObject implements IPersistent { protected NGECore core; @@ -63,6 +62,8 @@ public class GuildObject extends UniverseObject implements IPersistent { @NotPersistent private Transaction txn; + private long nextInstanceId = 0; + // GILD 3 private float complexity = 0x803F0F00; private String STFFile = "string_id_table"; @@ -281,6 +282,12 @@ public class GuildObject extends UniverseObject implements IPersistent { } } + public synchronized long getNextInstanceId() { + long ret = nextInstanceId; + nextInstanceId++; + return ret; + } + @Override public void sendBaselines(Client destination) { destination.getSession().write(messageBuilder.buildBaseline3()); diff --git a/src/resources/objects/harvester/HarvesterMessageBuilder.java b/src/resources/objects/harvester/HarvesterMessageBuilder.java index 3b6c4602..cbe9b4d9 100644 --- a/src/resources/objects/harvester/HarvesterMessageBuilder.java +++ b/src/resources/objects/harvester/HarvesterMessageBuilder.java @@ -21,6 +21,806 @@ ******************************************************************************/ package resources.objects.harvester; -public class HarvesterMessageBuilder { +import java.nio.ByteOrder; +import java.util.Vector; +import org.apache.mina.core.buffer.IoBuffer; + +import engine.resources.objects.SWGObject; + +import resources.objects.ObjectMessageBuilder; +import resources.objects.creature.CreatureObject; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceContainerObject; + +/** + * @author Charon + */ +public class HarvesterMessageBuilder extends ObjectMessageBuilder{ + + public HarvesterMessageBuilder(HarvesterObject harvesterObject) { + setObject(harvesterObject); + } + + public IoBuffer buildBaseline3() { + + HarvesterObject building = (HarvesterObject) object; + IoBuffer buffer = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putShort((short) 0x0D); + buffer.putFloat(building.getComplexity()); + buffer.put(getAsciiString(building.getStfFilename())); + buffer.putInt(0); + buffer.put(getAsciiString(building.getStfName())); + buffer.putInt(0); + buffer.putInt(0xFF); + //buffer.putInt(0x64); + buffer.putInt(0); + buffer.putInt(0); + buffer.putShort((short) 0); + + buffer.putInt(0); + buffer.putInt(0); + // buffer.putInt(16777216); + buffer.putInt(0x100); + buffer.putInt(0); + buffer.putInt(64); + buffer.putInt(0x201C); + buffer.put((byte) 1); + + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("BUIO", (byte) 3, buffer, size); + + return buffer; + + } + + public IoBuffer buildHINO3Delta(HarvesterObject harvester,byte state) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)3); + buffer.putInt(0xB); + buffer.putShort((short)2); + buffer.putShort((short)8); + buffer.put((byte)1); + buffer.putShort((short)1); + buffer.put((byte)0); + buffer.putShort((short)0xD); + buffer.put(state); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } +// 0000: 05 00 53 21 86 12 33 01 0E BE 41 00 00 00 4F 4E ..S!..3...A...ON +// 0010: 49 48 03 0B 00 00 00 02 00 08 00 01 01 00 00 0D IH.............. +// 0020: 00 01 + + + public IoBuffer buildHINO3Delta2(HarvesterObject harvester,byte state) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)3); + buffer.putInt(0xB); + buffer.putShort((short)2); + buffer.putShort((short)8); + buffer.put((byte)0); + buffer.putShort((short)1); + buffer.put((byte)0); + buffer.putShort((short)0xD); + buffer.put(state); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + + public IoBuffer buildBaseline6() { + + HarvesterObject building = (HarvesterObject) object; + IoBuffer buffer = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putShort((short) 8); + buffer.putInt(0x43); + + buffer.put(getAsciiString(building.getDetailFilename())); + buffer.putInt(0); + buffer.put(getAsciiString(building.getDetailName())); + buffer.putInt(0); + buffer.put((byte) 0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("BUIO", (byte) 6, buffer, size); + + return buffer; + + } + + + public IoBuffer buildHINO7Delta(HarvesterObject harvester,byte state) { + + Vector outputHopperContent = harvester.getOutputHopperContent(); + int hopperContentSize = outputHopperContent.size(); + int iHopperList = 1; + if (hopperContentSize==0) { + iHopperList = 0; + } + //int sizeP = 30 + 15*hopperContentSize; + int sizeP = 30-2-4-4; + //System.out.println("sizeP " + sizeP); + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + buffer.putInt(sizeP); + // dOut.writeInt(0x2D); + buffer.putShort((short)5); + buffer.putShort((short)6); + buffer.put(state); + buffer.putShort((short)9); + buffer.putFloat(harvester.getActualExtractionRate()); + buffer.putShort((short)0x0C); + buffer.put(harvester.getUpdateCount()); +// buffer.putShort((short)0x0D); +// buffer.putInt(iHopperList); +// buffer.putInt(harvester.getResourceUpdateCount()); + int sumOfHopper = 0; + int i = 0; + sumOfHopper = 0; + Vector outputHopper = harvester.getOutputHopperContent(); + for (ResourceContainerObject cont : outputHopper){ + sumOfHopper += cont.getStackCount(); + i++; + } + + buffer.putShort((short)0x0A); + buffer.putInt(sumOfHopper); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildHINO7Delta2(HarvesterObject harvester,byte state) { + + Vector outputHopperContent = harvester.getOutputHopperContent(); + int hopperContentSize = outputHopperContent.size(); + int iHopperList = 1; + if (hopperContentSize==0) { + iHopperList = 0; + } + int sizeP = 30 + 15*hopperContentSize; + //System.out.println("sizeP " + sizeP); + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + buffer.putInt(sizeP); + // dOut.writeInt(0x2D); + buffer.putShort((short)5); + buffer.putShort((short)6); + buffer.put(state); + buffer.putShort((short)9); + buffer.putFloat(harvester.getActualExtractionRate()); + buffer.putShort((short)0x0C); + buffer.put(harvester.getUpdateCount()); + buffer.putShort((short)0x0D); + buffer.putInt(iHopperList); + buffer.putInt(harvester.getResourceUpdateCount()); + int sumOfHopper = 0; + + byte i = 0; + for (ResourceContainerObject container : outputHopperContent){ + buffer.putShort((short)harvester.getResourceUpdateCount()); + buffer.put(i); + buffer.putLong(container.getReferenceID()); + buffer.putInt(container.getStackCount()); + sumOfHopper += container.getStackCount(); + i++; + } + + buffer.putShort((short)0x0A); + buffer.putInt(sumOfHopper); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + // 2 + 2 + 1 + 2 + 4 + 2 + 1 + 2 + 4 + 4 + (hoppersize* 2+1+8+4=15) + 2 + 4 + +// 0000: 05 00 53 21 86 12 33 01 0E BE 41 00 00 00 4F 4E ..S!..3...A...ON +// 0010: 49 48 07 2D 00 00 00 05 00 06 00 01 09 00 3F AE IH.-..........?. +// 0020: 2D 42 0C 00 02 0D 00 01 00 00 00 01 00 00 00 02 -B.............. +// 0030: 00 00 5E C8 62 AB 41 00 00 00 CC F1 0A 40 0A 00 ..^.b.A......@.. +// 0040: CC F1 0A 40 ...@ + + public IoBuffer buildHINO7EmptyHopperDelta(HarvesterObject harvester) { + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + buffer.putInt(21); + buffer.putShort((short)3); + buffer.putShort((short)0x0C); + buffer.put((byte)harvester.getResourceUpdateCount()); + buffer.putShort((short)0x0D); + buffer.putInt(0); + buffer.putInt(harvester.getResourceUpdateCount()); + buffer.putShort((short)0x0A); + buffer.putFloat(harvester.getOutputHopperContent().size()); + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + + public IoBuffer buildHINO7ExperimentalDelta(HarvesterObject harvester) { + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + buffer.putInt(0x18); + buffer.putShort((short)3); + buffer.putShort((short)0x0C); + buffer.put((byte)harvester.getResourceUpdateCount()); + buffer.putShort((short)0x0D); + buffer.putInt(1); + buffer.putInt(0x1E); + buffer.put((byte)0); + buffer.putShort((short)0); + buffer.putInt(harvester.getResourceUpdateCount()); + buffer.putShort((short)0x0A); + buffer.putFloat(0); // since it's 0 outputhoppercontent + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + +// 0000: 05 00 53 21 86 12 53 D0 AC 41 3F 00 00 00 4F 4E ..S!..S..A?...ON +// 0010: 49 48 07 18 00 00 00 03 00 0C 00 25 0D 00 01 00 IH.........%.... +// 0020: 00 00 1E 00 00 00 00 00 00 0A 00 00 00 00 00 ............... + + + public IoBuffer buildHINO7ExperimentalDelta2(HarvesterObject harvester) { + + int iHopperList = 0; + if (harvester.getOutputHopperContent().size() >= 1) { + iHopperList = 1; + } + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + + buffer.putInt(36); + buffer.putShort((short)3); + buffer.putShort((short)0x0C); + buffer.put(harvester.getUpdateCount()); + buffer.putShort((short)0x0D); + buffer.putInt(iHopperList); + buffer.putInt(harvester.getResourceUpdateCount()); + int i = 0; + int totalStackCount = 0; + Vector outputHopper = harvester.getOutputHopperContent(); + for (ResourceContainerObject cont : outputHopper){ + totalStackCount += cont.getStackCount(); + if (cont.getReferenceID() == harvester.getSelectedHarvestResource().getId()) { + buffer.put((byte)2); + buffer.putShort((short) i); + buffer.putLong(cont.getReferenceID()); + buffer.putFloat((float)cont.getStackCount()); + //System.out.println("TOTAL STACKCOUNT " + (float)cont.getStackCount()); + } + i++; + } + + buffer.putShort((short)0x0A); + buffer.putFloat((float)totalStackCount); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildHINO7ActivateDelta(HarvesterObject harvester) { + + int iHopperList = 0; + if (harvester.getOutputHopperContent().size() >= 1) { + iHopperList = 1; + } + int factor = 0; + Vector outputHopper = harvester.getOutputHopperContent(); + for (ResourceContainerObject cont : outputHopper){ + if (cont.getReferenceID() == harvester.getSelectedHarvestResource().getId()) { + factor = 1; + } + } + + byte iHopperUpdateCounter = harvester.getResourceUpdateCount(); + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + buffer.putInt(5+19+(15*factor)); + buffer.putShort((short)5); + buffer.putShort((short)6); + buffer.put((byte)1); + // 2 + 4 + 4 + 2 + 4 + (15*h) = 16 + 2 + 1 = 19 + buffer.putShort((short)0x0C); + buffer.put(harvester.getUpdateCount()); + buffer.putShort((short)0x0D); + buffer.putInt(iHopperList); + buffer.putInt(iHopperUpdateCounter); + int totalStackCount = 0; + + int i = 0; + + for (ResourceContainerObject cont : outputHopper){ + totalStackCount += cont.getStackCount(); + if (cont.getReferenceID() == harvester.getSelectedHarvestResource().getId()) { + buffer.put((byte)2); + buffer.putShort((short) i); + buffer.putLong(cont.getReferenceID()); + buffer.putFloat((float)cont.getStackCount()); + } + i++; + } + + buffer.putShort((short)0x0A); + buffer.putFloat((float)totalStackCount); + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + + public IoBuffer buildHINO7ActivateDelta2(HarvesterObject harvester) { + + int iHopperList = 0; + if (harvester.getOutputHopperContent().size() >= 1) { + iHopperList = 1; + } + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + + buffer.putInt(11); + buffer.putShort((short)2); + buffer.putShort((short)6); + buffer.put((byte)1); + buffer.putShort((short)9); + buffer.putFloat(harvester.getActualExtractionRate()); + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } +// +// 02 00 06 00 01 09 00 43 94 IH............C. +// 0020: 59 42 YB + + public IoBuffer buildHINO7ActivateDelta2old(HarvesterObject harvester) { + + int iHopperList = 0; + if (harvester.getOutputHopperContent().size() >= 1) { + iHopperList = 1; + } + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + + buffer.putInt(5); + buffer.putShort((short)5); + buffer.putShort((short)6); + buffer.put((byte)1); + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildHINO7DeactivateDelta(HarvesterObject harvester) { + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + + buffer.putInt(14); + buffer.putShort((short)5); + buffer.putShort((short)6); + buffer.put((byte)0); + buffer.putShort((short)9); + buffer.putFloat(0); + buffer.putShort((short)0xC); + buffer.put((byte)5); + + // new +// buffer.putShort((short)6); +// buffer.put((byte)0); +// buffer.putShort((short)9); +// buffer.put((byte)0); +// buffer.putShort((short)0xC); +// buffer.put((byte)5); + + // + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + + public IoBuffer buildHINO7DeactivateDeltaold(HarvesterObject harvester) { + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + + buffer.putInt(5); + buffer.putShort((short)5); + buffer.putShort((short)6); + buffer.put((byte)0); + + // new + buffer.putShort((short)6); + buffer.put((byte)0); + buffer.putShort((short)9); + buffer.put((byte)0); + buffer.putShort((short)0xC); + buffer.put((byte)5); + + // + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildHINO7ClearDelta(HarvesterObject harvester) { + + int iHopperList = 0; + if (harvester.getOutputHopperContent().size() >= 1) { + iHopperList = 1; + } + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x48494E4F); + buffer.put((byte)7); + + buffer.putInt(36); + buffer.putShort((short)3); + buffer.putShort((short)0x0C); + buffer.put(harvester.getUpdateCount()); + buffer.putShort((short)0x0D); + buffer.putInt(iHopperList); + buffer.putInt(harvester.getResourceUpdateCount()); + buffer.put((byte)4); + buffer.putShort((short)0x0A); + buffer.putFloat((float)0.0F); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + + public IoBuffer buildDiscardResourceResponse(HarvesterObject harvester, byte actionMode, byte actionCounter,CreatureObject owner) { + + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x80CE5E46); + buffer.putInt(0x0B); + buffer.putInt(0xEE); + buffer.putLong(owner.getObjectID()); + buffer.putInt(0); + buffer.putInt(0xED); + buffer.put((byte)1); + buffer.put(actionCounter); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + +//0000: 05 00 46 5E CE 80 0B 00 00 00 EE 00 00 00 62 5F ..F^..........b_ +//0010: 02 15 00 00 01 00 00 00 00 00 ED 00 00 00 01 01 ................ +// ^^ weird but works, should be zero allowed too + + public IoBuffer buildBaseline8() { + IoBuffer buffer = bufferPool.allocate(2, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 0); + int size = buffer.position(); + buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); + buffer.flip(); + buffer = createBaseline("TANO", (byte) 8, buffer, size); + + return buffer; + } + + public IoBuffer buildBaseline9() { + IoBuffer buffer = bufferPool.allocate(2, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 0); + int size = buffer.position(); + buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); + buffer.flip(); + buffer = createBaseline("TANO", (byte) 9, buffer, size); + + return buffer; + } + + + public IoBuffer buildHINOBaseline7(HarvesterObject harvester,Vector vSRD) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + int sizeP = 74; + + buffer.putShort((short)5); + buffer.putInt(0x68A75F0C); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x4F4E4948); + buffer.put((byte)7); + + int iResourceCount = vSRD.size(); + Vector outputHopperContent = harvester.getOutputHopperContent(); + int hopperContentSize = outputHopperContent.size(); + float outputHopperCount = 0; + + //y = a + 4x + 16x + 12z = a + 20x + 12z + sizeP += (iResourceCount * 4); + sizeP += (iResourceCount * 16); + + sizeP += (hopperContentSize * 12); + + for (int i = 0; i < iResourceCount; i++) { + sizeP += vSRD.get(i).getName().length(); + sizeP += vSRD.get(i).getFileName().length(); + } + + buffer.putInt(sizeP); + + for (ResourceContainerObject container : outputHopperContent){ + outputHopperCount += container.getStackCount(); + } + + buffer.putShort((short)0x0F); + buffer.put((byte)1); + buffer.putInt(iResourceCount); + buffer.putInt(iResourceCount); + + for (int i = 0; i < iResourceCount; i++) { + buffer.putLong(vSRD.get(i).getId()); + } + buffer.putInt(iResourceCount); + + buffer.putInt(iResourceCount); + + for (int i = 0; i < iResourceCount; i++) { + buffer.putLong(vSRD.get(i).getId()); + } + + buffer.putInt(iResourceCount); + + buffer.putInt(iResourceCount); + + for (int i = 0; i < iResourceCount; i++) { + buffer.put(getAsciiString(vSRD.get(i).getName())); + } + + buffer.putInt(iResourceCount); + buffer.putInt(iResourceCount); + for (int i = 0; i < iResourceCount; i++) { + buffer.put(getAsciiString(vSRD.get(i).getFileName())); + + } + + if (harvester.getSelectedHarvestResource() != null) { + buffer.putLong(harvester.getSelectedHarvestResource().getId()); + } else { + buffer.putLong(0); + } + + buffer.put(harvester.isActivated() ? (byte)1 : (byte)0); + + buffer.putInt(harvester.getSpecRate()); // SPEC RATE buffer.putInt(harvester.getBER()); + + buffer.putFloat(harvester.getBER()); + + buffer.putFloat(harvester.getActualExtractionRate()); + buffer.putFloat(outputHopperCount); + buffer.putInt(harvester.getOutputHopperCapacity()); + buffer.put(harvester.getUpdateCount()); + buffer.putInt(hopperContentSize); + buffer.putInt(0); + for (ResourceContainerObject container : outputHopperContent){ + buffer.putLong(container.getReferenceID()); + buffer.putFloat(container.getStackCount()); + } + buffer.put(harvester.getStructuralCondition()); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildCustomNameDelta(HarvesterObject harvester, String customName) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + int sizeP = 8; + sizeP += 2*customName.length(); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(harvester.getObjectID()); + buffer.putInt(0x54414E4F); + buffer.put((byte)3); + buffer.putInt(sizeP); + buffer.putShort((short)1); + buffer.putShort((short)2); + buffer.put(getUnicodeString(customName)); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildPermissionListCreate(HarvesterObject harvester, Vector permissionList, String listName) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + int listSize = permissionList.size(); + buffer.putShort((short)4); + buffer.putInt(0x52F364B8); + buffer.putInt(listSize); + for (String name : permissionList){ + buffer.put(getUnicodeString(name)); + } + //buffer.putInt(0x61); + buffer.putInt(0); + //buffer.putShort((short)0); + buffer.put(getUnicodeString(listName)); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + /* + 0000: 04 00 B8 64 F3 52 01 00 00 00 06 00 00 00 63 00 ...d.R........c. + 0010: 68 00 61 00 72 00 6F 00 6E 00 00 00 00 00 05 00 h.a.r.o.n....... + 0020: 00 00 41 00 44 00 4D 00 49 00 4E 00 ..A.D.M.I.N. + */ + + // Send this in response to the Radial Menu to manage harvesters, + // it is necessary to send this *before* the 07 Baseline! + //ResourceHarvesterActivatePageMessage (BD18C679) + public IoBuffer buildResourceHarvesterActivatePageMessage(HarvesterObject harvester) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)2); + buffer.putInt(0xBD18C679); + buffer.putLong(harvester.getObjectID()); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildHarvesterGetResourceData(HarvesterObject harvester,SWGObject owner,Vector planetResources) { + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x80CE5E46); + buffer.putInt(0x0B); + buffer.putInt(0x000000EA); + buffer.putLong(owner.getObjectID()); + buffer.putInt(0); + buffer.putLong(harvester.getObjectID()); + if (planetResources == null || planetResources.isEmpty()) { + buffer.putInt(0); + } else { + buffer.putInt(planetResources.size()); + for (int i = 0; i < planetResources.size(); i++) { + float localConcentration = planetResources.get(i).deliverConcentrationForSurvey(owner.getPlanetId(), owner.getPosition().x, owner.getPosition().z); + buffer.putLong(planetResources.get(i).getId()); + buffer.put(getAsciiString(planetResources.get(i).getName())); + buffer.put(getAsciiString(planetResources.get(i).getFileName())); + buffer.put((byte)localConcentration); + } + } + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + + @Override + public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { + // TODO Auto-generated method stub + + } + + @Override + public void sendBaselines() { + + } } diff --git a/src/resources/objects/harvester/HarvesterObject.java b/src/resources/objects/harvester/HarvesterObject.java index b31b40cf..8964d7e1 100644 --- a/src/resources/objects/harvester/HarvesterObject.java +++ b/src/resources/objects/harvester/HarvesterObject.java @@ -21,11 +21,391 @@ ******************************************************************************/ package resources.objects.harvester; +import java.util.Vector; + +import main.NGECore; + import com.sleepycat.persist.model.Persistent; +import engine.clients.Client; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import resources.objects.creature.CreatureObject; +import resources.objects.installation.InstallationMessageBuilder; import resources.objects.installation.InstallationObject; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceContainerObject; + +/** + * @author Charon + */ @Persistent(version=0) public class HarvesterObject extends InstallationObject { + + private HarvesterMessageBuilder messageBuilder; + private InstallationMessageBuilder installationMessageBuilder; + + public final static byte HARVESTER_TYPE_MINERAL = 0; + public final static byte HARVESTER_TYPE_CHEMICAL = 1; + public final static byte HARVESTER_TYPE_FLORA = 2; + public final static byte HARVESTER_TYPE_GAS = 3; + public final static byte HARVESTER_TYPE_WATER = 4; + public final static byte HARVESTER_TYPE_SOLAR = 5; + public final static byte HARVESTER_TYPE_WIND = 6; + public final static byte HARVESTER_TYPE_FUSION = 7; + public final static byte HARVESTER_TYPE_GEO = 8; + + public String[] mineral_type_iff = new String[]{"object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff", + "object/installation/mining_ore/shared_mining_ore_harvester_style_2.iff", + "object/installation/mining_ore/shared_mining_ore_harvester_heavy.iff", + "object/installation/mining_ore/shared_mining_ore_harvester_elite.iff"}; + + public String[] chemical_type_iff = new String[]{"object/installation/mining_liquid/shared_mining_liquid_harvester_style_1.iff", + "object/installation/mining_liquid/shared_mining_liquid_harvester_style_2.iff", + "object/installation/mining_liquid/shared_mining_liquid_harvester_style_3.iff", + "object/installation/mining_liquid/shared_mining_liquid_harvester_style_4.iff"}; + + public String[] flora_type_iff = new String[]{"object/installation/mining_organic/shared_mining_organic_flora_farm.iff", + "object/installation/mining_organic/shared_mining_organic_flora_farm_medium.iff", + "object/installation/mining_organic/shared_mining_organic_flora_farm_heavy.iff", + "object/installation/mining_organic/shared_mining_organic_flora_farm_elite.iff"}; + + public String[] water_type_iff = new String[]{"object/installation/mining_liquid/shared_mining_liquid_moisture_harvester.iff", + "object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_medium.iff", + "object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_heavy.iff", + "object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_elite.iff"}; + + public String[] gas_type_iff = new String[]{"object/installation/mining_gas/shared_mining_gas_harvester_style_1.iff", + "object/installation/mining_gas/shared_mining_gas_harvester_style_2.iff", + "object/installation/mining_gas/shared_mining_gas_harvester_style_3.iff", + "object/installation/mining_gas/shared_mining_gas_harvester_style_4.iff"}; + + public String[] wind_type_iff = new String[]{"object/installation/generators/shared_power_generator_wind_style_1.iff"}; + + public String[] solar_type_iff = new String[]{"object/installation/generators/shared_power_generator_solar_style_1.iff"}; + + public String[] fusion_type_iff = new String[]{"object/installation/generators/shared_power_generator_fusion_style_1.iff"}; + + public String[] geo_type_iff = new String[]{"object/installation/generators/shared_power_generator_geothermal_style_1.iff"}; + //for nothing "object/installation/generators/shared_power_generator_photo_bio_style_1.iff" + + + public byte harvester_type = 0; + public byte harvester_size = 0; + private Vector outputHopperContent = new Vector(); + private int outputHopperCapacity = 0; + private int BER = 0; + private float maintenanceAmount = 0; + private float powerLevel = 0; + private int powerCost = 0; + private int maintenanceCost = 0; + private byte structuralCondition = 100; + private boolean activated = false; + private boolean generator = false; + private GalacticResource selectedHarvestResource; + private float selectedResourceConcentration; + private byte updateCount; + private byte resourceUpdateCount; + private Vector adminList = new Vector(); + private Vector hopperList = new Vector(); + private long owner; + private float currentHarvestedCountFloat=0.0F; + private String deedTemplate; + + private int specRate; + + + public HarvesterObject(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, template, position, orientation); + this.setConditionDamage(100); + messageBuilder = new HarvesterMessageBuilder(this); + installationMessageBuilder = new InstallationMessageBuilder((InstallationObject)this); + } + + public int getBER() { + return BER; + } + + + public void setBER(int baseExtractionRate) { + this.BER = baseExtractionRate; + } + + + public float getActualExtractionRate() { + //float resourceDraw = (getBER() * getSelectedResourceConcentration()) / 400; // /100 + float resourceDraw = 1.5F*(getBER() * getSelectedResourceConcentration()) / 100; + // BER * concentration * publish 27 bonus * profession buffs = AER + // 14* 0.83 * 1.5 * 1.05 = 18.3015 AER + return resourceDraw; + } + + public int getSpecRate() { + return specRate; + } + + public void setSpecRate(int specRate) { + this.specRate = specRate; + } + + + public GalacticResource getSelectedHarvestResource() { + return selectedHarvestResource; + } + + + public void setSelectedHarvestResource(GalacticResource selectedHarvestResource,CreatureObject owner) { + this.selectedHarvestResource = selectedHarvestResource; + setSelectedResourceConcentration(selectedHarvestResource.deliverConcentrationForSurvey(this.getPlanetId(), this.getPosition().x, this.getPosition().z)); + + owner.getClient().getSession().write(installationMessageBuilder.constructINSO7Var1((InstallationObject) this,selectedHarvestResource.getObjectId())); + owner.getClient().getSession().write(installationMessageBuilder.constructINSO7Var2((InstallationObject) this,selectedHarvestResource.getObjectId())); + } + + + public float getSelectedResourceConcentration() { + return selectedResourceConcentration; + } + + + private void setSelectedResourceConcentration(float selectedResourceConcentration) { + this.selectedResourceConcentration = selectedResourceConcentration; + } + + + public void activateHarvester(CreatureObject owner){ + activated = true; + this.setOwner(owner.getObjectID()); + owner.getClient().getSession().write(messageBuilder.buildHINO3Delta(this,(byte)1)); + owner.getClient().getSession().write(messageBuilder.buildHINO7ActivateDelta2(this)); + } + + + public void deactivateHarvester(CreatureObject owner){ + activated = false; + owner.getClient().getSession().write(messageBuilder.buildHINO3Delta2(this,(byte)0)); + owner.getClient().getSession().write(messageBuilder.buildHINO7DeactivateDelta(this)); + } + + + public boolean isActivated(){ + return this.activated; + } + + + public byte getHarvester_type() { + return harvester_type; + } + + + public void setHarvester_type(byte harvester_type) { + this.harvester_type = harvester_type; + } + + + public Vector getOutputHopperContent() { + return outputHopperContent; + } + + + public void setOutputHopperContent(Vector outputHopperContent) { + this.outputHopperContent = outputHopperContent; + } + + + public byte getStructuralCondition() { + return structuralCondition; + } + + + public void setStructuralCondition(byte structuralCondition) { + this.structuralCondition = structuralCondition; + } + + + public int getOutputHopperCapacity() { + return outputHopperCapacity; + } + + + public void setOutputHopperCapacity(int outputHopperCapacity) { + this.outputHopperCapacity = outputHopperCapacity; + } + + + public byte getUpdateCount() { + if (updateCount>254) updateCount = 0; + return updateCount++; + } + + public byte getResourceUpdateCount() { + if (resourceUpdateCount>254) resourceUpdateCount = 0; + return resourceUpdateCount++; + } + + + public void setUpdateCount(byte updateCount) { + this.updateCount = updateCount; + } + + + public Vector getAdminList() { + return adminList; + } + + + public void setAdminList(Vector adminList) { + this.adminList = adminList; + } + + + public Vector getHopperList() { + return hopperList; + } + + + public void setHopperList(Vector hopperList) { + this.hopperList = hopperList; + } + + + public float getPowerLevel() { + return powerLevel; + } + + + public void setPowerLevel(float energyLevel) { + this.powerLevel = energyLevel; + } + + + public float getMaintenanceAmount() { + return maintenanceAmount; + } + + + public void setMaintenanceAmount(float maintenanceAmount) { + this.maintenanceAmount = maintenanceAmount; + } + + public int getPowerCost() { + return powerCost; + } + + + public void setPowerCost(int powerCost) { + this.powerCost = powerCost; + } + + + public int getMaintenanceCost() { + return maintenanceCost; + } + + + public void setMaintenanceCost(int maintenanceCost) { + this.maintenanceCost = maintenanceCost; + } + + + public float getCurrentHarvestedCountFloat() { + return currentHarvestedCountFloat; + } + + + public void setCurrentHarvestedCountFloat(float currentHarvestedCountFloat) { + this.currentHarvestedCountFloat = currentHarvestedCountFloat; + } + + + public long getOwner() { + return owner; + } + + + public void setOwner(long owner) { + this.owner = owner; + } + + public void setDeedTemplate(String deedTemplate){ + this.deedTemplate = deedTemplate; + } + + public String getDeedTemplate(){ + return this.deedTemplate; + } + + + public boolean isGenerator() { + return generator; + } + + public void setGenerator(boolean generator) { + this.generator = generator; + } + + + public void setHarvesterName(String name,CreatureObject owner){ + owner.getClient().getSession().write(messageBuilder.buildCustomNameDelta(this,name)); + this.setCustomName(name); + ((CreatureObject)owner).sendSystemMessage("Structure renamed.", (byte) 0); + } + + public void setPermissionAdmin(String name,CreatureObject owner){ + Vector permissionList = this.getAdminList(); + owner.getClient().getSession().write(messageBuilder.buildPermissionListCreate(this, permissionList, name)); + } + + public void setPermissionHopper(String name,CreatureObject owner){ + Vector permissionList = this.getAdminList(); + owner.getClient().getSession().write(messageBuilder.buildPermissionListCreate(this, permissionList, name)); + } + + public void operateMachinery(CreatureObject owner){ + owner.getClient().getSession().write(messageBuilder.buildResourceHarvesterActivatePageMessage(this)); + // Assemble resources at that spot + // For later, it might be needed to also pass the template to differentiate liquid resources + Vector planetResourcesVector = NGECore.getInstance().resourceService.getSpawnedResourcesByPlanetAndHarvesterType(this.getPlanetId(),this.getHarvester_type()); + owner.getClient().getSession().write(messageBuilder.buildHarvesterGetResourceData(this, owner, planetResourcesVector)); + owner.getClient().getSession().write(messageBuilder.buildHINOBaseline7(this, planetResourcesVector)); + } + + public void deActivate(){ + NGECore.getInstance().objectService.getObject(owner).getClient().getSession().write(messageBuilder.buildResourceHarvesterActivatePageMessage(this)); + } + + public void placeHarvester(){ + NGECore.getInstance().objectService.getObject(owner).getClient().getSession().write(messageBuilder.buildResourceHarvesterActivatePageMessage(this)); + } + + public void createNewHopperContainer(){ + Vector planetResourcesVector = NGECore.getInstance().resourceService.getSpawnedResourcesByPlanetAndHarvesterType(this.getPlanetId(),this.getHarvester_type()); + NGECore.getInstance().objectService.getObject(owner).getClient().getSession().write(messageBuilder.buildHINOBaseline7(this, planetResourcesVector)); + NGECore.getInstance().objectService.getObject(owner).getClient().getSession().write(messageBuilder.buildHINO7Delta(this,(byte)1)); + } + + public void continueHopperContainer(){ + Vector planetResourcesVector = NGECore.getInstance().resourceService.getSpawnedResourcesByPlanetAndHarvesterType(this.getPlanetId(),this.getHarvester_type()); + NGECore.getInstance().objectService.getObject(owner).getClient().getSession().write(messageBuilder.buildHarvesterGetResourceData(this, NGECore.getInstance().objectService.getObject(owner), planetResourcesVector)); + NGECore.getInstance().objectService.getObject(owner).getClient().getSession().write(messageBuilder.buildHINOBaseline7(this, planetResourcesVector)); + } + + @Override + public void sendBaselines(Client destination) { + + + if(destination == null || destination.getSession() == null) { + System.out.println("NULL destination"); + return; + } + + destination.getSession().write(installationMessageBuilder.buildBaseline3(this)); + //destination.getSession().write(installationMessageBuilder.buildBaseline6(this)); + //destination.getSession().write(installationMessageBuilder.buildBaseline8()); + //destination.getSession().write(installationMessageBuilder.buildBaseline9()); + + } } diff --git a/src/resources/objects/installation/InstallationMessageBuilder.java b/src/resources/objects/installation/InstallationMessageBuilder.java index f7902d4e..f9fe356d 100644 --- a/src/resources/objects/installation/InstallationMessageBuilder.java +++ b/src/resources/objects/installation/InstallationMessageBuilder.java @@ -21,6 +21,205 @@ ******************************************************************************/ package resources.objects.installation; -public class InstallationMessageBuilder { +import java.nio.ByteOrder; +import org.apache.mina.core.buffer.IoBuffer; +import resources.objects.ObjectMessageBuilder; +import resources.objects.harvester.HarvesterObject; +/** + * @author Charon + */ + +public class InstallationMessageBuilder extends ObjectMessageBuilder{ + + public InstallationMessageBuilder(InstallationObject installationObject) { + setObject(installationObject); + } + + public IoBuffer buildBaseline3(InstallationObject installationObject) { + IoBuffer buffer = bufferPool.allocate(10, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + int packSize = 66; + packSize += installationObject.getStfName().length(); + packSize += installationObject.getStfFilename().length(); + + buffer.putShort((short)5); + buffer.putInt(0x68A75F0C); + buffer.putLong(installationObject.getObjectID()); + buffer.putInt(0x494E534F); + buffer.put((byte)3); + buffer.putInt(packSize); + buffer.putShort((short) 0x05); + buffer.putFloat(installationObject.getComplexity()); + buffer.put(getAsciiString(installationObject.getStfFilename())); // installation_n + buffer.putInt(0); + buffer.put(getAsciiString(installationObject.getStfName())); + buffer.put(getUnicodeString(""));//buffer.put(getUnicodeString(installationObject.getCustomName())); + buffer.putInt(1);// int 1 // oper 3 + buffer.putShort((short)0); + + buffer.putInt(0); + buffer.putInt(0); + buffer.putLong(0); + + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.put((byte)1); + buffer.put((byte)0); + buffer.putFloat(0.0F); + buffer.putFloat(0.0F); + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + +// 0000: 05 00 0C 5F A7 68 82 EC 7D 16 00 00 02 00 4F 53 ..._.h..}.....OS +// 0010: 4E 49 06 0E 00 00 00 05 00 76 00 00 00 00 00 00 NI.......v...... +// 0020: 00 01 00 00 00 ..... + + public IoBuffer buildBaseline6(InstallationObject installationObject) { + IoBuffer buffer = bufferPool.allocate(10, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + int packSize = 14; + buffer.putShort((short)5); + buffer.putInt(0x68A75F0C); + buffer.putLong(installationObject.getObjectID()); + buffer.putInt(0x494E534F); + buffer.put((byte)6); + buffer.putInt(packSize); + buffer.putShort((short)5); + buffer.putInt(0x76); + buffer.putInt(0); + buffer.putInt(1); + + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + + public IoBuffer buildBaseline7() { + IoBuffer buffer = bufferPool.allocate(2, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 0); + int size = buffer.position(); + buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); + buffer.flip(); + buffer = createBaseline("INSO", (byte) 7, buffer, size); + + return buffer; + } + + public IoBuffer buildBaseline8() { + IoBuffer buffer = bufferPool.allocate(2, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 0); + int size = buffer.position(); + buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); + buffer.flip(); + buffer = createBaseline("INSO", (byte) 8, buffer, size); + + return buffer; + } + + public IoBuffer buildBaseline9() { + IoBuffer buffer = bufferPool.allocate(2, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.putShort((short) 0); + int size = buffer.position(); + buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); + buffer.flip(); + buffer = createBaseline("INSO", (byte) 9, buffer, size); + + return buffer; + } + + public IoBuffer buildDelta3(InstallationObject installationObject,IoBuffer packet,int packSize) { + IoBuffer buffer = bufferPool.allocate(10, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(installationObject.getObjectID()); + buffer.putInt(0x494E534F); + buffer.put((byte)3); + buffer.putInt(packSize); + buffer.put(packet); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildDelta7(InstallationObject installationObject,IoBuffer packet,int packSize) { + IoBuffer buffer = bufferPool.allocate(10, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(installationObject.getObjectID()); + buffer.putInt(0x494E534F); + buffer.put((byte)7); + buffer.putInt(packSize); + buffer.put(packet); + int size = buffer.position(); + buffer.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(buffer.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer constructINSO7Var1(InstallationObject installationObject,long selectedResource) { + IoBuffer buffer = bufferPool.allocate(10, false).order(ByteOrder.LITTLE_ENDIAN); + int hopperContentsSize = ((HarvesterObject)installationObject).getOutputHopperContent().size()+1; + byte updateCounter = ((HarvesterObject)installationObject).getUpdateCount(); + + buffer.setAutoExpand(true); + buffer.putShort((short)2); // buffer.putShort((short)updateCounter); + buffer.putShort((short)0xC); + buffer.put((byte)1); + buffer.putShort((short)0xD); + + buffer.putInt(1);//buffer.putInt(hopperContentsSize); // works once with 1! HopperContentsSize->Number of resources in hopper + buffer.putInt(2); // UpdateCounter works once with 2! + buffer.put((byte)1); // subtype : ADD + buffer.putShort((short)0); // index was 0 buffer.putShort((short)(hopperContentsSize-1)); + buffer.putLong(selectedResource); + buffer.putFloat(0); + int size = buffer.position(); + buffer.flip(); + return buildDelta7(installationObject,IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(),size); + } + +// 0000: 05 00 53 21 86 12 82 EC 7D 16 00 00 02 00 4F 53 ..S!....}.....OS +// 0010: 4E 49 07 1E 00 00 00 02 00 0C 00 01 0D 00 01 00 NI.............. +// 0020: 00 00 02 00 00 00 01 00 00 8A D3 79 16 00 00 0F ...........y.... +// 0030: 00 00 00 00 00 ..... + + public IoBuffer constructINSO7Var2(InstallationObject installationObject,long selectedResource) { + IoBuffer buffer = bufferPool.allocate(10, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)2); + buffer.putShort((short)0x9); + buffer.putFloat(0); + buffer.putShort((short)0x5); + buffer.putLong(selectedResource); + int size = buffer.position(); + buffer.flip(); + return buildDelta7(installationObject,IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(),size); + } + +// 0000: 05 00 53 21 86 12 82 EC 7D 16 00 00 02 00 4F 53 ..S!....}.....OS +// 0010: 4E 49 07 12 00 00 00 02 00 09 00 00 00 00 00 05 NI.............. +// 0020: 00 8A D3 79 16 00 00 0F 00 ...y..... + + @Override + public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { + // TODO Auto-generated method stub + + } + + @Override + public void sendBaselines() { + + } } diff --git a/src/resources/objects/installation/InstallationObject.java b/src/resources/objects/installation/InstallationObject.java index 728de4a9..4d78229d 100644 --- a/src/resources/objects/installation/InstallationObject.java +++ b/src/resources/objects/installation/InstallationObject.java @@ -21,11 +21,23 @@ ******************************************************************************/ package resources.objects.installation; -import com.sleepycat.persist.model.Persistent; +import com.sleepycat.persist.model.Entity; +import engine.clients.Client; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; import resources.objects.tangible.TangibleObject; -@Persistent(version=0) +@Entity(version=0) public class InstallationObject extends TangibleObject { - -} + + public InstallationObject(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, template, position, orientation); + } + + @Override + public void sendBaselines(Client destination) { + + } +} \ No newline at end of file diff --git a/src/resources/objects/loot/LootDrop.java b/src/resources/objects/loot/LootDrop.java new file mode 100644 index 00000000..371c1727 --- /dev/null +++ b/src/resources/objects/loot/LootDrop.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.loot; + +import java.util.ArrayList; +import java.util.List; + +public class LootDrop { + + private List elements = new ArrayList(); + private String droppedItemTemplate; + + public LootDrop(){ + + } + + public void addElement(String element){ + elements.add(element); + } + + public List getElements(){ + return elements; + } + + public String getDroppedItemTemplate() { + return droppedItemTemplate; + } + + public void setDroppedItemTemplate(String droppedItemTemplate) { + this.droppedItemTemplate = droppedItemTemplate; + } +} diff --git a/src/resources/objects/loot/LootGroup.java b/src/resources/objects/loot/LootGroup.java new file mode 100644 index 00000000..e349eaac --- /dev/null +++ b/src/resources/objects/loot/LootGroup.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.loot; + +import com.sleepycat.persist.model.Persistent; + +/** + * @author Charon + */ + +@Persistent(version=0) +public class LootGroup { + + private String[] lootPoolNames; + private int[] lootPoolChances; + private int lootGroupChance; + + public LootGroup(){ + + } + + public LootGroup(String[] lootPoolNames, int[] lootPoolChances, int lootGroupChance){ + this.lootPoolNames = lootPoolNames; + this.lootPoolChances = lootPoolChances; + this.lootGroupChance = lootGroupChance; + } + + public void addLootData(String[] lootPoolNames, int[] lootPoolChances, int lootGroupChance){ + this.lootPoolNames = lootPoolNames; + this.lootPoolChances = lootPoolChances; + this.lootGroupChance = lootGroupChance; + } + + public String[] getLootPoolNames() { + return lootPoolNames; + } + + public int[] getLootPoolChances() { + return lootPoolChances; + } + + public int getLootGroupChance() { + return lootGroupChance; + } +} diff --git a/src/resources/z/exp/objects/Builder.java b/src/resources/objects/loot/LootPool.java similarity index 90% rename from src/resources/z/exp/objects/Builder.java rename to src/resources/objects/loot/LootPool.java index 8bc6b647..2e74cf8b 100644 --- a/src/resources/z/exp/objects/Builder.java +++ b/src/resources/objects/loot/LootPool.java @@ -19,10 +19,15 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects; +package resources.objects.loot; -public interface Builder { - - public byte[] build(); +/** + * @author Charon + */ + +public class LootPool { + public LootPool(){ + + } } diff --git a/src/resources/objects/loot/LootRollSession.java b/src/resources/objects/loot/LootRollSession.java new file mode 100644 index 00000000..884346ba --- /dev/null +++ b/src/resources/objects/loot/LootRollSession.java @@ -0,0 +1,163 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.loot; + +import java.util.ArrayList; +import java.util.List; + +import engine.resources.scene.Planet; +import main.NGECore; +import resources.objects.creature.CreatureObject; +import resources.objects.group.GroupObject; +import resources.objects.tangible.TangibleObject; + +/** + * @author Charon + */ + +public class LootRollSession { + + private String SessionID; // leaderName-SystemTime + private boolean sessionValid; + private GroupObject playerGroup; + private CreatureObject requester; + private List droppedItems; + private Planet sessionPlanet; + private List errorMessages; + private int sessionLootMode; + private boolean allowRareLoot; + private boolean increasedRLSChance; + + public LootRollSession(){ + } + + public LootRollSession(CreatureObject requester, TangibleObject lootedObject){ + long requesterGroupId = requester.getGroupId(); + if (requesterGroupId>0){ + this.playerGroup = (GroupObject) NGECore.getInstance().objectService.getObject(requesterGroupId); + this.SessionID = playerGroup.getGroupLeader().getCustomName()+"-"+System.currentTimeMillis(); + + } else { + this.SessionID = requester.getCustomName()+"-"+System.currentTimeMillis(); + } + + if (lootedObject instanceof CreatureObject){ + CreatureObject lootedCreature = (CreatureObject)lootedObject; + // Exclude rare loot depending on creature level + // For groups maybe average CL? + if (requester.getLevel()-lootedCreature.getLevel()<=6){ + this.setAllowRareLoot(true); + } + } + + // Group situation + if (this.getPlayerGroup()!=null){ + if (this.getPlayerGroup().getMemberList().size()>=4) + this.setIncreasedRLSChance(true); + } + + // Possible AFKer check here + + + droppedItems = new ArrayList(); + errorMessages = new ArrayList(); + sessionPlanet = requester.getPlanet(); + this.requester = requester; + allowRareLoot = false; + } + + public List getDroppedItems() { + return droppedItems; + } + + public void addDroppedItem(TangibleObject droppedItem) { + this.droppedItems.add(droppedItem); + } + + public String getSessionID() { + return SessionID; + } + + public void setSessionID(String sessionID) { + SessionID = sessionID; + } + + public void generateSessionID(String sessionID) { + SessionID = sessionID; + } + + public Planet getSessionPlanet() { + return sessionPlanet; + } + + public List getErrorMessages() { + return errorMessages; + } + + public void addErrorMessage(String errorMessage) { + this.errorMessages.add(errorMessage); + } + + public int getSessionLootMode() { + return sessionLootMode; + } + + public void setSessionLootMode(int sessionLootMode) { + this.sessionLootMode = sessionLootMode; + } + + public boolean isAllowRareLoot() { + return allowRareLoot; + } + + public void setAllowRareLoot(boolean allowRareLoot) { + this.allowRareLoot = allowRareLoot; + } + + public GroupObject getPlayerGroup() { + return playerGroup; + } + + public boolean isIncreasedRLSChance() { + return increasedRLSChance; + } + + public void setIncreasedRLSChance(boolean increasedRLSChance) { + this.increasedRLSChance = increasedRLSChance; + } + + public boolean isSessionValid() { + return sessionValid; + } + + public void setSessionValid(boolean sessionValid) { + this.sessionValid = sessionValid; + } + + public CreatureObject getRequester() { + return requester; + } + + public void setRequester(CreatureObject requester) { + this.requester = requester; + } +} diff --git a/src/resources/objects/manufacture/ManufactureSchematicObject.java b/src/resources/objects/manufacture/ManufactureSchematicObject.java index 35e558de..4ed340ef 100644 --- a/src/resources/objects/manufacture/ManufactureSchematicObject.java +++ b/src/resources/objects/manufacture/ManufactureSchematicObject.java @@ -21,11 +21,27 @@ ******************************************************************************/ package resources.objects.manufacture; -import com.sleepycat.persist.model.Persistent; import resources.objects.intangible.IntangibleObject; +import com.sleepycat.persist.model.Persistent; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; + + +/** + * @author Charon + */ @Persistent(version=0) -public class ManufactureSchematicObject extends IntangibleObject { +public class ManufactureSchematicObject extends IntangibleObject{ + + //@NotPersistent + //private ManufactureSchematicMessageBuilder messageBuilder; + public ManufactureSchematicObject(long objectID, Planet planet, String template, Point3D position, Quaternion orientation) { + super(objectID, planet, position, orientation, template); + //messageBuilder = new ManufactureSchematicMessageBuilder(this); + } + } diff --git a/src/resources/objects/player/PlayerMessageBuilder.java b/src/resources/objects/player/PlayerMessageBuilder.java index 2493d3a7..7e518a32 100644 --- a/src/resources/objects/player/PlayerMessageBuilder.java +++ b/src/resources/objects/player/PlayerMessageBuilder.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import org.apache.mina.core.buffer.IoBuffer; -import engine.resources.common.CRC; import resources.objects.ObjectMessageBuilder; import resources.objects.waypoint.WaypointObject; @@ -69,7 +68,7 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { else buffer.put(getAsciiString(player.getTitle())); - buffer.putInt(0); // born date? + buffer.putInt(0); // born date - Needs to be in yyymmdd format - Stored as epoch time of character create buffer.putInt(player.getTotalPlayTime()); // total play time? @@ -85,8 +84,8 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { buffer.put(player.getCollections()); buffer.putInt(0); // Unknown, part of one delta, maybe a list buffer.putInt(0); // Unknown, part of one delta, maybe a list - buffer.put((byte) 0); // Unknown Boolean used in Tansarii - buffer.put((byte) 0); // Unknown Boolean used in Tansarii + buffer.put((byte) ((player.isShowBackpack()) ? 1 : 0)); + buffer.put((byte) ((player.isShowHelmet()) ? 1 : 0)); int size = buffer.position(); @@ -108,12 +107,10 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { buffer.setAutoExpand(true); buffer.putShort((short) 0x11); buffer.putInt((short) 0x43); - buffer.put(getAsciiString("string_id_table")); - - buffer.put((byte) 0); // unk - buffer.putShort((short) 0); // unk - buffer.putInt(0); // unk + buffer.putInt(0); // probably stringId + buffer.putShort((short) 0); // detailedDescription + buffer.put(player.getGodLevel()); buffer.putInt(0); // unk buffer.putInt(0); // unk buffer.putInt(0); // unk @@ -200,8 +197,8 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { } } - buffer.putInt(100); // Current force power ? - buffer.putInt(100); // Max force power ? + buffer.putInt(0); // Current force power ? + buffer.putInt(0); // Max force power ? buffer.putInt(0); // Current FS Quest List size ? buffer.putInt(0); // Current FS Quest List update counter ? @@ -292,18 +289,6 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { buffer.putInt(0); buffer.putInt(0); - buffer.putInt(3); - buffer.putInt(0); - buffer.putInt(0); - - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - - buffer.putInt(0); - buffer.putInt(2); buffer.putInt(0); buffer.putInt(0); buffer.putInt(0); @@ -314,7 +299,19 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { buffer.putInt(0); buffer.putInt(0); - buffer.putInt(4); // jedi state??? + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + + buffer.putInt(0); // jedi state??? buffer.putShort((short) 0); int size = buffer.position(); @@ -362,24 +359,31 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { PlayerObject player = (PlayerObject) object; player.setXpListUpdateCounter(player.getXpListUpdateCounter() + 1); - // Some problem with createDelta() - IoBuffer result = bufferPool.allocate(42 + type.length(), false).order(ByteOrder.LITTLE_ENDIAN); - result.putShort((short) 5); - result.putInt(CRC.StringtoCRC("BaselinesMessage")); - result.putLong(object.getContainer().getObjectID()); - result.put("YALP".getBytes()); - result.put((byte) 8); - result.putInt(19 + type.length()); - result.putShort((short) 1); - result.putShort((short) 0); + IoBuffer result = bufferPool.allocate(15 + type.length(), false).order(ByteOrder.LITTLE_ENDIAN); + result.putInt(1); result.putInt(player.getXpListUpdateCounter()); result.put((byte) ((alreadyExists) ? 2 : 0)); - result.putShort((short) type.length()); - result.put(type.getBytes()); + result.put(getAsciiString(type)); result.putInt(amount); - return result.flip(); + int size = result.position(); + result.flip(); + result = createDelta("PLAY", (byte) 8, (short) 1, (short) 0, result, size + 4); + return result; + } + + public IoBuffer buildProfessionWheelPositionDelta(String professionWheelPosition) { + IoBuffer buffer = bufferPool.allocate(2 + professionWheelPosition.length(), false).order(ByteOrder.LITTLE_ENDIAN); + + buffer.put(getAsciiString(professionWheelPosition)); + + int size = buffer.position(); + buffer.flip(); + + buffer = createDelta("PLAY", (byte) 8, (short) 1, (short) 8, buffer, size + 4); + return buffer; + } public IoBuffer buildWaypointAddDelta(WaypointObject waypoint) { @@ -625,6 +629,40 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { return buffer; } + public IoBuffer buildShowBackpackDelta(boolean showBackpack) { + IoBuffer buffer = bufferPool.allocate(1, false).order(ByteOrder.LITTLE_ENDIAN); + + buffer.put((byte) (showBackpack ? 1 : 0)); + + int size = buffer.position(); + buffer.flip(); + + buffer = createDelta("PLAY", (byte) 3, (short) 1, (short) 18, buffer, size + 4); + return buffer; + } + + public IoBuffer buildShowHelmetDelta(boolean showHelmet) { + IoBuffer buffer = bufferPool.allocate(1, false).order(ByteOrder.LITTLE_ENDIAN); + + buffer.put((byte) (showHelmet ? 1 : 0)); + + int size = buffer.position(); + buffer.flip(); + + buffer = createDelta("PLAY", (byte) 3, (short) 1, (short) 19, buffer, size + 4); + return buffer; + } + + public IoBuffer buildGodLevelDelta(byte godLevel) { + IoBuffer buffer = bufferPool.allocate(1, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.put(godLevel); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("PLAY", (byte) 6, (short) 1, (short) 0x02, buffer, size + 4); + return buffer; + + } + @Override public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { // TODO Auto-generated method stub diff --git a/src/resources/objects/player/PlayerObject.java b/src/resources/objects/player/PlayerObject.java index 44cd7b84..bcbc3b21 100644 --- a/src/resources/objects/player/PlayerObject.java +++ b/src/resources/objects/player/PlayerObject.java @@ -29,7 +29,10 @@ import java.util.Map; import java.util.TreeMap; import resources.objects.intangible.IntangibleObject; +import resources.objects.resource.ResourceContainerObject; +import resources.objects.tool.SurveyTool; import resources.objects.waypoint.WaypointObject; +import resources.objects.creature.CreatureObject; import com.sleepycat.persist.model.NotPersistent; import com.sleepycat.persist.model.Persistent; @@ -41,7 +44,7 @@ import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; -@Persistent(version=3) +@Persistent(version=13) public class PlayerObject extends IntangibleObject { // PLAY 3 @@ -52,11 +55,13 @@ public class PlayerObject extends IntangibleObject { private List flagsList = new ArrayList(); private List profileList = new ArrayList(); private List titleList = new ArrayList(); - private int bornDate = 0; + private long bornDate = 0; private int totalPlayTime = 0; private byte[] collections = new byte[] { }; private int highestSetBit = 0; private int flagBitmask = 0; + private boolean showHelmet = true; + private boolean showBackpack = true; // PLAY 6 @@ -116,6 +121,13 @@ public class PlayerObject extends IntangibleObject { private int jediState = 0; // unused in NGE + private String biography = ""; + private String spouse; + private String holoEmote; + private int holoEmoteUses; + + private int lotsRemaining = 10; + @NotPersistent private PlayerMessageBuilder messageBuilder; @@ -124,6 +136,17 @@ public class PlayerObject extends IntangibleObject { private Map factionStandingMap = new TreeMap(); + private WaypointObject lastSurveyWaypoint; + private SurveyTool lastUsedSurveyTool; + private ResourceContainerObject recentContainer; + + private byte godLevel = 0; + + private List chatChannels = new ArrayList(); + + @NotPersistent + private boolean callingCompanion = false; + public PlayerObject() { super(); messageBuilder = new PlayerMessageBuilder(this); @@ -173,13 +196,13 @@ public class PlayerObject extends IntangibleObject { return profileList; } - public int getBornDate() { + public long getBornDate() { synchronized(objectMutex) { return bornDate; } } - public void setBornDate(int bornDate) { + public void setBornDate(long bornDate) { synchronized(objectMutex) { this.bornDate = bornDate; } @@ -195,7 +218,8 @@ public class PlayerObject extends IntangibleObject { synchronized(objectMutex) { this.totalPlayTime = totalPlayTime; } - notifyObservers(messageBuilder.buildTotalPlayTimeDelta(totalPlayTime), true); + //notifyObservers(messageBuilder.buildTotalPlayTimeDelta(totalPlayTime), true); + getContainer().getClient().getSession().write(messageBuilder.buildTotalPlayTimeDelta(totalPlayTime)); } public String getHome() { @@ -227,11 +251,15 @@ public class PlayerObject extends IntangibleObject { synchronized(objectMutex) { xpExists = xpList.containsKey(type); xpList.put(type, amount); + //Console.println("Put " + type + " exp of " + amount + " in the map."); + //Console.println("Map is now: " + xpList.get(type).intValue()); } if (getContainer() != null && getContainer().getClient() != null && getContainer().getClient().getSession() != null) { getContainer().getClient().getSession().write(messageBuilder.buildXPListDelta(type, amount, xpExists)); + ((CreatureObject) getContainer()).setXpBarValue(amount); } + } public int getXpListUpdateCounter() { @@ -341,6 +369,9 @@ public class PlayerObject extends IntangibleObject { synchronized(objectMutex) { this.professionWheelPosition = professionWheelPosition; } + if (getContainer() != null && getContainer().getClient() != null && getContainer().getClient().getSession() != null) { + getContainer().getClient().getSession().write(messageBuilder.buildProfessionWheelPositionDelta(professionWheelPosition)); + } } public int getExperimentationFlag() { @@ -596,13 +627,12 @@ public class PlayerObject extends IntangibleObject { if(destination == null || destination.getSession() == null) return; - - //if(destination.getParent().getObjectID() == getParentId()) { // only send to self - destination.getSession().write(messageBuilder.buildBaseline3()); - destination.getSession().write(messageBuilder.buildBaseline6()); + destination.getSession().write(messageBuilder.buildBaseline3()); + destination.getSession().write(messageBuilder.buildBaseline6()); + if(destination.getParent().getObjectID() == getParentId()) { // only send to self destination.getSession().write(messageBuilder.buildBaseline8()); destination.getSession().write(messageBuilder.buildBaseline9()); - //} + } } @@ -664,6 +694,28 @@ public class PlayerObject extends IntangibleObject { } } + public String getBiography() { + return biography; + } + + public void setBiography(String biography) { + synchronized(objectMutex) { + this.biography = biography; + } + } + + public String getSpouseName() { + synchronized(objectMutex) { + return spouse; + } + } + + public void setSpouseName(String spouse) { + synchronized(objectMutex) { + this.spouse = spouse; + } + } + public int getFlagBitmask() { synchronized(objectMutex) { return flagBitmask; @@ -706,5 +758,145 @@ public class PlayerObject extends IntangibleObject { return ((flagBitmask & flags) == flags); } } + + public String getHoloEmote() { + return holoEmote; + } + + public void setHoloEmote(String holoEmote) { + this.holoEmote = holoEmote; + } + + public int getHoloEmoteUses() { + return holoEmoteUses; + } + + public void setHoloEmoteUses(int holoEmoteUses) { + this.holoEmoteUses = holoEmoteUses; + } + + public boolean isShowHelmet() { + return showHelmet; + } + + public void setShowHelmet(boolean showHelmet) { + synchronized(objectMutex) { + this.showHelmet = showHelmet; + } + + if (getContainer() != null) { + getContainer().getClient().getSession().write(messageBuilder.buildShowHelmetDelta(showHelmet)); + } + } + + public boolean isShowBackpack() { + return showBackpack; + } + + public void setShowBackpack(boolean showBackpack) { + synchronized(objectMutex) { + this.showBackpack = showBackpack; + } + + if (getContainer() != null) { + getContainer().getClient().getSession().write(messageBuilder.buildShowBackpackDelta(showBackpack)); + } + } + + public WaypointObject getLastSurveyWaypoint() { + return lastSurveyWaypoint; + } + + public void setLastSurveyWaypoint(WaypointObject lastSurveyWaypoint) { + this.lastSurveyWaypoint = lastSurveyWaypoint; + } + + public SurveyTool getLastUsedSurveyTool() { + synchronized(objectMutex) { + return this.lastUsedSurveyTool; + } + } + + public void setLastUsedSurveyTool(SurveyTool surveyTool) { + synchronized(objectMutex) { + this.lastUsedSurveyTool = surveyTool; + } + } + + public ResourceContainerObject getRecentContainer() { + return recentContainer; + } + + public void setRecentContainer(ResourceContainerObject recentContainer) { + this.recentContainer = recentContainer; + } + + public void setLotsRemaining(int amount) + { + this.lotsRemaining = amount; + } + + public boolean addLots(int amount) + { + this.lotsRemaining += amount; + return true; + } + + public boolean deductLots(int amount) + { + if(this.lotsRemaining - amount >= 0) + { + this.lotsRemaining -= amount; + return true; + } + return false; + } + + public int getLotsRemaining() + { + return this.lotsRemaining; + } + + public byte getGodLevel() { + return godLevel; + } + + public void setGodLevel(int godLevel) { + this.godLevel = (byte) godLevel; + + if (getContainer() != null) { + getContainer().getClient().getSession().write(messageBuilder.buildGodLevelDelta((byte) godLevel)); + } + } + + public List getJoinedChatChannels() { + return chatChannels; + } + + public void addChannel(int roomId) { + chatChannels.add(roomId); + } + + public void removeChannel(int roomId) { + if (chatChannels.contains(roomId)) + chatChannels.remove(roomId); + } + + public boolean isMemberOfChannel(int roomId) { + if (chatChannels.contains(roomId)) { + System.out.println("Member of the channel!"); + return true; + } + System.out.println("Not a Member of the channel!"); + return false; + } + + public boolean isCallingCompanion() { + return callingCompanion; + } + + public void setCallingCompanion(boolean callingCompanion) { + this.callingCompanion = callingCompanion; + } } diff --git a/src/resources/objects/resource/GalacticResource.java b/src/resources/objects/resource/GalacticResource.java new file mode 100644 index 00000000..9f23a171 --- /dev/null +++ b/src/resources/objects/resource/GalacticResource.java @@ -0,0 +1,683 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.resource; + +import java.util.List; +import java.util.Random; +import java.util.Vector; + +import main.NGECore; +import protocol.swg.SurveyMapUpdateMessage; +import resources.objects.creature.CreatureObject; +import resources.objects.player.PlayerObject; +import resources.objects.waypoint.WaypointObject; + +import com.sleepycat.je.Environment; +import com.sleepycat.je.Transaction; +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.NotPersistent; + +import engine.clients.Client; +import engine.resources.objects.IPersistent; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; + +/** + * @author Charon + */ + +@Entity(version=0) +public class GalacticResource extends SWGObject implements IPersistent { + + @NotPersistent + private Transaction txn; + + private String name; + private String fileName; + private String category; + private Long id; // use server highest + + private long spawnTime; + private long vanishTime; + + + @NotPersistent + public static final int INT_COLDRESISTANCE = 0; + @NotPersistent + public static final int INT_CONDUCTIVITY = 1; + @NotPersistent + public static final int INT_DECAYRESISTANCE = 2; + @NotPersistent + public static final int INT_HEATRESISTANCE = 3; + @NotPersistent + public static final int INT_MALLEABILITY = 4; + @NotPersistent + public static final int INT_SHOCKRESISTANCE = 5; + @NotPersistent + public static final int INT_UNITTOUGHNESS = 6; + @NotPersistent + public static final int INT_ENTANGLERESISTANCE = 7; + @NotPersistent + public static final int INT_POTENTIALENERGY = 8; + @NotPersistent + public static final int INT_OVERALLQUALITY = 9; + @NotPersistent + public static final int INT_FLAVOR = 10; + + @NotPersistent + public static final String[] statNamesLookup = {"Cold Resistance", + "Conductivity", + "Decay Resistance", + "Heat Resistance", + "Malleability", + "Shock Resistance", + "Unit Toughness", + "Entangle Resistance", + "Potential Energy", + "Overall Quality", + "Flavor"}; + + + private byte poolNumber; + private String stfName; + private String iffName; + private int type; + private byte generalType; + private byte containerType; + private String resourceClass; + private String getresourceType; + + //@NotPersistent + Vector galacticDepositList = new Vector(); + + //@NotPersistent + Vector spawnedPlanetIDs = new Vector(); + + short[] resourceStats = new short[11]; + + @NotPersistent + private static int RES_CAT_HI = 1; // Up to 99%, easy to find spots over 90% + @NotPersistent + private static int RES_CAT_MID = 2; // Up to 90%, often have to settle at around 80% + @NotPersistent + private static int RES_CAT_LO = 3; // Up to 70%, often have to settle around 60% + @NotPersistent + private static int RES_CAT_CRE = 4; // Creature resource + + @NotPersistent // Direct Persistence Layer entity reference restriction + private ResourceRoot resourceRoot; + + private int resourceRootID; // This is for re-referencing the resourceRoot in the reloaded resourceRoot collection + // due to the DPL entity reference restriction + + @NotPersistent + private double minDist = 99999.0; + + + public GalacticResource(){ + super(); + } + + public GalacticResource(long objectID, Planet planet, Point3D position, Quaternion orientation, String template){ + super(objectID, planet, position, orientation, template); + this.id = objectID; + } + + public GalacticResource(long id){ + this.id = id; + } + + public GalacticResource(String name, String fileName, String category){ + this.name = name; + this.fileName = fileName; + this.category = category; + //this.type = type; + long range = 1234567L; + Random r = new Random(); + this.id = (long)(r.nextDouble()*range); + } + + public Long getId(){ + return id; + } + + public void setId(Long Id){ + this.id = Id; + } + + public String getName(){ + return name; + } + + public void setName(String name){ + this.name = name; + } + + public String getFileName(){ + return fileName; + } + + public String getCategory(){ + return category; + } + + public byte getPoolNumber(){ + return poolNumber; + } + + public void setPoolNumber(byte poolNumber){ + this.poolNumber = poolNumber; + } + + public byte getGeneralType(){ + return generalType; + } + + public void setGeneralType(byte generalType){ + this.generalType = generalType; + } + + public boolean isSpawnedOn(int planetId){ + if (spawnedPlanetIDs.contains(planetId)) + return true; + return false; + } + + public void initializeNewGalaxyResource(Vector completeResourceNameHistory){ + galacticDepositList.clear(); + + constructResourceName(completeResourceNameHistory); + generateResourceType(); + generateResourceStats(); + generatePlanetarySpawns(); + generateSpawnTimes(); + setIffFileName(resourceRoot.getResourceFileName()); + this.category = resourceRoot.getResourceClass(); + this.setGeneralType(resourceRoot.getGeneralType()); + this.setResourceRootID(resourceRoot.getResourceRootID()); // FK + //setResourceContainerTemplateID(resourceRoot.getTemplateID()); + } + + public void generateResourceType(){ +// this.setResourceType(template.getResourceType()); +// this.setResourceClass(template.getResourceClass()); + } + + public void generateResourceStats(){ + // Generate the stats randomly, considering the caps + for (int k=0;k0) + randomStatValue = (short) (resourceRoot.getResourceMinCaps()[k] + new Random().nextInt(resourceRoot.getResourceMaxCaps()[k]-resourceRoot.getResourceMinCaps()[k])); + + resourceStats[k] = randomStatValue; + } + + } + + //Better not to make this publically available + private void setResourceStats(short[] statArray){ + this.resourceStats = statArray; + } + + public short[] getResourceStats(){ + return this.resourceStats; + } + + public void setResourceRoot(ResourceRoot root){ + this.resourceRoot = root; + } + + public ResourceRoot getResourceRoot(){ + return this.resourceRoot; + } + + public void setPlanetID(int planetID){ + spawnedPlanetIDs.add(planetID); + } + + public void generateSpawnTimes(){ + long minimumTime = resourceRoot.getMinimalLifeTime(); + long maximumTime = resourceRoot.getMaximalLifeTime(); + long randomTime = new Random(maximumTime).nextLong(); + this.spawnTime = System.currentTimeMillis(); + this.vanishTime = spawnTime + minimumTime + randomTime; + } + + public int[] generateRandomPlanetArray(){ + int planets = 6 + new Random().nextInt(2); + int[] outpool = new int[planets]; + int[] pool = new int[10]; // 10 Number of SWG planets + for (int i = 0; i < 10; i++) pool[i] = i+1; + for (int i = 0; i < planets; i++) outpool[i] = i+1; + shuffleArray(pool); + for (int i = 0; i < outpool.length; i++) + { + outpool[i]=pool[i]; + } + return outpool; + } + + public void shuffleArray(int[] ar) + { + Random rnd = new Random(); + for (int i = ar.length - 1; i > 0; i--) + { + int index = rnd.nextInt(i + 1); + int a = ar[index]; + ar[index] = ar[i]; + ar[i] = a; + } + } + + public void generatePlanetarySpawns(){ + // Generate a number of planets the resource will spawn on + int[] randomPlanetArray = generateRandomPlanetArray(); + if (poolNumber!=4){ + for (int i = 0; i < randomPlanetArray.length; i++){ + if (!spawnedPlanetIDs.contains(i)){ + PlanetDeposits planetDeposits = new PlanetDeposits(); + planetDeposits.setPlanetId(randomPlanetArray[i]); + spawnedPlanetIDs.add(randomPlanetArray[i]); + planetDeposits.addDeposits(generateDepositSpawns()); + galacticDepositList.add(planetDeposits); + } + } + } else { + PlanetDeposits planetDeposits = new PlanetDeposits(); + planetDeposits.setPlanetId(getAllSpawnedPlanetIds().get(0)); + planetDeposits.addDeposits(generateDepositSpawns()); + galacticDepositList.add(planetDeposits); + } + } + + public Vector generateDepositSpawns(){ + Vector depositList = new Vector(); + + // Calculate deposit positions + Random generator = new Random(); + int depositQuantity = 8 + generator.nextInt(24); + + // datatables/clientregion -> cities + + for (int i = 0; i < depositQuantity; i++) { + ResourceDeposit deposit = new ResourceDeposit(); + generator = new Random(); // Exclude mountains at the edge of the maps + int spawnCoordsX = generator.nextInt(15000) - 7500; + int spawnCoordsZ = generator.nextInt(15000) - 7500; + // check maybe for: if (!core.terrainService.isWater(player.getPlanetId(), spawnCoordsX, spawnCoordsZ)) ? + generator = new Random(); + int spawnConcentration = 30 + generator.nextInt(70); + generator = new Random(); + int spawnRadius = 360 + generator.nextInt(1200-360); + deposit.setSpawnRadius(spawnRadius); + deposit.setSpawnConcentration(spawnConcentration); + //System.out.println("spawnConcentration " + spawnConcentration); + deposit.setSpawnCoordinatesX(spawnCoordsX); + deposit.setSpawnCoordinatesZ(spawnCoordsZ); + depositList.add(deposit); + } + return depositList; + } + + public float deliverConcentrationForSurvey(int planetId, float coordsX, float coordsY) { + float measuredOutput = 0; + for (int i = 0; i < galacticDepositList.size(); i++) { + PlanetDeposits deposits = galacticDepositList.get(i); + if (deposits.getPlanetId()==planetId){ + List depositList = deposits.getDeposits(); + for (int j=0;jmeasuredOutput) { + measuredOutput=localConcentration; + } + } + } + } + } + + if (measuredOutput<=10.0f) + return 0; + //measuredOutput=80.0f; + return measuredOutput; + } + + public Vector buildConcentrationsCollection(Point3D measurePos, GalacticResource resource, float radius,float differential, int planetId){ + float leftXCoordinate = measurePos.x - (0.5f*radius); + float topZCoordinate = measurePos.z - (0.5f*radius); + float cursorX = leftXCoordinate; + float cursorZ = topZCoordinate; + int divisions=5; + if (radius<=192.0f){ + divisions = 4; + } + if (radius<=64.0f){ + divisions = 3; + } + + Vector concentrationsCollection = new Vector(); + for (int z=0;z concentrationMap, float radius){ + + int pointsAmount = 25; + if (radius<=64.0f) { + pointsAmount=9; + } else if (radius<=128.0) { + pointsAmount = 16; + } else if (radius<=192.0f) { + pointsAmount = 16; + } else if (radius<=256.0f) { + pointsAmount = 25; + } else if (radius>=256.0f) { + pointsAmount = 25; + } + + SurveyMapUpdateMessage smuMsg = new SurveyMapUpdateMessage(concentrationMap, pointsAmount); + crafter.getClient().getSession().write(smuMsg.serialize()); + tools.CharonPacketUtils.printAnalysis(smuMsg.serialize()); + + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + if (smuMsg.getHighestConcentration() > 0.10f){ + WaypointObject lastSurveyWaypoint = player.getLastSurveyWaypoint(); + WaypointObject surveyWaypoint = null; + if (lastSurveyWaypoint==null){ + surveyWaypoint = (WaypointObject) NGECore.getInstance().objectService.createObject("object/waypoint/shared_world_waypoint_blue.iff", crafter.getPlanet(), smuMsg.getHighestX(), 0 ,smuMsg.getHighestZ()); + surveyWaypoint.setName("Survey location"); + surveyWaypoint.setPlanetCRC(engine.resources.common.CRC.StringtoCRC(crafter.getPlanet().getName())); + surveyWaypoint.setPosition(new Point3D(smuMsg.getHighestX(),0, smuMsg.getHighestZ())); + player.waypointAdd(surveyWaypoint); + surveyWaypoint.setPosition(new Point3D(smuMsg.getHighestX(),0, smuMsg.getHighestZ())); + surveyWaypoint.setActive(true); + surveyWaypoint.setColor((byte)1); + surveyWaypoint.setStringAttribute("", ""); + player.waypointAdd(surveyWaypoint); + surveyWaypoint.setName("Survey location"); + surveyWaypoint.setPlanetCRC(engine.resources.common.CRC.StringtoCRC(crafter.getPlanet().getName())); + player.setLastSurveyWaypoint(surveyWaypoint); + } else { + surveyWaypoint = lastSurveyWaypoint; + surveyWaypoint.setPosition(new Point3D(smuMsg.getHighestX(),0, smuMsg.getHighestZ())); + player.waypointUpdate(surveyWaypoint); + } + crafter.sendSystemMessage("@survey:survey_waypoint", (byte) 0); + } + } + + // Redundant just for Testing !!! + public double getHelperMinDist(){ + return minDist; + } + + public void constructResourceName(Vector completeResourceNameHistory){ + // ToDo: This is where the database check for past names must be added + boolean check=true; + while(check) + { + this.name = NAME_SYLLABLE_1[(int) new Random().nextInt(NAME_SYLLABLE_1.length-1)] + + NAME_SYLLABLE_2[(int) new Random().nextInt(NAME_SYLLABLE_2.length-1)] + + NAME_SYLLABLE_3[(int) new Random().nextInt(NAME_SYLLABLE_3.length-1)]; + check = completeResourceNameHistory.contains(this.name); + } + } + + public Vector getGalacticDepositList(){ + return galacticDepositList; + } + + public Vector getAllSpawnedPlanetIds() { + return spawnedPlanetIDs; + } + + public void setIffFileName(String iffName) { + this.iffName = iffName; + this.fileName = iffName; + } + + public String getIffFileName() { + return this.fileName; + } + +// protected String getStfFileName() { +// return stfName; +// } +// +// protected void setSffFileName(String stfName) { +// this.stfName = iffName; +// } + + public byte getContainerType() { + return containerType; + } + + public void setContainerType(byte containerType) { + this.containerType = containerType; + } + + public long getVanishTime() { + return vanishTime; + } + + public void setVanishTime(long vanishTime) { + this.vanishTime = vanishTime; + } + + @NotPersistent + public final static String[] GENERAL_TYPES = { + "resource_mineral", + "resource_chemical", + "resource_flora", + "resource_gas", + "resource_water", + "resource_solar", + "resource_wind", + "resource_geothermal", + "resource_tidal", + "resource_hydron", + "resource_bones", + "resource_hide", + "resource_meat", + "resource_milk", + "resource_JTL" + }; + + @NotPersistent + public final static byte GENERAL_MINERAL = 0; + @NotPersistent + public final static byte GENERAL_CHEMICAL = 1; + @NotPersistent + public final static byte GENERAL_FLORA = 2; + @NotPersistent + public final static byte GENERAL_GAS = 3; + @NotPersistent + public final static byte GENERAL_WATER = 4; + @NotPersistent + public final static byte GENERAL_SOLAR = 5; + @NotPersistent + public final static byte GENERAL_WIND = 6; + @NotPersistent + public final static byte GENERAL_GEOTHERM = 7; + @NotPersistent + public final static byte GENERAL_TIDAL = 8; + @NotPersistent + public final static byte GENERAL_HYDRON = 9; + @NotPersistent + public final static byte GENERAL_BONES = 10; + @NotPersistent + public final static byte GENERAL_HORN = 11; + @NotPersistent + public final static byte GENERAL_HIDE = 12; + @NotPersistent + public final static byte GENERAL_MEAT = 13; + @NotPersistent + public final static byte GENERAL_MILK = 14; + @NotPersistent + public final static byte GENERAL_JTL = 15; + + @NotPersistent + public final static String[] CONTAINER_TYPES = { + "inorganic_minerals_small", + "inorganic_chemicals_small", + "organic_food_small", + "inorganic_gas_small", + "inorganic_water_small", + "energy_liquid_small", + "energy_liquid_small", + "energy_liquid_small", + "energy_liquid_small", + "energy_liquid_small", + "organic_structure_small", + "organic_structure_small", + "organic_hide_small", + "organic_food_small", + "organic_milk_small", + "resource_JTL" + }; + + @NotPersistent + private static String[] NAME_SYLLABLE_1 = {"Zi", "Ao", "Bo", "Gox", + "Ru", "Su", "Tu", "Uu", "Vu", "Wu", "Xu", "Yu", "Zu", + "Ie", "Ce", "Ia", "Tip", "Tri", "Rel", "Xio", "Che", "Fa", "Po", + "Pae", "Doi", "Wa", "Rup", "Ovi", "Ove", "Tae", "Nao", "Lao", + "Lin", "Lex", "Loex", "Paex", "Bib", "Jaw", "Xat", "Lape", "Su", + "Sae", "Epo", "Vix", "Vu", "Ke", "Kel", "Koi", "Cix", "Pal", "Pla", + "Sor", "Lak", "Lek", "Waf", "Weg", "Ga", "Gix", "Nai", "Su", + "Aa", "Ba", "Ca", "Da", "Ea", "Fa", "Ga", "Ha", "Ia", "Ja", "Ka", + "La", "Ma", "Na", "Oa", "Pa", "Qa", "Ra", "Sa", "Ta", "Ua", "Va", + "Wa", "Xa", "Ya", "Za", "Ae", "Be", "Ce", "De", "Ee", "Fe", "Ge", + "He", "Ie", "Je", "Ke", "Le", "Me", "Ne", "Oe", "Pe", "Qe", "Re", + "Se", "Te", "Ue", "Ve", "We", "Xe", "Ye", "Ze", "Ai", "Bi", "Ci", + "Di", "Ei", "Fi", "Gi", "Hi", "Ii", "Ji", "Ki", "Li", "Mi", "Ni", + "Oi", "Pi", "Qi", "Ri", "Si", "Ti", "Ui", "Vi", "Wi", "Xi", "Yi", + "Re", "Iso", "Nab", "Co", "Do", "Eo", "Fo", "Go", "Ho", "Io", "Jo", + "Ko", "Lo", "Mo", "No", "Oo", "Po", "Qo", "Ro", "So", "To", "Uo", + "Vo", "Wo", "Xo", "Yo", "Zo", "Au", "Bu", "Cu", "Du", "Eu", "Fu", + "Or", "Ved", "Pos", "Xe", "Ex", "Sti", "Ir", "Ake", "Geh", "Fig", + "Gu", "Hu", "Iu", "Ju", "Ku", "Lu", "Mu", "Nu", "Ou", "Pu", "Qu", + "Rel", "Xio", "Ie", "Ce", "Ia", "Tip", "Tri", "Che", "Fa", "Po"}; + + @NotPersistent + private static String[] NAME_SYLLABLE_2 = {"gi", "hi", "ii", "qo", "ro", + "da", "ea", "fa", "ga", "ha", "ia", "ja", "ka", "la", "ma", "na", + "oa", "pa", "qa", "ra", "sa", "ta", "ua", "va", "wa", "xa", "ya", + "za", "ae", "be", "ce", "de", "ee", "fe", "ge", "he", "ie", "je", + "ke", "le", "me", "ne", "oe", "pe", "qe", "re", "se", "te", "ue", + "ve", "we", "xe", "ye", "ze", "ai", "bi", "ci", "di", "ei", "fi", + "uu", "vu", "wu", "xu", "yu", "zu", "mi", "ni", "oi", "pi", "qi", + "ri", "si", "ti", "ui", "vi", "wi", "xi", "yi", "zi", "ao", "bo", + "co", "do", "eo", "fo", "go", "ho", "io", "jo", "ko", "lo", "mo", + "no", "oo", "po", "so", "to", "uo", "vo", "wo", "xo", "mu", "nu", + "yo", "zo", "au", "bu", "cu", "du", "eu", "fu", "gu", "hu", "iu", + "aa", "ba", "ca", "ji", "ki", "li"}; + + @NotPersistent + private static String[] NAME_SYLLABLE_3 = {"fui", "gti", "hsi", "dwi", + "mna", "nma", "ola", "pka", "qja", "ria", "sha", "tga", "ufa", + "eve", "fue", "gte", "hse", "ire", "jqe", "kpe", "loe", "mne", + "wde", "xce", "ybe", "zae", "azi", "byi", "cxi", "dwi", "evi", + "iri", "jqi", "kpi", "loi", "mni", "nmi", "aza", "bya", "cxa", + "oli", "pki", "qji", "rii", "shi", "tgi", "ufi", "vei", "wdi", + "xci", "ybi", "zai", "azo", "byo", "cxo", "dwo", "evo", "fuo", + "dwa", "eva", "fua", "gta", "hsa", "ira", "jqa", "kpa", "loa", + "gto", "hso", "iro", "jqo", "kpo", "loo", "mno", "nmo", "olo", + "pko", "qjo", "rio", "sho", "tgo", "ufo", "veo", "wdo", "xco", + "ybo", "zao", "azu", "byu", "cxu", "dwu", "evu", "fuu", "gtu", + "nme", "ole", "pke", "qje", "rie", "she", "tge", "ufe", "vee", + "hsu", "iru", "jqu", "kpu", "lou", "mnu", "nmu", "olu", "pku", + "vea", "wda", "xca", "yba", "zaa", "aze", "bye", "cxe", "dwe", + "qju", "riu", "shu", "tgu", "ufu", "veu", "wdu", "xcu", "ybu", + "zau"}; + + + @Override + public void createTransaction(Environment env) { txn = env.beginTransaction(null, null);} + + + @Override + public Transaction getTransaction() { return txn; } + + @Override + public void sendBaselines(Client arg0) { + } + + public int getResourceRootID() { + return resourceRootID; + } + + public void setResourceRootID(int resourceRootID) { + this.resourceRootID = resourceRootID; + } + + public String getResourceClass() { + return resourceClass; + } + + public void setResourceClass(String resourceClass) { + this.resourceClass = resourceClass; + } + + public String getResourceType() { + return getresourceType; + } + + public void setResourceType(String getresourceType) { + this.getresourceType = getresourceType; + } + + public GalacticResource convertToHistoricResource(){ + GalacticResource historicResource = new GalacticResource(); + historicResource.setName(this.getName()); + historicResource.setResourceClass(this.getResourceClass()); + historicResource.setResourceStats(this.getResourceStats()); + historicResource.setResourceType(this.getResourceType()); + historicResource.setGeneralType(this.getGeneralType()); + historicResource.setId(this.getId()); + historicResource.setIffFileName(this.getIffFileName()); + + return historicResource; + } +} diff --git a/src/resources/objects/resource/PlanetDeposits.java b/src/resources/objects/resource/PlanetDeposits.java new file mode 100644 index 00000000..712ec89b --- /dev/null +++ b/src/resources/objects/resource/PlanetDeposits.java @@ -0,0 +1,32 @@ +package resources.objects.resource; + +import java.util.List; + +import com.sleepycat.persist.model.Persistent; + +@Persistent(version=0) +public class PlanetDeposits { + + private int planetId; + private List depositList; + + public PlanetDeposits(){ + + } + + public void setPlanetId(int planetId){ + this.planetId = planetId; + } + + public int getPlanetId(){ + return this.planetId; + } + + public void addDeposits(List depositList){ + this.depositList = depositList; + } + + public List getDeposits(){ + return this.depositList; + } +} diff --git a/src/resources/objects/resource/ResourceConcentration.java b/src/resources/objects/resource/ResourceConcentration.java new file mode 100644 index 00000000..c2104b9e --- /dev/null +++ b/src/resources/objects/resource/ResourceConcentration.java @@ -0,0 +1,41 @@ +package resources.objects.resource; + +public class ResourceConcentration { + private float coordsX; + private float coordsZ; + private float concentration; + + public ResourceConcentration(){ + + } + + public ResourceConcentration(float coordsX, float coordsZ, float concentration){ + this.coordsX = coordsX; + this.coordsZ = coordsZ; + this.concentration = concentration; + } + + public float getCoordsX() { + return coordsX; + } + + public void setCoordsX(float coordsX) { + this.coordsX = coordsX; + } + + public float getCoordsZ() { + return coordsZ; + } + + public void setCoordsZ(float coordsZ) { + this.coordsZ = coordsZ; + } + + public float getConcentration() { + return concentration; + } + + public void setConcentration(float concentration) { + this.concentration = concentration; + } +} diff --git a/src/resources/objects/resource/ResourceContainerMessageBuilder.java b/src/resources/objects/resource/ResourceContainerMessageBuilder.java index 7f517faa..92192c3f 100644 --- a/src/resources/objects/resource/ResourceContainerMessageBuilder.java +++ b/src/resources/objects/resource/ResourceContainerMessageBuilder.java @@ -21,6 +21,268 @@ ******************************************************************************/ package resources.objects.resource; -public class ResourceContainerMessageBuilder { +import java.nio.ByteOrder; + +import org.apache.mina.core.buffer.IoBuffer; + +import resources.objects.ObjectMessageBuilder; + +public class ResourceContainerMessageBuilder extends ObjectMessageBuilder { + + public ResourceContainerMessageBuilder(ResourceContainerObject resourceContainerObject) { + setObject(resourceContainerObject); + } + + + public IoBuffer buildBaseline3() { + ResourceContainerObject resourceContainer = (ResourceContainerObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putShort((short)0x0F); + buffer.putFloat(1.0f); + buffer.put(getAsciiString("resource/resource_names")); + buffer.putInt(0); + buffer.put(getAsciiString(resourceContainer.getResourceFileName())); + buffer.putInt(0); + buffer.putInt(1); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putShort((short)0); + buffer.putInt(0); + buffer.putInt(0); + buffer.putInt(100); //MaxCondition + buffer.put((byte)1); + buffer.putInt(resourceContainer.getStackCount()); + //result.putInt(30000); + buffer.putLong(resourceContainer.getReferenceID()); + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("RCNO", (byte) 3, buffer, size); + + return buffer; + } + + + public IoBuffer buildBaseline6() { + ResourceContainerObject resourceContainer = (ResourceContainerObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + String iffFileName = resourceContainer.getResourceFileName(); + String contName = resourceContainer.getResourceName(); + + buffer.putShort((short)12); //0C + buffer.putInt(0x8A); + buffer.put(getAsciiString("resource_container_d")); + buffer.putInt(0); + // buffer.put(getAsciiString("inorganic_minerals_small")); + buffer.put(getAsciiString(GalacticResource.CONTAINER_TYPES[resourceContainer.getGeneralType()])); + + //37 x 00 + buffer.putLong(0); + buffer.putLong(0); + buffer.putLong(0); + buffer.putLong(0); + buffer.putInt(0); + buffer.put((byte)0); + + buffer.putInt(ResourceContainerObject.maximalStackCapacity); + buffer.put(getAsciiString(iffFileName)); + buffer.put(getUnicodeString(contName)); + buffer.putLong(0); + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("RCNO", (byte) 6, buffer, size); + + return buffer; + } + + + public IoBuffer buildBaseline8() { + ResourceContainerObject resourceContainer = (ResourceContainerObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putInt(2); + buffer.putShort((short)0); + + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("RCNO", (byte) 8, buffer, size); + return buffer; + } + + + public IoBuffer buildBaseline9() { + ResourceContainerObject resourceContainer = (ResourceContainerObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x68A75F0C); + buffer.putLong(resourceContainer.getObjectID()); + buffer.putInt(0x52434E4F); + buffer.put((byte)9); + buffer.putInt(2); + buffer.putShort((short)0); + int size = buffer.position(); + buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); + + buffer.flip(); + buffer = createBaseline("RCNO", (byte) 9, buffer, size); + return buffer; + } + + public IoBuffer buildDelta3() { + ResourceContainerObject resourceContainer = (ResourceContainerObject) object; + IoBuffer buffer = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + + buffer.putInt(resourceContainer.getStackCount()); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("RCNO", (byte) 3, (short) 1, (short) 0x0D, buffer, size + 4); // 0x0D differs from pre-NGE specification ! + + return buffer; + } + + // This is a specific AttributeListMessage for the resource container + // and represents no baseline or delta. + public IoBuffer serialized_buildAttributeListMessage() { + ResourceContainerObject resourceContainer = (ResourceContainerObject) object; + IoBuffer result = IoBuffer.allocate(10).order(ByteOrder.LITTLE_ENDIAN); + result.setAutoExpand(true); + result.putShort((short)5); + result.putInt(0xF3F12F2A); // ! + result.putLong(resourceContainer.getObjectID()); + result.putShort((short)0); + + int countedSize = 0; + if (resourceContainer.getColdResistance()>0) + countedSize++; + if (resourceContainer.getConductivity()>0) + countedSize++; + if (resourceContainer.getDecayResistance()>0) + countedSize++; + if (resourceContainer.getHeatResistance()>0) + countedSize++; + if (resourceContainer.getMalleability()>0) + countedSize++; + if (resourceContainer.getOverallQuality()>0) + countedSize++; + if (resourceContainer.getShockResistance()>0) + countedSize++; + if (resourceContainer.getUnitToughness()>0) + countedSize++; + if (resourceContainer.getFlavor()>0) + countedSize++; + if (resourceContainer.getEntangleResistance()>0) + countedSize++; + if (resourceContainer.getPotentialEnergy()>0) + countedSize++; + + int attributeSize = 5 + countedSize; + + result.putInt(attributeSize);//result.putInt(16); + + result.put(getAsciiString("condition")); + result.put(getUnicodeString("100/100")); + + result.put(getAsciiString("volume")); + result.put(getUnicodeString("1")); + + result.put(getAsciiString("resource_contents")); + result.put(getUnicodeString(resourceContainer.getStackCount()+"/"+ResourceContainerObject.maximalStackCapacity)); + + result.put(getAsciiString("resource_name")); + result.put(getUnicodeString(resourceContainer.getResourceName())); + + result.put(getAsciiString("resource_class")); + result.put(getUnicodeString("@resource/resource_names:" + resourceContainer.getResourceFileName())); + //result.put(getUnicodeString(resourceContainer.getResourceClass())); + + if (resourceContainer.getColdResistance()>0){ + result.put(getAsciiString("res_cold_resist")); + result.put(getUnicodeString(""+resourceContainer.getColdResistance())); + } + + if (resourceContainer.getConductivity()>0){ + result.put(getAsciiString("res_conductivity")); + result.put(getUnicodeString(""+resourceContainer.getConductivity())); + } + + if (resourceContainer.getDecayResistance()>0){ + result.put(getAsciiString("res_decay_resist")); + result.put(getUnicodeString(""+resourceContainer.getDecayResistance())); + } + + if (resourceContainer.getHeatResistance()>0){ + result.put(getAsciiString("res_heat_resist")); + result.put(getUnicodeString(""+resourceContainer.getHeatResistance())); + } + + if (resourceContainer.getMalleability()>0){ + result.put(getAsciiString("res_malleability")); + result.put(getUnicodeString(""+resourceContainer.getMalleability())); + } + + if (resourceContainer.getOverallQuality()>0){ + result.put(getAsciiString("res_quality")); + result.put(getUnicodeString(""+resourceContainer.getOverallQuality())); + } + + if (resourceContainer.getShockResistance()>0){ + result.put(getAsciiString("res_shock_resistance")); + result.put(getUnicodeString(""+resourceContainer.getShockResistance())); + } + + if (resourceContainer.getUnitToughness()>0){ + result.put(getAsciiString("res_toughness")); + result.put(getUnicodeString(""+resourceContainer.getUnitToughness())); + } + + if (resourceContainer.getFlavor()>0){ + result.put(getAsciiString("res_flavor")); + result.put(getUnicodeString(""+resourceContainer.getFlavor())); + } + + if (resourceContainer.getEntangleResistance()>0){ + result.put(getAsciiString("entangle_resistance")); + result.put(getUnicodeString(""+resourceContainer.getEntangleResistance())); + } + + if (resourceContainer.getPotentialEnergy()>0){ + result.put(getAsciiString("res_potential_energy")); + result.put(getUnicodeString(""+resourceContainer.getPotentialEnergy())); + } + + result.putInt(10); + int size = result.position(); + result.flip(); + tools.CharonPacketUtils.printAnalysis(IoBuffer.allocate(size).put(result.array(), 0, size).flip()); + return IoBuffer.allocate(size).put(result.array(), 0, size).flip(); + } + + + @Override + public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { + // TODO Auto-generated method stub + + } + + + @Override + public void sendBaselines() { + // TODO Auto-generated method stub + + } } diff --git a/src/resources/objects/resource/ResourceContainerObject.java b/src/resources/objects/resource/ResourceContainerObject.java index 1e4299a9..c5b84a9f 100644 --- a/src/resources/objects/resource/ResourceContainerObject.java +++ b/src/resources/objects/resource/ResourceContainerObject.java @@ -21,11 +21,531 @@ ******************************************************************************/ package resources.objects.resource; + +import main.NGECore; + +import com.sleepycat.persist.model.NotPersistent; import com.sleepycat.persist.model.Persistent; +import engine.clients.Client; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import resources.objects.creature.CreatureObject; import resources.objects.tangible.TangibleObject; +/** + * @author Charon + */ + @Persistent(version=0) public class ResourceContainerObject extends TangibleObject { + + // Unique ID + private long containerID; + + private CreatureObject proprietor; + private String resourceType; + private String resourceClass=""; + private String resourceName; + private byte generalType; + private long referenceID; + private String iffFileName; + private String resourceFileName; + private int stackCount=0; + private byte containerType; + + // Since this can represent a resource that already despawned + // it needs to hold all resource stats: + private short coldResistance; + private short conductivity; + private short decayResistance; + private short heatResistance; + private short malleability; + private short shockResistance; + private short unitToughness; + private short entangleResistance; + private short potentialEnergy; + private short overallQuality; + private short flavor; + + /* + private static byte CONTAINER_TYPE_INORGANIC_MINERALS = 0; + private static byte CONTAINER_TYPE_INORGANIC_CHEMICALS = 1; + private static byte CONTAINER_TYPE_INORGANIC_GAS = 2; + private static byte CONTAINER_TYPE_INORGANIC_PETROCHEM_LIQUID = 3; + private static byte CONTAINER_TYPE_INORGANIC_WATER = 4; + private static byte CONTAINER_TYPE_INORGANIC_BOTTLE_WATER = 5; + private static byte CONTAINER_TYPE_ORGANIC_BEAN = 6; + private static byte CONTAINER_TYPE_ORGANIC_BOTTLE_MILK = 7; + private static byte CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE = 8; + private static byte CONTAINER_TYPE_ORGANIC_CORN = 9; + private static byte CONTAINER_TYPE_ORGANIC_FOOD = 10; + private static byte CONTAINER_TYPE_ORGANIC_FRUIT = 11; + private static byte CONTAINER_TYPE_ORGANIC_FUNGI = 12; + private static byte CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES = 13; + private static byte CONTAINER_TYPE_ORGANIC_HIDE = 14; + private static byte CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE = 15; + private static byte CONTAINER_TYPE_ORGANIC_OATS = 16; + private static byte CONTAINER_TYPE_ORGANIC_RICE = 17; + private static byte CONTAINER_TYPE_ORGANIC_SCALEY_HIDE = 18; + private static byte CONTAINER_TYPE_ORGANIC_STRUCTURE = 19; + private static byte CONTAINER_TYPE_ORGANIC_TUBER = 20; + private static byte CONTAINER_TYPE_ORGANIC_WHEAT = 21; + private static byte CONTAINER_TYPE_ORGANIC_WOOLY_HIDE = 22; + private static byte CONTAINER_TYPE_ENERGY_GAS = 23; + private static byte CONTAINER_TYPE_ENERGY_LIQUID = 24; + private static byte CONTAINER_TYPE_ENERGY_RADIOACTIVE = 25; + private static byte CONTAINER_TYPE_ENERGY_SOLID = 26; + + private static String[] CONTAINER_TYPE_IFF_SIGNIFIER = new String[]{ + "object/resource_container/shared_resource_container_inorganic_minerals.iff", + "object/resource_container/shared_resource_container_inorganic_chemicals.iff", + "object/resource_container/shared_resource_container_inorganic_gas.iff", + "object/resource_container/shared_resource_container_inorganic_petrochem_liquid.iff", + "object/resource_container/shared_resource_container_inorganic_water.iff", + "object/resource_container/shared_resource_container_inorganic_bottle_water.iff", + "object/resource_container/shared_resource_container_organic_bean.iff", + "object/resource_container/shared_resource_container_organic_bottle_milk.iff", + "object/resource_container/shared_resource_container_organic_bristley_hide.iff", + "object/resource_container/shared_resource_container_organic_corn.iff", + "object/resource_container/shared_resource_container_organic_food.iff", + "object/resource_container/shared_resource_container_organic_fruit.iff", + "object/resource_container/shared_resource_container_organic_fungi.iff", + "object/resource_container/shared_resource_container_organic_green_vegetables.iff", + "object/resource_container/shared_resource_container_organic_hide.iff", + "object/resource_container/shared_resource_container_organic_leathery_hide.iff", + "object/resource_container/shared_resource_container_organic_oats.iff", + "object/resource_container/shared_resource_container_organic_rice.iff", + "object/resource_container/shared_resource_container_organic_scaley_hide.iff", + "object/resource_container/shared_resource_container_organic_structure.iff", + "object/resource_container/shared_resource_container_organic_tuber.iff", + "object/resource_container/shared_resource_container_organic_wheat.iff", + "object/resource_container/shared_resource_container_organic_wooly_hide.iff", + "object/resource_container/shared_resource_container_energy_gas.iff", + "object/resource_container/shared_resource_container_energy_liquid.iff", + "object/resource_container/shared_resource_container_energy_radioactive.iff", + "object/resource_container/shared_resource_container_energy_solid.iff" + }; + */ + + @NotPersistent + public static int maximalStackCapacity = 100000; + + @NotPersistent + private ResourceContainerMessageBuilder messageBuilder; + + public ResourceContainerObject(){ + + } + + public ResourceContainerObject(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, template, position, orientation); + messageBuilder = new ResourceContainerMessageBuilder(this); + this.setAttachment("radial_filename", "resourceContainer"); + } + + public void initializeStats(GalacticResource resource){ + this.setResourceName(resource.getName()); + this.setResourceClass(resource.getCategory()); + this.setColdResistance(resource.getResourceStats()[0]); + this.setConductivity(resource.getResourceStats()[1]); + this.setDecayResistance(resource.getResourceStats()[2]); + this.setHeatResistance(resource.getResourceStats()[3]); + this.setMalleability(resource.getResourceStats()[4]); + this.setShockResistance(resource.getResourceStats()[5]); + this.setUnitToughness(resource.getResourceStats()[6]); + this.setEntangleResistance(resource.getResourceStats()[7]); + this.setPotentialEnergy(resource.getResourceStats()[8]); + this.setOverallQuality(resource.getResourceStats()[9]); + this.setFlavor(resource.getResourceStats()[10]); + this.setResourceType(resource.getResourceType()); + this.setGeneralType(resource.getGeneralType()); + this.setReferenceID(resource.getId()); + this.setResourceFileName(resource.getIffFileName()); + //this.setIffFileName(resource.getIffFileName()); + + // set attributes + this.getAttributes().put("@obj_attr_n:condition", "100/100"); + this.getAttributes().put("@obj_attr_n:volume", "1"); + this.getAttributes().put("@obj_attr_n:resource_contents", this.getStackCount()+"/"+maximalStackCapacity); + this.getAttributes().put("@obj_attr_n:resource_name", this.getResourceName()); + this.getAttributes().put("@obj_attr_n:resource_class", "@resource/resource_names:" + this.getResourceFileName()); + + if (this.getColdResistance()>0){ + this.getAttributes().put("res_cold_resist", ""+this.getColdResistance()); + resource.getAttributes().put("res_cold_resist", ""+this.getColdResistance()); + } + + if (this.getConductivity()>0){ + this.getAttributes().put("res_conductivity", ""+this.getConductivity()); + resource.getAttributes().put("res_conductivity", ""+this.getConductivity()); + } + + if (this.getDecayResistance()>0){ + this.getAttributes().put("res_decay_resist", ""+this.getDecayResistance()); + resource.getAttributes().put("res_decay_resist", ""+this.getDecayResistance()); + } + + if (this.getHeatResistance()>0){ + this.getAttributes().put("res_heat_resist", ""+this.getHeatResistance()); + resource.getAttributes().put("res_heat_resist", ""+this.getHeatResistance()); + } + + if (this.getMalleability()>0){ + this.getAttributes().put("res_malleability", ""+this.getMalleability()); + resource.getAttributes().put("res_malleability", ""+this.getMalleability()); + } + + if (this.getOverallQuality()>0){ + this.getAttributes().put("res_quality", ""+this.getOverallQuality()); + resource.getAttributes().put("res_quality", ""+this.getOverallQuality()); + } + + if (this.getShockResistance()>0){ + this.getAttributes().put("res_shock_resistance", ""+this.getShockResistance()); + resource.getAttributes().put("res_shock_resistance", ""+this.getShockResistance()); + } + + if (this.getUnitToughness()>0){ + this.getAttributes().put("res_toughness", ""+this.getUnitToughness()); + resource.getAttributes().put("res_toughness", ""+this.getUnitToughness()); + } + + if (this.getFlavor()>0){ + this.getAttributes().put("res_flavor", ""+this.getFlavor()); + resource.getAttributes().put("res_flavor", ""+this.getFlavor()); + } + + if (this.getEntangleResistance()>0){ + this.getAttributes().put("entangle_resistance", ""+this.getEntangleResistance()); + resource.getAttributes().put("entangle_resistance", ""+this.getEntangleResistance()); + } + + if (this.getPotentialEnergy()>0){ + this.getAttributes().put("res_potential_energy", ""+this.getPotentialEnergy()); + resource.getAttributes().put("res_potential_energy", ""+this.getPotentialEnergy()); + } + } + + public void cloneStats(ResourceContainerObject original){ + this.setResourceName(original.getResourceName()); + this.setResourceClass(original.getResourceClass()); + this.setColdResistance(original.getColdResistance()); + this.setConductivity(original.getConductivity()); + this.setDecayResistance(original.getDecayResistance()); + this.setHeatResistance(original.getHeatResistance()); + this.setMalleability(original.getMalleability()); + this.setShockResistance(original.getShockResistance()); + this.setUnitToughness(original.getUnitToughness()); + this.setEntangleResistance(original.getEntangleResistance()); + this.setPotentialEnergy(original.getPotentialEnergy()); + this.setOverallQuality(original.getOverallQuality()); + this.setFlavor(original.getFlavor()); + this.setResourceType(original.getResourceType()); + this.setGeneralType(original.getGeneralType()); + this.setReferenceID(original.getReferenceID()); + this.setResourceFileName(original.getResourceFileName()); + + // set attributes + this.getAttributes().put("@obj_attr_n:condition", "100/100"); + this.getAttributes().put("@obj_attr_n:volume", "1"); + this.getAttributes().put("@obj_attr_n:resource_contents", this.getStackCount()+"/"+maximalStackCapacity); + this.getAttributes().put("@obj_attr_n:resource_name", this.getResourceName()); + this.getAttributes().put("@obj_attr_n:resource_class", "@resource/resource_names:" + this.getResourceFileName()); + + if (this.getColdResistance()>0){ + this.getAttributes().put("res_cold_resist", ""+this.getColdResistance()); + } + + if (this.getConductivity()>0){ + this.getAttributes().put("res_conductivity", ""+this.getConductivity()); + } + + if (this.getDecayResistance()>0){ + this.getAttributes().put("res_decay_resist", ""+this.getDecayResistance()); + } + + if (this.getHeatResistance()>0){ + this.getAttributes().put("res_heat_resist", ""+this.getHeatResistance()); + } + + if (this.getMalleability()>0){ + this.getAttributes().put("res_malleability", ""+this.getMalleability()); + } + + if (this.getOverallQuality()>0){ + this.getAttributes().put("res_quality", ""+this.getOverallQuality()); + } + + if (this.getShockResistance()>0){ + this.getAttributes().put("res_shock_resistance", ""+this.getShockResistance()); + } + + if (this.getUnitToughness()>0){ + this.getAttributes().put("res_toughness", ""+this.getUnitToughness()); + } + + if (this.getFlavor()>0){ + this.getAttributes().put("res_flavor", ""+this.getFlavor()); + } + + if (this.getEntangleResistance()>0){ + this.getAttributes().put("entangle_resistance", ""+this.getEntangleResistance()); + } + + if (this.getPotentialEnergy()>0){ + this.getAttributes().put("res_potential_energy", ""+this.getPotentialEnergy()); + } + + } + + public long getContainerID() { + return containerID; + } + + public void setContainerID(long containerID) { + this.containerID = containerID; + } + + public CreatureObject getProprietor() { + return proprietor; + } + + public void setProprietor(CreatureObject proprietor) { + this.proprietor = proprietor; + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public int getStackCount() { + return stackCount; + } + + public void setStackCount(int stackCount,boolean isNewContainer) { + this.stackCount += stackCount; + if (isNewContainer) + this.stackCount = stackCount; + } + + public void setStackCount(int stackCount,CreatureObject owner) { + this.stackCount = stackCount; + this.getAttributes().put("@obj_attr_n:resource_contents", this.getStackCount()+"/"+maximalStackCapacity); + if (stackCount>0) + this.sendDelta3(owner.getClient()); + } + + public short getColdResistance() { + return coldResistance; + } + + public void setColdResistance(short coldResistance) { + this.coldResistance = coldResistance; + } + + public short getConductivity() { + return conductivity; + } + + public void setConductivity(short conductivity) { + this.conductivity = conductivity; + } + + public short getDecayResistance() { + return decayResistance; + } + + public void setDecayResistance(short decayResistance) { + this.decayResistance = decayResistance; + } + + public short getHeatResistance() { + return heatResistance; + } + + public void setHeatResistance(short heatResistance) { + this.heatResistance = heatResistance; + } + + public short getMalleability() { + return malleability; + } + + public void setMalleability(short malleability) { + this.malleability = malleability; + } + + public short getShockResistance() { + return shockResistance; + } + + public void setShockResistance(short shockResistance) { + this.shockResistance = shockResistance; + } + + public short getUnitToughness() { + return unitToughness; + } + + public void setUnitToughness(short unitToughness) { + this.unitToughness = unitToughness; + } + + public short getEntangleResistance() { + return entangleResistance; + } + + public void setEntangleResistance(short entangleResistance) { + this.entangleResistance = entangleResistance; + } + + public short getPotentialEnergy() { + return potentialEnergy; + } + + public void setPotentialEnergy(short potentialEnergy) { + this.potentialEnergy = potentialEnergy; + } + + public short getOverallQuality() { + return overallQuality; + } + + public void setOverallQuality(short overallQuality) { + this.overallQuality = overallQuality; + } + + public short getFlavor() { + return flavor; + } + + public void setFlavor(short flavor) { + this.flavor = flavor; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public String getIffFileName() { + return iffFileName; + } + + public void setIffFileName(String iffFileName) { + this.iffFileName = iffFileName; + } + + public String getResourceClass() { + return resourceClass; + } + + public void setResourceClass(String resourceClass) { + this.resourceClass = resourceClass; + } + + public long getReferenceID() { + return referenceID; + } + + public void setReferenceID(long referenceID) { + this.referenceID = referenceID; + } + + public String getResourceFileName() { + return resourceFileName; + } + + public void setResourceFileName(String resourceFileName) { + this.resourceFileName = resourceFileName; + } + + public byte getGeneralType() { + return generalType; + } + + public void setGeneralType(byte generalType) { + this.generalType = generalType; + } + + public void setStackCount(int stackCount) { + this.stackCount = stackCount; + this.getAttributes().put("@obj_attr_n:resource_contents", this.getStackCount()+"/"+maximalStackCapacity); + this.sendDelta3(this.getProprietor().getClient()); + } + + public byte getContainerType() { + return containerType; + } + + public void setContainerType(byte containerType) { + this.containerType = containerType; + } + + public void buildAttributeListMessage(Client destination){ + destination.getSession().write(messageBuilder.serialized_buildAttributeListMessage()); + } + + public void splitContainer(CreatureObject owner,ResourceContainerObject originalObject,String commandString){ + String[] splitArray = commandString.split(" "); + if (splitArray.length<3) + return; + int cloneStackQuantity= Integer.parseInt(splitArray[0]); + int parentcontainerID= Integer.parseInt(splitArray[1]); + SWGObject objectParentContainer = (SWGObject) NGECore.getInstance().objectService.getObject(parentcontainerID); + if (objectParentContainer==null || originalObject==null) + return; + CreatureObject proprietor = originalObject.getProprietor(); + ResourceContainerObject containerObject = (ResourceContainerObject) NGECore.getInstance().objectService.createObject(originalObject.getTemplate(), proprietor.getPlanet()); + containerObject.cloneStats(originalObject); + containerObject.setProprietor(originalObject.getProprietor()); + containerObject.setStackCount(cloneStackQuantity); + originalObject.setStackCount(originalObject.getStackCount()-cloneStackQuantity); + objectParentContainer.add(containerObject); + } + + public void transferContainer(CreatureObject owner,ResourceContainerObject disposableObject,String commandString){ + String[] splitArray = commandString.split(" "); + if (splitArray.length<2) + return; + int parentcontainerID= Integer.parseInt(splitArray[0]); + int cloneStackQuantity= Integer.parseInt(splitArray[1]); + ResourceContainerObject resourceContainer = (ResourceContainerObject) NGECore.getInstance().objectService.getObject(parentcontainerID); + if (resourceContainer==null) + return; + resourceContainer.setStackCount(resourceContainer.getStackCount()+cloneStackQuantity); + SWGObject objectParentContainer = (SWGObject) NGECore.getInstance().objectService.getObject(resourceContainer.getParentId()); + objectParentContainer.remove(disposableObject); + } + + @Override + public void sendBaselines(Client destination) { + + if(destination == null || destination.getSession() == null) + return; + + destination.getSession().write(messageBuilder.buildBaseline3()); + destination.getSession().write(messageBuilder.buildBaseline6()); + destination.getSession().write(messageBuilder.buildBaseline8()); + destination.getSession().write(messageBuilder.buildBaseline9()); + } + + public void sendDelta3(Client destination) { + + if(destination == null || destination.getSession() == null) + return; + + destination.getSession().write(messageBuilder.buildDelta3()); + } } diff --git a/src/resources/objects/resource/ResourceDeposit.java b/src/resources/objects/resource/ResourceDeposit.java new file mode 100644 index 00000000..9a6572fc --- /dev/null +++ b/src/resources/objects/resource/ResourceDeposit.java @@ -0,0 +1,51 @@ +package resources.objects.resource; + +import com.sleepycat.persist.model.Persistent; + +/** + * @author Charon + */ + +@Persistent(version=0) +public class ResourceDeposit { + private float spawnCoordsX; + private float spawnCoordsZ; + private float spawnRadius; + private float spawnConcentration; + + public ResourceDeposit(){ + + } + + public void setSpawnCoordinatesX(float spawnCoordsX){ + this.spawnCoordsX = spawnCoordsX; + } + + public float getSpawnCoordinatesX(){ + return this.spawnCoordsX; + } + + public void setSpawnCoordinatesZ(float spawnCoordsZ){ + this.spawnCoordsZ = spawnCoordsZ; + } + + public float getSpawnCoordinatesZ(){ + return this.spawnCoordsZ; + } + + public void setSpawnRadius(float spawnRadius){ + this.spawnRadius = spawnRadius; + } + + public float getSpawnRadius(){ + return spawnRadius; + } + + public void setSpawnConcentration(float spawnConcentration){ + this.spawnConcentration = spawnConcentration; + } + + public float getSpawnConcentration(){ + return this.spawnConcentration; + } +} diff --git a/src/resources/objects/resource/ResourceRoot.java b/src/resources/objects/resource/ResourceRoot.java new file mode 100644 index 00000000..34bba280 --- /dev/null +++ b/src/resources/objects/resource/ResourceRoot.java @@ -0,0 +1,247 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.resource; + +import com.sleepycat.je.Environment; +import com.sleepycat.je.Transaction; +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.NotPersistent; +import com.sleepycat.persist.model.PrimaryKey; + +/** + * @author Charon + */ + +@Entity(version=0) +public class ResourceRoot { + +// Publish 15: + +// - Total: 61, Minimum pool: 15, Random pool: 24 (3 was removed), Fixed pool: 22. +// - Possible spawns for rare non-Iron resources: 39. +// - Indoor concentrations were fixed for creature harvesting. + + +// 1) Minimum Pool (15 resources) +// +// 1 Steel not including Hardened and Crystallized from JTL +// 1 Copper not including Conductive from JTL +// 0 Iron +// 1 Aluminium not including Perovskitic from JTL +// 1 Extrusive Ore +// 1 Intrusive Ore +// 0 Siliclastic Ore not including Fermionic from JTL +// 1 Carbonate Ore +// 1 Crystalline Gemstone +// 1 Armophous Gemstone +// 1 Known Radioactive not including High Grade from JTL +// 1 Known Solid Petrochemicals +// 1 Known Liquid Petrochemicals +// 2 Polymer +// 2 Lubricating Oil +// 0 Known Inert Gas +// 0 Known Reactive Gas not including Unstable from JTL Gas +// +// +//2) Random Pool (24 resources) +// +// Any Mineral except Iron and JTL resources. +// Any Gas except JTL Gas. +// Any Chemical except Fiberplast +// Extra Water (Bonus Water in addition to the one in the Native Pool) +// +// +//3) Fixed Pool (22 resources) +// +// 8 JTL Resources (Added just before Publish 11) +// 14 Iron +// +// +//4) Native Pool (420 resources) +// +// One Fiberplast for each planet +// One Water for each planet +// One Wind Energy and One Solar Energy for each planet +// All 38 Organic types for each planet + + @NotPersistent + private Transaction txn; + + private static int highestID = 0; + + @PrimaryKey + private int resourceRootID; + + private String resourceClass; + private String resourceType; + private byte generalType; + private byte containerType; + private String resourceFileName; + private short[] resourceMaxCaps; + private short[] resourceMinCaps; + private Long minimalLifeTime; + private Long maximalLifeTime; +// Non-JTL Inorganics: 6 to 11 days. +// Organics: 6 to 22 days. +// JTL resources: 13 to 22 days. + + public static byte CONTAINER_TYPE_INORGANIC_MINERALS = 0; + public static byte CONTAINER_TYPE_INORGANIC_CHEMICALS = 1; + public static byte CONTAINER_TYPE_INORGANIC_GAS = 2; + public static byte CONTAINER_TYPE_INORGANIC_PETROCHEM_LIQUID = 3; + public static byte CONTAINER_TYPE_INORGANIC_WATER = 4; + public static byte CONTAINER_TYPE_INORGANIC_BOTTLE_WATER = 5; + public static byte CONTAINER_TYPE_ORGANIC_BEAN = 6; + public static byte CONTAINER_TYPE_ORGANIC_BOTTLE_MILK = 7; + public static byte CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE = 8; + public static byte CONTAINER_TYPE_ORGANIC_CORN = 9; + public static byte CONTAINER_TYPE_ORGANIC_FOOD = 10; + public static byte CONTAINER_TYPE_ORGANIC_FRUIT = 11; + public static byte CONTAINER_TYPE_ORGANIC_FUNGI = 12; + public static byte CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES = 13; + public static byte CONTAINER_TYPE_ORGANIC_HIDE = 14; + public static byte CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE = 15; + public static byte CONTAINER_TYPE_ORGANIC_OATS = 16; + public static byte CONTAINER_TYPE_ORGANIC_RICE = 17; + public static byte CONTAINER_TYPE_ORGANIC_SCALEY_HIDE = 18; + public static byte CONTAINER_TYPE_ORGANIC_STRUCTURE = 19; + public static byte CONTAINER_TYPE_ORGANIC_TUBER = 20; + public static byte CONTAINER_TYPE_ORGANIC_WHEAT = 21; + public static byte CONTAINER_TYPE_ORGANIC_WOOLY_HIDE = 22; + public static byte CONTAINER_TYPE_ENERGY_GAS = 23; + public static byte CONTAINER_TYPE_ENERGY_LIQUID = 24; + public static byte CONTAINER_TYPE_ENERGY_RADIOACTIVE = 25; + public static byte CONTAINER_TYPE_ENERGY_SOLID = 26; + + public static String[] CONTAINER_TYPE_IFF_SIGNIFIER = new String[]{ + "object/resource_container/shared_resource_container_inorganic_minerals.iff", + "object/resource_container/shared_resource_container_inorganic_chemicals.iff", + "object/resource_container/shared_resource_container_inorganic_gas.iff", + "object/resource_container/shared_resource_container_inorganic_petrochem_liquid.iff", + "object/resource_container/shared_resource_container_inorganic_water.iff", + "object/resource_container/shared_resource_container_inorganic_bottle_water.iff", + "object/resource_container/shared_resource_container_organic_bean.iff", + "object/resource_container/shared_resource_container_organic_bottle_milk.iff", + "object/resource_container/shared_resource_container_organic_bristley_hide.iff", + "object/resource_container/shared_resource_container_organic_corn.iff", + "object/resource_container/shared_resource_container_organic_food.iff", + "object/resource_container/shared_resource_container_organic_fruit.iff", + "object/resource_container/shared_resource_container_organic_fungi.iff", + "object/resource_container/shared_resource_container_organic_green_vegetables.iff", + "object/resource_container/shared_resource_container_organic_hide.iff", + "object/resource_container/shared_resource_container_organic_leathery_hide.iff", + "object/resource_container/shared_resource_container_organic_oats.iff", + "object/resource_container/shared_resource_container_organic_rice.iff", + "object/resource_container/shared_resource_container_organic_scaley_hide.iff", + "object/resource_container/shared_resource_container_organic_structure.iff", + "object/resource_container/shared_resource_container_organic_tuber.iff", + "object/resource_container/shared_resource_container_organic_wheat.iff", + "object/resource_container/shared_resource_container_organic_wooly_hide.iff", + "object/resource_container/shared_resource_container_energy_gas.iff", + "object/resource_container/shared_resource_container_energy_liquid.iff", + "object/resource_container/shared_resource_container_energy_radioactive.iff", + "object/resource_container/shared_resource_container_energy_solid.iff" + }; + + + public ResourceRoot(){ + this.resourceRootID = highestID++; + resourceMinCaps = new short[11]; + resourceMaxCaps = new short[11]; + } + + public String getResourceClass() { + return resourceClass; + } + public void setResourceClass(String resourceClass) { + this.resourceClass = resourceClass; + } + public String getResourceType() { + return resourceType; + } + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + public String getResourceFileName() { + return resourceFileName; + } + public void setResourceFileName(String resourceFileName) { + this.resourceFileName = resourceFileName; + } + public short[] getResourceMaxCaps() { + return resourceMaxCaps; + } + public void setResourceMaxCaps(short[] resourceMaxCaps) { + this.resourceMaxCaps = resourceMaxCaps; + } + public short[] getResourceMinCaps() { + return resourceMinCaps; + } + public void setResourceMinCaps(short[] resourceMinCaps) { + this.resourceMinCaps = resourceMinCaps; + } + public Long getMinimalLifeTime() { + return minimalLifeTime; + } + public void setMinimalLifeTime(Long minimalLifeTime) { + this.minimalLifeTime = minimalLifeTime; + } + public Long getMaximalLifeTime() { + return maximalLifeTime; + } + public void setMaximalLifeTime(Long maximalLifeTime) { + this.maximalLifeTime = maximalLifeTime; + } + + public byte getGeneralType(){ + return generalType; + } + + public void setgeneralType(byte generalType){ + this.generalType = generalType; + } + + public byte getContainerType() { + return containerType; + } + + public void setContainerType(byte containerType) { + this.containerType = containerType; + } + + public void setGeneralType(byte generalType) { + this.generalType = generalType; + } + + public int getResourceRootID() { + return resourceRootID; + } + + public void setResourceRootID(int resourceRootID) { + this.resourceRootID = resourceRootID; + } + + public void createTransaction(Environment env) { txn = env.beginTransaction(null, null);} + + public Transaction getTransaction() { return txn; } + +} diff --git a/src/resources/objects/tangible/TangibleMessageBuilder.java b/src/resources/objects/tangible/TangibleMessageBuilder.java index 720a366a..ec017af4 100644 --- a/src/resources/objects/tangible/TangibleMessageBuilder.java +++ b/src/resources/objects/tangible/TangibleMessageBuilder.java @@ -51,9 +51,9 @@ public class TangibleMessageBuilder extends ObjectMessageBuilder { buffer.put(getUnicodeString(object.getCustomName())); buffer.putInt(object.getVolume()); buffer.putInt(0); - buffer.putInt(0); // faction vars + buffer.putInt(tangible.getFactionStatus()); // faction vars - if(tangible.getCustomization() == null || tangible.getCustomization().length < 1) + if(tangible.getCustomization() == null || tangible.getCustomization().length <= 0) buffer.putShort((short) 0); else { buffer.putShort((short) tangible.getCustomization().length); @@ -64,8 +64,10 @@ public class TangibleMessageBuilder extends ObjectMessageBuilder { buffer.putInt(0); //buffer.putInt(0); + if(tangible.getOptionsBitmask() == 0) + tangible.setOptionsBitmask(0x100); buffer.putInt(tangible.getOptionsBitmask()); - buffer.putInt(0); // number of item uses + buffer.putInt(tangible.getUses()); // number of item uses buffer.putInt(tangible.getConditionDamage()); buffer.putInt(tangible.getMaxDamage()); buffer.put((byte) (tangible.isStaticObject() ? 1 : 0)); @@ -138,6 +140,70 @@ public class TangibleMessageBuilder extends ObjectMessageBuilder { } + public IoBuffer buildCustomNameDelta(String customName) { + IoBuffer buffer = bufferPool.allocate(getUnicodeString(customName).length, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.put(getUnicodeString(customName)); + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("TANO", (byte) 3, (short) 1, (short) 2, buffer, size + 4); + return buffer; + + } + + public IoBuffer buildCustomizationDelta(byte[] customization) { + IoBuffer buffer = bufferPool.allocate(customization.length, false).order(ByteOrder.LITTLE_ENDIAN); + + buffer.put(customization); + + int size = buffer.position(); + buffer.flip(); + buffer = createDelta("TANO", (byte) 3, (short) 1, (short) 6, buffer, size + 4); + return buffer; + } + + public IoBuffer buildDelta3() { + IoBuffer buffer = bufferPool.allocate(2, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(getObject().getObjectID()); + buffer.putInt(0x54414E4F); + buffer.put((byte)3); + buffer.putInt(8);//buffer.putInt(8+6); + + buffer.putShort((short) 2); + buffer.putShort((short)8); + buffer.put((byte)0); + buffer.putShort((short) 0x21); + buffer.put((byte)0); + +// buffer.putShort((short) 0); +// buffer.putFloat(4.0F); + + int size = buffer.position(); + buffer.flip(); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + + public IoBuffer buildAssemblyDelta3() { + IoBuffer buffer = bufferPool.allocate(2, false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); + buffer.putShort((short)5); + buffer.putInt(0x12862153); + buffer.putLong(getObject().getObjectID()); + buffer.putInt(0x54414E4F); + buffer.put((byte)3); + buffer.putInt(8);//buffer.putInt(8+6); + + buffer.putShort((short) 1); + buffer.putShort((short)0x0B); + buffer.putInt(0x000003E8); // ? + + int size = buffer.position(); + buffer.flip(); + return IoBuffer.allocate(size).put(buffer.array(), 0, size).flip(); + } + @Override public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { // TODO Auto-generated method stub diff --git a/src/resources/objects/tangible/TangibleObject.java b/src/resources/objects/tangible/TangibleObject.java index fcb47aef..4efc2c4c 100644 --- a/src/resources/objects/tangible/TangibleObject.java +++ b/src/resources/objects/tangible/TangibleObject.java @@ -21,30 +21,40 @@ ******************************************************************************/ package resources.objects.tangible; +import java.io.ByteArrayOutputStream; import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.Vector; +import main.NGECore; import protocol.swg.ObjControllerMessage; import protocol.swg.PlayClientEffectObjectMessage; import protocol.swg.StopClientEffectObjectByLabel; import protocol.swg.UpdatePVPStatusMessage; import protocol.swg.objectControllerObjects.ShowFlyText; - +import resources.common.OutOfBand; import resources.common.RGB; +import resources.datatables.Options; import resources.objects.creature.CreatureObject; +import resources.objects.loot.LootGroup; +import resources.visitors.IDManagerVisitor; import com.sleepycat.persist.model.NotPersistent; import com.sleepycat.persist.model.Persistent; +import engine.clientdata.ClientFileManager; import engine.clients.Client; import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; -@Persistent(version=0) +@Persistent(version=11) public class TangibleObject extends SWGObject { // TODO: Thread safety @@ -54,10 +64,13 @@ public class TangibleObject extends SWGObject { protected int pvpBitmask = 0; protected byte[] customization; private List componentCustomizations = new ArrayList(); + private Map customizationVariables = new HashMap(); protected int optionsBitmask = 0; + private int uses = 0; private int maxDamage = 1000; private boolean staticObject = true; - protected String faction = "neutral"; // Says you're "Imperial Special Forces" if it's 0 for some reason + protected String faction = ""; // Says you're "Imperial Special Forces" if it's 0 for some reason + protected int factionStatus = 0; @NotPersistent private Vector defendersList = new Vector(); // unused in packets but useful for the server @NotPersistent @@ -66,6 +79,27 @@ public class TangibleObject extends SWGObject { private int respawnTime = 0; private Point3D spawnCoordinates = new Point3D(0, 0, 0); + //private TreeSet> lootSpecification = new TreeSet>(); + private List lootGroups = new ArrayList(); + + @NotPersistent + private boolean looted = false; // These 4 should not need to be persisted, since a looted corpse will get wiped with server restart + @NotPersistent + private boolean lootLock = false; + @NotPersistent + private boolean creditRelieved = false; + @NotPersistent + private boolean lootItem = false; + + private boolean stackable = false; + private int stackCount = 1; + private boolean noSell = false; + private byte junkType = -1; + private int junkDealerPrice = 0; + + + private String serialNumber; + @NotPersistent private TangibleObject killer = null; @@ -86,6 +120,12 @@ public class TangibleObject extends SWGObject { super(); messageBuilder = new TangibleMessageBuilder(this); } + + public void setCustomName2(String customName) { + setCustomName(customName); + + notifyObservers(messageBuilder.buildCustomNameDelta(customName), true); + } public int getIncapTimer() { return incapTimer; @@ -94,6 +134,15 @@ public class TangibleObject extends SWGObject { public void setIncapTimer(int incapTimer) { this.incapTimer = incapTimer; } + + public int getUses() { + return uses; + } + + public void setUses(int uses) { + this.uses = uses; + setIntAttribute("uses", uses); + } public synchronized int getConditionDamage() { return conditionDamage; @@ -116,7 +165,11 @@ public class TangibleObject extends SWGObject { } public void setCustomization(byte[] customization) { - this.customization = customization; + synchronized(objectMutex) { + this.customization = customization; + } + + notifyObservers(messageBuilder.buildCustomizationDelta(customization), false); } public List getComponentCustomizations() { @@ -207,6 +260,75 @@ public class TangibleObject extends SWGObject { } } } + + //updatePvpStatus(); + } + + public void updatePvpStatus() { + HashSet observers = new HashSet(getObservers()); + + for (Iterator it = observers.iterator(); it.hasNext();) { + Client observer = it.next(); + + if (observer.getParent() != null) { + observer.getSession().write(new UpdatePVPStatusMessage(this.getObjectID(), NGECore.getInstance().factionService.calculatePvpStatus((CreatureObject) observer.getParent(), this), getFaction()).serialize()); + if(getClient() != null) + getClient().getSession().write(new UpdatePVPStatusMessage(observer.getParent().getObjectID(), NGECore.getInstance().factionService.calculatePvpStatus((CreatureObject) this, (CreatureObject) observer.getParent()), getFaction()).serialize()); + } + + } + + if (getClient() != null) { + CreatureObject companion = NGECore.getInstance().mountService.getCompanion((CreatureObject) this); + + if (companion != null) { + companion.updatePvpStatus(); + } + } + } + + public void setCustomizationVariable(String type, byte value) + { + if(customizationVariables.containsKey(type)) customizationVariables.replace(type, value); + else customizationVariables.put(type, value); + + buildCustomizationBytes(); + } + + public void removeCustomizationVariable(String type) + { + if(customizationVariables.containsKey(type)) + { + customizationVariables.remove(type); + buildCustomizationBytes(); + } + } + + private void buildCustomizationBytes() + { + //if(customizationVariables.size() == 0) customization = { 0x00 }; + + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + try + { + IDManagerVisitor visitor = ClientFileManager.loadFile("customization/customization_id_manager.iff", IDManagerVisitor.class); + + stream.write((byte)0x02); // Unk + stream.write((byte)customizationVariables.size()); // Number of customization attributes + + for(String type : customizationVariables.keySet()) + { + stream.write(visitor.getAttributeIndex(type)); // Index of palette type within "customization/customization_id_manager.iff" + stream.write(customizationVariables.get(type)); // Value/Index within palette + + // Seperator/Footer + stream.write((byte) 0xC3); + stream.write((byte) 0xBF); + stream.write((byte) 0x03); + } + customization = stream.toByteArray(); + } + catch (Exception e) { e.printStackTrace(); } } public String getFaction() { @@ -219,14 +341,30 @@ public class TangibleObject extends SWGObject { synchronized(objectMutex) { this.faction = faction; } + + updatePvpStatus(); } - + + public int getFactionStatus() { + synchronized(objectMutex) { + return factionStatus; + } + } + + public void setFactionStatus(int factionStatus) { + synchronized(objectMutex) { + this.factionStatus = factionStatus; + } + } + public Vector getDefendersList() { - return defendersList; + synchronized(objectMutex) { + return defendersList; + } } public void addDefender(TangibleObject defender) { - + defendersList.add(defender); if(this instanceof CreatureObject) { @@ -285,32 +423,39 @@ public class TangibleObject extends SWGObject { return getPvPBitmask() == 1 || getPvPBitmask() == 2; - } + } else if(attacker.getSlottedObject("ghost") == null) + return true; return getPvPBitmask() == 1 || getPvPBitmask() == 2; } - public void showFlyText(String stfFile, String stfString, float scale, RGB color, int displayType) { - Set observers = getObservers(); - - if (getClient() != null) { - getClient().getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(getObjectID(), getObjectID(), stfFile, stfString, scale, color, displayType))).serialize()); - } - - for (Client client : observers) { - client.getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(client.getParent().getObjectID(), getObjectID(), stfFile, stfString, scale, color, displayType))).serialize()); - } + public void showFlyText(OutOfBand outOfBand, float scale, RGB color, int displayType, boolean notifyObservers) { + showFlyText("", outOfBand, scale, color, displayType, notifyObservers); } - public void showFlyText(String stfFile, String stfString, String customText, int xp, float scale, RGB color, int displayType) { - Set observers = getObservers(); - - if (getClient() != null) { - getClient().getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(getObjectID(), getObjectID(), 56, 1, 1, -1, stfFile, stfString, customText, xp, scale, color, displayType))).serialize()); + public void showFlyText(String stf, float scale, RGB color, int displayType, boolean notifyObservers) { + showFlyText(stf, new OutOfBand(), scale, color, displayType, notifyObservers); + } + + public void showFlyText(String stf, OutOfBand outOfBand, float scale, RGB color, int displayType, boolean notifyObservers) { + if (outOfBand == null) { + outOfBand = new OutOfBand(); } - for (Client client : observers) { - client.getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(client.getParent().getObjectID(), getObjectID(), 56, 1, 1, -1, stfFile, stfString, customText, xp, scale, color, displayType))).serialize()); + if (color == null) { + color = new RGB(255, 255, 255); + } + + if (getClient() != null) { + getClient().getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(getObjectID(), getObjectID(), stf, outOfBand, scale, color, displayType))).serialize()); + } + + if (notifyObservers) { + Set observers = getObservers(); + + for (Client client : observers) { + client.getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(client.getParent().getObjectID(), getObjectID(), stf, outOfBand, scale, color, displayType))).serialize()); + } } } @@ -346,6 +491,114 @@ public class TangibleObject extends SWGObject { } } + public List getLootGroups() { + return lootGroups; + } + + public void addToLootGroups(String[] lootPoolNames, int[] lootPoolChances, int lootGroupChance) { + System.out.println("lootPoolNames[0] " + lootPoolNames[0]); + LootGroup lootGroup = new LootGroup(lootPoolNames, lootPoolChances, lootGroupChance); + this.lootGroups.add(lootGroup); + } + + public boolean isLooted() { + return looted; + } + + public void setLooted(boolean looted) { + this.looted = looted; + } + + public boolean isLootLock() { + return lootLock; + } + + public void setLootLock(boolean lootLock) { + this.lootLock = lootLock; + } + + public boolean isLootItem() { + return lootItem; + } + + public void setLootItem(boolean lootItem) { + this.lootItem = lootItem; + } + + public boolean isStackable() { + return stackable; + } + + public void setStackable(boolean stackable) { + this.stackable = stackable; + } + + public int getStackCount() { + return stackCount; + } + + public void setStackCount(int stackCount) { + this.stackCount = stackCount; + } + + public boolean isNoSell() { + return noSell; + } + + public void setNoSell(boolean noSell) { + this.noSell = noSell; + } + + public byte getJunkType() { + return junkType; + } + + public void setJunkType(byte junkType) { + this.junkType = junkType; + } + + public int getJunkDealerPrice() { + return junkDealerPrice; + } + + public void setJunkDealerPrice(int junkDealerPrice) { + this.junkDealerPrice = junkDealerPrice; + } + + public boolean isCreditRelieved() { + return creditRelieved; + } + + public void setCreditRelieved(boolean creditRelieved) { + if (creditRelieved) + this.creditRelieved = creditRelieved; // only allow one state change to prevent hacking + } + + public String getSerialNumber() { + return getStringAttribute("serial_number"); + } + + public void setSerialNumber(String serialNumber) { + setStringAttribute("serial_number", serialNumber); + setOptions(Options.SERIAL, true); + } + + public void sendDelta3(Client destination) { + destination.getSession().write(messageBuilder.buildDelta3()); + //tools.CharonPacketUtils.printAnalysis(messageBuilder.buildDelta3(),"TANO3 Delta"); + } + + public void sendAssemblyDelta3(Client destination) { + destination.getSession().write(messageBuilder.buildAssemblyDelta3()); + //tools.CharonPacketUtils.printAnalysis(messageBuilder.buildAssemblyDelta3(),"TANO3 Assembly Delta"); + } + + public void sendCustomizationDelta3(Client destination, String enteredName){ + destination.getSession().write(messageBuilder.buildCustomNameDelta(enteredName)); + //tools.CharonPacketUtils.printAnalysis(messageBuilder.buildCustomNameDelta(enteredName),"TANO3 Customization Delta"); + } + + @Override public void sendBaselines(Client destination) { @@ -357,8 +610,8 @@ public class TangibleObject extends SWGObject { destination.getSession().write(messageBuilder.buildBaseline3()); destination.getSession().write(messageBuilder.buildBaseline6()); - //destination.getSession().write(messageBuilder.buildBaseline8()); - //destination.getSession().write(messageBuilder.buildBaseline9()); + destination.getSession().write(messageBuilder.buildBaseline8()); + destination.getSession().write(messageBuilder.buildBaseline9()); if(getPvPBitmask() != 0) { UpdatePVPStatusMessage upvpm = new UpdatePVPStatusMessage(getObjectID()); @@ -369,5 +622,4 @@ public class TangibleObject extends SWGObject { } - } diff --git a/src/resources/objects/tool/SurveyTool.java b/src/resources/objects/tool/SurveyTool.java new file mode 100644 index 00000000..90dfbc18 --- /dev/null +++ b/src/resources/objects/tool/SurveyTool.java @@ -0,0 +1,337 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objects.tool; + +import java.util.Vector; + +import main.NGECore; + +import com.sleepycat.persist.model.NotPersistent; +import com.sleepycat.persist.model.Persistent; + +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import resources.objects.creature.CreatureObject; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceConcentration; +import resources.objects.tangible.TangibleObject; + +/** + * @author Charon + */ + +@Persistent(version=0) +public class SurveyTool extends TangibleObject{ + + private byte toolType=0; + private long surveyResourceID; + private long userID=0; + private Long tanoID=0L; + private byte SurveyRangeSetting=0; + + @NotPersistent + private String surveyEffectString=""; + @NotPersistent + private String sampleEffectString=""; + @NotPersistent + private boolean currentlySurveying=false; + @NotPersistent + private boolean currentlySampling=false; + @NotPersistent + private boolean currentlyCoolingDown=false; + @NotPersistent + private boolean exceptionalState=false; + @NotPersistent + private boolean recoveryMode=false; + @NotPersistent + private Long lastSurveyTime=0L; + @NotPersistent + private Long lastSampleTime=0L; + @NotPersistent + private Long recoveryTime=10L; + + public static byte MineralSurveyDevice = 1; + public static byte ChemicalSurveyDevice = 2; + public static byte FloraSurveyTool = 3; + public static byte GasPocketSurveyDevice = 4; + public static byte WaterSurveyDevice = 5; + public static byte WindCurrentSurveyingTool = 6; + public static byte AmbientSolarEnergySurveyingTool = 7; + public static byte CompleteResourceSurveyDevice = 8; + + public SurveyTool() { + super(); + this.exceptionalState = false; + } + + public SurveyTool(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ + super(objectID, planet, template, position, orientation); + surveyEffectString = ""; + sampleEffectString = ""; + this.tanoID = objectID; + this.exceptionalState = false; + this.recoveryMode = false; + switch (template) { + case "object/tangible/survey_tool/shared_survey_tool_mineral.iff" : + toolType = 1; + surveyEffectString = "clienteffect/survey_tool_mineral.cef"; + sampleEffectString = "clienteffect/survey_sample_mineral.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_inorganic.iff" : + toolType = 2; + surveyEffectString = "clienteffect/survey_tool_lumber.cef"; + sampleEffectString = "clienteffect/survey_sample_lumber.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_lumber.iff" : + toolType = 3; + surveyEffectString = "clienteffect/survey_tool_lumber.cef"; + sampleEffectString = "clienteffect/survey_sample_lumber.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_gas.iff" : + toolType = 4; + surveyEffectString = "clienteffect/survey_tool_gas.cef"; + sampleEffectString = "clienteffect/survey_sample_gas.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_moisture.iff" : + toolType = 5; + surveyEffectString = "clienteffect/survey_tool_liquid.cef"; + sampleEffectString = "clienteffect/survey_sample_liquid.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_wind.iff" : + toolType = 6; + surveyEffectString = "clienteffect/survey_tool_gas.cef"; + sampleEffectString = "clienteffect/survey_sample_gas.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_solar.iff" : + toolType = 7; + surveyEffectString = "clienteffect/survey_tool_moisture.cef"; + sampleEffectString = "clienteffect/survey_sample_moisture.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_all.iff" : + toolType = 8; + surveyEffectString = "clienteffect/survey_tool_liquid.cef"; + sampleEffectString = "clienteffect/survey_sample_liquid.cef"; + break; + default: toolType = -1; + } + } + + public SurveyTool(String template, Long tanoID) { + super(); + surveyEffectString = ""; + sampleEffectString = ""; + this.tanoID = tanoID; + this.exceptionalState = false; + switch (template) { + case "object/tangible/survey_tool/shared_survey_tool_mineral.iff" : + toolType = 1; + surveyEffectString = "clienteffect/survey_tool_mineral.cef"; + sampleEffectString = "clienteffect/survey_sample_mineral.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_inorganic.iff" : + toolType = 2; + surveyEffectString = "clienteffect/survey_tool_lumber.cef"; + sampleEffectString = "clienteffect/survey_sample_lumber.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_lumber.iff" : + toolType = 3; + surveyEffectString = "clienteffect/survey_tool_lumber.cef"; + sampleEffectString = "clienteffect/survey_sample_lumber.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_gas.iff" : + toolType = 4; + surveyEffectString = "clienteffect/survey_tool_gas.cef"; + sampleEffectString = "clienteffect/survey_sample_gas.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_moisture.iff" : + toolType = 5; + surveyEffectString = "clienteffect/survey_tool_liquid.cef"; + sampleEffectString = "clienteffect/survey_sample_liquid.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_wind.iff" : + toolType = 6; + surveyEffectString = "clienteffect/survey_tool_gas.cef"; + sampleEffectString = "clienteffect/survey_sample_gas.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_solar.iff" : + toolType = 7; + surveyEffectString = "clienteffect/survey_tool_moisture.cef"; + sampleEffectString = "clienteffect/survey_sample_moisture.cef"; + break; + case "object/tangible/survey_tool/shared_survey_tool_all.iff" : + toolType = 8; + surveyEffectString = "clienteffect/survey_tool_liquid.cef"; + sampleEffectString = "clienteffect/survey_sample_liquid.cef"; + break; + default: toolType = -1; + } + + } + + public void setToolType(byte toolType) { + this.toolType = toolType; + } + + public byte getToolType() { + return this.toolType; + } + + public String getSurveyEffectString() { + return surveyEffectString; + } + + public String getSampleEffectString() { + return sampleEffectString; + } + + public void setCurrentlySurveying(boolean toggle){ + this.currentlySurveying=toggle; + } + + public boolean getCurrentlySurveying(){ + return this.currentlySurveying; + } + + public void setCurrentlySampling(boolean toggle){ + this.currentlySampling=toggle; + } + + public boolean getCurrentlySampling(){ + return this.currentlySampling; + } + + public void setLastSurveyTime(Long time){ + this.lastSurveyTime = time; + } + + public Long getLastSurveyTime(){ + return this.lastSurveyTime; + } + + public void setLastSampleTime(Long time){ + this.lastSampleTime = time; + } + + public Long getLastSampleTime(){ + return this.lastSampleTime; + } + + public void setSurveyResourceID(long surveyResourceID){ + this.surveyResourceID = surveyResourceID; + } + + public long getSurveyResourceID(){ + return this.surveyResourceID; + } + + public boolean getCurrentlyCoolingDown() { + return currentlyCoolingDown; + } + + public void setCurrentlyCoolingDown(boolean currentlyCoolingDown) { + this.currentlyCoolingDown = currentlyCoolingDown; + } + + public Long getRecoveryTime() { + return recoveryTime; + } + + public void setRecoveryTime(Long recoveryTime) { + this.recoveryTime = recoveryTime; + } + + public long getUserID() { + return userID; + } + + public void setUserID(long userID) { + this.userID = userID; + } + + public Long getTanoID() { + return tanoID; + } + + public void setTanoID(Long tanoID) { + this.tanoID = tanoID; + } + + public boolean isExceptionalState() { + return exceptionalState; + } + + public void setExceptionalState(boolean exceptionalState) { + this.exceptionalState = exceptionalState; + } + + public boolean isRecoveryMode() { + return this.recoveryMode; + } + + public void setRecoveryMode(boolean recoveryMode) { + this.recoveryMode = recoveryMode; + } + + public byte getSurveyRangeSetting() { + return SurveyRangeSetting; + } + + public void setSurveyRangeSetting(byte surveyRangeSetting) { + SurveyRangeSetting = surveyRangeSetting; + } + + public void sendConstructSurveyMapMessage(){ + float surveyRadius = 64.0f; + int surveyToolRangeSetting = this.getSurveyRangeSetting(); + //surveyToolRangeSetting = 4; + int divisor = 0; + if (surveyToolRangeSetting==0) { + divisor = 2; + surveyRadius = 64.0f; + } else if (surveyToolRangeSetting==1) { + divisor = 3; + surveyRadius = 128.0f; + } else if (surveyToolRangeSetting==2) { + divisor = 3; + surveyRadius = 192.0f; + } else if (surveyToolRangeSetting==3) { + divisor = 4; + surveyRadius = 256.0f; + } else if (surveyToolRangeSetting==4) { + divisor = 4; + surveyRadius = 320.0f; + } else { + divisor = 5; + surveyRadius = 3072.0f; + } + + float differential = surveyRadius / (float) divisor; + GalacticResource resourceToSurvey = (GalacticResource) NGECore.getInstance().objectService.getObject(this.getSurveyResourceID()); + CreatureObject user = (CreatureObject) NGECore.getInstance().objectService.getObject(this.getUserID()); + if (resourceToSurvey==null || user==null) + return; + Vector concentrationMap = resourceToSurvey.buildConcentrationsCollection(user.getPosition(),resourceToSurvey, surveyRadius, differential, user.getPlanetId()); + resourceToSurvey.constructSurveyMapMessage(user, concentrationMap, surveyRadius); + //this.getUser().sendSystemMessage("Distance to nearest Deposit : " + this.getSurveyResource().getHelperMinDist(), (byte) 0); + } +} \ No newline at end of file diff --git a/src/resources/objects/weapon/WeaponMessageBuilder.java b/src/resources/objects/weapon/WeaponMessageBuilder.java index 8e2e5afc..5084b9cf 100644 --- a/src/resources/objects/weapon/WeaponMessageBuilder.java +++ b/src/resources/objects/weapon/WeaponMessageBuilder.java @@ -26,14 +26,14 @@ import java.nio.ByteOrder; import org.apache.mina.core.buffer.IoBuffer; import resources.objects.ObjectMessageBuilder; - +import resources.datatables.Elemental; public class WeaponMessageBuilder extends ObjectMessageBuilder { public WeaponMessageBuilder(WeaponObject weaponObject) { setObject(weaponObject); } - + public IoBuffer buildBaseline3() { WeaponObject weapon = (WeaponObject) object; IoBuffer buffer = bufferPool.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN); @@ -68,11 +68,12 @@ public class WeaponMessageBuilder extends ObjectMessageBuilder { buffer.putInt(0); buffer.putFloat(weapon.getMaxRange()); buffer.putInt(0); - + if( weapon.getElementalType() != null) // Weapon particle effect + buffer.putInt(Elemental.getElementalNum(weapon.getElementalType())); + else + buffer.putInt(Elemental.getElementalNum(weapon.getDamageType())); buffer.putInt(0); - buffer.putInt(0); // those 2 ints have something to do with particle color - int size = buffer.position(); buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size); diff --git a/src/resources/objects/weapon/WeaponObject.java b/src/resources/objects/weapon/WeaponObject.java index 8caa651e..2d0fa6ba 100644 --- a/src/resources/objects/weapon/WeaponObject.java +++ b/src/resources/objects/weapon/WeaponObject.java @@ -21,6 +21,7 @@ ******************************************************************************/ package resources.objects.weapon; +import resources.datatables.WeaponType; import resources.objects.tangible.TangibleObject; import com.sleepycat.persist.model.NotPersistent; @@ -31,7 +32,7 @@ import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; -@Persistent(version=0) +@Persistent(version=1) public class WeaponObject extends TangibleObject { // TODO: Thread safety @@ -39,53 +40,24 @@ public class WeaponObject extends TangibleObject { @NotPersistent private WeaponMessageBuilder messageBuilder; - private float attackSpeed = 1; - private float maxRange; - public WeaponObject(long objectID, Planet planet, String template) { super(objectID, planet, template, new Point3D(0, 0, 0), new Quaternion(1, 0, 1, 0)); messageBuilder = new WeaponMessageBuilder(this); if (this.getClass().getSimpleName().equals("WeaponObject")) setIntAttribute("volume", 1); - calculateRange(); - calculateAttackSpeed(); + setStringAttribute("cat_wpn_damage.damage", "0-0"); } public WeaponObject(long objectID, Planet planet, String template, Point3D position, Quaternion orientation) { super(objectID, planet, template, position, orientation); messageBuilder = new WeaponMessageBuilder(this); if (this.getClass().getSimpleName().equals("WeaponObject")) setIntAttribute("volume", 1); - calculateRange(); - calculateAttackSpeed(); + setStringAttribute("cat_wpn_damage.damage", "0-0"); } public WeaponObject() { super(); messageBuilder = new WeaponMessageBuilder(this); - //calculateRange(); - } - - private void calculateRange() { - - int weaponType = getWeaponType(); - - switch(weaponType) { - - case 0: maxRange = 64; break; - case 1: maxRange = 50; break; - case 2: maxRange = 35; break; - case 12: maxRange = 64; break; - case 4: maxRange = 5; break; - case 5: maxRange = 5; break; - case 6: maxRange = 5; break; - case 7: maxRange = 5; break; - case 8: maxRange = 64; break; - case 9: maxRange = 5; break; - case 10: maxRange = 5; break; - case 11: maxRange = 5; break; - - } - } public int getIncapTimer() { @@ -118,7 +90,9 @@ public class WeaponObject extends TangibleObject { } public void setMaxDamage(int maxDamage) { + setStringAttribute("cat_wpn_damage.damage", String.valueOf(getMinDamage()) + "-" + String.valueOf(maxDamage)); + setIntAttribute("cat_wpn_damage.dps", getDamagePerSecond()); } public int getMinDamage() { @@ -126,7 +100,9 @@ public class WeaponObject extends TangibleObject { } public void setMinDamage(int minDamage) { + setStringAttribute("cat_wpn_damage.damage", String.valueOf(minDamage) + "-" + String.valueOf(getMaxDamage())); + setIntAttribute("cat_wpn_damage.dps", getDamagePerSecond()); } public int getElementalDamage() { @@ -135,55 +111,44 @@ public class WeaponObject extends TangibleObject { public void setElementalDamage(int elementalDamage) { setIntAttribute("cat_wpn_damage.wpn_elemental_value", elementalDamage); + setIntAttribute("cat_wpn_damage.dps", getDamagePerSecond()); } public String getElementalType() { - return getStringAttribute("cat_wpn_damage.wpn_elemental_type"); + if (getStringAttribute("cat_wpn_damage.wpn_elemental_type") != null ) + return getStringAttribute("cat_wpn_damage.wpn_elemental_type").replace("@obj_attr_n:elemental_", ""); + return null; } public void setElementalType(String elementalType) { - setStringAttribute("cat_wpn_damage.wpn_elemental_type", elementalType); + setStringAttribute("cat_wpn_damage.wpn_elemental_type", "@obj_attr_n:elemental_" + elementalType); } public String getDamageType() { - return getStringAttribute("cat_wpn_damage.wpn_damage_type"); + return getStringAttribute("cat_wpn_damage.wpn_damage_type").replace("@obj_attr_n:armor_eff_", ""); } public void setDamageType(String damageType) { - setStringAttribute("cat_wpn_damage.wpn_damage_type", damageType); + setStringAttribute("cat_wpn_damage.wpn_damage_type", "@obj_attr_n:armor_eff_" + damageType); } public int getDamagePerSecond() { - return (int) (((getMaxDamage() + getElementalDamage() + getMinDamage() + getElementalDamage()) / 2 + getElementalDamage()) * (1 / getAttackSpeed())); + if(getAttributes().containsKey("cat_wpn_damage.damage") && getAttributes().containsKey("cat_wpn_damage.wpn_attack_speed")) { + + if (getElementalType() != null ) + return (int) (((getMaxDamage() + getElementalDamage() + getMinDamage() + getElementalDamage()) / 2 + getElementalDamage()) * (1 / getAttackSpeed())); + else + return (int) (((getMaxDamage() + getMinDamage()) / 2 ) * (1 / getAttackSpeed())); + } else + return 0; } public int getWeaponType() { - - int weaponType = -1; - - String template = getTemplate(); - - if(template == null) - return weaponType; - - if(template.contains("rifle")) weaponType = 0; - if(template.contains("carbine")) weaponType = 1; - if(template.contains("pistol")) weaponType = 2; - if(template.contains("heavy")) weaponType = 12; - if(template.contains("sword") || template.contains("baton")) weaponType = 4; - if(template.contains("2h_sword") || template.contains("axe")) weaponType = 5; - if(template.contains("unarmed")) weaponType = 6; - if(template.contains("polearm") || template.contains("lance")) weaponType = 7; - if(template.contains("thrown")) weaponType = 8; - if(template.contains("lightsaber_one_handed")) weaponType = 9; - if(template.contains("lightsaber_two_handed")) weaponType = 10; - if(template.contains("lightsaber_polearm")) weaponType = 11; - - if(weaponType == -1) - weaponType = 6; - - return weaponType; - + return Integer.parseInt(getStringAttribute("cat_wpn_damage.wpn_category").replace("@obj_attr_n:wpn_category_", "")); + } + + public void setWeaponType(int weaponType) { + setStringAttribute("cat_wpn_damage.wpn_category", "@obj_attr_n:wpn_category_" + weaponType); } @Override @@ -201,11 +166,16 @@ public class WeaponObject extends TangibleObject { } public float getAttackSpeed() { - return attackSpeed; + return getFloatAttribute("cat_wpn_damage.wpn_attack_speed"); } public void setAttackSpeed(float attackSpeed) { - this.attackSpeed = attackSpeed; + if((int) attackSpeed != attackSpeed) + setFloatAttribute("cat_wpn_damage.wpn_attack_speed", attackSpeed); + else + setIntAttribute("cat_wpn_damage.wpn_attack_speed", (int) attackSpeed); + + setIntAttribute("cat_wpn_damage.dps", getDamagePerSecond()); } public WeaponMessageBuilder getMessageBuilder() { @@ -213,18 +183,21 @@ public class WeaponObject extends TangibleObject { } public float getMaxRange() { - return maxRange; + return Float.parseFloat(getStringAttribute("cat_wpn_damage.wpn_range").replace("0-", "").replace("m", "")); } public void setMaxRange(float maxRange) { - this.maxRange = maxRange; + if((int) maxRange != maxRange) + setStringAttribute("cat_wpn_damage.wpn_range", "0-" + String.valueOf(maxRange) + "m"); + else + setStringAttribute("cat_wpn_damage.wpn_range", "0-" + String.valueOf((int) maxRange) + "m"); } public boolean isMelee() { int weaponType = getWeaponType(); - if(weaponType == 4 || weaponType == 5 || weaponType == 6 || weaponType == 7 || weaponType == 9 || weaponType == 10 || weaponType == 11) + if(weaponType == WeaponType.ONEHANDEDMELEE || weaponType == WeaponType.TWOHANDEDMELEE || weaponType == WeaponType.UNARMED || weaponType == WeaponType.POLEARMMELEE || weaponType == WeaponType.ONEHANDEDSABER || weaponType == WeaponType.TWOHANDEDSABER || weaponType == WeaponType.POLEARMSABER) return true; return false; @@ -235,35 +208,11 @@ public class WeaponObject extends TangibleObject { int weaponType = getWeaponType(); - if(weaponType == 0 || weaponType == 1 || weaponType == 2 || weaponType == 3) + if(weaponType == WeaponType.RIFLE || weaponType == WeaponType.CARBINE || weaponType == WeaponType.PISTOL || weaponType == WeaponType.FLAMETHROWER || weaponType == WeaponType.HEAVYWEAPON) return true; return false; } - - private void calculateAttackSpeed() { - - int weaponType = getWeaponType(); - - switch(weaponType) { - - case 0: attackSpeed = 0.8f; break; - case 1: attackSpeed = 0.6f; break; - case 2: attackSpeed = 0.4f; break; - case 12: attackSpeed = 1; break; - case 4: attackSpeed = 1; break; - case 5: attackSpeed = 1; break; - case 6: attackSpeed = 1; break; - case 7: attackSpeed = 1; break; - case 8: attackSpeed = 1; break; - case 9: attackSpeed = 1; break; - case 10: attackSpeed = 1; break; - case 11: attackSpeed = 1; break; - - } - - } - } diff --git a/src/resources/visitors/IDManagerVisitor.java b/src/resources/visitors/IDManagerVisitor.java new file mode 100644 index 00000000..3c7a1617 --- /dev/null +++ b/src/resources/visitors/IDManagerVisitor.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.visitors; + +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.mina.core.buffer.IoBuffer; + +import engine.clientdata.VisitorInterface; + +public class IDManagerVisitor implements VisitorInterface { + + private ConcurrentHashMap customizationMap; + private CharsetDecoder charsetDecoder; + + public IDManagerVisitor() { + customizationMap = new ConcurrentHashMap(); + charsetDecoder = Charset.forName("US-ASCII").newDecoder(); + } + + @Override + public void parseData(String node, IoBuffer data, int depth, int size) throws Exception { + + if (!node.equals("0001DATA") || depth != 2) + return; + + while(data.hasRemaining()) { + + byte designNumber = data.get(); + data.get(); + String customizationType = data.getString(charsetDecoder); + charsetDecoder.reset(); + + customizationMap.put(customizationType, designNumber); + + //System.out.println(designNumber + ": " + customizationType); + } + } + + public byte getAttributeIndex(String type) + { + return customizationMap.get(type); + } + + @Override + public void notifyFolder(String node, int depth) throws Exception { + } + + public ConcurrentHashMap getCustomizationMap() { + return this.customizationMap; + } +} diff --git a/src/resources/visitors/ProfessionTemplateVisitor.java b/src/resources/visitors/ProfessionTemplateVisitor.java new file mode 100644 index 00000000..8b46a49d --- /dev/null +++ b/src/resources/visitors/ProfessionTemplateVisitor.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.visitors; + +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.util.Vector; + +import org.apache.mina.core.buffer.IoBuffer; + +import engine.clientdata.VisitorInterface; + +public class ProfessionTemplateVisitor implements VisitorInterface { + + + private class RaceTemplate { + private Vector items; + private String template; + public RaceTemplate(String template) { + this.template = template; + this.items = new Vector(); + } + + public Vector getItems() { + return items; + } + + public String getTemplate() { + return template; + } + } + + private CharsetDecoder charsetDecoder; + + private Vector pItems; + + public ProfessionTemplateVisitor() { + this.charsetDecoder = Charset.forName("US-ASCII").newDecoder(); + this.pItems = new Vector(); + } + + public Vector getItems(String template) { + for(RaceTemplate rTemplate : pItems) { + if (rTemplate.getTemplate().equals(template)) { + return rTemplate.getItems(); + } + } + return null; + } + + @Override + public void notifyFolder(String str, int depth) throws Exception { + } + + @Override + public void parseData(String node, IoBuffer data, int depth, int size) { + + try { + if (depth != 3) + return; + + if (node.equals("PTMPNAME")) { + String ptmpname = data.getString(charsetDecoder); + + pItems.add(new RaceTemplate(ptmpname)); + charsetDecoder.reset(); + } else if (node.equals("ITEM")){ + int index = pItems.size() - 1; + data.skip(4); + String item = data.getString(charsetDecoder); + pItems.get(index).getItems().add(item); + charsetDecoder.reset(); + } + } catch(CharacterCodingException e) { + e.printStackTrace(); + } + } +} diff --git a/src/resources/z/exp/buffs/Buff.java b/src/resources/z/exp/buffs/Buff.java deleted file mode 100644 index dc6259d6..00000000 --- a/src/resources/z/exp/buffs/Buff.java +++ /dev/null @@ -1,324 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.buffs; - -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; -import org.apache.mina.core.buffer.SimpleBufferAllocator; - -import resources.objects.IDelta; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clientdata.ClientFileManager; -import engine.clientdata.visitors.DatatableVisitor; - -@Persistent(version=3) -public class Buff implements IDelta { - - @NotPersistent - private SimpleBufferAllocator bufferPool = new SimpleBufferAllocator(); - private float duration; - private String buffName; - private long ownerId; - private String effect1Name, effect2Name, effect3Name, effect4Name, effect5Name; - private float effect1Value, effect2Value, effect3Value, effect4Value, effect5Value; - private String particleEffect; - private boolean isDebuff; - private boolean removeOnDeath; - private boolean isRemovableByPlayer; - private int maxStacks; - private boolean isPersistent; - private boolean removeOnRespec; - private boolean aiRemoveOnEndCombat; - private boolean decayOnPvPDeath; - private long startTime; - private int totalPlayTime; - - public Buff(String buffName, long ownerId) { - this.buffName = buffName; - this.ownerId = ownerId; - - DatatableVisitor visitor; - - try { - - visitor = ClientFileManager.loadFile("datatables/buff/buff.iff", DatatableVisitor.class); - - for (int i = 0; i < visitor.getRowCount(); i++) { - - if (visitor.getObject(i, 0) != null) { - - if (((String) visitor.getObject(i, 0)).equalsIgnoreCase(buffName)) { - - duration = (Float) visitor.getObject(i, 6); - effect1Name = (String) visitor.getObject(i, 7); - effect1Value = (Float) visitor.getObject(i, 8); - effect2Name = (String) visitor.getObject(i, 9); - effect2Value = (Float) visitor.getObject(i, 10); - effect3Name = (String) visitor.getObject(i, 11); - effect3Value = (Float) visitor.getObject(i, 12); - effect4Name = (String) visitor.getObject(i, 13); - effect4Value = (Float) visitor.getObject(i, 14); - effect5Name = (String) visitor.getObject(i, 15); - effect5Value = (Float) visitor.getObject(i, 16); - particleEffect = (String) visitor.getObject(i, 19); - isDebuff = (Boolean) visitor.getObject(i, 22); - removeOnDeath = (Integer) visitor.getObject(i, 25) != 0; - isRemovableByPlayer = (Integer) visitor.getObject(i, 26) != 0; - maxStacks = (Integer) visitor.getObject(i, 28); - isPersistent = (Integer) visitor.getObject(i, 29) != 0; - removeOnRespec = (Integer) visitor.getObject(i, 31) != 0; - aiRemoveOnEndCombat = (Integer) visitor.getObject(i, 32) != 0; - decayOnPvPDeath = (Integer) visitor.getObject(i, 33) != 0; - - } - - } - - } - - } catch (InstantiationException | IllegalAccessException e) { - e.printStackTrace(); - } - } - - public Buff() { - - } - - public byte[] getBytes() { - IoBuffer buffer = bufferPool.allocate(28, false).order(ByteOrder.LITTLE_ENDIAN); - if (duration > 0) { - buffer.putInt((int) (totalPlayTime + getRemainingDuration())); - buffer.putInt(0); - buffer.putInt((int) duration); - } else { - buffer.putInt(-1); - buffer.putInt(0); - buffer.putInt(-1); - } - buffer.putLong(ownerId); - buffer.putInt(1); // Unknown - buffer.flip(); - return buffer.array(); - } - - public float getDuration() { - return duration; - } - - public void setDuration(float duration) { - this.duration = duration; - } - - public String getBuffName() { - return buffName; - } - - public void setBuffName(String buffName) { - this.buffName = buffName; - } - - public long getOwnerId() { - return ownerId; - } - - public void setOwnerId(long ownerId) { - this.ownerId = ownerId; - } - - public String getEffect1Name() { - return effect1Name; - } - - public void setEffect1Name(String effect1Name) { - this.effect1Name = effect1Name; - } - - public String getEffect2Name() { - return effect2Name; - } - - public void setEffect2Name(String effect2Name) { - this.effect2Name = effect2Name; - } - - public String getEffect3Name() { - return effect3Name; - } - - public void setEffect3Name(String effect3Name) { - this.effect3Name = effect3Name; - } - - public String getEffect4Name() { - return effect4Name; - } - - public void setEffect4Name(String effect4Name) { - this.effect4Name = effect4Name; - } - - public String getEffect5Name() { - return effect5Name; - } - - public void setEffect5Name(String effect5Name) { - this.effect5Name = effect5Name; - } - - public float getEffect1Value() { - return effect1Value; - } - - public void setEffect1Value(float effect1Value) { - this.effect1Value = effect1Value; - } - - public float getEffect2Value() { - return effect2Value; - } - - public void setEffect2Value(float effect2Value) { - this.effect2Value = effect2Value; - } - - public float getEffect3Value() { - return effect3Value; - } - - public void setEffect3Value(float effect3Value) { - this.effect3Value = effect3Value; - } - - public float getEffect4Value() { - return effect4Value; - } - - public void setEffect4Value(float effect4Value) { - this.effect4Value = effect4Value; - } - - public float getEffect5Value() { - return effect5Value; - } - - public void setEffect5Value(float effect5Value) { - this.effect5Value = effect5Value; - } - - public String getParticleEffect() { - return particleEffect; - } - - public void setParticleEffect(String particleEffect) { - this.particleEffect = particleEffect; - } - - public boolean isDebuff() { - return isDebuff; - } - - public void setDebuff(boolean isDebuff) { - this.isDebuff = isDebuff; - } - - public boolean isRemoveOnDeath() { - return removeOnDeath; - } - - public void setRemoveOnDeath(boolean removeOnDeath) { - this.removeOnDeath = removeOnDeath; - } - - public boolean isRemovableByPlayer() { - return isRemovableByPlayer; - } - - public void setRemovableByPlayer(boolean isRemovableByPlayer) { - this.isRemovableByPlayer = isRemovableByPlayer; - } - - public int getMaxStacks() { - return maxStacks; - } - - public void setMaxStacks(int maxStacks) { - this.maxStacks = maxStacks; - } - - public boolean isPersistent() { - return isPersistent; - } - - public void setPersistent(boolean isPersistent) { - this.isPersistent = isPersistent; - } - - public boolean isRemoveOnRespec() { - return removeOnRespec; - } - - public void setRemoveOnRespec(boolean removeOnRespec) { - this.removeOnRespec = removeOnRespec; - } - - public boolean isAiRemoveOnEndCombat() { - return aiRemoveOnEndCombat; - } - - public void setAiRemoveOnEndCombat(boolean aiRemoveOnEndCombat) { - this.aiRemoveOnEndCombat = aiRemoveOnEndCombat; - } - - public boolean isDecayOnPvPDeath() { - return decayOnPvPDeath; - } - - public void setDecayOnPvPDeath(boolean decayOnPvPDeath) { - this.decayOnPvPDeath = decayOnPvPDeath; - } - - public void setStartTime() { - this.startTime = System.currentTimeMillis(); - } - - public int getRemainingDuration() { - long currentTime = System.currentTimeMillis(); - long timeDiff = (currentTime - startTime) / 1000; - int remaining = (int) (duration - timeDiff); - System.out.println("Buff remaining: " + remaining); - return remaining; - } - - public int getTotalPlayTime() { - return totalPlayTime; - } - - public void setTotalPlayTime(int totalPlayTime) { - this.totalPlayTime = totalPlayTime; - } - -} diff --git a/src/resources/z/exp/craft/DraftSchematic.java b/src/resources/z/exp/craft/DraftSchematic.java deleted file mode 100644 index 7192c98b..00000000 --- a/src/resources/z/exp/craft/DraftSchematic.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.craft; - -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import resources.objects.Delta; - -@Persistent -public class DraftSchematic extends Delta { - - private int serverSchematicCrc = 0; - private int schematicCrc = 0; - private int amount = 1; - - public DraftSchematic(int serverSchematicCrc, int schematicCrc, int amount) { - this.serverSchematicCrc = serverSchematicCrc; - this.schematicCrc = schematicCrc; - this.amount = amount; - } - - public DraftSchematic(int serverSchematicCrc, int schematicCrc) { - this.serverSchematicCrc = serverSchematicCrc; - this.schematicCrc = schematicCrc; - } - - public DraftSchematic() { - - } - - public int getServerSchematicCrc() { - synchronized(objectMutex) { - return serverSchematicCrc; - } - } - - public int getSchematicCrc() { - synchronized(objectMutex) { - return schematicCrc; - } - } - - public int getAmount() { - synchronized(objectMutex) { - return amount; - } - } - - public void setAmount(int amount) { - synchronized(objectMutex) { - this.amount = amount; - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(12, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(serverSchematicCrc); - buffer.putInt(schematicCrc); - buffer.putInt(amount); - return buffer.array(); - } - } - -} diff --git a/src/resources/z/exp/equipment/Equipment.java b/src/resources/z/exp/equipment/Equipment.java deleted file mode 100644 index 4e7e06cc..00000000 --- a/src/resources/z/exp/equipment/Equipment.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.equipment; - -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import engine.resources.common.CRC; -import engine.resources.objects.SWGObject; -import resources.objects.Delta; -import resources.z.exp.objects.tangible.TangibleObject; -import resources.z.exp.objects.weapon.WeaponObject; - -@Persistent -public class Equipment extends Delta { - - private TangibleObject object; - - public Equipment(SWGObject object) { - this.object = ((object instanceof TangibleObject) ? (TangibleObject) object : null); - } - - public Equipment() { - - } - - public SWGObject getObject() { - synchronized(objectMutex) { - return object; - } - } - - public long getObjectId() { - synchronized(objectMutex) { - return object.getObjectId(); - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - int size = 18 + object.getCustomization().length; - - IoBuffer buffer = bufferPool.allocate(size, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.setAutoExpand(true); - buffer.putShort((short) object.getCustomization().length); - buffer.put(object.getCustomization()); - buffer.putInt(object.getArrangementId()); - buffer.putLong(object.getObjectID()); - buffer.putInt(CRC.StringtoCRC(object.getTemplate())); - buffer.put(getBoolean((object instanceof WeaponObject))); - if (object instanceof WeaponObject) { - buffer.put(((WeaponObject) object).getBaseline3().getBaseline()); - buffer.put(((WeaponObject) object).getBaseline6().getBaseline()); - } - buffer.flip(); - - return buffer.array(); - } - } - -} diff --git a/src/resources/z/exp/gcw/CurrentServerGCWZonePercent.java b/src/resources/z/exp/gcw/CurrentServerGCWZonePercent.java deleted file mode 100644 index 930671f0..00000000 --- a/src/resources/z/exp/gcw/CurrentServerGCWZonePercent.java +++ /dev/null @@ -1,173 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.gcw; - -import java.math.BigDecimal; -import java.math.MathContext; -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import engine.resources.scene.Point2D; - -import resources.objects.Delta; - -@Persistent -public class CurrentServerGCWZonePercent extends Delta implements Cloneable { - - private Point2D position; - private float radius = 0; - private BigDecimal weight; - private int type = 0; - private BigDecimal percent; - private int gcwPoints = 1; - private long lastUpdateTime = (System.currentTimeMillis() / ((long) 1000)); - - public CurrentServerGCWZonePercent(Point2D position, float radius, int weight, int type) { - this.position = position; - this.radius = radius; - this.weight = new BigDecimal(weight, MathContext.DECIMAL128); - this.weight = this.weight.divide(new BigDecimal("10000000.0", MathContext.DECIMAL128), MathContext.DECIMAL128); - this.type = type; - this.percent = new BigDecimal("50.0", MathContext.DECIMAL128); - } - - public CurrentServerGCWZonePercent() { - - } - - public Point2D getPosition() { - synchronized(objectMutex) { - return position.clone(); - } - } - - public void setPosition(Point2D position) { - synchronized(objectMutex) { - this.position = position; - } - } - - public float getRadius() { - synchronized(objectMutex) { - return radius; - } - } - - public void setRadius(float radius) { - synchronized(objectMutex) { - this.radius = radius; - } - } - - public int getGroup() { - synchronized(objectMutex) { - return weight.unscaledValue().intValue(); - } - } - - public BigDecimal getWeight() { - synchronized(objectMutex) { - return weight; - } - } - - public void setWeight(int weight) { - synchronized(objectMutex) { - this.weight = new BigDecimal(weight, MathContext.DECIMAL128); - this.weight = this.weight.divide(new BigDecimal("10000000.0", MathContext.DECIMAL128), MathContext.DECIMAL128); - } - } - - public int getType() { - synchronized(objectMutex) { - return type; - } - } - - public void setType(int type) { - synchronized(objectMutex) { - this.type = type; - } - } - - public BigDecimal getPercent() { - synchronized(objectMutex) { - return percent; - } - } - - public CurrentServerGCWZonePercent setPercent(BigDecimal percent) { - synchronized(objectMutex) { - this.percent = percent; - this.lastUpdateTime = (System.currentTimeMillis() / ((long) 1000)); - return this; - } - } - - public int getGCWPoints() { - synchronized(objectMutex) { - return gcwPoints; - } - } - - public void addGCWPoints(int gcwPoints) { - synchronized(objectMutex) { - this.gcwPoints += gcwPoints; - } - } - - public void removeGCWPoints(int gcwPoints) { - synchronized(objectMutex) { - this.gcwPoints = (((this.gcwPoints - gcwPoints) < 1) ? 1 : this.gcwPoints - gcwPoints); - } - } - - public int getLastUpdateTime() { - synchronized(objectMutex) { - return ((int) lastUpdateTime); - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(percent.intValue()); - return buffer.array(); - } - } - - @Override - public CurrentServerGCWZonePercent clone() { - try { - CurrentServerGCWZonePercent object = (CurrentServerGCWZonePercent) super.clone(); - object.setPosition(getPosition()); - return object; - } catch (CloneNotSupportedException e) { - e.printStackTrace(); - return null; - } - } - -} diff --git a/src/resources/z/exp/gcw/RegionDefender.java b/src/resources/z/exp/gcw/RegionDefender.java deleted file mode 100644 index 3f0194fa..00000000 --- a/src/resources/z/exp/gcw/RegionDefender.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.gcw; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import resources.common.AString; -import resources.z.exp.objects.Baseline; -import resources.objects.Delta; - -@Persistent -public class RegionDefender extends Delta { - - private AString region; - private byte byte1 = 0; - private byte byte2 = 0; - - public RegionDefender(String region, byte byte1, byte byte2) { - this.region = new AString(region); - this.byte1 = byte1; - this.byte2 = byte2; - } - - public RegionDefender(String region) { - this.region = new AString(region); - } - - public RegionDefender() { - this.region = new AString(); - } - - public String getRegion() { - synchronized(objectMutex) { - return region.get(); - } - } - - public void setRegion(String region) { - synchronized(objectMutex) { - this.region = new AString(region); - } - } - - public byte getByte1() { - synchronized(objectMutex) { - return byte1; - } - } - - public void setByte1(byte byte1) { - synchronized(objectMutex) { - this.byte1 = byte1; - } - } - - public byte getByte2() { - synchronized(objectMutex) { - return byte2; - } - } - - public void setByte2(byte byte2) { - synchronized(objectMutex) { - this.byte2 = byte2; - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = Baseline.createBuffer(region.getBytes().length + 2); - buffer.put(region.getBytes()); - buffer.put(byte1); - buffer.put(byte2); - return buffer.array(); - } - } - -} diff --git a/src/resources/z/exp/group/GroupInviteInfo.java b/src/resources/z/exp/group/GroupInviteInfo.java deleted file mode 100644 index 97c53445..00000000 --- a/src/resources/z/exp/group/GroupInviteInfo.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.group; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import resources.common.AString; -import resources.z.exp.objects.Baseline; -import resources.objects.Delta; - -@Persistent -public class GroupInviteInfo extends Delta { - - private long senderId; - private AString senderName; - private long inviteCounter; - - public GroupInviteInfo(long senderId, String senderName) { - this.senderId = senderId; - this.senderName = new AString(senderName); - inviteCounter = 1; - } - - public GroupInviteInfo() { - - } - - public long getSenderId() { - synchronized(objectMutex) { - return senderId; - } - } - - public String getSenderName() { - synchronized(objectMutex) { - return senderName.get(); - } - } - - public void setSender(long senderId, String senderName) { - synchronized(objectMutex) { - this.senderId = senderId; - this.senderName = new AString(senderName); - inviteCounter++; - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = Baseline.createBuffer(16 + senderName.getBytes().length); - buffer.putLong(senderId); - buffer.put(senderName.getBytes()); - buffer.putLong(inviteCounter); - return buffer.array(); - } - } - -} diff --git a/src/resources/z/exp/guild/Guild.java b/src/resources/z/exp/guild/Guild.java deleted file mode 100644 index 7e29d8a2..00000000 --- a/src/resources/z/exp/guild/Guild.java +++ /dev/null @@ -1,120 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.guild; - -import java.nio.ByteOrder; -import java.util.List; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import resources.objects.Delta; - -import engine.resources.objects.SWGObject; - -@Persistent -public class Guild extends Delta { - - private int id; - private String abbreviation; - private String name; - private SWGObject leader; - private List members; - - public Guild(int id, String abbreviation, String name, SWGObject leader) { - this.id = id; - this.abbreviation = abbreviation; - this.name = name; - this.leader = leader; - this.members.add(leader); - } - - public Guild() { - - } - - public int getId() { - synchronized(objectMutex) { - return id; - } - } - - public void setId(int id) { - synchronized(objectMutex) { - this.id = id; - } - } - - public String getAbbreviation() { - synchronized(objectMutex) { - return abbreviation; - } - } - - public void setAbbreviation(String abbreviation) { - synchronized(objectMutex) { - this.abbreviation = abbreviation; - } - } - - public String getName() { - synchronized(objectMutex) { - return name; - } - } - - public void setName(String name) { - synchronized(objectMutex) { - this.name = name; - } - } - - public String getString() { - return (Integer.toString(getId()) + ":" + getAbbreviation()); - } - - public SWGObject getLeader() { - synchronized(objectMutex) { - return leader; - } - } - - public void setLeader(SWGObject leader) { - synchronized(objectMutex) { - this.leader = leader; - } - } - - public List getMembers() { - return members; - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate((getString().length() + 2), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put(getAsciiString(getString())); - return buffer.array(); - } - } - -} diff --git a/src/resources/z/exp/manufacture/TableAndKey.java b/src/resources/z/exp/manufacture/TableAndKey.java deleted file mode 100644 index acf3aa73..00000000 --- a/src/resources/z/exp/manufacture/TableAndKey.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.manufacture; - -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import resources.objects.Delta; - -@Persistent -public class TableAndKey extends Delta { - - private String table = ""; - private int unused = 0; - private String key = ""; - - public TableAndKey(String table, String key) { - this.table = table; - this.table = key; - } - - public TableAndKey() { - - } - - public String getTable() { - synchronized(objectMutex) { - return table; - } - } - - public TableAndKey setTable(String table) { - synchronized(objectMutex) { - this.table = table; - return this; - } - } - - public String getKey() { - synchronized(objectMutex) { - return key; - } - } - - public TableAndKey setKey(String key) { - synchronized(objectMutex) { - this.key = key; - return this; - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(4 + getAsciiString(table).length + getAsciiString(key).length, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put(getAsciiString(table)); - buffer.putInt(unused); - buffer.put(getAsciiString(key)); - return buffer.array(); - } - } - -} diff --git a/src/resources/z/exp/mission/MissionLocation.java b/src/resources/z/exp/mission/MissionLocation.java deleted file mode 100644 index 52a37dc1..00000000 --- a/src/resources/z/exp/mission/MissionLocation.java +++ /dev/null @@ -1,47 +0,0 @@ -package resources.z.exp.mission; - -import com.sleepycat.persist.model.Persistent; - -import engine.resources.common.CRC; -import engine.resources.scene.Point3D; - -@Persistent -public class MissionLocation { - - private float x, y, z; - private long objectId; - private String planet; - - public MissionLocation(Point3D position, long objectId, String planet) { - this.x = position.x; - this.y = position.y; - this.z = position.z; - this.objectId = objectId; - this.planet = planet; - } - - public MissionLocation() { - - } - - public Point3D getPosition() { - return new Point3D(x, y, z); - } - - public long getObjectId() { - return objectId; - } - - public String getPlanet() { - return planet; - } - - public int getPlanetCRC() { - if (planet != null) { - return CRC.StringtoCRC(planet); - } else { - return 0; - } - } - -} diff --git a/src/resources/z/exp/objects/Baseline.java b/src/resources/z/exp/objects/Baseline.java deleted file mode 100644 index 9ae536c6..00000000 --- a/src/resources/z/exp/objects/Baseline.java +++ /dev/null @@ -1,747 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects; - -import java.io.UnsupportedEncodingException; -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.TreeMap; -import java.util.concurrent.CopyOnWriteArrayList; - -import org.apache.mina.core.buffer.IoBuffer; -import org.apache.mina.core.buffer.SimpleBufferAllocator; - -import resources.common.AString; -import resources.common.Opcodes; -import resources.common.UString; -import resources.objects.IDelta; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.resources.objects.SWGObject; - -@Persistent -public class Baseline implements List { - - private List list = new CopyOnWriteArrayList(); - private Map definition = new TreeMap(); - private BaseObject object; - private byte viewType; - @NotPersistent - protected final Object objectMutex = new Object(); - @NotPersistent - private static SimpleBufferAllocator bufferPool = new SimpleBufferAllocator(); - @NotPersistent - private Map baselineBuilders; - @NotPersistent - private Map deltaBuilders; - - public Baseline() { } - - public Baseline(BaseObject object, int viewType) { - this.viewType = (byte) viewType; - this.object = object; - } - - public boolean add(Object e) { - synchronized(objectMutex) { - if (list.add(e)) { - definition.put(Integer.toString(list.size() - 1), list.size() - 1); - return true; - } else { - return false; - } - } - } - - public void add(int index, Object element) { - synchronized(objectMutex) { - return; - } - } - - public boolean addAll(Collection c) { - synchronized(objectMutex) { - return false; - } - } - - public boolean addAll(int index, Collection c) { - synchronized(objectMutex) { - return false; - } - } - - public void clear() { - synchronized(objectMutex) { - list.clear(); - definition.clear(); - } - } - - public boolean contains(Object o) { - synchronized(objectMutex) { - return list.contains(o); - } - } - - public boolean containsAll(Collection c) { - synchronized(objectMutex) { - return list.containsAll(c); - } - } - - private boolean compareTypes(Object o1, Object o2) { - if ((o1 instanceof IDelta && o2 instanceof IDelta) || - (o1 instanceof AString && o2 instanceof AString) || - (o1 instanceof UString && o2 instanceof UString) || - (o1 instanceof Byte[] && o2 instanceof Byte[]) || - (o1 instanceof Byte && o2 instanceof Byte) || - (o1 instanceof Boolean && o2 instanceof Boolean) || - (o1 instanceof Short && o2 instanceof Short) || - (o1 instanceof Integer && o2 instanceof Integer) || - (o1 instanceof Float && o2 instanceof Float) || - (o1 instanceof Long && o2 instanceof Long) || - (o1 instanceof SWGObject && o2 instanceof SWGObject) || - (o1 instanceof SWGList && o2 instanceof SWGList) || - (o1 instanceof SWGSet && o2 instanceof SWGSet) || - (o1 instanceof SWGMap && o2 instanceof SWGMap) || - (o1 instanceof SWGMultiMap && o2 instanceof SWGMultiMap) || - (o1 instanceof ArrayList && o2 instanceof ArrayList)) { - return true; - } - - return false; - } - - public IoBuffer createBaseline() { - byte[] objects = { }; - int size = 0; - - for (Object o : list) { - byte[] object; - - if (baselineBuilders != null && baselineBuilders.containsKey(o)) { - object = baselineBuilders.get(o).build(); - } else { - object = toBytes(o); - } - - size += object.length; - - IoBuffer buffer = createBuffer(size); - buffer.put(objects); - buffer.put(object); - buffer.flip(); - - objects = buffer.array(); - } - - IoBuffer buffer = createBuffer(25 + size); - buffer.putShort((short) 5); - buffer.putInt(Opcodes.BaselinesMessage); - buffer.putLong(object.getObjectID()); - try { - buffer.put(reverse(getShortTemplate()).getBytes("US-ASCII")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - buffer.put(viewType); - buffer.putInt(size); - buffer.putShort((short) list.size()); - buffer.put(objects); - buffer.flip(); - - return buffer; - } - - public static IoBuffer createBuffer(int size) { - return bufferPool.allocate(size, false).order(ByteOrder.LITTLE_ENDIAN); - } - - public IoBuffer createDelta() { - List objectQueue = new ArrayList(); - - synchronized(objectMutex) { - for (int i = 0; i < list.size(); i++) { - objectQueue.add(i); - } - } - - return createDelta(objectQueue, null); - } - - public IoBuffer createDelta(int object) { - List objectQueue = new ArrayList(); - objectQueue.add(object); - return createDelta(objectQueue, null); - } - - public IoBuffer createDelta(int object, byte[] data) { - List objectQueue = new ArrayList(); - objectQueue.add(object); - return createDelta(objectQueue, data); - } - - public IoBuffer createDelta(List objectQueue, byte[] data) { - byte[] objects = { }; - int size = 0; - - for (Integer o : objectQueue) { - byte[] object; - - if (deltaBuilders != null && deltaBuilders.containsKey(o)) { - object = deltaBuilders.get(o).build(); - } else if (data != null) { - object = data; - } else { - object = toBytes(get(o)); - } - - size += 2 + object.length; - - IoBuffer buffer = createBuffer(size); - buffer.put(objects); - buffer.putShort(o.shortValue()); - buffer.put(object); - buffer.flip(); - - objects = buffer.array(); - } - - IoBuffer buffer = createBuffer(27 + size); - buffer.putShort((short) 5); - buffer.putInt(Opcodes.DeltasMessage); - buffer.putLong(object.getObjectID()); - try { - buffer.put(reverse(getShortTemplate()).getBytes("US-ASCII")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - buffer.put(viewType); - buffer.putInt(size); - buffer.putShort((short) objectQueue.size()); - buffer.put(objects); - buffer.flip(); - - return buffer; - } - - public Object get(int index) { - synchronized(objectMutex) { - return list.get(index); - } - } - - public Object get(String name) { - synchronized(objectMutex) { - return list.get(definition.get(name)); - } - } - - public IoBuffer getBaseline() { - return createBaseline(); - } - - public Map getBaselineBuilders() { - synchronized(objectMutex) { - return baselineBuilders; - } - } - - public static byte getBoolean(boolean condition) { - return ((byte) ((condition) ? 1 : 0)); - } - - public byte[] getBytes() { - synchronized(objectMutex) { - int size = 0; - - for (Object o : list) { - size += toBytes(o).length; - } - - IoBuffer buffer = createBuffer(size); - - for (Object o : list) { - buffer.put(toBytes(o)); - } - - buffer.flip(); - - return buffer.array(); - } - } - - public byte[] getBytes(int index) { - synchronized(objectMutex) { - return toBytes(list.get(index)); - } - } - - public byte[] getBytes(String name) { - synchronized(objectMutex) { - return toBytes(list.get(definition.get(name))); - } - } - - private String getDefinition(int index) { - for (Entry entry : definition.entrySet()) { - if (entry.getValue() == index) { - return entry.getKey(); - } - } - - return null; - } - - public Map getDefinitions() { - synchronized(objectMutex) { - return definition; - } - } - - public IoBuffer getDelta(int index) { - return createDelta(index); - } - - public IoBuffer getDelta(String name) { - return createDelta(definition.get(name)); - } - - public Map getDeltaBuilders() { - synchronized(objectMutex) { - return deltaBuilders; - } - } - - public Object getMutex() { - return objectMutex; - } - - public String getShortTemplate() throws Exception { - String Template = object.getTemplate(); - - if (Template.startsWith("object/battlefield_marker")) { - return "BMRK"; - } else if(Template.startsWith("object/building")){ - return "BUIO"; - } else if(Template.startsWith("object/cell")) { - return "SCLT"; - } else if (Template.startsWith("object/construction_contract")) { - throw new Exception(); - } else if (Template.startsWith("object/counting")) { - throw new Exception(); - } else if (Template.startsWith("object/creature")) { - return "CREO"; - } else if (Template.startsWith("object/draft_schematic")) { - throw new Exception(); - } else if (Template.startsWith("object/factory")) { - return "FCYT"; - } else if(Template.startsWith("object/group")) { - return "GRUP"; - } else if(Template.startsWith("object/guild")) { - return "GILD"; - } else if (Template.startsWith("object/installation")) { - return "INSO"; - } else if (Template.startsWith("object/installation/battlefield")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/faction_perk/covert_detector")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/faction_perk/minefield")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/faction_perk/turret")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/generators")) { - return "HINO"; - } else if (Template.startsWith("object/installation/manufacture")) { - return "MINO"; - } else if (Template.startsWith("object/installation/mining_gas")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/mining_liquid")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/mining_gas")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/mining_ore")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/mining_organic")) { - throw new Exception(); - } else if (Template.startsWith("object/installation/turret")) { - throw new Exception(); - } else if (Template.startsWith("object/intangible")) { - return "ITNO"; - } else if (Template.startsWith("object/jedi_manager")) { - throw new Exception(); - } else if (Template.startsWith("object/manufacture_schematic")) { - return "MSCO"; - } else if (Template.startsWith("object/mission")) { - return "MISO"; - } else if (Template.startsWith("object/mobile")) { - throw new Exception(); - } else if (Template.startsWith("object/object")) { - throw new Exception(); - } else if (Template.startsWith("object/path_waypoint")) { - throw new Exception(); - } else if (Template.startsWith("object/player")) { - return "PLAY"; - } else if (Template.startsWith("object/player_quest")) { - return "PQOS"; - } else if (Template.startsWith("object/resource_container")) { - return "RCNO"; - } else if (Template.startsWith("object/ship")) { - return "SHIP"; - } else if (Template.startsWith("object/soundobject")) { - throw new Exception(); - } else if(Template.startsWith("object/static")) { - return "STAO"; - } else if (Template.startsWith("object/tangible")) { - return "TANO"; - } else if (Template.startsWith("object/token")) { - throw new Exception(); - } else if (Template.startsWith("object/universe")) { - throw new Exception(); - } else if(Template.startsWith("object/waypoint")) { - return "WAYP"; - } else if (Template.startsWith("object/weapon")) { - return "WEAO"; - } else { - throw new Exception(); - } - } - - public int indexOf(Object o) { - synchronized(objectMutex) { - return list.indexOf(o); - } - } - - public boolean isEmpty() { - synchronized(objectMutex) { - return list.isEmpty(); - } - } - - public Iterator iterator() { - synchronized(objectMutex) { - return list.iterator(); - } - } - - public int lastIndexOf(Object o) { - synchronized(objectMutex) { - return lastIndexOf(o); - } - } - - public ListIterator listIterator() { - synchronized(objectMutex) { - return list.listIterator(); - } - } - - public ListIterator listIterator(int index) { - synchronized(objectMutex) { - return listIterator(index); - } - } - - public void put(String name, Object o) { - synchronized(objectMutex) { - definition.put(name, list.size()); - list.add(o); - } - } - - public boolean remove(Object o) { - return false; - } - - public Object remove(int index) { - return null; - } - - public boolean removeAll(Collection c) { - return false; - } - - public boolean retainAll(Collection c) { - return false; - } - - private String reverse(String reverseString) { - if (reverseString.length() <= 1) { - return reverseString; - } - - return reverse(reverseString.substring(1, reverseString.length())) + reverseString.charAt(0); - } - - public Object set(int index, Object element) { - return null; - } - - public IoBuffer set(String name, Object o) { - synchronized(objectMutex) { - int index = definition.get(name); - - if (compareTypes(o, list.get(index)) && list.set(index, o) != null) { - return createDelta(index); - } else { - return null; - } - } - } - - public void setBaselineBuilders(Map baselineBuilders) { - synchronized(objectMutex) { - this.baselineBuilders = baselineBuilders; - } - } - - public void setDeltaBuilders(Map deltaBuilders) { - synchronized(objectMutex) { - this.deltaBuilders = deltaBuilders; - } - } - - public int size() { - synchronized(objectMutex) { - return list.size(); - } - } - - public List subList(int fromIndex, int toIndex) { - synchronized(objectMutex) { - return list.subList(fromIndex, toIndex); - } - } - - public Object[] toArray() { - synchronized(objectMutex) { - return list.toArray(); - } - } - - public T[] toArray(T[] a) { - synchronized(objectMutex) { - return list.toArray(a); - } - } - - public static byte[] toBytes(Object o) { - try { - if (o != null) { - if (o instanceof IDelta) { - return ((IDelta) o).getBytes(); - } else if (o instanceof String) { - return (new AString((String) o)).getBytes(); - } else if (o instanceof AString) { - return ((AString) o).getBytes(); - } else if (o instanceof UString) { - return ((UString) o).getBytes(); - } else if (o instanceof Byte[]) { - IoBuffer buffer = createBuffer(2 + ((Byte[]) o).length); - buffer.putShort((short) ((Byte[]) o).length); - for (Byte b : (Byte[]) o) buffer.put(b); - return buffer.array(); - } else if (o instanceof Byte) { - return createBuffer(1).put((Byte) o).array(); - } else if (o instanceof Boolean) { - return createBuffer(1).put(((((Boolean) o)) ? (byte) 1 : (byte) 0)).array(); - } else if (o instanceof Short) { - return createBuffer(2).putShort((Short) o).array(); - } else if (o instanceof Integer) { - return createBuffer(4).putInt((Integer) o).array(); - } else if (o instanceof Float) { - return createBuffer(4).putFloat((Float) o).array(); - } else if (o instanceof Long) { - return createBuffer(8).putLong((Long) o).array(); - } else if (o instanceof SWGObject) { - long objectId = ((((SWGObject) o) == null) ? (long) 0 : ((SWGObject) o).getObjectID()); - return createBuffer(8).putLong(objectId).array(); - } else if (o instanceof SWGList) { - return ((SWGList) o).getBytes(); - } else if (o instanceof SWGSet) { - return ((SWGSet) o).getBytes(); - } else if (o instanceof SWGMap) { - return ((SWGMap) o).getBytes(); - } else if (o instanceof SWGMultiMap) { - return ((SWGMultiMap) o).getBytes(); - } else if (o instanceof ArrayList) { - ArrayList list = ((ArrayList) o); - int size = 0; - byte[] objects = { }; - - for (int i = 0; i < list.size(); i++) { - byte[] object = toBytes(list.get(i)); - size += object.length; - - IoBuffer buffer = createBuffer(size); - buffer.put(objects); - buffer.put(object); - buffer.flip(); - - objects = buffer.array(); - } - - return createBuffer(size + 4).putInt(list.size()).array(); - } else { - System.out.println("ERROR: Unsupported type used in Baseline: " + (o.getClass()).getSimpleName()); - throw new Exception(); - //return new byte[] { }; - } - } else { - if (o instanceof IDelta) { - System.out.println("ERROR: a baseline object that implements IDelta is null. This could cause crashes! Make it at least a new instance with all fields set to 0."); - return new byte[] { }; - } else if (o instanceof String) { - return new byte[] { 0x00, 0x00 }; - } else if (o instanceof AString) { - return new byte[] { 0x00, 0x00 }; - } else if (o instanceof UString) { - return new byte[] { 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof Byte[]) { - return new byte[] { 0x00, 0x00 }; - } else if (o instanceof Byte) { - return new byte[] { 0x00 }; - } else if (o instanceof Boolean) { - return new byte[] { 0x00 }; - } else if (o instanceof Short) { - return new byte[] { 0x00, 0x00 }; - } else if (o instanceof Integer) { - return new byte[] { 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof Float) { - return new byte[] { 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof Long) { - return new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof SWGObject) { - return null; - } else if (o instanceof SWGList) { - return new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof SWGSet) { - return new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof SWGMap) { - return new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof SWGMultiMap) { - return new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - } else if (o instanceof ArrayList) { - return new byte[] { 0x00, 0x00, 0x00, 0x00 }; - } else { - System.out.println("ERROR: Unsupported type used in Baseline."); - System.out.println("~additionally, the type was null, which is dangerous."); - return new byte[] { }; - } - } - } catch (Exception e) { - e.printStackTrace(); - return new byte[] { }; - } - } - - public void transformStructure(Baseline defaults) { - synchronized(objectMutex) { - List oldStruct = list; - Baseline newStruct = defaults; - - for (int i = 0; i < newStruct.size(); i++) { - if (definition.containsKey(newStruct.getDefinition(i))) { - int oldIndex = definition.get(newStruct.getDefinition(i)); - Object newObject = newStruct.get(i); - Object oldObject = oldStruct.get(oldIndex); - - if (compareTypes(newObject, oldObject)) { - newStruct.set(i, oldObject); - } else { - if (newObject instanceof String) { - if (oldObject instanceof AString) { - newStruct.set(i, ((AString) oldObject).get()); - } else if (oldObject instanceof UString) { - newStruct.set(i, ((UString) oldObject).get()); - } - } else if (newObject instanceof AString) { - if (oldObject instanceof String) { - newStruct.set(i, new AString((String) oldObject)); - } else if (oldObject instanceof UString) { - newStruct.set(i, new AString(((UString) oldObject).get())); - } - } else if (newObject instanceof UString) { - if (oldObject instanceof String) { - newStruct.set(i, new UString((String) oldObject)); - } else if (oldObject instanceof AString) { - newStruct.set(i, new UString(((AString) oldObject).get())); - } - } else if (newObject instanceof Byte) { - if (oldObject instanceof Short && (Short) oldObject < 0xFF) { - newStruct.set(i, ((Short) oldObject).byteValue()); - } else if (oldObject instanceof Integer && (Integer) oldObject < 0xFF) { - newStruct.set(i, ((Integer) oldObject).byteValue()); - } else if (oldObject instanceof Long && (Long) oldObject < 0xFF) { - newStruct.set(i, ((Long) oldObject).byteValue()); - } - } else if (newObject instanceof Short) { - if (oldObject instanceof Byte) { - newStruct.set(i, ((Byte) oldObject).shortValue()); - } else if (oldObject instanceof Integer && (Integer) oldObject < 0xFFFF) { - newStruct.set(i, ((Integer) oldObject).shortValue()); - } else if (oldObject instanceof Long && (Long) oldObject < 0xFFFF) { - newStruct.set(i, ((Long) oldObject).shortValue()); - } - } else if (newObject instanceof Integer) { - if (oldObject instanceof Byte) { - newStruct.set(i, ((Byte) oldObject).intValue()); - } else if (oldObject instanceof Short) { - newStruct.set(i, ((Short) oldObject).intValue()); - } else if (oldObject instanceof Long && (Long) oldObject < 0xFFFFFFFF) { - newStruct.set(i, ((Long) oldObject).intValue()); - } - } else if (newObject instanceof Long) { - if (oldObject instanceof Byte) { - newStruct.set(i, ((Byte) oldObject).longValue()); - } else if (oldObject instanceof Short) { - newStruct.set(i, ((Short) oldObject).longValue()); - } else if (oldObject instanceof Integer) { - newStruct.set(i, ((Integer) oldObject).longValue()); - } else if (oldObject instanceof SWGObject) { - newStruct.set(i, ((SWGObject) oldObject).getObjectID()); - } - } - } - } - } - - list = newStruct.list; - } - } - -} diff --git a/src/resources/z/exp/objects/ObjectMessageBuilder.java b/src/resources/z/exp/objects/ObjectMessageBuilder.java deleted file mode 100644 index 0ef9564f..00000000 --- a/src/resources/z/exp/objects/ObjectMessageBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects; - -import java.nio.ByteBuffer; -import java.util.Map; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import resources.common.StringUtilities; -import resources.z.exp.objects.object.BaseObject; - -@Persistent -public class ObjectMessageBuilder { - - protected BaseObject object; - - public ObjectMessageBuilder(BaseObject object) { - setObject(object); - } - - public ObjectMessageBuilder() { - - } - - public void buildBaseline1(Map baselineBuilders, Map deltaBuilders) { - /* - baselineBuilders.put(5, new Builder { - public byte[] build() { - IoBuffer = Baseline.createBuffer(2); - buffer.putShort((short) 27); - return buffer.array(); - } - }); - - deltaBuilders.put(7, new Builder { - public byte[] build() { - IoBuffer = Baseline.createBuffer(4); - buffer.putInt(27); - return buffer.array(); - } - }); - */ - } - - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - - } - - public void buildBaseline4(Map baselineBuilders, Map deltaBuilders) { - - } - - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - - } - - public void buildBaseline7(Map baselineBuilders, Map deltaBuilders) { - - } - - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - - } - - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - - } - - public IoBuffer createBuffer(int size, boolean autoSize) { - return createBuffer(size).setAutoExpand(autoSize); - } - - public IoBuffer createBuffer(int size) { - return Baseline.createBuffer(size); - } - - public BaseObject getObject() { - return object; - } - - public void setObject(BaseObject object) { - this.object = object; - } - - protected byte getBoolean(boolean variable) { - return Baseline.getBoolean(variable); - } - - protected String getAsciiString(ByteBuffer buffer) { - return StringUtilities.getAsciiString(buffer); - } - - protected String getUnicodeString(ByteBuffer buffer) { - return StringUtilities.getUnicodeString(buffer); - } - - protected byte[] getAsciiString(String string) { - return StringUtilities.getAsciiString(string); - } - - protected byte[] getUnicodeString(String string) { - return StringUtilities.getUnicodeString(string); - } - -} diff --git a/src/resources/z/exp/objects/SWGList.java b/src/resources/z/exp/objects/SWGList.java deleted file mode 100644 index 5e1883ec..00000000 --- a/src/resources/z/exp/objects/SWGList.java +++ /dev/null @@ -1,410 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects; - -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import java.util.concurrent.CopyOnWriteArrayList; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.objects.IDelta; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -/* A SWGList element should extend Delta or implement IDelta */ - -@Persistent -public class SWGList implements List { - - private List list = new CopyOnWriteArrayList(); - @NotPersistent - private int updateCounter = 0; - private BaseObject object; - private byte viewType; - private short updateType; - private boolean addByte; - @NotPersistent - protected final Object objectMutex = new Object(); - - public SWGList() { } - - public SWGList(BaseObject object, int viewType, int updateType, boolean addByte) { - this.object = object; - this.viewType = (byte) viewType; - this.updateType = (short) updateType; - this.addByte = addByte; - } - - public boolean add(E e) { - synchronized(objectMutex) { - if (valid(e) && list.add(e)) { - queue(item(1, list.lastIndexOf(e), Baseline.toBytes(e), true, true)); - return true; - } - - return false; - } - } - - public void add(int index, E element) { - synchronized(objectMutex) { - if (valid(element)) { - list.add(index, element); - queue(item(1, index, Baseline.toBytes(element), true, true)); - } - } - } - - public boolean addAll(Collection c) { - synchronized(objectMutex) { - if (!c.isEmpty()) { - List buffer = new ArrayList(); - boolean success = false; - - for (E element : c) { - if (valid(element)) { - if (list.add(element)) { - buffer.add(item(1, list.lastIndexOf(element), Baseline.toBytes(element), true, true)); - success = true; - } - } else { - return false; - } - } - - if (success == true) { - queue(buffer); - } else { - return false; - } - } - - return false; - } - } - - public boolean addAll(int index, Collection c) { - synchronized(objectMutex) { - if (!c.isEmpty()) { - List buffer = new ArrayList(); - - for (E element : c) { - if (valid(element)) { - list.add(index, element); - buffer.add(item(1, index, Baseline.toBytes(element), true, true)); - index++; - } else { - return false; - } - } - - queue(buffer); - - return true; - } - - return false; - } - } - - public void clear() { - synchronized(objectMutex) { - list.clear(); - queue(item(4, 0, null, false, false)); - } - } - - public boolean contains(Object o) { - synchronized(objectMutex) { - return list.contains(o); - } - } - - public boolean containsAll(Collection c) { - synchronized(objectMutex) { - return list.containsAll(c); - } - } - - public E get(int index) { - synchronized(objectMutex) { - return list.get(index); - } - } - - public List get() { - return list; - } - - public int indexOf(Object o) { - synchronized(objectMutex) { - return list.indexOf(o); - } - } - - public boolean isEmpty() { - synchronized(objectMutex) { - return list.isEmpty(); - } - } - - public Iterator iterator() { - synchronized(objectMutex) { - return list.iterator(); - } - } - - public int lastIndexOf(Object o) { - synchronized(objectMutex) { - return list.lastIndexOf(o); - } - } - - public ListIterator listIterator() { - synchronized(objectMutex) { - return list.listIterator(); - } - } - - public ListIterator listIterator(int index) { - synchronized(objectMutex) { - return listIterator(index); - } - } - - public boolean remove(Object o) { - synchronized(objectMutex) { - int index = list.indexOf(o); - - if (list.remove(o)) { - queue(item(1, index, null, true, false)); - return true; - } else { - return false; - } - } - } - - public E remove(int index) { - synchronized(objectMutex) { - E element = list.remove(index); - - queue(item(1, index, null, true, false)); - - return (E) element; - } - } - - public boolean removeAll(Collection c) { - synchronized(objectMutex) { - if (!c.isEmpty()) { - List buffer = new ArrayList(); - int index; - boolean success = false; - - for (Object element : c) { - index = list.indexOf(element); - - if (list.remove(element)) { - buffer.add(item(0, index, null, true, false)); - success = true; - } - } - - if (success) { - queue(buffer); - } - - return success; - } - - return false; - } - } - - public boolean retainAll(Collection c) { - synchronized(objectMutex) { - return list.retainAll(c); - } - } - - public E set(int index, E element) { - synchronized(objectMutex) { - if (valid(element)) { - E previousElement = list.set(index, element); - - queue(item(2, index, Baseline.toBytes(element), true, true)); - - return previousElement; - } - - return null; - } - } - - public boolean set(List list) { - synchronized(objectMutex) { - byte[] newListData = { 0x03 }; - - if (!list.isEmpty()) { - for (E element : list) { - if (valid(element)) { - IoBuffer buffer = IoBuffer.allocate((newListData.length + Baseline.toBytes(element).length), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put(newListData); - buffer.put(Baseline.toBytes(element)); - newListData = buffer.array(); - } else { - return false; - } - } - - this.list = list; - - updateCounter++; - queue(newListData); - - return true; - } - - return false; - } - } - - public int size() { - synchronized(objectMutex) { - return list.size(); - } - } - - public List subList(int fromIndex, int toIndex) { - synchronized(objectMutex) { - return list.subList(fromIndex, toIndex); - } - } - - public Object[] toArray() { - synchronized(objectMutex) { - return list.toArray(); - } - } - - public T[] toArray(T[] a) { - synchronized(objectMutex) { - return list.toArray(a); - } - } - - public int getUpdateCounter() { - synchronized(objectMutex) { - return updateCounter; - } - } - - public Object getMutex() { - return objectMutex; - } - - public byte[] getBytes() { - synchronized(objectMutex) { - byte[] objects = { }; - int size = 0; - - for (Object o : list) { - byte[] object = Baseline.toBytes(o); - size += object.length; - - IoBuffer buffer = Baseline.createBuffer(size); - buffer.put(objects); - if (addByte) buffer.put((byte) 0); - buffer.put(object); - buffer.flip(); - - objects = buffer.array(); - } - - IoBuffer buffer = Baseline.createBuffer(8 + size); - buffer.putInt(list.size()); - buffer.putInt(updateCounter); - buffer.put(objects); - buffer.flip(); - - return buffer.array(); - } - } - - private boolean valid(Object o) { - if (o instanceof String || o instanceof Byte || o instanceof Short || - o instanceof Integer || o instanceof Float || o instanceof Long || - o instanceof IDelta) { - return true; - } else { - return false; - } - } - - private byte[] item(int type, int index, byte[] data, boolean useIndex, boolean useData) { - int size = 1 + ((useIndex) ? 2 : 0) + ((useData) ? data.length : 0); - - IoBuffer buffer = IoBuffer.allocate((size), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put((byte) type); - if (useIndex) buffer.putShort((short) index); - if (useData) buffer.put(data); - buffer.flip(); - - updateCounter++; - - return buffer.array(); - } - - private void queue(byte[] data) { - IoBuffer buffer = IoBuffer.allocate((data.length + 8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(1); - buffer.putInt(updateCounter); - buffer.put(data); - buffer.flip(); - object.sendListDelta(viewType, updateType, buffer); - } - - private void queue(List data) { - int size = 0; - - for (byte[] queued : data) { - size += queued.length; - } - - IoBuffer buffer = IoBuffer.allocate((size + 8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(data.size()); - buffer.putInt(updateCounter); - for (byte[] queued : data) buffer.put(queued); - buffer.flip(); - - object.sendListDelta(viewType, updateType, buffer); - } - -} diff --git a/src/resources/z/exp/objects/SWGMap.java b/src/resources/z/exp/objects/SWGMap.java deleted file mode 100644 index 663d3fd3..00000000 --- a/src/resources/z/exp/objects/SWGMap.java +++ /dev/null @@ -1,279 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects; - -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.objects.IDelta; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -/* A SWGMap element should extend Delta or implement IDelta */ - -@Persistent -public class SWGMap implements Map { - - private Map map = new TreeMap(); - @NotPersistent - private int updateCounter = 0; - private BaseObject object; - private byte viewType; - private short updateType; - private boolean addByte; - @NotPersistent - protected final Object objectMutex = new Object(); - - public SWGMap() { } - - public SWGMap(BaseObject object, int viewType, int updateType, boolean addByte) { - this.object = object; - this.viewType = (byte) viewType; - this.updateType = (short) updateType; - this.addByte = addByte; - } - - public SWGMap(Map m) { - if (m instanceof SWGMap) { - this.object = ((SWGMap) m).object; - this.viewType = ((SWGMap) m).viewType; - this.updateType = ((SWGMap) m).updateType; - map.putAll(m); - } - } - - public void clear() { - throw new UnsupportedOperationException(); - } - - public boolean containsKey(Object key) { - synchronized(objectMutex) { - return map.containsKey(key); - } - } - - public boolean containsValue(Object value) { - synchronized(objectMutex) { - return map.containsValue(value); - } - } - - public Set> entrySet() { - synchronized(objectMutex) { - return map.entrySet(); - } - } - - public V get(Object key) { - return map.get(key); - } - - public boolean isEmpty() { - synchronized(objectMutex) { - return map.isEmpty(); - } - } - - public Set keySet() { - synchronized(objectMutex) { - return map.keySet(); - } - } - - public V put(K key, V value) { - synchronized(objectMutex) { - if (valid(key) && valid(value)) { - if (map.containsKey(key)) { - V oldValue = map.put(key, value); - - queue(item(2, key, Baseline.toBytes(value), true, true)); - - return oldValue; - } else { - V oldValue = map.put(key, value); - - queue(item(0, key, Baseline.toBytes(value), true, true)); - - return oldValue; - } - } - - return null; - } - } - - public void putAll(Map m) { - synchronized(objectMutex) { - List buffer = new ArrayList(); - - for (Entry entry : m.entrySet()) { - K key = entry.getKey(); - V value = entry.getValue(); - - if (valid(key) && valid(value)) { - if (map.containsKey(key)) { - if (map.put(key, value) != null) { - buffer.add(item(2, key, Baseline.toBytes(value), true, true)); - } - } else { - if (map.put(key, value) != null) { - buffer.add(item(0, key, Baseline.toBytes(value), true, true)); - } - } - } - } - - if (buffer.size() > 0) { - queue(buffer); - } - } - } - - public V remove(Object key) { - synchronized(objectMutex) { - if (valid(key)) { - V value = map.remove(key); - - queue(item(1, key, Baseline.toBytes(map.get(key)), true, true)); - - return value; - } - - return null; - } - } - - public int size() { - synchronized(objectMutex) { - return map.size(); - } - } - - public Collection values() { - synchronized(objectMutex) { - return map.values(); - } - } - - public int getUpdateCounter() { - synchronized(objectMutex) { - return updateCounter; - } - } - - public Object getMutex() { - return objectMutex; - } - - public byte[] getBytes() { - synchronized(objectMutex) { - byte[] objects = { }; - int size = 0; - - for (Entry entry : map.entrySet()) { - byte[] key = Baseline.toBytes(entry.getKey()); - byte[] value = Baseline.toBytes(entry.getValue()); - size += ((addByte) ? 1 : 0) + key.length + value.length; - - IoBuffer buffer = Baseline.createBuffer(size); - buffer.put(objects); - if (addByte) buffer.put((byte) 0); - buffer.put(key); - buffer.put(value); - buffer.flip(); - - objects = buffer.array(); - } - - IoBuffer buffer = Baseline.createBuffer(8 + size); - buffer.putInt(map.size()); - buffer.putInt(updateCounter); - buffer.put(objects); - buffer.flip(); - - return buffer.array(); - } - } - - private boolean valid(Object o) { - if (o instanceof String || o instanceof Byte || o instanceof Short || - o instanceof Integer || o instanceof Float || o instanceof Long || - o instanceof IDelta) { - return true; - } else { - return false; - } - } - - private byte[] item(int type, Object index, byte[] data, boolean useIndex, boolean useData) { - if (useIndex && ((index instanceof IDelta) || !valid(index))) { - throw new IllegalArgumentException(); - } - - int size = 1 + ((useIndex) ? (2 + Baseline.toBytes(index).length) : 0) + ((useData) ? data.length : 0); - - IoBuffer buffer = IoBuffer.allocate(size, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put((byte) type); - if (useIndex) buffer.put(Baseline.toBytes(index)); - if (useData) buffer.put(data); - buffer.flip(); - - updateCounter++; - - return buffer.array(); - } - - private void queue(byte[] data) { - IoBuffer buffer = IoBuffer.allocate(data.length + 8, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(1); - buffer.putInt(updateCounter); - buffer.put(data); - buffer.flip(); - object.sendListDelta(viewType, updateType, buffer); - } - - private void queue(List data) { - int size = 0; - - for (byte[] queued : data) { - size += queued.length; - } - - IoBuffer buffer = IoBuffer.allocate((size + 8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(data.size()); - buffer.putInt(updateCounter); - for (byte[] queued : data) buffer.put(queued); - buffer.flip(); - - object.sendListDelta(viewType, updateType, buffer); - } - -} diff --git a/src/resources/z/exp/objects/SWGMultiMap.java b/src/resources/z/exp/objects/SWGMultiMap.java deleted file mode 100644 index 3a63d514..00000000 --- a/src/resources/z/exp/objects/SWGMultiMap.java +++ /dev/null @@ -1,382 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects; - -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.TreeMap; - -import org.apache.mina.core.buffer.IoBuffer; -import org.python.google.common.collect.ArrayListMultimap; -import org.python.google.common.collect.Multimap; -import org.python.google.common.collect.Multiset; -import org.python.google.common.collect.Ordering; -import org.python.google.common.collect.TreeMultimap; - -import resources.common.StringUtilities; -import resources.objects.IDelta; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -@SuppressWarnings("unused") - -@Persistent -public class SWGMultiMap implements Multimap { - - private Multimap map = ArrayListMultimap.create(); - @NotPersistent - private int updateCounter = 0; - private BaseObject object; - private byte viewType; - private short updateType; - private boolean addByte; - @NotPersistent - protected final Object objectMutex = new Object(); - - public SWGMultiMap() { } - - public SWGMultiMap(BaseObject object, int viewType, int updateType, boolean addByte) { - this.object = object; - this.viewType = (byte) viewType; - this.updateType = (short) updateType; - this.addByte = addByte; - } - - public SWGMultiMap(Multimap m) { - if (m instanceof SWGMultiMap) { - this.object = ((SWGMultiMap) m).object; - this.viewType = ((SWGMultiMap) m).viewType; - this.updateType = ((SWGMultiMap) m).updateType; - map.putAll(m); - } - } - - public Map> asMap() { - synchronized(objectMutex) { - return map.asMap(); - } - } - - public void clear() { - throw new UnsupportedOperationException(); - } - - public boolean containsEntry(Object key, Object value) { - synchronized(objectMutex) { - return map.containsEntry(key, value); - } - } - - public boolean containsKey(Object key) { - synchronized(objectMutex) { - return map.containsKey(key); - } - } - - public boolean containsValue(Object value) { - synchronized(objectMutex) { - return map.containsValue(value); - } - } - - public Collection> entries() { - synchronized(objectMutex) { - return map.entries(); - } - } - - public Collection get(K key) { - synchronized(objectMutex) { - return map.get(key); - } - } - - public boolean isEmpty() { - synchronized(objectMutex) { - return map.isEmpty(); - } - } - - public Multiset keys() { - synchronized(objectMutex) { - return map.keys(); - } - } - - public Set keySet() { - synchronized(objectMutex) { - return map.keySet(); - } - } - - public boolean put(K key, V value) { - synchronized(objectMutex) { - if (key instanceof String || key instanceof Byte || key instanceof Short || - key instanceof Integer || key instanceof Float || key instanceof Long || - value instanceof IDelta) { - if (map.put(key, value)) { - queue(item(0, (String) key, ((IDelta) value).getBytes(), true, true)); - return true; - } - } - - return false; - } - } - - public boolean putAll(K key, Iterable values) { - synchronized(objectMutex) { - if (key instanceof String || key instanceof Byte || key instanceof Short || - key instanceof Integer || key instanceof Float || key instanceof Long) { - List buffer = new ArrayList(); - - for (V value : values) { - if (value instanceof IDelta) { - if (map.put(key, value)) { - buffer.add(item(0, (String) key, ((IDelta) value).getBytes(), true, true)); - } - } - } - - if (buffer.size() > 0) { - queue(buffer); - return true; - } - } - - return false; - } - } - - public boolean putAll(Multimap map) { - synchronized(objectMutex) { - List buffer = new ArrayList(); - - for (Entry entry : map.entries()) { - K key = entry.getKey(); - V value = entry.getValue(); - - if (key instanceof String || key instanceof Byte || key instanceof Short || - key instanceof Integer || key instanceof Float || key instanceof Long || - value instanceof IDelta) { - if (this.map.put(key, value)) { - buffer.add(item(0, (String) key, ((IDelta) value).getBytes(), true, true)); - } - } - } - - if (buffer.size() > 0) { - queue(buffer); - return true; - } - - return false; - } - } - - @SuppressWarnings("unchecked") - public boolean remove(Object key, Object value) { - synchronized(objectMutex) { - if (key instanceof String || key instanceof Byte || key instanceof Short || - key instanceof Integer || key instanceof Float || key instanceof Long) { - if (map.remove(key, value)) { - queue(item(1, (String) key, ((IDelta) map.get((K) key)).getBytes(), true, true)); - - return true; - } - } - - return false; - } - } - - @SuppressWarnings("unchecked") - public Collection removeAll(Object key) { - synchronized(objectMutex) { - if (key instanceof String || key instanceof Byte || key instanceof Short || - key instanceof Integer || key instanceof Float || key instanceof Long) { - Collection collection = map.get((K) key); - List buffer = new ArrayList(); - - for (V value : map.get((K) key)) { - if (map.remove(key, value)) { - buffer.add(item(1, (String) key, ((IDelta) map.get((K) key)).getBytes(), true, true)); - } - } - - if (buffer.size() > 0) { - queue(buffer); - return collection; - } - } - - return null; - } - } - - public Collection replaceValues(K key, Iterable values) { - synchronized(objectMutex) { - if (key instanceof String || key instanceof Byte || key instanceof Short || - key instanceof Integer || key instanceof Float || key instanceof Long) { - if (map.containsKey(key)) { - List buffer = new ArrayList(); - - for (V value : values) { - if (value instanceof IDelta) { - if (!map.get(key).contains(value)) { - buffer.add(item(2, (String) key, ((IDelta) value).getBytes(), true, true)); - } - } else { - return null; - } - } - - if (buffer.size() > 0) { - queue(buffer); - return map.replaceValues(key, values); - } - } - } - - return null; - } - } - - public int size() { - synchronized(objectMutex) { - return map.size(); - } - } - - public Collection values() { - synchronized(objectMutex) { - return map.values(); - } - } - - public int getUpdateCounter() { - synchronized(objectMutex) { - return updateCounter; - } - } - - public Object getMutex() { - return objectMutex; - } - - public byte[] getBytes() { - synchronized(objectMutex) { - byte[] objects = { }; - int size = 0; - - for (Entry entry : map.entries()) { - byte[] key = Baseline.toBytes(entry.getKey()); - byte[] value = Baseline.toBytes(entry.getValue()); - size += ((addByte) ? 1 : 0) + key.length + value.length; - - IoBuffer buffer = Baseline.createBuffer(size); - buffer.put(objects); - if (addByte) buffer.put((byte) 0); - buffer.put(key); - buffer.put(value); - buffer.flip(); - - objects = buffer.array(); - } - - IoBuffer buffer = Baseline.createBuffer(8 + size); - buffer.putInt(map.size()); - buffer.putInt(updateCounter); - buffer.put(objects); - buffer.flip(); - - return buffer.array(); - } - } - - private byte[] item(int type, Object index, byte[] data, boolean useIndex, boolean useData) { - if (useIndex && !(index instanceof Byte) && !(index instanceof Short) - && !(index instanceof Integer) && !(index instanceof Float) - && !(index instanceof Long) && !(index instanceof String)) { - throw new IllegalArgumentException(); - } - - int size = 1 + ((useIndex) ? (2 + index.toString().getBytes().length) : 0) + ((useData) ? data.length : 0); - - IoBuffer buffer = IoBuffer.allocate((size), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put((byte) type); - if (useIndex) { - if (index instanceof String) { - buffer.put(StringUtilities.getAsciiString((String) index)); - } else if (index instanceof Byte) { - buffer.put(((Byte) index).byteValue()); - } else if (index instanceof Short) { - buffer.putShort(((Short) index).shortValue()); - } else if (index instanceof Integer) { - buffer.putInt(((Integer) index).intValue()); - } else if (index instanceof Float) { - buffer.putFloat(((Float) index).floatValue()); - } else if (index instanceof Long) { - buffer.putLong(((Long) index).longValue()); - } else { - throw new IllegalArgumentException(); - } - } - if (useData) buffer.put(data); - - updateCounter++; - - return buffer.array(); - } - - private void queue(byte[] data) { - IoBuffer buffer = IoBuffer.allocate((data.length + 8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(1); - buffer.putInt(updateCounter); - buffer.put(data); - object.sendListDelta(viewType, updateType, buffer); - } - - private void queue(List data) { - int size = 0; - - for (byte[] queued : data) { - size += queued.length; - } - - IoBuffer buffer = IoBuffer.allocate((size + 8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(data.size()); - buffer.putInt(updateCounter); - for (byte[] queued : data) buffer.put(queued); - - object.sendListDelta(viewType, updateType, buffer); - } - -} diff --git a/src/resources/z/exp/objects/SWGSet.java b/src/resources/z/exp/objects/SWGSet.java deleted file mode 100644 index a960c0f2..00000000 --- a/src/resources/z/exp/objects/SWGSet.java +++ /dev/null @@ -1,280 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects; - -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.objects.IDelta; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -/* A SWGSet element should extend Delta or implement IDelta */ - -@Persistent -public class SWGSet implements Set { - - private TreeSet set = new TreeSet(); - @NotPersistent - private int updateCounter = 0; - private BaseObject object; - private byte viewType; - private short updateType; - private boolean addByte; - @NotPersistent - protected final Object objectMutex = new Object(); - - public SWGSet() { } - - public SWGSet(BaseObject object, int viewType, int updateType, boolean addByte) { - this.object = object; - this.viewType = (byte) viewType; - this.updateType = (short) updateType; - this.addByte = addByte; - } - - public SWGSet(Set s) { - if (s instanceof SWGSet) { - this.object = ((SWGSet) s).object; - this.viewType = ((SWGSet) s).viewType; - this.updateType = ((SWGSet) s).updateType; - set.addAll(s); - } - } - - public boolean add(E e) { - synchronized(objectMutex) { - if (valid(e)) { - if (set.add(e)) { - queue(item(1, e, null, true, false)); - return true; - } - } - - return false; - } - } - - public boolean addAll(Collection c) { - synchronized(objectMutex) { - List buffer = new ArrayList(); - - for (E e : c) { - if (valid(e) && set.add(e)) { - buffer.add(item(1, e, null, true, false)); - } - } - - if (buffer.size() > 0) { - queue(buffer); - return true; - } else { - return false; - } - } - } - - public void clear() { - synchronized(objectMutex) { - queue(item(2, null, null, false, false)); - } - } - - public boolean contains(Object o) { - synchronized(objectMutex) { - return set.contains(o); - } - } - - public boolean containsAll(Collection c) { - synchronized(objectMutex) { - return set.containsAll(c); - } - } - - public boolean isEmpty() { - synchronized(objectMutex) { - return set.isEmpty(); - } - } - - public Iterator iterator() { - synchronized(objectMutex) { - return set.iterator(); - } - } - - public boolean remove(Object e) { - synchronized(objectMutex) { - if (valid(e) && set.remove(e)) { - queue(item(0, e, null, true, false)); - return true; - } - - return false; - } - } - - public boolean removeAll(Collection c) { - synchronized(objectMutex) { - List buffer = new ArrayList(); - - for (Object o : c) { - if (valid(o) && set.remove(o)) { - buffer.add(item(0, o, null, true, false)); - } - } - - if (buffer.size() > 0) { - queue(buffer); - return true; - } else { - return false; - } - } - } - - public boolean retainAll(Collection c) { - synchronized(objectMutex) { - return set.retainAll(c); - } - } - - public int size() { - synchronized(objectMutex) { - return set.size(); - } - } - - public Object[] toArray() { - synchronized(objectMutex) { - return set.toArray(); - } - } - - public T[] toArray(T[] a) { - synchronized(objectMutex) { - return set.toArray(a); - } - } - - public int getUpdateCounter() { - synchronized(objectMutex) { - return updateCounter; - } - } - - public Object getMutex() { - return objectMutex; - } - - public byte[] getBytes() { - synchronized(objectMutex) { - byte[] objects = { }; - int size = 0; - - for (Object o : set) { - byte[] object = Baseline.toBytes(o); - size += object.length; - - IoBuffer buffer = Baseline.createBuffer(size); - buffer.put(objects); - if (addByte) buffer.put((byte) 0); - buffer.put(object); - buffer.flip(); - - objects = buffer.array(); - } - - IoBuffer buffer = Baseline.createBuffer(8 + size); - buffer.putInt(set.size()); - buffer.putInt(updateCounter); - buffer.put(objects); - buffer.flip(); - - return buffer.array(); - } - } - - private boolean valid(Object o) { - if (o instanceof String || o instanceof Byte || o instanceof Short || - o instanceof Integer || o instanceof Float || o instanceof Long || - o instanceof IDelta) { - return true; - } else { - return false; - } - } - - private byte[] item(int type, Object index, byte[] data, boolean useIndex, boolean useData) { - if (useIndex && ((index instanceof IDelta) || !valid(index))) { - throw new IllegalArgumentException(); - } - - int size = 1 + ((useIndex) ? (2 + Baseline.toBytes(index).length) : 0) + ((useData) ? data.length : 0); - - IoBuffer buffer = IoBuffer.allocate(size, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.put((byte) type); - if (useIndex) buffer.put(Baseline.toBytes(index)); - if (useData) buffer.put(data); - buffer.flip(); - - updateCounter++; - - return buffer.array(); - } - - private void queue(byte[] data) { - IoBuffer buffer = IoBuffer.allocate((data.length + 8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(1); - buffer.putInt(updateCounter); - buffer.put(data); - buffer.flip(); - object.sendListDelta(viewType, updateType, buffer); - } - - private void queue(List data) { - int size = 0; - - for (byte[] queued : data) { - size += queued.length; - } - - IoBuffer buffer = IoBuffer.allocate((size + 8), false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putInt(data.size()); - buffer.putInt(updateCounter); - for (byte[] queued : data) buffer.put(queued); - buffer.flip(); - - object.sendListDelta(viewType, updateType, buffer); - } - -} diff --git a/src/resources/z/exp/objects/building/BuildingObject.java b/src/resources/z/exp/objects/building/BuildingObject.java deleted file mode 100644 index 578c0dd7..00000000 --- a/src/resources/z/exp/objects/building/BuildingObject.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.building; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.tangible.TangibleObject; - -import com.sleepycat.persist.model.Entity; -import com.sleepycat.persist.model.NotPersistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Entity -public class BuildingObject extends TangibleObject { - - @NotPersistent - private BuildingMessageBuilder messageBuilder; - - public BuildingObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - setVolume(255); - setOptionsBitmask(256); - setMaximumCondition(4320); - toggleStatic(); - } - - public BuildingObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - return baseline; - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, false); - } - - @Override - public BuildingMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new BuildingMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - } - } - -} diff --git a/src/resources/z/exp/objects/cell/CellMessageBuilder.java b/src/resources/z/exp/objects/cell/CellMessageBuilder.java deleted file mode 100644 index 92e25457..00000000 --- a/src/resources/z/exp/objects/cell/CellMessageBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.cell; - -import java.util.Map; - -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.ObjectMessageBuilder; - -public class CellMessageBuilder extends ObjectMessageBuilder { - - public CellMessageBuilder(CellObject object) { - super(object); - } - - public CellMessageBuilder() { - super(); - } - - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - -} diff --git a/src/resources/z/exp/objects/cell/CellObject.java b/src/resources/z/exp/objects/cell/CellObject.java deleted file mode 100644 index 059c8d3d..00000000 --- a/src/resources/z/exp/objects/cell/CellObject.java +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.cell; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class CellObject extends BaseObject { - - @NotPersistent - CellMessageBuilder messageBuilder; - - public CellObject(long objectID, Planet planet, int cellNumber) { - super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(0, 0, 0, 1), "object/cell/shared_cell.iff"); - setCellNumber(cellNumber); - } - - public CellObject(long objectID, Planet planet) { - super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(0, 0, 0, 1), "object/cell/shared_cell.iff"); - } - - public CellObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - initializeBaseline(8); - initializeBaseline(9); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("4", (byte) 1); // Unknown - baseline.put("cellNumber", 0); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("2", (long) 0); // Unknown - baseline.put("3", (long) 0); // Unknown - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - return baseline; - } - - public int getCellNumber() { - return (int) baseline3.get("cellNumber"); - } - - public void setCellNumber(int cellNumber) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("cellNumber", cellNumber); - } - - getContainer().notifyObservers(buffer, false); - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - getContainer().notifyObservers(buffer, false); - } - - @Override - public CellMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new CellMessageBuilder(); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - //destination.getSession().write(baseline8.getBaseline()); - //destination.getSession().write(baseline9.getBaseline()); - } - } - -} diff --git a/src/resources/z/exp/objects/creature/CreatureMessageBuilder.java b/src/resources/z/exp/objects/creature/CreatureMessageBuilder.java deleted file mode 100644 index d76e8383..00000000 --- a/src/resources/z/exp/objects/creature/CreatureMessageBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.creature; - -import java.util.Map; - -import com.sleepycat.persist.model.Persistent; - -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.tangible.TangibleMessageBuilder; - -@Persistent -public class CreatureMessageBuilder extends TangibleMessageBuilder { - - public CreatureMessageBuilder(CreatureObject creatureObject) { - super(creatureObject); - } - - public CreatureMessageBuilder() { - super(); - } - - @Override - public void buildBaseline1(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline1(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline4(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline4(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - -} diff --git a/src/resources/z/exp/objects/creature/CreatureObject.java b/src/resources/z/exp/objects/creature/CreatureObject.java deleted file mode 100644 index 511875ea..00000000 --- a/src/resources/z/exp/objects/creature/CreatureObject.java +++ /dev/null @@ -1,1086 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.creature; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map.Entry; - -import org.apache.mina.core.buffer.IoBuffer; - -import protocol.swg.ChatSystemMessage; -import protocol.swg.ObjControllerMessage; -import protocol.swg.UpdatePVPStatusMessage; -import protocol.swg.UpdatePostureMessage; -import protocol.swg.objectControllerObjects.Posture; - -import com.sleepycat.je.Environment; -import com.sleepycat.je.Transaction; -import com.sleepycat.persist.model.Entity; -import com.sleepycat.persist.model.NotPersistent; - -import engine.clients.Client; -import resources.z.exp.buffs.Buff; -import resources.common.StringUtilities; -import resources.z.exp.equipment.Equipment; -import resources.z.exp.group.GroupInviteInfo; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.SWGList; -import resources.z.exp.objects.SWGMap; -import resources.z.exp.objects.SWGSet; -import engine.resources.common.CRC; -import engine.resources.objects.IPersistent; -import engine.resources.objects.SWGObject; -import resources.z.exp.skills.SkillMod; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -import resources.z.exp.objects.player.PlayerObject; -import resources.z.exp.objects.tangible.TangibleObject; - -@Entity -public class CreatureObject extends TangibleObject implements IPersistent { - - @NotPersistent - private Transaction txn; - - @NotPersistent - private CreatureMessageBuilder messageBuilder; - - // non-baseline vars - @NotPersistent - private List duelList = Collections.synchronizedList(new ArrayList()); - - public CreatureObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - getBaseHAMList().add(0x00002FF8); - getBaseHAMList().add(0x000003E8); - getBaseHAMList().add(0x0000245F); - getBaseHAMList().add(0x000001F4); - getBaseHAMList().add(0x0000012C); - getBaseHAMList().add(0x000003E8); - setVolume(0x000F4240); - getComponentCustomizationList().add(0); - setOptionsBitmask(0x80); - setMaximumCondition(0x3A98); - getHamList().add(20000); - getHamList().add(0); - getHamList().add(12500); - getHamList().add(0); - getHamList().add(0x2C01); - getHamList().add(0); - getMaxHamList().add(20000); - getMaxHamList().add(0); - getMaxHamList().add(12500); - getMaxHamList().add(0); - getMaxHamList().add(0x2C01); - getMaxHamList().add(0); - getBuffList().put(0, new Buff("", 0)); // Initial Default Buff - } - - public CreatureObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - initializeBaseline(1); - initializeBaseline(4); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline1() { - Baseline baseline = super.getBaseline1(); - baseline.put("bankCredits", 0); - baseline.put("cashCredits", 0); - baseline.put("baseHamList", new SWGList(this, 1, 2, false)); - baseline.put("skills", new SWGSet(this, 1, 3, false)); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("posture", (byte) 1); - baseline.put("factionRank", (byte) 0); // For NPCs probably - baseline.put("ownerId", (long) 0); - baseline.put("height", (float) 1); - baseline.put("battleFatigue", 0); - baseline.put("stateBitmask", (long) 0); - return baseline; - } - - @Override - public Baseline getBaseline4() { - Baseline baseline = super.getBaseline4(); - baseline.put("accelerationMultiplierBase", (float) 1); - baseline.put("accelerationMultiplierMod", (float) 1); - baseline.put("hamEncumberanceList", new SWGList(this, 4, 2, false)); - baseline.put("skillMods", new SWGMap(this, 4, 3, true)); - baseline.put("speedMultiplierBase", (float) 1); - baseline.put("speedMultiplierMod", (float) 1); - baseline.put("listenToId", (long) 0); - baseline.put("runSpeed", (float) 7.3); - baseline.put("slopeModAngle", (float) 1); - baseline.put("slopeModPercent", (float) 1); - baseline.put("turnRadius", (float) 1); - baseline.put("walkSpeed", (float) 2.75); - baseline.put("waterModPercent", (float) 1); - baseline.put("missionCriticalObjects", new SWGMap(this, 4, 13, false)); - baseline.put("abilities", new SWGMap(this, 4, 14, true)); - baseline.put("15", (byte) 0); // Unknown (been seen as 0xD4) - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("level", (short) 90); - baseline.put("9", (int) 0xD007); - baseline.put("currentAnimation", ""); - baseline.put("moodAnimation", "neutral"); - baseline.put("weaponId", (long) 0); - baseline.put("groupId", (long) 0); - baseline.put("groupInviteInfo", new GroupInviteInfo((long) 0, "")); - baseline.put("guildId", 0); - baseline.put("targetId", (long) 0); - baseline.put("moodId", (byte) 0); - baseline.put("performanceCounter", 0); - baseline.put("performanceId", 0); - baseline.put("20", new SWGList(this, 6, 20, false)); // Unknown List - baseline.put("hamList", new SWGList(this, 6, 21, false)); - baseline.put("maxHamList", new SWGList(this, 6, 22, false)); - baseline.put("equipmentList", new SWGList(this, 6, 23, false)); - baseline.put("costume", ""); - baseline.put("lockMovement", false); - baseline.put("buffList", new SWGMap(this, 6, 26, false)); - // need to build an 0x01 int after the bufflist - baseline.put("27", (short) 0); - baseline.put("hologramColor", -1); - baseline.put("29", (byte) 1); - baseline.put("30", (short) 0); - baseline.put("appearanceEquipmentList", new SWGList(this, 6, 31, false)); - baseline.put("32", 0); - baseline.put("33", (short) 0); - baseline.put("34", (short) 0); // there's 35 elements, so 2 of these = shorts - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - return baseline; - } - - public int getBankCredits() { - synchronized(objectMutex) { - return (int) baseline1.get("bankCredits"); - } - } - - public void setBankCredits(int bankCredits) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline1.set("bankCredits", bankCredits); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public int getCashCredits() { - synchronized(objectMutex) { - return (int) baseline1.get("cashCredits"); - } - } - - public void setCashCredits(int cashCredits) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline1.set("cashCredits", cashCredits); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - @SuppressWarnings("unchecked") - public SWGList getBaseHAMList() { - return (SWGList) baseline1.get("baseHamList"); - } - - @SuppressWarnings("unchecked") - public SWGSet getSkills() { - return (SWGSet) baseline3.get("skills"); - } - - public void addSkill(String skill) { - if (!getSkills().contains(skill)) { - getSkills().add(skill); - } - } - - public void removeSkill(String skill) { - if (getSkills().contains(skill)) { - getSkills().remove(skill); - } - } - - public byte getPosture() { - synchronized(objectMutex) { - return (byte) baseline3.get("posture"); - } - } - - public void setPosture(byte posture) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("posture", posture); - } - - notifyObservers(buffer, true); - notifyObservers(new ObjControllerMessage(0x1B, new Posture(getObjectID(), posture)), true); - } - - public byte getFactionRank() { - synchronized(objectMutex) { - return (byte) baseline3.get("factionRank"); - } - } - - public void setFactionRank(byte factionRank) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("factionRank", factionRank); - } - - notifyObservers(buffer, true); - } - - public long getOwnerId() { - synchronized(objectMutex) { - return (long) baseline3.get("ownerId"); - } - } - - public void setOwnerId(long ownerId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("ownerId", ownerId); - } - - notifyObservers(buffer, true); - } - - public float getHeight() { - synchronized(objectMutex) { - return (float) baseline3.get("height"); - } - } - - public void setHeight(float height) { - height = (((height < 0.7) || (height > 1.5)) ? 1 : height); - - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("height", height); - } - - notifyObservers(buffer, true); - } - - public int getBattleFatigue() { - synchronized(objectMutex) { - return (int) baseline3.get("battleFatigue"); - } - } - - public void setBattleFatigue(int battleFatigue) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("battleFatigue", battleFatigue); - } - - notifyObservers(buffer, true); - } - - public long getStateBitmask() { - synchronized(objectMutex) { - return (long) baseline3.get("stateBitmask"); - } - } - - public void setStateBitmask(long stateBitmask) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("stateBitmask", stateBitmask); - } - - notifyObservers(buffer, true); - } - - public float getAccelerationMultiplierBase() { - synchronized(objectMutex) { - return (float) baseline4.get("accelerationMultiplierBase"); - } - } - - public void setAccelerationMultiplierBase(float accelerationMultiplierBase) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("accelerationMultiplierBase", accelerationMultiplierBase); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getAccelerationMultiplierMod() { - synchronized(objectMutex) { - return (float) baseline4.get("accelerationMultiplierMod"); - } - } - - public void setAccelerationMultiplierMod(float accelerationMultiplierMod) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("accelerationMultiplierMod", accelerationMultiplierMod); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - @SuppressWarnings("unchecked") - public SWGList getHamEncumberanceList() { - return (SWGList) baseline4.get("hamEncumberanceList"); - } - - @SuppressWarnings("unchecked") - public SWGMap getSkillMods() { - return (SWGMap) baseline4.get("skillMods"); - } - - public SkillMod getSkillMod(String name) { - synchronized(objectMutex) { - if (getSkillMods().containsKey(name) && getSkillMods().get(name) != null) { - return getSkillMods().get(name); - } - - return null; - } - } - - public void addSkillMod(String name, int base) { - if (!getSkillMods().containsKey(name)) { - getSkillMods().put(name, new SkillMod(base, 0)); - } else { - SkillMod mod = getSkillMods().get(name); - getSkillMods().put(name, new SkillMod(mod.getBase() + base, mod.getModifier())); - } - } - - public void deductSkillMod(String name, int base) { - if (getSkillMods().containsKey(name)) { - SkillMod mod = getSkillMods().get(name); - mod = new SkillMod(mod.getBase() - base, mod.getModifier()); - - if (mod.getBase() - base <= 0) { - removeSkillMod(name); - } else { - getSkillMods().put(name, mod); - } - } - } - - public void removeSkillMod(String name) { - getSkillMods().remove(name); - } - - public float getSpeedMultiplierBase() { - synchronized(objectMutex) { - return (float) baseline4.get("speedMultiplierBase"); - } - } - - public void setSpeedMultiplierBase(float speedMultiplierBase) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("speedMultiplierBase", speedMultiplierBase); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getSpeedMultiplierMod() { - synchronized(objectMutex) { - return (float) baseline4.get("speedMultiplierMod"); - } - } - - public void setSpeedMultiplierMod(float speedMultiplierMod) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("speedMultiplierMod", speedMultiplierMod); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public long getListenToId() { - synchronized(objectMutex) { - return (long) baseline4.get("listenToId"); - } - } - - public void setListenToId(long listenToId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("listenToId", listenToId); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getRunSpeed() { - synchronized(objectMutex) { - return (float) baseline4.get("runSpeed"); - } - } - - public void setRunSpeed(float runSpeed) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("runSpeed", runSpeed); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getSlopeModAngle() { - synchronized(objectMutex) { - return (float) baseline4.get("slopeModAngle"); - } - } - - public void setSlopeModAngle(float slopeModAngle) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("slopeModAngle", slopeModAngle); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getSlopeModPercent() { - synchronized(objectMutex) { - return (float) baseline4.get("slopeModPercent"); - } - } - - public void setSlopeModPercent(float slopeModPercent) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("slopeModPercent", slopeModPercent); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getTurnRadius() { - synchronized(objectMutex) { - return (float) baseline4.get("turnRadius"); - } - } - - public void setTurnRadius(float turnRadius) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("turnRadius", turnRadius); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getWalkSpeed() { - synchronized(objectMutex) { - return (float) baseline4.get("walkSpeed"); - } - } - - public void setWalkSpeed(float walkSpeed) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("walkSpeed", walkSpeed); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public float getWaterModPercent() { - synchronized(objectMutex) { - return (float) baseline4.get("waterModPercent"); - } - } - - public void setWaterModPercent(float waterModPercent) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline4.set("waterModPercent", waterModPercent); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - @SuppressWarnings("unchecked") - public SWGMap getMissionCriticalObjects() { - return (SWGMap) baseline4.get("missionCriticalObjects"); - } - - @SuppressWarnings("unchecked") - public SWGMap getAbilities() { - return (SWGMap) baseline4.get("abilities"); - } - - public void addAbility(String abilityName) { - if (!getAbilities().containsKey(abilityName)) { - getAbilities().put(abilityName, 1); - } - } - - public void removeAbility(String abilityName) { - if (getAbilities().containsKey(abilityName)) { - getAbilities().remove(abilityName); - } - } - - public short getLevel() { - synchronized(objectMutex) { - return (short) baseline6.get("level"); - } - } - - public void setLevel(short level) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("level", level); - } - - notifyObservers(buffer, true); - } - - public String getCurrentAnimation() { - synchronized(objectMutex) { - return (String) baseline6.get("currentAnimation"); - } - } - - public void setCurrentAnimation(String currentAnimation) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("currentAnimation", currentAnimation); - } - - notifyObservers(buffer, true); - } - - public String getMoodAnimation() { - synchronized(objectMutex) { - return (String) baseline6.get("moodAnimation"); - } - } - - public void setMoodAnimation(String moodAnimation) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("moodAnimation", moodAnimation); - } - - notifyObservers(buffer, true); - } - - public long getWeaponId() { - synchronized(objectMutex) { - return (long) baseline6.get("weaponId"); - } - } - - public void setWeaponId(long weaponId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("weaponId", weaponId); - } - - notifyObservers(buffer, true); - } - - public long getGroupId() { - synchronized(objectMutex) { - return (long) baseline6.get("groupId"); - } - } - - public void setGroupId(long groupId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("groupId", groupId); - } - - notifyObservers(buffer, true); - } - - public GroupInviteInfo getGroupInviteInfo() { - return (GroupInviteInfo) baseline6.get("groupInviteInfo"); - } - - public long getInviteSenderId() { - synchronized(objectMutex) { - return getGroupInviteInfo().getSenderId(); - } - } - - public void setInviteSenderId(long inviteSenderId) { - synchronized(objectMutex) { - getGroupInviteInfo().setSender(inviteSenderId, getInviteSenderName()); - } - } - - public String getInviteSenderName() { - synchronized(objectMutex) { - return getGroupInviteInfo().getSenderName(); - } - } - - public void setInviteSenderName(String inviteSenderName) { - synchronized(objectMutex) { - getGroupInviteInfo().setSender(getInviteSenderId(), inviteSenderName); - } - } - - public long getInviteCounter() { - return 0; - } - - public void setInviteCounter(long inviteCounter) { - - } - - public void updateGroupInviteInfo() { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("groupInviteInfo", getGroupInviteInfo()); - } - - if (getClient() != null && getClient().getSession() != null) { - getClient().getSession().write(buffer); - } - } - - public int getGuildId() { - synchronized(objectMutex) { - return (int) baseline6.get("guildId"); - } - } - - public void setGuildId(int guildId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("guildId", guildId); - } - - notifyObservers(buffer, true); - } - - public long getTargetId() { - synchronized(objectMutex) { - return (long) baseline6.get("targetId"); - } - } - - public void setTargetId(long targetId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("targetId", targetId); - } - - notifyObservers(buffer, true); - } - - public byte getMoodId() { - synchronized(objectMutex) { - return (byte) baseline6.get("moodId"); - } - } - - public void setMoodId(byte moodId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("moodId", moodId); - } - - notifyObservers(buffer, true); - } - - public int getPerformanceCounter() { - synchronized(objectMutex) { - return (int) baseline6.get("performanceCounter"); - } - } - - public void setPerformanceCounter(int performanceCounter) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("performanceCounter", performanceCounter); - } - - notifyObservers(buffer, true); - } - - public int getPerformanceId() { - synchronized(objectMutex) { - return (int) baseline6.get("performanceId"); - } - } - - public void setPerformanceId(int performanceId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("performanceId", performanceId); - } - - notifyObservers(buffer, true); - } - - @SuppressWarnings("unchecked") - public SWGList getHamList() { - return (SWGList) baseline6.get("hamList"); - } - - public int getHealth() { - synchronized(objectMutex) { - return getHamList().get(0); - } - } - - public void setHealth(int health) { - if (health > getMaxHealth()) { - health = getMaxHealth(); - } - - synchronized(objectMutex) { - getHamList().set(0, health); - } - } - - public int getAction() { - synchronized(objectMutex) { - return getHamList().get(2); - } - } - - public void setAction(int action) { - if (action > getMaxAction()) { - action = getMaxAction(); - } - - synchronized(objectMutex) { - getHamList().set(2, action); - } - } - - @SuppressWarnings("unchecked") - public SWGList getMaxHamList() { - return (SWGList) baseline6.get("maxHamList"); - } - - public int getMaxHealth() { - synchronized(objectMutex) { - return getMaxHamList().get(0); - } - } - - public void setMaxHealth(int maxHealth) { - synchronized(objectMutex) { - getMaxHamList().set(0, maxHealth); - } - } - - public int getMaxAction() { - synchronized(objectMutex) { - return getMaxHamList().get(2); - } - } - - public void setMaxAction(int maxAction) { - synchronized(objectMutex) { - getMaxHamList().set(2, maxAction); - } - } - - @SuppressWarnings("unchecked") - public SWGList getEquipmentList() { - return (SWGList) baseline6.get("equipmentList"); - } - - public void equipObject(SWGObject object) { - if (object instanceof TangibleObject) { - getEquipmentList().add(new Equipment(object)); - } - } - - public void unequipObject(SWGObject object) { - if (object instanceof TangibleObject) { - for (Equipment equipment : getEquipmentList()) { - if (equipment.getObjectId() == object.getObjectId()) { - getEquipmentList().remove(equipment); - } - } - } - } - - @SuppressWarnings("unchecked") - public SWGMap getBuffList() { - return (SWGMap) baseline6.get("buffList"); - } - - public void addBuff(Buff buff) { - synchronized(objectMutex) { - PlayerObject player = (PlayerObject) this.getSlottedObject("ghost"); - buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000)); - } - - getBuffList().put(CRC.StringtoCRC(buff.getBuffName()), buff); - - synchronized(objectMutex) { - buff.setStartTime(); - } - } - - public void removeBuff(Buff buff) { - getBuffList().remove(CRC.StringtoCRC(buff.getBuffName())); - } - - public Buff getBuffByName(String buffName) { - for (Entry entry : getBuffList().entrySet()) { - if (entry.getKey().equals(CRC.StringtoCRC(buffName))) { - return entry.getValue(); - } - } - - return null; - } - - @SuppressWarnings("unchecked") - public SWGList getAppearanceEquipmentList() { - return (SWGList) baseline6.get("appearanceEquipmentList"); - } - - public void equipAppearance(SWGObject object) { - if (object instanceof TangibleObject) { - getAppearanceEquipmentList().add(new Equipment(object)); - } - } - - public void unequipAppearance(SWGObject object) { - if (object instanceof TangibleObject) { - for (Equipment equipment : getAppearanceEquipmentList()) { - if (equipment.getObjectId() == object.getObjectId()) { - getAppearanceEquipmentList().remove(equipment); - } - } - } - } - - public List getDuelList() { - return duelList; - } - - public boolean isInDuelList(long objectId) { - if (duelList.contains(objectId)) { - return true; - } - - return false; - } - - public boolean isInDuelList(SWGObject object) { - return isInDuelList(object.getObjectId()); - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, notifySelf); - } - - @Override - public CreatureMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new CreatureMessageBuilder(this); - } - - return messageBuilder; - } - } - - @SuppressWarnings("unused") - @Override - public void sendBaselines(Client destination) { - if (destination == null || destination.getSession() == null) { - System.out.println("NULL session"); - return; - } - - System.out.println(StringUtilities.bytesToHex(baseline3.getBaseline().array())); - destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - if (destination == getClient()) { - //destination.getSession().write(baseline1.getBaseline()); - //destination.getSession().write(baseline4.getBaseline()); - } - //destination.getSession().write(baseline8().getBaseline()); - //destination.getSession().write(baseline9().getBaseline()); - - UpdatePostureMessage upm = new UpdatePostureMessage(getObjectID(), (byte) 0); - //destination.getSession().write(upm.serialize()); - - if (destination != getClient()) { - UpdatePVPStatusMessage upvpm = new UpdatePVPStatusMessage(getObjectID()); - - int factionStatus = getFactionStatus(); - String faction = getFaction(); - - if (factionStatus == 1 && faction == "imperial") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Imperial); - upvpm.setStatus(16); - } - - if (factionStatus == 1 && faction == "rebel") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Rebel); - upvpm.setStatus(16); - } - - if (factionStatus == 2 && faction == "imperial") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Imperial); - upvpm.setStatus(55); - } - - if (factionStatus == 2 && faction == "rebel") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Rebel); - upvpm.setStatus(55); - } - - if (factionStatus == 0 && faction == "neutral") { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Neutral); - upvpm.setStatus(16); - } else { - upvpm.setFaction(UpdatePVPStatusMessage.factionCRC.Neutral); - upvpm.setStatus(16); - } - - destination.getSession().write(upvpm.serialize()); - } - } - - public void sendSystemMessage(String message, byte displayType) { - if (getClient() != null && getClient().getSession() != null) { - ChatSystemMessage systemMsg = new ChatSystemMessage(message, displayType); - getClient().getSession().write(systemMsg.serialize()); - } - } - - public Transaction getTransaction() { - return txn; - } - - public void createTransaction(Environment env) { - txn = env.beginTransaction(null, null); - } - -} diff --git a/src/resources/z/exp/objects/group/GroupObject.java b/src/resources/z/exp/objects/group/GroupObject.java deleted file mode 100644 index 30ddc659..00000000 --- a/src/resources/z/exp/objects/group/GroupObject.java +++ /dev/null @@ -1,256 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.group; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.NotPersistent; - -import resources.z.exp.group.Member; -import resources.z.exp.group.MemberInfo; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.SWGList; -import resources.z.exp.objects.creature.CreatureObject; -import resources.z.exp.objects.universe.UniverseObject; - -import engine.clients.Client; -import engine.resources.objects.SWGObject; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -public class GroupObject extends UniverseObject { - - @NotPersistent - private GroupMessageBuilder messageBuilder; - - public GroupObject(long objectId) { - super(objectId, null, new Point3D(0, 0, 0), new Quaternion(0, 0, 0, 1), "object/group/shared_group_object.iff"); - } - - public GroupObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("memberList", new SWGList(this, 6, 2, false)); - baseline.put("memberInfoList", new SWGList(this, 6, 3, false)); - baseline.put("4", ""); - baseline.put("groupLevel", (short) 0); - baseline.put("6", 0); - baseline.put("groupLeader", null); - baseline.put("lootMaster", null); - baseline.put("lootMode", 0); - return baseline; - } - - @SuppressWarnings("unchecked") - public SWGList getMemberList() { - return (SWGList) baseline6.get("memberList"); - } - - @SuppressWarnings("unchecked") - public SWGList getMemberInfoList() { - return (SWGList) baseline6.get("memberInfoList"); - } - - public void addMember(SWGObject member) { - if (member instanceof CreatureObject && member.getClient() != null) { - SWGList memberList = getMemberList(); - SWGList memberInfoList = getMemberInfoList(); - - if (memberList.size() >= 8) { - ((CreatureObject) member).sendSystemMessage("@group:join_full", (byte) 0); - } else { - Member newMember = new Member(member); - - if (memberList.add(newMember)) { - memberInfoList.add(new MemberInfo(memberList.indexOf(newMember), 0)); - - if (((CreatureObject) member).getLevel() > getGroupLevel()) { - setGroupLevel(((CreatureObject) member).getLevel()); - } - } - } - } - } - - public void removeMember(SWGObject member) { - if (member instanceof CreatureObject && member.getClient() != null) { - SWGList memberList = getMemberList(); - SWGList memberInfoList = getMemberInfoList(); - - if (!(memberList.size() <= 0)) { - int index = memberList.indexOf(member); - - if (memberList.remove(member)) { - memberInfoList.remove(index); - - synchronized(objectMutex) { - for (int i = 0; i < memberInfoList.size(); i++) { - if (memberInfoList.get(i).getMemberId() != i) { - memberInfoList.set(i, memberInfoList.get(i).setMemberId(i)); - } - } - } - } - - short maxLevel = 0; - - for (Member memberObject : getMemberList()) { - if (memberObject.getMember() instanceof CreatureObject) { - CreatureObject creature = (CreatureObject) memberObject.getMember(); - - if (creature.getLevel() > maxLevel) { - maxLevel = creature.getLevel(); - } - } - } - - if (maxLevel != getGroupLevel()) { - setGroupLevel(maxLevel); - } - } - } - } - - public boolean setMemberInfo(SWGObject object, long info) { - if (object instanceof CreatureObject && object.getClient() != null) { - for (Member member : getMemberList()) { - if (member.getMember().equals(member)) { - int id = getMemberList().indexOf(member); - getMemberInfoList().set(id, new MemberInfo(info, id)); - return true; - } - } - } - - return false; - } - - public short getGroupLevel() { - synchronized(objectMutex) { - return (short) baseline6.get("groupLevel"); - } - } - - public void setGroupLevel(short groupLevel) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("groupLevel", groupLevel); - } - - notifyObservers(buffer, false); - } - - public SWGObject getGroupLeader() { - synchronized(objectMutex) { - return (SWGObject) baseline6.get("groupLeader"); - } - } - - public void setGroupLeader(SWGObject groupLeader) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("groupLeader", groupLeader); - } - - notifyObservers(buffer, false); - } - - public SWGObject getLootMaster() { - synchronized(objectMutex) { - return (SWGObject) baseline6.get("lootMaster"); - } - } - - public void setLootMaster(SWGObject lootMaster) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("lootMaster", lootMaster); - } - - notifyObservers(buffer, false); - } - - public int getLootMode() { - synchronized(objectMutex) { - return (int) baseline6.get("lootMode"); - } - } - - public void setLootMode(int lootMode) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("lootMode", lootMode); - } - - notifyObservers(buffer, false); - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, false); - } - - @Override - public GroupMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new GroupMessageBuilder(); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - destination.getSession().write(baseline3.getBaseline()); - destination.getSession().write(baseline6.getBaseline()); - } - } - -} diff --git a/src/resources/z/exp/objects/guild/GuildObject.java b/src/resources/z/exp/objects/guild/GuildObject.java deleted file mode 100644 index 7df685e4..00000000 --- a/src/resources/z/exp/objects/guild/GuildObject.java +++ /dev/null @@ -1,192 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.guild; - -import java.util.Map; -import java.util.TreeMap; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.gcw.CurrentServerGCWZoneHistory; -import resources.gcw.CurrentServerGCWZonePercent; -import resources.gcw.OtherServerGCWZonePercent; -import resources.z.exp.guild.Guild; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.SWGList; -import resources.z.exp.objects.SWGMap; -import resources.z.exp.objects.SWGMultiMap; -import resources.z.exp.objects.universe.UniverseObject; - -import com.sleepycat.je.Environment; -import com.sleepycat.je.Transaction; -import com.sleepycat.persist.model.Entity; -import com.sleepycat.persist.model.NotPersistent; - -import engine.clients.Client; -import engine.resources.objects.IPersistent; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Entity -public class GuildObject extends UniverseObject implements IPersistent { - - @NotPersistent - private GuildMessageBuilder messageBuilder = new GuildMessageBuilder(this); - - private Map> zoneMap = new TreeMap>(); - - @NotPersistent - private Transaction txn; - - public GuildObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - } - - public GuildObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - baseline.put("nextUpdateTime", 1321383613); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("guildList", new SWGList(this, 3, 4, false)); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("currentServerGCWZonePercentMap", new SWGMap(this, 6, 2, true)); - baseline.put("currentServerGCWTotalPercentMap", new SWGMap(this, 6, 3, true)); - baseline.put("currentServerGCWZoneHistoryMap", new SWGMultiMap(this, 6, 4, true)); - baseline.put("currentServerGCWTotalHistoryMap", new SWGMultiMap(this, 6, 5, true)); - baseline.put("otherServerGCWZonePercentMap", new SWGMultiMap(this, 6, 6, true)); - baseline.put("otherServerGCWTotalPercentMap", new SWGMultiMap(this, 6, 7, true)); - baseline.put("8", 5); - return baseline; - } - - @SuppressWarnings("unchecked") - public SWGList getGuildList() { - return (SWGList) baseline3.get("guildList"); - } - - @SuppressWarnings("unchecked") - public SWGMap getCurrentServerGCWZonePercentMap() { - return (SWGMap) baseline6.get("currentServerGCWZonePercentMap"); - } - - @SuppressWarnings("unchecked") - public SWGMap getCurrentServerGCWTotalPercentMap() { - return (SWGMap) baseline6.get("currentServerGCWTotalPercentMap"); - } - - @SuppressWarnings("unchecked") - public SWGMultiMap getCurrentServerGCWZoneHistoryMap() { - return (SWGMultiMap) baseline6.get("currentServerGCWZoneHistoryMap"); - } - - @SuppressWarnings("unchecked") - public SWGMultiMap getCurrentServerGCWTotalHistoryMap() { - return (SWGMultiMap) baseline6.get("currentServerGCWTotalHistoryMap"); - } - - @SuppressWarnings("unchecked") - public SWGMultiMap getOtherServerGCWZonePercentMap() { - return (SWGMultiMap) baseline6.get("otherServerGCWZonePercentMap"); - } - - @SuppressWarnings("unchecked") - public SWGMultiMap getOtherServerGCWTotalPercentMap() { - return (SWGMultiMap) baseline6.get("otherServerGCWTotalPercentMap"); - } - - public Map> getZoneMap() { - synchronized(objectMutex) { - return zoneMap; - } - } - - public int getNextUpdateTime() { - synchronized(objectMutex) { - return (int) otherVariables.get("nextUpdateTime"); - } - } - - public int setNextUpdateTime(long nextUpdateTime) { - synchronized(objectMutex) { - otherVariables.set("nextUpdateTime", (int) nextUpdateTime); - return getNextUpdateTime(); - } - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, false); - } - - @Override - public GuildMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new GuildMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - } - } - - @Override - public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { - notifyClients(baseline6.createDelta(updateType, buffer.array()), false); - } - - public Transaction getTransaction() { - return txn; - } - - public void createTransaction(Environment env) { - txn = env.beginTransaction(null, null); - } - -} diff --git a/src/resources/z/exp/objects/installation/InstallationMessageBuilder.java b/src/resources/z/exp/objects/installation/InstallationMessageBuilder.java deleted file mode 100644 index 054ba875..00000000 --- a/src/resources/z/exp/objects/installation/InstallationMessageBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.installation; - -public class InstallationMessageBuilder { - -} diff --git a/src/resources/z/exp/objects/installation/InstallationObject.java b/src/resources/z/exp/objects/installation/InstallationObject.java deleted file mode 100644 index e57c0460..00000000 --- a/src/resources/z/exp/objects/installation/InstallationObject.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.installation; - -public class InstallationObject { - -} diff --git a/src/resources/z/exp/objects/intangible/IntangibleObject.java b/src/resources/z/exp/objects/intangible/IntangibleObject.java deleted file mode 100644 index d02b9ccf..00000000 --- a/src/resources/z/exp/objects/intangible/IntangibleObject.java +++ /dev/null @@ -1,139 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.intangible; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class IntangibleObject extends BaseObject { - - @NotPersistent - private IntangibleMessageBuilder messageBuilder; - - public IntangibleObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - } - - public IntangibleObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - initializeBaseline(8); - initializeBaseline(9); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("genericInt", 0); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - return baseline; - } - - public int getGenericInt() { - synchronized(objectMutex) { - return (int) baseline3.get("genericInt"); - } - } - - public void setGenericInt(int genericInt) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("genericInt", genericInt); - } - - notifyClients(buffer, true); - } - - public void incrementGenericInt(int increase) { - setGenericInt((getGenericInt() + increase)); - } - - public void decrementGenericInt(int decrease) { - setGenericInt((((getGenericInt() - decrease) < 1) ? 0 : (getGenericInt() - decrease))); - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, notifySelf); - } - - @Override - public IntangibleMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new IntangibleMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - //destination.getSession().write(baseline8.getBaseline()); - //destination.getSession().write(baseline9.getBaseline()); - } - } - -} diff --git a/src/resources/z/exp/objects/manufacture/ManufactureSchematicMessageBuilder.java b/src/resources/z/exp/objects/manufacture/ManufactureSchematicMessageBuilder.java deleted file mode 100644 index 97d20d8e..00000000 --- a/src/resources/z/exp/objects/manufacture/ManufactureSchematicMessageBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.manufacture; - -import java.util.Map; - -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.intangible.IntangibleMessageBuilder; - -public class ManufactureSchematicMessageBuilder extends IntangibleMessageBuilder { - - public ManufactureSchematicMessageBuilder(ManufactureSchematicObject object) { - super(object); - } - - public ManufactureSchematicMessageBuilder() { - super(); - } - - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline7(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline7(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - -} diff --git a/src/resources/z/exp/objects/manufacture/ManufactureSchematicObject.java b/src/resources/z/exp/objects/manufacture/ManufactureSchematicObject.java deleted file mode 100644 index 88e49380..00000000 --- a/src/resources/z/exp/objects/manufacture/ManufactureSchematicObject.java +++ /dev/null @@ -1,603 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.manufacture; - -import java.util.ArrayList; -import java.util.Collection; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; -import resources.z.exp.manufacture.Property; -import resources.z.exp.manufacture.SubList; -import resources.z.exp.manufacture.TableAndKey; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.SWGList; -import resources.z.exp.objects.SWGMultiMap; -import resources.z.exp.objects.intangible.IntangibleObject; - -@Persistent -public class ManufactureSchematicObject extends IntangibleObject { - - @NotPersistent - private ManufactureSchematicMessageBuilder messageBuilder; - - public ManufactureSchematicObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - initializeBaseline(7); - } - - public ManufactureSchematicObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - baseline.put("totalSlots", (byte) 0); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("properties", new SWGMultiMap(this, 3, 5, true)); - baseline.put("schematicComplexity", 0); - baseline.put("schematicDataSize", (float) 1); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("schematicCustomization", new byte[] { }); - baseline.put("customizationTemplate", ""); - baseline.put("schematicPrototype", ""); - baseline.put("inUse", false); - baseline.put("filledSlots", (byte) 0); - return baseline; - } - - @Override - public Baseline getBaseline7() { - Baseline baseline = super.getBaseline7(); - baseline.put("slotNameList", new SWGList(this, 7, 0, false)); - baseline.put("slotContentsList", new SWGList(this, 7, 1, false)); - baseline.put("ingredientList", new SWGList>(this, 7, 2, false)); - baseline.put("quantityList", new SWGList>(this, 7, 3, false)); - baseline.put("qualityList", new SWGList(this, 7, 4, false)); - baseline.put("cleanSlotList", new SWGList(this, 7, 5, false)); - baseline.put("slotIndexList", new SWGList(this, 7, 6, false)); - baseline.put("ingredientsCounter", (byte) 0); - baseline.put("experimentationNameList", new SWGList(this, 7, 8, false)); - baseline.put("currentExperimentationValueList", new SWGList(this, 7, 9, false)); - baseline.put("experimentationOffsetList", new SWGList(this, 7, 10, false)); - baseline.put("bluebarList", new SWGList(this, 7, 11, false)); - baseline.put("maxExperimentationList", new SWGList(this, 7, 12, false)); - baseline.put("customizationNameList", new SWGList(this, 7, 13, false)); - baseline.put("palleteSelectionList", new SWGList(this, 7, 14, false)); - baseline.put("palleteStartIndexList", new SWGList(this, 7, 15, false)); - baseline.put("palleteEndIndexList", new SWGList(this, 7, 16, false)); - baseline.put("customizationCounter", (byte) 0); - baseline.put("riskFactor", (float) 0); - baseline.put("objectTemplateCustomizationList", new SWGList(this, 7, 19, false)); - baseline.put("ready", true); - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - return baseline; - } - - public void setQuantity(int quantity) { - setGenericInt(quantity); - } - - public void incrementQuantity(int increase) { - incrementGenericInt(increase); - } - - public void decrementQuantity(int decrease) { - decrementGenericInt(decrease); - } - - @SuppressWarnings("unchecked") - public SWGMultiMap getPropertiesMap() { - return (SWGMultiMap) baseline3.get("properties"); - } - - public Collection getPropertiesForFile(String stfFile) { - synchronized(objectMutex) { - if (getPropertiesMap().containsKey(stfFile)) { - return getPropertiesMap().get(stfFile); - } else { - return new ArrayList(); - } - } - } - - public Collection getAllProperties() { - synchronized(objectMutex) { - return getPropertiesMap().values(); - } - } - - public boolean containsKey(String stfFile, String key) { - synchronized(objectMutex) { - for (Property property : getPropertiesMap().get(stfFile)) { - if (property.getKey().equals(key)) { - return true; - } - } - - return false; - } - } - - public boolean containsKey(String key) { - synchronized(objectMutex) { - for (Property property : getPropertiesMap().values()) { - if (property.getKey().equals(key)) { - return true; - } - } - - return false; - } - } - - public Property getProperty(String stfFile, String key) { - synchronized(objectMutex) { - for (Property property: getPropertiesMap().get(stfFile)) { - if (property.getKey().equals(key)) { - return property; - } - } - - return null; - } - } - - public Property getProperty(String key) { - synchronized(objectMutex) { - for (Property property: getPropertiesMap().values()) { - if (property.getKey().equals(key)) { - return property; - } - } - - return null; - } - } - - public void addProperty(String stfFile, String key, float value) { - if (!containsKey(stfFile, key)) { - getPropertiesMap().put(stfFile, new Property(key, value)); - } - } - - public void setProperty(String stfFile, String key, float value) { - if (getPropertiesMap().containsKey(stfFile)) { - for (Property property : getPropertiesMap().get(stfFile)) { - if (property.getKey().equals(key)) { - property.setValue(value); - getPropertiesMap().replaceValues(stfFile, getPropertiesMap().get(stfFile)); - return; - } - } - } - } - - public void removeProperty(String stfFile, String key) { - if (containsKey(stfFile, key)) { - getPropertiesMap().remove(stfFile, getProperty(key)); - } - } - - public void removeFile(String stfFile) { - getPropertiesMap().removeAll(stfFile); - } - - public int getSchematicComplexity() { - synchronized(objectMutex) { - return (int) baseline3.get("schematicComplexity"); - } - } - - public void setSchematicComplexity(int schematicComplexity) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("schematicComplexity", schematicComplexity); - } - - notifyClients(buffer, false); - } - - public float getSchematicDataSize() { - synchronized(objectMutex) { - return (float) baseline3.get("schematicDataSize"); - } - } - - public void setSchematicDataSize(float schematicDataSize) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("schematicDataSize", schematicDataSize); - } - - notifyClients(buffer, false); - } - - public byte[] getSchematicCustomization() { - synchronized(objectMutex) { - return (byte[]) baseline6.get("schematicCustomization"); - } - } - - public void setSchematicCustomization(byte[] schematicCustomization) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("schematicCustomization", schematicCustomization); - } - - notifyClients(buffer, false); - } - - public String getCustomizationTemplate() { - synchronized(objectMutex) { - return (String) baseline6.get("customizationTemplate"); - } - } - - public void setCustomizationTemplate(String customizationTemplate) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("customizationTemplate", customizationTemplate); - } - - notifyClients(buffer, false); - } - - public String getSchematicTemplate() { - synchronized(objectMutex) { - return (String) baseline6.get("schematicTemplate"); - } - } - - public void setSchematicTemplate(String schematicTemplate) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("schematicTemplate", schematicTemplate); - } - - notifyClients(buffer, false); - } - - public boolean inUse() { - synchronized(objectMutex) { - return (boolean) baseline6.get("inUse"); - } - } - - public void setInUse(boolean inUse) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("inUse", inUse); - } - - notifyClients(buffer, false); - } - - public void toggleInUse() { - setInUse(!inUse()); - } - - public byte getTotalSlots() { - synchronized(objectMutex) { - return (byte) otherVariables.get("totalSlots"); - } - } - - public void setTotalSlots(byte totalSlots) { - synchronized(objectMutex) { - otherVariables.set("totalSlots", totalSlots); - } - } - - public byte getFilledSlots() { - synchronized(objectMutex) { - return (byte) baseline6.get("filledSlots"); - } - } - - public void setFilledSlots(byte filledSlots) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("filledSlots", filledSlots); - } - - notifyClients(buffer, false); - } - - public void incrementFilledSlots(int increase) { - setFilledSlots(((byte) (getFilledSlots() + ((byte) increase)))); - } - - public void decrementFilledSlots(int decrease) { - setFilledSlots(((byte) (((getFilledSlots() - ((byte) decrease)) < 0) ? ((byte) 0) : (getFilledSlots() - ((byte) decrease))))); - } - - @SuppressWarnings("unchecked") - public SWGList getSlotNameList() { - return (SWGList) baseline7.get("slotNameList"); - } - - @SuppressWarnings("unchecked") - public SWGList getSlotContentsList() { - return (SWGList) baseline7.get("slotContentsList"); - } - - @SuppressWarnings("unchecked") - public SWGList> getIngredientList() { - return (SWGList>) baseline7.get("ingredientList"); - } - - @SuppressWarnings("unchecked") - public SWGList> getQuantityList() { - return (SWGList>) baseline7.get("quantityList"); - } - - @SuppressWarnings("unchecked") - public SWGList getQualityList() { - return (SWGList) baseline7.get("quantityList"); - } - - @SuppressWarnings("unchecked") - public SWGList getCleanSlotList() { - return (SWGList) baseline7.get("cleanSlotList"); - } - - @SuppressWarnings("unchecked") - public SWGList getSlotIndexList() { - return (SWGList) baseline7.get("slotIndexList"); - } - - public byte getIngredientsCounter() { - return (byte) baseline7.get("ingredientsCounter"); - } - - public void setIngredientsCounter(byte ingredientsCounter) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline7.set("ingredientsCounter", ingredientsCounter); - } - - if (getGrandparent().getClient() != null) { - getGrandparent().getClient().getSession().write(buffer); - } - } - - public void incrementIngredientsCounter(int increase) { - setIngredientsCounter((byte) (getIngredientsCounter() + ((byte) increase))); - } - - public void decrementIngredientsCoutner(int decrease) { - byte ingredientsCounter = getIngredientsCounter(); - setIngredientsCounter(((ingredientsCounter < 0) ? 0 : ((byte) (ingredientsCounter - ((byte) decrease))))); - } - - @SuppressWarnings("unchecked") - public SWGList getExperimentationNameList() { - return (SWGList) baseline7.get("experimentationNameList"); - } - - @SuppressWarnings("unchecked") - public SWGList getCurrentExperimentationValueList() { - return (SWGList) baseline7.get("currentExperimentationValueList"); - } - - @SuppressWarnings("unchecked") - public SWGList getExperimentationOffsetList() { - return (SWGList) baseline7.get("experimentationOffsetList"); - } - - @SuppressWarnings("unchecked") - public SWGList getBlueBarList() { - return (SWGList) baseline7.get("blueBarList"); - } - - @SuppressWarnings("unchecked") - public SWGList getMaxExperimentationList() { - return (SWGList) baseline7.get("maxExperimentationList"); - } - - @SuppressWarnings("unchecked") - public SWGList getCustomizationNameList() { - return (SWGList) baseline7.get("customizationNameList"); - } - - @SuppressWarnings("unchecked") - public SWGList getPalleteSelectionList() { - return (SWGList) baseline7.get("palleteSelectionList"); - } - - @SuppressWarnings("unchecked") - public SWGList getPalleteStartIndexList() { - return (SWGList) baseline7.get("palleteStartIndexList"); - } - - @SuppressWarnings("unchecked") - public SWGList getPalleteEndIndexList() { - return (SWGList) baseline7.get("palleteEndIndexList"); - } - - public byte getCustomizationCounter() { - synchronized(objectMutex) { - return (byte) baseline7.get("customizationCounter"); - } - } - - public void setCustomizationCounter(byte customizationCounter) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline7.set("customizationCounter", customizationCounter); - } - - if (getGrandparent().getClient() != null) { - getGrandparent().getClient().getSession().write(buffer); - } - } - - public void incrementCustomizationCounter(int increase) { - - } - - public void decrementCustomizationCounter(int decrease) { - - } - - public float getRiskFactor() { - synchronized(objectMutex) { - return (float) baseline7.get("riskFactor"); - } - } - - public void setRiskFactor(float riskFactor) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline7.set("riskFactor", riskFactor); - } - - if (getGrandparent().getClient() != null) { - getGrandparent().getClient().getSession().write(buffer); - } - } - - @SuppressWarnings("unchecked") - public SWGList getObjectTemplateCustomizationList() { - return (SWGList) baseline7.get("objectTemplateCustomizationList"); - } - - public boolean isReady() { - synchronized(objectMutex) { - return (boolean) baseline7.get("isReady"); - } - } - - public void setReady(boolean ready) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline7.set("ready", ready); - } - - if (getGrandparent().getClient() != null) { - getGrandparent().getClient().getSession().write(buffer); - } - } - - public void toggleReady() { - setReady(!isReady()); - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, notifySelf); - } - - @Override - public ManufactureSchematicMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new ManufactureSchematicMessageBuilder(this); - } - - return messageBuilder; - } - } - - public void sendBaseline7(Client destination) { - destination.getSession().write(baseline7.getBaseline()); - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - destination.getSession().write(baseline3.getBaseline()); - destination.getSession().write(baseline6.getBaseline()); - destination.getSession().write(baseline8.getBaseline()); - destination.getSession().write(baseline9.getBaseline()); - } - } - - @Override - public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { - switch (viewType) { - case 1: - case 4: - case 7: - if (getGrandparent().getClient() != null) { - buffer = getBaseline(viewType).createDelta(updateType, buffer.array()); - getGrandparent().getClient().getSession().write(buffer); - } - - return; - case 3: - case 6: - case 8: - case 9: - notifyObservers(getBaseline(viewType).createDelta(updateType, buffer.array()), true); - default: - return; - } - } - -} diff --git a/src/resources/z/exp/objects/mission/MissionMessageBuilder.java b/src/resources/z/exp/objects/mission/MissionMessageBuilder.java deleted file mode 100644 index b1626472..00000000 --- a/src/resources/z/exp/objects/mission/MissionMessageBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.mission; - -import java.util.Map; - -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.intangible.IntangibleMessageBuilder; - -public class MissionMessageBuilder extends IntangibleMessageBuilder { - - public MissionMessageBuilder(MissionObject object) { - super(object); - } - - public MissionMessageBuilder() { - super(); - } - - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - -} diff --git a/src/resources/z/exp/objects/mission/MissionObject.java b/src/resources/z/exp/objects/mission/MissionObject.java deleted file mode 100644 index fdb43469..00000000 --- a/src/resources/z/exp/objects/mission/MissionObject.java +++ /dev/null @@ -1,329 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.mission; - -import org.apache.mina.core.buffer.IoBuffer; - -import main.NGECore; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.objects.SWGObject; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -import resources.common.Stf; -import resources.common.UString; -import resources.z.exp.mission.MissionLocation; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.intangible.IntangibleObject; -import resources.z.exp.objects.waypoint.WaypointObject; - -@Persistent -public class MissionObject extends IntangibleObject { - - @NotPersistent - private MissionMessageBuilder messageBuilder; - - public MissionObject(NGECore core, long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - baseline3.set("waypoint", (WaypointObject) core.objectService.createObject("object/waypoint/base/shared_base_waypoint.iff", planet)); - } - - public MissionObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("difficultyLevel", 0); - baseline.put("startLocation", new MissionLocation(new Point3D(0, 0, 0), 0, "")); - baseline.put("creator", new UString()); - baseline.put("creditReward", 0); - baseline.put("targetObject", 0); - baseline.put("description", new Stf()); - baseline.put("title", new Stf()); - baseline.put("repeatCounter", 0); - baseline.put("missionType", ""); - baseline.put("targetName", ""); - baseline.put("waypoint", new WaypointObject()); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - return baseline; - } - - public int getDifficultyLevel() { - synchronized(objectMutex) { - return (int) baseline3.get("difficultyLevel"); - } - } - - public void setDifficultyLevel(int difficultyLevel) { - synchronized(objectMutex) { - baseline3.set("difficultyLevel", difficultyLevel); - } - } - - public MissionLocation getStartLocation() { - synchronized(objectMutex) { - return (MissionLocation) baseline3.get("startLocation"); - } - } - - public void setStartLocation(Point3D position, SWGObject object, Planet planet) { - setStartLocation(position, object, planet.getName()); - } - - public void setStartLocation(Point3D position, SWGObject object, String planet) { - synchronized(objectMutex) { - MissionLocation startLocation = new MissionLocation(position.clone(), object.getObjectID(), planet); - baseline3.set("startLocation", startLocation); - } - } - - public String getCreator() { - synchronized(objectMutex) { - return (String) baseline3.get("creator"); - } - } - - public void setCreator(String creator) { - synchronized(objectMutex) { - baseline3.set("creator", creator); - } - } - - public int getCreditReward() { - synchronized(objectMutex) { - return (int) baseline3.get("creditReward"); - } - } - - public void setCreditReward(int creditReward) { - synchronized(objectMutex) { - baseline3.set("creditReward", creditReward); - } - } - - public MissionLocation getDestination() { - synchronized(objectMutex) { - return (MissionLocation) baseline3.get("destination"); - } - } - - public void setDestination(Point3D position, SWGObject object, Planet planet) { - setDestination(position, object, planet.getName()); - } - - public void setDestination(Point3D position, SWGObject object, String planet) { - synchronized(objectMutex) { - MissionLocation destination = new MissionLocation(position.clone(), object.getObjectID(), planet); - baseline3.set("destination", destination); - } - } - - public int getTargetObject() { - synchronized(objectMutex) { - return (int) baseline3.get("targetObject"); - } - } - - public void setTargetObject(int targetObject) { - synchronized(objectMutex) { - baseline3.set("targetObject", targetObject); - } - } - - public Stf getDescription() { - synchronized(objectMutex) { - return (Stf) baseline3.get("description"); - } - } - - public void setDescription(String stfFilename, String string) { - synchronized(objectMutex) { - Stf description = new Stf(stfFilename, 0, string); - baseline3.set("description", description); - } - } - - public Stf getTitle() { - synchronized(objectMutex) { - return (Stf) baseline3.get("title"); - } - } - - public void setTitle(String stfFilename, String string) { - synchronized(objectMutex) { - Stf title = new Stf(stfFilename, 0, string); - baseline3.set("title", title); - } - } - - public int getRepeatCounter() { - synchronized(objectMutex) { - return (int) baseline3.get("repeatCounter"); - } - } - - public void setRepeatCounter(int repeatCounter) { - synchronized(objectMutex) { - baseline3.set("repeatCounter", repeatCounter); - } - } - - public void incrementRepeatCounter(int increase) { - setRepeatCounter(getRepeatCounter() + 1); - } - - public void decrementRepeatCounter(int decrease) { - int repeatCounter = getRepeatCounter() + 1; - setRepeatCounter((repeatCounter < 0) ? 0 : repeatCounter); - } - - public String getMissionType() { - synchronized(objectMutex) { - return (String) baseline3.get("missionType"); - } - } - - public void setMissionType(String missionType) { - synchronized(objectMutex) { - baseline3.set("missionType", missionType); - } - } - - public String getTargetName() { - synchronized(objectMutex) { - return (String) baseline3.get("targetName"); - } - } - - public void setTargetName(String targetName) { - synchronized(objectMutex) { - baseline3.set("targetName", targetName); - } - } - - public WaypointObject getWaypoint() { - synchronized(objectMutex) { - return (WaypointObject) baseline3.get("waypoint"); - } - } - - public void setWaypoint(WaypointObject waypoint) { - synchronized(objectMutex) { - baseline3.set("waypoint", waypoint); - } - } - - // A new mission listing is just one big delta to one of the player's - // empty, pre-existing MissionObjects - public void updateMission() { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.createDelta(); - } - - if (getGrandparent().getClient() != null) { - getGrandparent().getClient().getSession().write(buffer); - } - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - getGrandparent().getClient().getSession().write(buffer); - } - - @Override - public MissionMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new MissionMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - destination.getSession().write(baseline3.getBaseline()); - destination.getSession().write(baseline6.getBaseline()); - destination.getSession().write(baseline8.getBaseline()); - destination.getSession().write(baseline9.getBaseline()); - } - } - - @Override - public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { - switch (viewType) { - case 1: - case 4: - case 3: - case 6: - case 7: - case 8: - case 9: - if (getGrandparent().getClient() != null) { - buffer = getBaseline(viewType).createDelta(updateType, buffer.array()); - getGrandparent().getClient().getSession().write(buffer); - } - default: - return; - } - } - -} diff --git a/src/resources/z/exp/objects/object/BaseObject.java b/src/resources/z/exp/objects/object/BaseObject.java deleted file mode 100644 index 37dc0f85..00000000 --- a/src/resources/z/exp/objects/object/BaseObject.java +++ /dev/null @@ -1,543 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.object; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.common.Stf; -import resources.common.UString; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.ObjectMessageBuilder; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.objects.SWGObject; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class BaseObject extends SWGObject { - - @NotPersistent - private ObjectMessageBuilder messageBuilder; - - protected Baseline baseline1; - protected Baseline baseline3; - protected Baseline baseline4; - protected Baseline baseline6; - protected Baseline baseline7; - protected Baseline baseline8; - protected Baseline baseline9; - protected Baseline otherVariables; - - @NotPersistent - private ScheduledExecutorService scheduler; - - private boolean ready = false; - - public BaseObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - super.setCustomName(""); - if (super.getDetailFilename() == null) super.setDetailFilename(""); - if (super.getDetailName() == null) super.setDetailName(""); - initializeBaselines(); - otherVariables = getOtherVariables(); - ready = true; - } - - public BaseObject() { - super(); - - scheduler = Executors.newScheduledThreadPool(2); - - // Makes sure this runs after the baselines have been restored from DB - - scheduler.schedule(new Runnable() { - - public void run() { - while (!ready); - initializeBaselines(); - } - - }, 0, TimeUnit.NANOSECONDS); - } - - public void initializeBaselines() { - // Transform the structures of any baselines incase they've been altered - - if (otherVariables != null) { - otherVariables.transformStructure(getOtherVariables()); - } - - if (baseline1 != null) { - baseline1.transformStructure(getBaseline1()); - addBuilders(1); - } - - if (baseline3 != null) { - baseline3.transformStructure(getBaseline3()); - addBuilders(3); - } - - if (baseline4 != null) { - baseline4.transformStructure(getBaseline4()); - addBuilders(4); - } - - if (baseline6 != null) { - baseline6.transformStructure(getBaseline6()); - addBuilders(6); - } - - if (baseline7 != null) { - baseline7.transformStructure(getBaseline7()); - addBuilders(7); - } - - if (baseline8 != null) { - baseline8.transformStructure(getBaseline8()); - addBuilders(8); - } - - if (baseline9 != null) { - baseline9.transformStructure(getBaseline9()); - addBuilders(9); - } - - // Inheriting objects initialize these only if needed, for efficiency - - initializeBaseline(3); - initializeBaseline(6); - } - - public void initializeBaseline(int viewType) { - // Won't initialize any baselines if they've already been initialized - - switch (viewType) { - case 1: - if (baseline1 == null) { - baseline1 = getBaseline1(); - addBuilders(viewType); - getMessageBuilder().buildBaseline1(baseline1.getBaselineBuilders(), baseline1.getDeltaBuilders()); - } - - return; - case 3: - if (baseline3 == null) { - baseline3 = getBaseline3(); - addBuilders(viewType); - getMessageBuilder().buildBaseline3(baseline3.getBaselineBuilders(), baseline3.getDeltaBuilders()); - } - - return; - case 4: - if (baseline4 == null) { - baseline4 = getBaseline4(); - addBuilders(viewType); - getMessageBuilder().buildBaseline4(baseline4.getBaselineBuilders(), baseline4.getDeltaBuilders()); - } - - return; - case 6: - if (baseline6 == null) { - baseline6 = getBaseline6(); - addBuilders(viewType); - getMessageBuilder().buildBaseline6(baseline6.getBaselineBuilders(), baseline6.getDeltaBuilders()); - } - - return; - case 7: - if (baseline7 == null) { - baseline7 = getBaseline7(); - addBuilders(viewType); - getMessageBuilder().buildBaseline7(baseline7.getBaselineBuilders(), baseline7.getDeltaBuilders()); - } - - return; - case 8: - if (baseline8 == null) { - baseline8 = getBaseline8(); - addBuilders(viewType); - getMessageBuilder().buildBaseline8(baseline8.getBaselineBuilders(), baseline8.getDeltaBuilders()); - } - - return; - case 9: - if (baseline9 == null) { - baseline9 = getBaseline9(); - addBuilders(viewType); - getMessageBuilder().buildBaseline9(baseline9.getBaselineBuilders(), baseline9.getDeltaBuilders()); - } - default: - return; - } - } - - public void addBuilders(int viewType) { - Baseline baseline = getBaseline(viewType); - Map baselineBuilders = new HashMap(); - Map deltaBuilders = new HashMap(); - - switch (viewType) { - case 1: - getMessageBuilder().buildBaseline1(baselineBuilders, deltaBuilders); - break; - case 3: - getMessageBuilder().buildBaseline3(baselineBuilders, deltaBuilders); - break; - case 4: - getMessageBuilder().buildBaseline4(baselineBuilders, deltaBuilders); - break; - case 6: - getMessageBuilder().buildBaseline6(baselineBuilders, deltaBuilders); - break; - case 7: - getMessageBuilder().buildBaseline7(baselineBuilders, deltaBuilders); - break; - case 8: - getMessageBuilder().buildBaseline8(baselineBuilders, deltaBuilders); - break; - case 9: - getMessageBuilder().buildBaseline9(baselineBuilders, deltaBuilders); - break; - } - - if (baselineBuilders.size() > 0) { - baseline.setBaselineBuilders(baselineBuilders); - } - - if (deltaBuilders.size() > 0) { - baseline.setDeltaBuilders(deltaBuilders); - } - } - - public Baseline getOtherVariables() { - Baseline baseline = new Baseline(this, 0); - return baseline; - } - - public Baseline getBaseline1() { - Baseline baseline = new Baseline(this, 1); - return baseline; - } - - public Baseline getBaseline3() { - Baseline baseline = new Baseline(this, 3); - baseline.put("complexity", (float) 1); - baseline.put("stf", new Stf(getStfFilename(), 0, getStfName())); - baseline.put("customName", new UString("")); - baseline.put("volume", 1); - return baseline; - } - - public Baseline getBaseline4() { - Baseline baseline = new Baseline(this, 4); - return baseline; - } - - public Baseline getBaseline6() { - Baseline baseline = new Baseline(this, 6); - baseline.put("serverId", 0); - baseline.put("detail", new Stf(getDetailFilename(), 0, getDetailName())); - return baseline; - } - - public Baseline getBaseline7() { - Baseline baseline = new Baseline(this, 7); - return baseline; - } - - public Baseline getBaseline8() { - Baseline baseline = new Baseline(this, 8); - return baseline; - } - - public Baseline getBaseline9() { - Baseline baseline = new Baseline(this, 9); - return baseline; - } - - public float getComplexity() { - synchronized(objectMutex) { - return (float) baseline3.get("complexity"); - } - } - - public void setComplexity(float complexity) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("complexity", complexity); - } - - if (baseline3 != null) { - notifyClients(buffer, true); - } - } - - public Stf getStf() { - return (Stf) baseline3.get("stf"); - } - - public void setStfFilename(String stfFilename) { - super.setStfFilename(stfFilename); - - if (baseline3 != null) { - IoBuffer buffer; - - getStf().setStfFilename(stfFilename); - - synchronized(objectMutex) { - buffer = baseline3.set("stf", getStf()); - } - - if (baseline3 != null) { - notifyClients(buffer, true); - } - } - } - - public int getStfSpacer() { - synchronized(objectMutex) { - return ((Stf) baseline3.get("stf")).getSpacer(); - } - } - - public void setStfSpacer(int stfSpacer) { - IoBuffer buffer; - - getStf().setSpacer(stfSpacer); - - synchronized(objectMutex) { - buffer = baseline3.set("stf", getStf()); - } - - if (baseline3 != null) { - notifyClients(buffer, true); - } - } - - public void setStfName(String stfName) { - super.setStfName(stfName); - - if (baseline3 != null) { - IoBuffer buffer; - - getStf().setStfName(stfName); - - synchronized(objectMutex) { - buffer = baseline3.set("stf", getStf()); - } - - if (baseline3 != null) { - notifyClients(buffer, true); - } - } - } - - public void setCustomName(String customName) { - super.setCustomName(customName); - - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("customName", customName); - } - - if (baseline3 != null) { - notifyClients(buffer, true); - } - } - - public void setVolume(int volume) { - super.setVolume(volume); - - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("volume", volume); - } - - if (baseline3 != null) { - notifyClients(buffer, true); - } - } - - public void incrementVolume(int increase) { - setVolume((getVolume() + increase)); - } - - public void decrementVolume(int decrease) { - setVolume((((getVolume() - decrease) < 1) ? 0 : (getVolume() - decrease))); - } - - public int getServerId() { - synchronized(objectMutex) { - return (int) baseline6.get("serverId"); - } - } - - public void setServerId(int serverId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("serverId", serverId); - } - - if (baseline6 != null) { - notifyClients(buffer, true); - } - } - - public Stf getDetail() { - return (Stf) baseline3.get("detail"); - } - - public void setDetailFilename(String detailFilename) { - super.setDetailFilename(detailFilename); - - if (baseline6 != null) { - IoBuffer buffer; - - getDetail().setStfFilename(detailFilename); - - synchronized(objectMutex) { - buffer = baseline6.set("detail", getDetail()); - } - - if (baseline6 != null) { - notifyClients(buffer, true); - } - } - } - - public int getDetailSpacer() { - synchronized(objectMutex) { - return ((Stf) baseline6.get("detail")).getSpacer(); - } - } - - public void setDetailSpacer(int detailSpacer) { - IoBuffer buffer; - - getDetail().setSpacer(detailSpacer); - - synchronized(objectMutex) { - buffer = baseline6.set("detail", getDetail()); - } - - if (baseline6 != null) { - notifyClients(buffer, true); - } - } - - public void setDetailName(String detailName) { - super.setDetailName(detailName); - - if (baseline6 != null) { - IoBuffer buffer; - - getDetail().setStfName(detailName); - - synchronized(objectMutex) { - buffer = baseline6.set("detail", getDetail()); - } - - if (baseline6 != null) { - notifyClients(buffer, true); - } - } - } - - protected Baseline getBaseline(int viewType) { - switch (viewType) { - case 1: return baseline1; - case 3: return baseline3; - case 4: return baseline4; - case 6: return baseline6; - case 7: return baseline7; - case 8: return baseline8; - case 9: return baseline9; - default: return null; - } - } - - /* - This should contain the method of notifying observers, as - it tends to vary depending on the type of object, which is - a problem for inheritance when the master object uses a - different method (ie. ITNO and PLAY). - */ - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, notifySelf); - } - - public ObjectMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new ObjectMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - destination.getSession().write(baseline3.getBaseline()); - destination.getSession().write(baseline6.getBaseline()); - } - } - - public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { - switch (viewType) { - case 1: - case 4: - case 7: - if (getClient() != null) { - buffer = getBaseline(viewType).createDelta(updateType, buffer.array()); - getClient().getSession().write(buffer); - } - - return; - case 3: - case 6: - case 8: - case 9: - notifyClients(getBaseline(viewType).createDelta(updateType, buffer.array()), true); - default: - return; - } - } - -} diff --git a/src/resources/z/exp/objects/player/PlayerMessageBuilder.java b/src/resources/z/exp/objects/player/PlayerMessageBuilder.java deleted file mode 100644 index f4886ec9..00000000 --- a/src/resources/z/exp/objects/player/PlayerMessageBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.player; - -import java.util.Map; - -import com.sleepycat.persist.model.Persistent; - -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.intangible.IntangibleMessageBuilder; - -@Persistent -public class PlayerMessageBuilder extends IntangibleMessageBuilder { - - public PlayerMessageBuilder(PlayerObject playerObject) { - super(playerObject); - } - - public PlayerMessageBuilder() { - super(); - } - - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); - } - - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); - } - - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - -} diff --git a/src/resources/z/exp/objects/player/PlayerObject.java b/src/resources/z/exp/objects/player/PlayerObject.java deleted file mode 100644 index df7284b0..00000000 --- a/src/resources/z/exp/objects/player/PlayerObject.java +++ /dev/null @@ -1,999 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.player; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.List; -import java.util.Locale; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.datatables.Professions; -import resources.z.exp.gcw.RegionDefender; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.SWGList; -import resources.z.exp.objects.SWGMap; -import resources.z.exp.objects.intangible.IntangibleObject; -import resources.z.exp.objects.waypoint.WaypointObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import resources.z.exp.craft.DraftSchematic; -import resources.z.exp.quest.Quest; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class PlayerObject extends IntangibleObject { - - @NotPersistent - private PlayerMessageBuilder messageBuilder; - - @NotPersistent - private long lastPlayTimeUpdate = System.currentTimeMillis(); - - public PlayerObject(long objectID, Planet planet) { - super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), "object/player/shared_player.iff"); - setServerId(0x8A); - } - - public PlayerObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - List flagsList = new ArrayList(); - flagsList.add(0); - flagsList.add(0); - flagsList.add(0); - flagsList.add(0); - baseline.put("flagsList", flagsList); - List profileFlagsList = new ArrayList(); - profileFlagsList.add(0); - profileFlagsList.add(0); - profileFlagsList.add(0); - profileFlagsList.add(0); - baseline.put("profileFlagsList", profileFlagsList); - baseline.put("title", ""); - baseline.put("bornDate", Integer.parseInt(new SimpleDateFormat("yyyymmdd", Locale.ENGLISH).format(Calendar.getInstance().getTime()))); - baseline.put("totalPlayTime", 0); - baseline.put("professionIcon", 0); - baseline.put("profession", "trader_1a"); - baseline.put("gcwPoints", 0); - baseline.put("pvpKills", 0); - baseline.put("lifetimeGcwPoints", (long) 0); - baseline.put("lifetimePvpKills", 0); - baseline.put("16", new SWGList(this, 3, 16, false)); // Misc data size (varies, 0 in tutorial) <- collections?) <- this isn't a SWGList, but it'll work until we need it - baseline.put("17", new SWGList(this, 3, 17, false)); // Misc ints (2 ints in tutorial, 5 bytes other times...) - baseline.put("18", (byte) 0); // Unknown Flag (regularly changed in tutorial) - baseline.put("19", (byte) 0); // Unknown Flag (regularly changed in tutorial) - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("adminFlags", (byte) 0); - baseline.put("currentRank", 0); - baseline.put("rankProgress", (float) 0); - baseline.put("highestRebelRank", 0); - baseline.put("highestImperialRank", 0); - baseline.put("nextUpdateTime", 0); // TODO set correctly - baseline.put("home", ""); - baseline.put("citizenship", (byte) 0); // Homeless/Citizen/Militia/Mayor? - baseline.put("cityRegionDefender", new RegionDefender()); - baseline.put("guildRegionDefender", new RegionDefender()); - baseline.put("12", 0); // General? - baseline.put("13", 0); // Guild Rank Title? - baseline.put("14", 0); // Citizen Rank Title? - baseline.put("15", 0); // All random guesses, always seem to be 0 - baseline.put("16", 0); - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - baseline.put("xpList", new SWGMap(this, 8, 0, true)); - baseline.put("waypoints", new SWGMap(this, 8, 1, true)); - baseline.put("currentForcePower", 100); - baseline.put("maxForcePower", 100); - baseline.put("currentFSQuestList", new SWGList(this, 8, 4, false)); - baseline.put("completedFSQuestList", new SWGList(this, 8, 5, false)); - baseline.put("questJournal", new SWGList(this, 8, 6, false)); - baseline.put("professionWheelPosition", ""); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - baseline.put("experimentationFlag", 0); - baseline.put("craftingStage", 0); - baseline.put("nearestCraftingStation", 0); - baseline.put("draftSchematicList", new SWGList(this, 9, 3, true)); - baseline.put("4", new SWGList(this, 9, 4, false)); // Might or might not be a list, but at the very least it's two 0 ints that are part of the same delta. - baseline.put("experimentationPoints", 0); - baseline.put("accomplishmentCounter", 0); - baseline.put("friendList", new SWGList(this, 9, 7, false)); - baseline.put("ignoreList", new SWGList(this, 9, 8, false)); - baseline.put("languageId", 0); - baseline.put("currentStomach", 0); - baseline.put("maxStomach", 100); - baseline.put("currentDrink", 0); - baseline.put("maxDrink", 100); - baseline.put("currentConsumable", 0); - baseline.put("maxConsumable", 100); - // The others are unknown, commented below. - // it won't send the rest and won't have to by using a lower object count. - // If we figure all these structs out all we have to do is add them the - // same way as above - /* - buffer.putInt(0); // Related to stomach in CU - buffer.putInt(0); // Related to stomach in CU - buffer.putInt(0); // Been seen as 0x0A - buffer.putInt(3); // Also been seen as 0x0A and 0x02 and 0x18 - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); // Unused Waypoint List? - buffer.putInt(0); // Update Counter? - buffer.putInt(2); // Unknown, sometimes a number and sometimes 0 - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(0); - buffer.putInt(object.getJediState()); - buffer.putShort((short) 0); - */ - return baseline; - } - - @SuppressWarnings("unchecked") - public List getFlagsList() { - return (List) baseline3.get("flagsList"); - } - - public void setFlagsList(int flag1, int flag2, int flag3, int flag4) { - IoBuffer buffer; - - synchronized(objectMutex) { - List flagsList = getFlagsList(); - flagsList.set(0, flag1); - flagsList.set(1, flag2); - flagsList.set(2, flag3); - flagsList.set(3, flag4); - buffer = baseline3.set("flagsList", flagsList); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - @SuppressWarnings("unchecked") - public List getProfileFlagsList() { - return (List) baseline3.get("profileFlagsList"); - } - - public void setProfileFlagsList(int flag1, int flag2, int flag3, int flag4) { - IoBuffer buffer; - - synchronized(objectMutex) { - List profileFlagsList = getProfileFlagsList(); - profileFlagsList.set(0, flag1); - profileFlagsList.set(1, flag2); - profileFlagsList.set(2, flag3); - profileFlagsList.set(3, flag4); - buffer = baseline3.set("profileFlagsList", profileFlagsList); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public String getTitle() { - synchronized(objectMutex) { - return (String) baseline3.get("title"); - } - } - - public void setTitle(String title) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("title", title); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getBornDate() { - synchronized(objectMutex) { - return (int) baseline3.get("bornDate"); - } - } - - public long getLastPlayTimeUpdate() { - synchronized(objectMutex) { - return (long) baseline3.get("lastPlayTimeUpdate"); - } - } - - public void setLastPlayTimeUpdate(long lastPlayTimeUpdate) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("lastPlayTimeUpdate", lastPlayTimeUpdate); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getTotalPlayTime() { - synchronized(objectMutex) { - return (int) baseline3.get("totalPlayTime"); - } - } - - public void setTotalPlayTime(int totalPlayTime) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("totalPlayTime", totalPlayTime); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getProfessionIcon() { - synchronized(objectMutex) { - return (int) baseline3.get("professionIcon"); - } - } - - public void setProfessionIcon(int professionIcon) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("professionIcon", professionIcon); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public String getProfession() { - synchronized(objectMutex) { - return (String) baseline3.get("profession"); - } - } - - public void setProfession(String profession) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("profession", profession); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - - setProfessionIcon(Professions.get(profession)); - } - - public int getGcwPoints() { - synchronized(objectMutex) { - return (int) baseline3.get("gcwPoints"); - } - } - - public void addGcwPoints(int gcwPoints) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("gcwPoints", (((int) baseline3.get("gcwPoints")) + gcwPoints)); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public void resetGcwPoints() { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("gcwPoints", 0); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getPvpKills() { - synchronized(objectMutex) { - return (int) baseline3.get("pvpKills"); - } - } - - public void addPvpKill() { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("pvpKills", (((int) baseline3.get("pvpKills")) + 1)); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public void resetPvpKills() { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("pvpKills", 0); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public long getLifetimeGcwPoints() { - synchronized(objectMutex) { - return (long) baseline3.get("lifetimeGcwPoints"); - } - } - - public void addLifetimeGcwPoints(long gcwPoints) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("lifetimeGcwPoints", (((long) baseline3.get("lifetimeGcwPoints")) + gcwPoints)); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getLifetimePvpKills() { - synchronized(objectMutex) { - return (int) baseline3.get("lifetimePvpKills"); - } - } - - public void addLifetimePvpKills(int pvpKills) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("lifetimePvpKills", (((int) baseline3.get("lifetimePvpKills")) + pvpKills)); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public byte getAdminFlag() { - synchronized(objectMutex) { - return (byte) baseline6.get("adminFlag"); - } - } - - public void setAdminFlag(byte adminFlag) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("adminFlag", adminFlag); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getCurrentRank() { - synchronized(objectMutex) { - return (int) baseline6.get("currentRank"); - } - } - - public void setCurrentRank(int currentRank) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("currentRank", currentRank); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public float getRankProgress() { - synchronized(objectMutex) { - return (float) baseline6.get("rankProgress"); - } - } - - public void setRankProgress(float rankProgress) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("rankProgress", rankProgress); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getHighestRebelRank() { - synchronized(objectMutex) { - return (int) baseline6.get("highestRebelRank"); - } - } - - public void setHighestIRank(int highestRebelRank) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("highestRebelRank", highestRebelRank); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getHighestImperialRank() { - synchronized(objectMutex) { - return (int) baseline6.get("highestImperialRank"); - } - } - - public void setHighestImperialRank(int highestImperialRank) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("highestImperialRank", highestImperialRank); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getNextUpdateTime() { - synchronized(objectMutex) { - return (int) baseline6.get("nextUpdateTime"); - } - } - - public void setNextUpdateTime(int nextUpdateTime) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("nextUpdateTime", nextUpdateTime); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public String getHome() { - synchronized(objectMutex) { - return (String) baseline6.get("home"); - } - } - - public void setHome(String home) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("home", home); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public byte getCitizenship() { - synchronized(objectMutex) { - return (byte) baseline6.get("citizenship"); - } - } - - public void setCitizenship(byte citizenship) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("citizenship", citizenship); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public RegionDefender getCityRegionDefender() { - synchronized(objectMutex) { - return (RegionDefender) baseline6.get("cityRegionDefender"); - } - } - - public void setCityRegionDefender(RegionDefender cityRegionDefender) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("cityRegionDefender", cityRegionDefender); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public RegionDefender getGuildRegionDefender() { - synchronized(objectMutex) { - return (RegionDefender) baseline6.get("guildRegionDefender"); - } - } - - public void setGuildRegionDefender(RegionDefender guildRegionDefender) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("guildRegionDefender", guildRegionDefender); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - @SuppressWarnings("unchecked") - public SWGMap getXpList() { - return (SWGMap) baseline8.get("xpList"); - } - - @SuppressWarnings("unchecked") - public SWGMap getWaypoints() { - return (SWGMap) baseline8.get("waypoints"); - } - - public void waypointUpdate(WaypointObject waypoint) { - getWaypoints().put(waypoint.getObjectID(), waypoint); - } - - public void waypointRemove(WaypointObject waypoint) { - getWaypoints().remove(waypoint.getObjectID()); - } - - public void waypointAdd(WaypointObject waypoint) { - getWaypoints().put(waypoint.getObjectID(), waypoint); - } - - public WaypointObject getWaypointFromList(WaypointObject waypoint) { - synchronized(objectMutex) { - if (getWaypoints().containsKey(waypoint.getObjectID())) { - return getWaypoints().get(waypoint.getObjectID()); - } - } - - return null; - } - - public int getCurrentForcePower() { - synchronized(objectMutex) { - return (int) baseline8.get("currentForcePower"); - } - } - - public void setCurrentForcePower(int currentForcePower) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline8.set("currentForcePower", currentForcePower); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getMaxForcePower() { - synchronized(objectMutex) { - return (int) baseline8.get("maxForcePower"); - } - } - - public void setMaxForcePower(int maxForcePower) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline8.set("maxForcePower", maxForcePower); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - @SuppressWarnings("unchecked") - public SWGList getCurrentFSQuestList() { - return (SWGList) baseline8.get("currentFSQuestList"); - } - - @SuppressWarnings("unchecked") - public SWGList getCompletedFSQuestList() { - return (SWGList) baseline8.get("completedFSQuestList"); - } - - @SuppressWarnings("unchecked") - public SWGList getQuestJournal() { - return (SWGList) baseline8.get("questJournal"); - } - - public String getProfessionWheelPosition() { - synchronized(objectMutex) { - return (String) baseline8.get("professionWheelPosition"); - } - } - - public void setProfessionWheelPosition(String professionWheelPosition) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline8.set("professionWheelPosition", professionWheelPosition); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getExperimentationFlag() { - synchronized(objectMutex) { - return (int) baseline9.get("experimentationFlag"); - } - } - - public void setExperimentationFlag(int experimentationFlag) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("experimentationFlag", experimentationFlag); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getCraftingStage() { - synchronized(objectMutex) { - return (int) baseline9.get("craftingStage"); - } - } - - public void setCraftingStage(int craftingStage) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("craftingStage", craftingStage); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public long getNearestCraftingStation() { - synchronized(objectMutex) { - return (long) baseline9.get("nearestCraftingStation"); - } - } - - public void setNearestCraftingStation(long nearestCraftingStation) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("nearestCraftingStation", nearestCraftingStation); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - @SuppressWarnings("unchecked") - public SWGList getDraftSchematicList() { - return (SWGList) baseline9.get("draftSchematicList"); - } - - public int getExperimentationPoints() { - synchronized(objectMutex) { - return (int) baseline9.get("experimentationPoints"); - } - } - - public void setExperimentationPoints(int experimentationPoints) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("experimentationPoints", experimentationPoints); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getAccomplishmentCounter() { - synchronized(objectMutex) { - return (int) baseline9.get("accomplishmentCounter"); - } - } - - public void setAccomplishmentCounter(int accomplishmentCounter) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("accomplishmentCounter", accomplishmentCounter); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - @SuppressWarnings("unchecked") - public SWGList getFriendList() { - return (SWGList) baseline9.get("friendList"); - } - - public void friendAdd(String friend) { - getFriendList().add(friend); - } - - public void friendRemove(String friend) { - getFriendList().remove(friend); - } - - @SuppressWarnings("unchecked") - public SWGList getIgnoreList() { - return (SWGList) baseline9.get("ignoreList"); - } - - public void ignoreAdd(String name) { - getIgnoreList().add(name); - } - - public void ignoreRemove(String name) { - getIgnoreList().remove(name); - } - - public int getLanguageId() { - synchronized(objectMutex) { - return (int) baseline9.get("languageId"); - } - } - - public void setLanguageId(int languageId) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("languageId", languageId); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getCurrentStomach() { - synchronized(objectMutex) { - return (int) baseline9.get("currentStomach"); - } - } - - public void setCurrentStomach(int currentStomach) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("currentStomach", currentStomach); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getMaxStomach() { - synchronized(objectMutex) { - return (int) baseline9.get("maxStomach"); - } - } - - public void setMaxStomach(int maxStomach) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("maxStomach", maxStomach); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getCurrentDrink() { - synchronized(objectMutex) { - return (int) baseline9.get("currentDrink"); - } - } - - public void setCurrentDrink(int currentDrink) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("currentDrink", currentDrink); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getMaxDrink() { - synchronized(objectMutex) { - return (int) baseline9.get("maxDrink"); - } - } - - public void setMaxDrink(int maxDrink) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("maxDrink", maxDrink); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getCurrentConsumable() { - synchronized(objectMutex) { - return (int) baseline9.get("currentConsumable"); - } - } - - public void setCurrentConsumable(int currentConsumable) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("currentConsumable", currentConsumable); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - public int getMaxConsumable() { - synchronized(objectMutex) { - return (int) baseline9.get("maxConsumable"); - } - } - - public void setMaxConsumable(int maxConsumable) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline9.set("maxConsumable", maxConsumable); - } - - if (getContainer() != null) { - getContainer().notifyObservers(buffer, true); - } - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - if (getContainer() != null) { - getContainer().notifyObservers(buffer, notifySelf); - } - } - - @Override - public PlayerMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new PlayerMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //if(destination.getParent().getObjectID() == getParentId()) { // only send to self - //destination.getSession().write(getBaseline(3).getBaseline()); - //destination.getSession().write(getBaseline(6).getBaseline()); - //destination.getSession().write(getBaseline(8).getBaseline()); - //destination.getSession().write(getBaseline(9).getBaseline()); - //} - } - } - - @Override - public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { - if (getContainer() != null) { - getContainer().notifyObservers(getBaseline(viewType).createDelta(updateType, buffer.array()), true); - } - } - -} diff --git a/src/resources/z/exp/objects/resource/ResourceContainerMessageBuilder.java b/src/resources/z/exp/objects/resource/ResourceContainerMessageBuilder.java deleted file mode 100644 index 10450243..00000000 --- a/src/resources/z/exp/objects/resource/ResourceContainerMessageBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.resource; - -public class ResourceContainerMessageBuilder { - -} diff --git a/src/resources/z/exp/objects/resource/ResourceContainerObject.java b/src/resources/z/exp/objects/resource/ResourceContainerObject.java deleted file mode 100644 index a3ef31ad..00000000 --- a/src/resources/z/exp/objects/resource/ResourceContainerObject.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.resource; - -public class ResourceContainerObject { - -} diff --git a/src/resources/z/exp/objects/ship/ShipMessageBuilder.java b/src/resources/z/exp/objects/ship/ShipMessageBuilder.java deleted file mode 100644 index a1a8de8e..00000000 --- a/src/resources/z/exp/objects/ship/ShipMessageBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.ship; - -public class ShipMessageBuilder { - -} diff --git a/src/resources/z/exp/objects/ship/ShipObject.java b/src/resources/z/exp/objects/ship/ShipObject.java deleted file mode 100644 index 5789f04d..00000000 --- a/src/resources/z/exp/objects/ship/ShipObject.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.ship; - -public class ShipObject { - -} diff --git a/src/resources/z/exp/objects/staticobject/StaticObject.java b/src/resources/z/exp/objects/staticobject/StaticObject.java deleted file mode 100644 index 309be323..00000000 --- a/src/resources/z/exp/objects/staticobject/StaticObject.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.staticobject; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class StaticObject extends BaseObject { - - @NotPersistent - private StaticMessageBuilder messageBuilder; - - public StaticObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - } - - public StaticObject() { - super(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - return baseline; - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, false); - } - - @Override - public StaticMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new StaticMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - } - } - -} diff --git a/src/resources/z/exp/objects/tangible/TangibleMessageBuilder.java b/src/resources/z/exp/objects/tangible/TangibleMessageBuilder.java deleted file mode 100644 index 0575128c..00000000 --- a/src/resources/z/exp/objects/tangible/TangibleMessageBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* -` * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.tangible; - -import java.util.Map; - -import com.sleepycat.persist.model.Persistent; - -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.ObjectMessageBuilder; - -@Persistent -public class TangibleMessageBuilder extends ObjectMessageBuilder { - - public TangibleMessageBuilder(TangibleObject object) { - super(object); - } - - public TangibleMessageBuilder() { - super(); - } - - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - -} diff --git a/src/resources/z/exp/objects/tangible/TangibleObject.java b/src/resources/z/exp/objects/tangible/TangibleObject.java deleted file mode 100644 index 1a54abb6..00000000 --- a/src/resources/z/exp/objects/tangible/TangibleObject.java +++ /dev/null @@ -1,400 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.tangible; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.datatables.FactionStatus; -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.SWGList; -import resources.z.exp.objects.creature.CreatureObject; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.common.CRC; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class TangibleObject extends BaseObject { - - @NotPersistent - private TangibleMessageBuilder messageBuilder; - - @NotPersistent - private List defendersList = new ArrayList(); - - public TangibleObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String template) { - super(objectID, planet, position, orientation, template); - } - - public TangibleObject(long objectID, Planet planet, String template) { - super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(1, 0, 1, 0), template); - } - - public TangibleObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - initializeBaseline(8); - initializeBaseline(9); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - baseline.put("faction", ""); - baseline.put("pvpBitmask", 0); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("faction", 0); - baseline.put("factionStatus", 0); - baseline.put("customization", new Byte[] { 0x00, 0x00 }); - baseline.put("componentCustomizationList", new SWGList(this, 3, 7, false)); - baseline.put("optionsBitmask", 0); - baseline.put("incapacityTimer", 0); - baseline.put("conditionDamage", 0); - baseline.put("maximumCondition", 0); - baseline.put("isStatic", false); - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("inCombat", false); - baseline.put("3", (long) 0); // Unknown - baseline.put("4", (long) 0); // Unknown - baseline.put("5", (long) 0); // Unknown - baseline.put("6", (long) 0); // Unknown - baseline.put("7", 0); // Unknown - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - return baseline; - } - - public String getFaction() { - synchronized(objectMutex) { - return (String) otherVariables.get("faction"); - } - } - - public void setFaction(String faction) { - IoBuffer buffer; - - synchronized(objectMutex) { - otherVariables.set("faction", faction); - buffer = baseline3.set("faction", CRC.StringtoCRC(faction)); - } - - notifyClients(buffer, true); - } - - public int getFactionStatus() { - synchronized(objectMutex) { - return (int) baseline3.get("factionStatus"); - } - } - - public void setFactionStatus(int factionStatus) { - switch (factionStatus) { - case FactionStatus.OnLeave: - case FactionStatus.Combatant: - case FactionStatus.SpecialForces: - break; - default: - factionStatus = 0; - } - - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("factionStatus", factionStatus); - } - - notifyClients(buffer, true); - } - - public byte[] getCustomization() { - synchronized(objectMutex) { - return (byte[]) baseline3.get("customization"); - } - } - - public void setCustomization(byte[] customization) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("customization", customization); - } - - notifyClients(buffer, true); - } - - @SuppressWarnings("unchecked") - public SWGList getComponentCustomizationList() { - return (SWGList) baseline3.get("componentCustomizationList"); - } - - public int getOptionsBitmask() { - synchronized(objectMutex) { - return (int) baseline3.get("optionsBitmask"); - } - } - - public void setOptionsBitmask(int optionsBitmask) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("optionsBitmask", optionsBitmask); - } - - notifyClients(buffer, true); - } - - public int getIncapacityTimer() { - synchronized(objectMutex) { - return (int) baseline3.get("incapacityTimer"); - } - } - - public void setIncapacityTimer(int incapacityTimer) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("incapacityTimer", incapacityTimer); - } - - notifyClients(buffer, true); - } - - public int getConditionDamage() { - synchronized(objectMutex) { - return (int) baseline3.get("conditionDamage"); - } - } - - public void setConditionDamage(int conditionDamage) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("conditionDamage", conditionDamage); - } - - notifyClients(buffer, true); - } - - public int getMaximumCondition() { - synchronized(objectMutex) { - return (int) baseline3.get("maximumCondition"); - } - } - - public void setMaximumCondition(int maximumCondition) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("maximumCondition", maximumCondition); - } - - notifyClients(buffer, true); - } - - public boolean isStatic() { - synchronized(objectMutex) { - return (boolean) baseline3.get("isStatic"); - } - } - - public void setStatic(boolean isStatic) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("isStatic", isStatic); - } - - notifyClients(buffer, true); - } - - public void toggleStatic() { - setStatic(!isStatic()); - } - - public boolean inCombat() { - synchronized(objectMutex) { - return (boolean) baseline6.get("inCombat"); - } - } - - public void setInCombat(boolean inCombat) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline6.set("inCombat", inCombat); - } - - notifyClients(buffer, true); - } - - public void toggleCombat() { - setInCombat(!inCombat()); - } - - public List getDefendersList() { - return defendersList; - } - - // All objects can be in combat (terminal mission flag bases, tutorial target box) - public void addDefender(TangibleObject defender) { - defendersList.add(defender); - - if (!inCombat()) { - setInCombat(true); - } - } - - public void removeDefender(TangibleObject defender) { - defendersList.remove(defender); - - if (defendersList.isEmpty() && inCombat()) { - setInCombat(false); - } - } - - public int getPvPBitmask() { - synchronized(objectMutex) { - return (int) otherVariables.get("pvpBitmask"); - } - } - - public void setPvPBitmask(int pvpBitmask) { - synchronized(objectMutex) { - otherVariables.set("pvpBitmask", pvpBitmask); - } - } - - public boolean isAttackableBy(CreatureObject attacker) { - CreatureObject creature; - - if (this instanceof CreatureObject) { - creature = (CreatureObject) this; - - if (creature.getDuelList().contains(attacker) && attacker.getDuelList().contains(this)) { - return true; - } - } - - if (getFaction().equals("rebel") && attacker.getFaction().equals("rebel")) { - return false; - } else if (getFaction().equals("imperial") && attacker.getFaction().equals("imperial")) { - return false; - } else if(attacker.getSlottedObject("ghost") != null) { - if (this instanceof CreatureObject && getSlottedObject("ghost") != null) { - creature = (CreatureObject) this; - - if (creature.getFactionStatus() == 2 && attacker.getFactionStatus() == 2) { - return true; - } else { - return false; - } - } - - if ((getFaction().equals("rebel") || getFaction().equals("imperial")) && attacker.getFactionStatus() >= 1) { - return true; - } else if ((getFaction().equals("rebel") || getFaction().equals("imperial")) && attacker.getFactionStatus() == 0) { - return false; - } - - return getPvPBitmask() == 1 || getPvPBitmask() == 2; - } - - return getPvPBitmask() == 1 || getPvPBitmask() == 2; - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, false); - } - - @Override - public TangibleMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new TangibleMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - //destination.getSession().write(baseline8.getBaseline()); - //destination.getSession().write(baseline9.getBaseline()); - } - } - - @Override - public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) { - switch (viewType) { - case 3: - { - switch (updateType) { - case 7: - { - buffer = baseline3.createDelta(7, buffer.array()); - notifyClients(buffer, true); - break; - } - } - } - } - } - -} diff --git a/src/resources/z/exp/objects/universe/UniverseObject.java b/src/resources/z/exp/objects/universe/UniverseObject.java deleted file mode 100644 index e01bbf1e..00000000 --- a/src/resources/z/exp/objects/universe/UniverseObject.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.universe; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.object.BaseObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class UniverseObject extends BaseObject { - - @NotPersistent - private UniverseMessageBuilder messageBuilder; - - public UniverseObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, position, orientation, Template); - } - - public UniverseObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - return baseline; - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, false); - } - - @Override - public UniverseMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new UniverseMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - - } - -} diff --git a/src/resources/z/exp/objects/waypoint/WaypointObject.java b/src/resources/z/exp/objects/waypoint/WaypointObject.java deleted file mode 100644 index 6539e172..00000000 --- a/src/resources/z/exp/objects/waypoint/WaypointObject.java +++ /dev/null @@ -1,172 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.waypoint; - -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.common.StringUtilities; -import resources.objects.IDelta; -import resources.z.exp.objects.intangible.IntangibleObject; -import resources.z.exp.objects.Baseline; - -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent(version=0) -public class WaypointObject extends IntangibleObject implements IDelta { - - public static final byte BLUE, GREEN, ORANGE, YELLOW, PURPLE, WHITE, MULTICOLOR; - - static { - BLUE = 1; - GREEN = 2; - ORANGE = 3; - YELLOW = 4; - PURPLE = 5; - WHITE = 6; - MULTICOLOR = 7; - }; - - // WAYP 3 - private int cellId; - //private Point3D position = new Point3D(0, 0, 0); - private long targetId = 0; - private int planetCrc = 0; - private String name = "Waypoint"; - //private long waypointId = 0; - private byte color = 1; - private boolean isActive = false; - - public WaypointObject(long objectID, Planet planet, Point3D position) { - super(objectID, planet, position, new Quaternion(0, 0, 0, 1), "object/waypoint/shared_waypoint.iff"); - } - - public WaypointObject() { - super(); - } - - public int getCellId() { - synchronized(objectMutex) { - return cellId; - } - } - - public void setCellId(int cellId) { - synchronized(objectMutex) { - this.cellId = cellId; - } - } - - public long getTargetId() { - synchronized(objectMutex) { - return targetId; - } - } - - public void setTargetId(long targetId) { - synchronized(objectMutex) { - this.targetId = targetId; - } - } - - public int getPlanetCrc() { - synchronized(objectMutex) { - return planetCrc; - } - } - - public void setPlanetCrc(int planetCrc) { - synchronized(objectMutex) { - this.planetCrc = planetCrc; - } - } - - public String getName() { - synchronized(objectMutex) { - return name; - } - } - - public void setName(String name) { - synchronized(objectMutex) { - this.name = name; - } - } - - public byte getColor() { - synchronized(objectMutex) { - return color; - } - } - - public void setColor(byte color) { - synchronized(objectMutex) { - this.color = color; - } - } - - public boolean isActive() { - synchronized(objectMutex) { - return isActive; - } - } - - public void setActive(boolean isActive) { - synchronized(objectMutex) { - this.isActive = isActive; - } - } - - public void toggleActive() { - setActive(!isActive()); - } - - @Override - public void sendBaselines(Client destination) { - - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = IoBuffer.allocate(42, false).order(ByteOrder.LITTLE_ENDIAN).setAutoExpand(true); - buffer.putInt(cellId); - buffer.putFloat(getPosition().x); - buffer.putFloat(getPosition().y); - buffer.putFloat(getPosition().z); - buffer.putLong(targetId); - buffer.putInt(planetCrc); - buffer.put(StringUtilities.getUnicodeString(name)); - buffer.putLong(getObjectID()); - buffer.put(color); - buffer.put(Baseline.getBoolean(isActive)); - buffer.flip(); - return buffer.array(); - } - } - -} diff --git a/src/resources/z/exp/objects/weapon/WeaponMessageBuilder.java b/src/resources/z/exp/objects/weapon/WeaponMessageBuilder.java deleted file mode 100644 index 860f5bd2..00000000 --- a/src/resources/z/exp/objects/weapon/WeaponMessageBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.weapon; - -import java.util.Map; - -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.tangible.TangibleMessageBuilder; - -public class WeaponMessageBuilder extends TangibleMessageBuilder { - - public WeaponMessageBuilder(WeaponObject weaponObject) { - super(weaponObject); - } - - public WeaponMessageBuilder() { - super(); - } - - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); - - baselineBuilders.put(13, new Builder() { - - public byte[] build() { - return Baseline.createBuffer(4).putInt(((WeaponObject) object).getWeaponType()).array(); - } - - }); - - deltaBuilders.put(13, new Builder() { - - public byte[] build() { - return Baseline.createBuffer(4).putInt(((WeaponObject) object).getWeaponType()).array(); - } - - }); - - } - - @Override - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); - } - - @Override - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - -} diff --git a/src/resources/z/exp/objects/weapon/WeaponObject.java b/src/resources/z/exp/objects/weapon/WeaponObject.java deleted file mode 100644 index d1b92a7b..00000000 --- a/src/resources/z/exp/objects/weapon/WeaponObject.java +++ /dev/null @@ -1,246 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.objects.weapon; - -import org.apache.mina.core.buffer.IoBuffer; - -import resources.z.exp.objects.Baseline; -import resources.z.exp.objects.tangible.TangibleObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.clients.Client; -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -@Persistent -public class WeaponObject extends TangibleObject { - - @NotPersistent - private WeaponMessageBuilder messageBuilder; - - public WeaponObject(long objectID, Planet planet, String template) { - super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(1, 0, 1, 0), template); - } - - public WeaponObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String template) { - super(objectID, planet, position, orientation, template); - } - - public WeaponObject() { - super(); - } - - @Override - public void initializeBaselines() { - super.initializeBaselines(); - initializeBaseline(8); - initializeBaseline(9); - } - - @Override - public Baseline getOtherVariables() { - Baseline baseline = super.getOtherVariables(); - baseline.put("maxDamage", 0); - return baseline; - } - - @Override - public Baseline getBaseline3() { - Baseline baseline = super.getBaseline3(); - baseline.put("attackSpeed", (float) 1); - baseline.put("14", 0); - baseline.put("15", 0); - baseline.put("maxRange", calculateRange()); - baseline.put("17", 0); // Could be lightsaber color? Seen as 2 on a saber - baseline.put("18", 0); // something to do with particle color - baseline.put("19", 0); // something to do with particle color - return baseline; - } - - @Override - public Baseline getBaseline6() { - Baseline baseline = super.getBaseline6(); - baseline.put("weaponType", 0); - return baseline; - } - - @Override - public Baseline getBaseline8() { - Baseline baseline = super.getBaseline8(); - return baseline; - } - - @Override - public Baseline getBaseline9() { - Baseline baseline = super.getBaseline9(); - return baseline; - } - - public float getAttackSpeed() { - synchronized(objectMutex) { - return (float) baseline3.get("attackSpeed"); - } - } - - public void setAttackSpeed(float attackSpeed) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("attackSpeed", attackSpeed); - } - - notifyClients(buffer, false); - } - - private float calculateRange() { - int weaponType = getWeaponType(); - - switch (weaponType) { - case 4: - case 5: - case 6: - case 7: - case 9: - case 10: - case 11: - return 5; - case 2: - return 35; - case 1: - return 50; - case 0: - case 3: - case 8: - return 64; - default: - return 0; - } - } - - public float getMaxRange() { - synchronized(objectMutex) { - return (float) baseline3.get("maxRange"); - } - } - - public void setMaxRange(float maxRange) { - IoBuffer buffer; - - synchronized(objectMutex) { - buffer = baseline3.set("maxRange", maxRange); - } - - notifyClients(buffer, false); - } - - public int getWeaponType() { - String template = getTemplate(); - int weaponType = -1; - - synchronized(objectMutex) { - if (template == null) { - return weaponType; - } - - if (template.contains("rifle")) weaponType = 0; - if (template.contains("carbine")) weaponType = 1; - if (template.contains("pistol")) weaponType = 2; - if (template.contains("heavy")) weaponType = 3; - if (template.contains("sword") || template.contains("baton")) weaponType = 4; - if (template.contains("2h_sword") || template.contains("axe")) weaponType = 5; - if (template.contains("unarmed")) weaponType = 6; - if (template.contains("polearm") || template.contains("lance")) weaponType = 7; - if (template.contains("thrown")) weaponType = 8; - if (template.contains("lightsaber_one_handed")) weaponType = 9; - if (template.contains("lightsaber_two_handed")) weaponType = 10; - if (template.contains("lightsaber_polearm")) weaponType = 11; - - if (weaponType == -1) { - weaponType = 6; - } - - return weaponType; - } - } - - public int getMaxDamage() { - synchronized(objectMutex) { - return (int) otherVariables.get("maxDamage"); - } - } - - public void setMaxDamage(int maxDamage) { - synchronized(objectMutex) { - otherVariables.set("maxDamage", maxDamage); - } - } - - public boolean isMelee() { - int weaponType = getWeaponType(); - - if ((weaponType > 4 && weaponType < 8) || (weaponType > 8 && weaponType < 12)) { - return true; - } - - return false; - } - - public boolean isRanged() { - int weaponType = getWeaponType(); - - if (weaponType == 0 || weaponType == 1 || weaponType == 2 || weaponType == 3) { - return true; - } - - return false; - } - - @Override - public void notifyClients(IoBuffer buffer, boolean notifySelf) { - notifyObservers(buffer, notifySelf); - } - - @Override - public WeaponMessageBuilder getMessageBuilder() { - synchronized(objectMutex) { - if (messageBuilder == null) { - messageBuilder = new WeaponMessageBuilder(this); - } - - return messageBuilder; - } - } - - @Override - public void sendBaselines(Client destination) { - if (destination != null && destination.getSession() != null) { - //destination.getSession().write(baseline3.getBaseline()); - //destination.getSession().write(baseline6.getBaseline()); - //destination.getSession().write(baseline8.getBaseline()); - //destination.getSession().write(baseline9.getBaseline()); - } - } - -} diff --git a/src/resources/z/exp/skills/SkillMod.java b/src/resources/z/exp/skills/SkillMod.java deleted file mode 100644 index 82cdb237..00000000 --- a/src/resources/z/exp/skills/SkillMod.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.z.exp.skills; - -import java.nio.ByteOrder; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -import resources.objects.Delta; - -// Proxy for engine.resources.objects.SkillMod so it uses Delta - -@Persistent -public class SkillMod extends Delta { - - private int base = 0; - private int modifier = 0; - - public SkillMod(int base, int modifier) { - engine.resources.objects.SkillMod skillMod = new engine.resources.objects.SkillMod(); - skillMod.setBase(base); - skillMod.setModifier(modifier); - this.base = skillMod.getBase(); - this.modifier = skillMod.getModifier(); - } - - public SkillMod() { - - } - - public int getBase() { - synchronized(objectMutex) { - engine.resources.objects.SkillMod skillMod = new engine.resources.objects.SkillMod(); - skillMod.setBase(base); - skillMod.setModifier(modifier); - return skillMod.getBase(); - } - } - - public void setBase(int base) { - synchronized(objectMutex) { - engine.resources.objects.SkillMod skillMod = new engine.resources.objects.SkillMod(); - skillMod.setBase(this.base); - skillMod.setModifier(modifier); - skillMod.setBase(base); - this.base = skillMod.getBase(); - } - } - - public int getModifier() { - synchronized(objectMutex) { - engine.resources.objects.SkillMod skillMod = new engine.resources.objects.SkillMod(); - skillMod.setBase(base); - skillMod.setModifier(modifier); - return skillMod.getModifier(); - } - } - - public void setModifier(int modifier) { - synchronized(objectMutex) { - engine.resources.objects.SkillMod skillMod = new engine.resources.objects.SkillMod(); - skillMod.setBase(base); - skillMod.setModifier(this.modifier); - skillMod.setModifier(modifier); - this.modifier = skillMod.getModifier(); - } - } - - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = bufferPool.allocate(8, false).order(ByteOrder.LITTLE_ENDIAN); - engine.resources.objects.SkillMod skillMod = new engine.resources.objects.SkillMod(); - skillMod.setBase(base); - skillMod.setModifier(modifier); - buffer.putInt(skillMod.getBase()); - buffer.putInt(skillMod.getModifier()); - return buffer.array(); - } - } - -} diff --git a/src/services/BuffService.java b/src/services/BuffService.java index 76948e89..71f44a0d 100644 --- a/src/services/BuffService.java +++ b/src/services/BuffService.java @@ -1,235 +1,366 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package services; - -import java.util.Map; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; - -import org.python.core.Py; -import org.python.core.PyObject; - -import resources.common.FileUtilities; -import resources.objects.Buff; -import resources.objects.DamageOverTime; -import resources.objects.creature.CreatureObject; -import resources.objects.group.GroupObject; -import resources.objects.player.PlayerObject; -import main.NGECore; -import engine.resources.objects.SWGObject; -import engine.resources.service.INetworkDispatch; -import engine.resources.service.INetworkRemoteEvent; - -public class BuffService implements INetworkDispatch { - - private NGECore core; - private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); - - public BuffService(NGECore core) { - this.core = core; - } - - @Override - public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { - - } - - @Override - public void shutdown() { - - } - - public void addBuffToCreature(final CreatureObject creature, String buffName) { - - /*if(!FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) { - //System.out.println("Buff script doesnt exist for: " + buffName); - return; - }*/ - - final Buff buff = new Buff(buffName, creature.getObjectID()); - if(buff.isGroupBuff()) { - addGroupBuff(creature, buffName); - } else { - doAddBuff(creature, buffName); - } - } - - public Buff doAddBuff(final CreatureObject creature, String buffName) { - - final Buff buff = new Buff(buffName, creature.getObjectID()); - buff.setTotalPlayTime(((PlayerObject) creature.getSlottedObject("ghost")).getTotalPlayTime()); - - - for (final Buff otherBuff : creature.getBuffList()) { - if (buff.getGroup1().equals(otherBuff.getGroup1())) - if (buff.getPriority() >= otherBuff.getPriority()) { - if (buff.getBuffName().equals(otherBuff.getBuffName())) { - - if(otherBuff.getStacks() < otherBuff.getMaxStacks()) { - - buff.setStacks(otherBuff.getStacks() + 1); - if(creature.getDotByBuff(otherBuff) != null) // reset duration when theres a dot stack - creature.getDotByBuff(otherBuff).setStartTime(buff.getStartTime()); - - } else { - buff.setStacks(buff.getMaxStacks()); - } - - if (otherBuff.getRemainingDuration() > buff.getDuration() && otherBuff.getStacks() >= otherBuff.getMaxStacks()) { - return null; - } - } - - removeBuffFromCreature(creature, otherBuff); - break; - } else { - System.out.println("buff not added:" + buffName); - return null; - } - } - - if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) - core.scriptService.callScript("scripts/buffs/", "setup", buffName, core, creature, buff); - - creature.addBuff(buff); - - if(buff.getDuration() > 0) { - - ScheduledFuture task = scheduler.schedule(new Runnable() { - - @Override - public void run() { - - removeBuffFromCreature(creature, buff); - - - } - - }, (long) buff.getDuration(), TimeUnit.SECONDS); - - buff.setRemovalTask(task); - - } - - for (String effect : buff.getParticleEffect().split(",")) { - creature.playEffectObject(effect, buff.getBuffName()); - } - - if (!buff.getCallback().equals("")) { - if (FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) { - scheduler.schedule(new Runnable() { - - @Override - public void run() { - PyObject method = core.scriptService.getMethod("scripts/buffs/", buff.getBuffName(), buff.getCallback()); - - if (method != null && method.isCallable()) { - method.__call__(Py.java2py(core), Py.java2py(creature), Py.java2py(buff)); - } - } - - }, 0, TimeUnit.SECONDS); - } - } - - return buff; - - } - - @SuppressWarnings("unused") - public void removeBuffFromCreature(CreatureObject creature, Buff buff) { - - if(!creature.getBuffList().contains(buff)) - return; - DamageOverTime dot = creature.getDotByBuff(buff); - if(dot != null) { - dot.getTask().cancel(true); - creature.removeDot(dot); - } - if(FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) - core.scriptService.callScript("scripts/buffs/", "removeBuff", buff.getBuffName(), core, creature, buff); - creature.removeBuff(buff); - - for (String effect : buff.getParticleEffect().split(",")) { - creature.stopEffectObject(buff.getBuffName()); - } - - - } - - public void clearBuffs(final CreatureObject creature) { - - // copy to array for thread safety - - for(final Buff buff : creature.getBuffList().get().toArray(new Buff[] { })) { - - if (buff.getGroup1().startsWith("setBonus")) { continue; } - - if(buff.isGroupBuff() && buff.getGroupBufferId() != creature.getObjectID()) { - removeBuffFromCreature(creature, buff); - continue; - } - - if(buff.getRemainingDuration() > 0 && buff.getDuration() > 0) { - ScheduledFuture task = scheduler.schedule(new Runnable() { - - @Override - public void run() { - - removeBuffFromCreature(creature, buff); - - } - - }, (long) buff.getRemainingDuration(), TimeUnit.SECONDS); - buff.setRemovalTask(task); - continue; - } else { - removeBuffFromCreature(creature, buff); - } - - } - - } - - public void addGroupBuff(final CreatureObject buffer, String buffName) { - - if(buffer.getGroupId() == 0) { - doAddBuff(buffer, buffName); - return; - } - - GroupObject group = (GroupObject) core.objectService.getObject(buffer.getGroupId()); - - if(group == null) { - doAddBuff(buffer, buffName); - return; - } - - for(SWGObject member : group.getMemberList()) { - Buff buff = doAddBuff((CreatureObject) member, buffName); - buff.setGroupBufferId(buffer.getObjectID()); - } - - } -} +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +import org.python.core.Py; +import org.python.core.PyObject; + +import resources.common.FileUtilities; +import resources.objects.Buff; +import resources.objects.DamageOverTime; +import resources.objects.creature.CreatureObject; +import resources.objects.group.GroupObject; +import resources.objects.player.PlayerObject; +import main.NGECore; +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; +import engine.resources.common.CRC; +import engine.resources.objects.SWGObject; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +public class BuffService implements INetworkDispatch { + + private NGECore core; + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); + private ConcurrentHashMap buffMap = new ConcurrentHashMap(); + + public BuffService(NGECore core) { + this.core = core; + core.commandService.registerCommand("removeBuff"); + + loadBuffs(); + } + + @Override + public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + + } + + @Override + public void shutdown() { + + } + + public void addBuffToCreature(CreatureObject creature, String buffName) { + try { + throw new Exception(); + } catch (Exception e) { + // New system becoming necessary. Target can be the buffer for abilities that can't buff others. + System.out.println("WARNING: New AddBuff Format: target, buffName, buffer"); + e.printStackTrace(); + } + + addBuffToCreature(creature, buffName, creature); + } + + public boolean addBuffToCreature(CreatureObject target, String buffName, CreatureObject buffer) { + + /*if(!FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) { + //System.out.println("Buff script doesnt exist for: " + buffName); + return; + }*/ + + Buff buff = buffMap.get(buffName); + + if(buff == null) return false; + + if(buff.isGroupBuff()) { + addGroupBuff(buffer, buffName, buffer); + return true; + } else { + doAddBuff(target, buffName, buffer); + return true; + } + } + + public Buff doAddBuff(final CreatureObject target, String buffName, final CreatureObject buffer) { + + if (target.getPosition().getDistance(buffer.getPosition()) > 20) { + return null; + } + + if (target != buffer && !core.simulationService.checkLineOfSight(buffer, target)) { + return null; + } + + final Buff buff = new Buff(buffMap.get(buffName), target.getObjectID()); + if(target.getSlottedObject("ghost") != null) + buff.setTotalPlayTime(((PlayerObject) target.getSlottedObject("ghost")).getTotalPlayTime()); + else + buff.setTotalPlayTime(0); + + if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) core.scriptService.callScript("scripts/buffs/", buffName, "setup", core, buffer, buff); + + for (final Buff otherBuff : target.getBuffList()) { + if (buff.getGroup1().equals(otherBuff.getGroup1())) + if (buff.getPriority() >= otherBuff.getPriority()) { + if (buff.getBuffName().equals(otherBuff.getBuffName())) + { + + if(otherBuff.getStacks() < otherBuff.getMaxStacks()) + { + + buff.setStacks(otherBuff.getStacks() + 1); + if(target.getDotByBuff(otherBuff) != null) // reset duration when theres a dot stack + target.getDotByBuff(otherBuff).setStartTime(buff.getStartTime()); + + } + else + { + buff.setStacks(buff.getMaxStacks()); + } + if (buff.getDuration() != -1.0) + if (otherBuff.getRemainingDuration() > buff.getDuration() && otherBuff.getStacks() >= otherBuff.getMaxStacks()) + return null; + } + + removeBuffFromCreature(target, otherBuff); + break; + } else { + System.out.println("buff not added:" + buffName); + return null; + } + } + + if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) core.scriptService.callScript("scripts/buffs/", buffName, "add", core, target, buff); + else + { + if(buff.getEffect1Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect1Name(), (int) buff.getEffect1Value()); + if(buff.getEffect2Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect2Name(), (int) buff.getEffect2Value()); + if(buff.getEffect3Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect3Name(), (int) buff.getEffect3Value()); + if(buff.getEffect4Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect4Name(), (int) buff.getEffect4Value()); + if(buff.getEffect5Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect5Name(), (int) buff.getEffect5Value()); + } + + target.addBuff(buff); + + if(buff.getDuration() > 0) { + + ScheduledFuture task = scheduler.schedule(new Runnable() { + + @Override + public void run() { + + removeBuffFromCreature(target, buff); + + + } + + }, (long) buff.getDuration(), TimeUnit.SECONDS); + + buff.setRemovalTask(task); + + } else if (buff.getGroup2().contains("of_aura") && buffer != null && buffer.getObjectId() != target.getObjectId()) { + + // I'm not sure if all aura effects follow the same rules, so this is simply restricted to officer aura's atm + ScheduledFuture task = scheduler.scheduleAtFixedRate(new Runnable() { + @Override + public void run() { + if (buffer == null || buffer.getClient() == null) + removeBuffFromCreature(target, buff); + + if (target.getWorldPosition().getDistance2D(buffer.getWorldPosition()) > 80) { + removeBuffFromCreature(target, buff); + } + } + }, 5, 5, TimeUnit.SECONDS); + + buff.setRemovalTask(task); + } + + for (String effect : buff.getParticleEffect().split(",")) { + target.playEffectObject(effect, buff.getBuffName()); + } + + if (buffer != null && target.getGroupId() != 0 && target.getGroupId() == buffer.getGroupId()) { + buff.setGroupBufferId(buffer.getObjectID()); + } + + return buff; + + } + + @SuppressWarnings("unused") + public void removeBuffFromCreature(CreatureObject creature, Buff buff) { + if(!creature.getBuffList().contains(buff)) + return; + DamageOverTime dot = creature.getDotByBuff(buff); + if(dot != null) { + dot.getTask().cancel(true); + creature.removeDot(dot); + } + if(FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) core.scriptService.callScript("scripts/buffs/", buff.getBuffName(), "remove", core, creature, buff); + else + { + if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect1Name(), (int) buff.getEffect1Value()); + if(buff.getEffect2Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect2Name(), (int) buff.getEffect2Value()); + if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect3Name(), (int) buff.getEffect3Value()); + if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect4Name(), (int) buff.getEffect4Value()); + if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect5Name(), (int) buff.getEffect5Value()); + } + + if (!buff.getCallback().equals("none") && !buff.getCallback().equals("")) { + if (FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) { + PyObject method = core.scriptService.getMethod("scripts/buffs/", buff.getBuffName(), buff.getCallback()); + + if (method != null && method.isCallable()) { + method.__call__(Py.java2py(core), Py.java2py(creature), Py.java2py(buff)); + } + } + } + creature.removeBuff(buff); + + for (String effect : buff.getParticleEffect().split(",")) { + creature.stopEffectObject(buff.getBuffName()); + } + + if (buff.getRemovalTask() != null) { + buff.getRemovalTask().cancel(true); + buff.setRemovalTask(null); + } + } + + public void removeBuffFromCreatureByName(CreatureObject creature, String buffName) + { + removeBuffFromCreature(creature, creature.getBuffByName(buffName)); + } + /* + public void clearBuffs(final CreatureObject creature) + { + // This method sucks ass, someone please fix me. indeed, it doesnt even work at all! + for(Buff buff : creature.getBuffList().get()) + { + if(buff.getRemainingDuration() > 0 && buff.getDuration() > 0) buff.setRemovalTask(null); + removeBuffFromCreature(creature, buff); + } + + } + */ + + public void clearBuffs(final CreatureObject creature) { + + // copy to array for thread safety + + for(final Buff buff : creature.getBuffList().get().toArray(new Buff[] { })) { + + if (buff.getGroup1().startsWith("setBonus")) { continue; } + + if(buff.isGroupBuff() && buff.getGroupBufferId() != creature.getObjectID()) { + removeBuffFromCreature(creature, buff); + continue; + } + + if(buff.getRemainingDuration() > 0 && buff.getDuration() > 0) { + ScheduledFuture task = scheduler.schedule(() -> removeBuffFromCreature(creature, buff), (long) buff.getRemainingDuration(), TimeUnit.SECONDS); + buff.setRemovalTask(task); + continue; + } else { + removeBuffFromCreature(creature, buff); + } + + } + + } + + public void addGroupBuff(CreatureObject buffer, String buffName) { + try { + throw new Exception(); + } catch (Exception e) { + // New system becoming necessary. Target can be the buffer for abilities that can't buff others. + System.out.println("WARNING: New GroupAddBuff Format: target, buffName, buffer"); + e.printStackTrace(); + } + + addGroupBuff(buffer, buffName, buffer); + } + + public void addGroupBuff(CreatureObject target, String buffName, CreatureObject buffer) { + + if(buffer.getGroupId() == 0) { + doAddBuff(target, buffName, buffer); + return; + } + + GroupObject group = (GroupObject) core.objectService.getObject(buffer.getGroupId()); + + if(group == null) { + doAddBuff(target, buffName, buffer); + return; + } + + for(SWGObject member : group.getMemberList()) { + doAddBuff((CreatureObject) member, buffName, buffer); + } + + } + + private void loadBuffs() { + try { + DatatableVisitor visitor = ClientFileManager.loadFile("datatables/buff/buff.iff", DatatableVisitor.class); + for(int i = 0; i < visitor.getRowCount(); i++) { + Buff buff = new Buff(); + + String name = (String) visitor.getObject(i, 0); + + buff.setBuffName(name); + buff.setBuffCRC(CRC.StringtoCRC(name)); + buff.setGroup1((String) visitor.getObject(i, 1)); + buff.setGroup2((String) visitor.getObject(i, 2)); + buff.setPriority((int) visitor.getObject(i, 4)); + buff.setDuration((Float) visitor.getObject(i, 6)); + buff.setEffect1Name((String) visitor.getObject(i, 7)); + buff.setEffect1Value((Float) visitor.getObject(i, 8)); + buff.setEffect2Name((String) visitor.getObject(i, 9)); + buff.setEffect2Value((Float) visitor.getObject(i, 10)); + buff.setEffect3Name((String) visitor.getObject(i, 11)); + buff.setEffect3Value((Float) visitor.getObject(i, 12)); + buff.setEffect4Name((String) visitor.getObject(i, 13)); + buff.setEffect4Value((Float) visitor.getObject(i, 14)); + buff.setEffect5Name((String) visitor.getObject(i, 15)); + buff.setEffect5Value((Float) visitor.getObject(i, 16)); + buff.setCallback((String) visitor.getObject(i, 18)); + buff.setParticleEffect((String) visitor.getObject(i, 19)); + buff.setDebuff((Boolean) visitor.getObject(i, 22)); + buff.setRemoveOnDeath((Integer) visitor.getObject(i, 25) != 0); + buff.setRemovableByPlayer((Integer) visitor.getObject(i, 26) != 0); + buff.setMaxStacks((Integer) visitor.getObject(i, 28)); + buff.setPersistent((Integer) visitor.getObject(i, 29) != 0); + buff.setRemoveOnRespec((Integer) visitor.getObject(i, 31) != 0); + buff.setAiRemoveOnEndCombat((Integer) visitor.getObject(i, 32) != 0); + buff.setDecayOnPvPDeath((Integer) visitor.getObject(i, 33) != 0); + + buffMap.put(name, buff); + } + + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } +} diff --git a/src/services/CharacterService.java b/src/services/CharacterService.java index df9d5bdf..60666553 100644 --- a/src/services/CharacterService.java +++ b/src/services/CharacterService.java @@ -26,6 +26,7 @@ import java.nio.ByteOrder; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.util.Calendar; import java.util.Map; import main.NGECore; @@ -33,6 +34,10 @@ import main.NGECore; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; + + +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; import engine.clients.Client; import engine.resources.common.CRC; import engine.resources.container.CreatureContainerPermissions; @@ -60,6 +65,7 @@ import resources.objects.mission.MissionObject; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import resources.objects.weapon.WeaponObject; +import resources.visitors.ProfessionTemplateVisitor; @SuppressWarnings("unused") @@ -191,7 +197,16 @@ public class CharacterService implements INetworkDispatch { }); + + swgOpcodes.put(Opcodes.LagReport, new INetworkRemoteEvent() { + @Override + public void handlePacket(IoSession session, IoBuffer buffer) throws Exception { + + } + + }); + swgOpcodes.put(Opcodes.ClientCreateCharacter, new INetworkRemoteEvent() { @Override @@ -250,6 +265,12 @@ public class CharacterService implements INetworkDispatch { if (stamina >= 1) core.skillModService.addSkillMod(object, "stamina", (int) stamina); if (agility >= 1) core.skillModService.addSkillMod(object, "agility", (int) agility); + core.skillModService.addSkillMod(object, "language_basic_comprehend", 100); + core.skillModService.addSkillMod(object, "language_basic_speak", 100); + core.skillModService.addSkillMod(object, "creature_harvesting", 25); + core.skillModService.addSkillMod(object, "language_wookiee_comprehend", 100); + + object.createTransaction(core.getCreatureODB().getEnvironment()); PlayerObject player = (PlayerObject) core.objectService.createObject("object/player/shared_player.iff", object.getPlanet()); @@ -267,16 +288,21 @@ public class CharacterService implements INetworkDispatch { object.addObjectToEquipList(hair); } + player.setBornDate((int) System.currentTimeMillis()); + TangibleObject inventory = (TangibleObject) core.objectService.createObject("object/tangible/inventory/shared_character_inventory.iff", object.getPlanet()); inventory.setContainerPermissions(CreatureContainerPermissions.CREATURE_CONTAINER_PERMISSIONS); TangibleObject appInventory = (TangibleObject) core.objectService.createObject("object/tangible/inventory/shared_appearance_inventory.iff", object.getPlanet()); appInventory.setContainerPermissions(CreaturePermissions.CREATURE_PERMISSIONS); TangibleObject datapad = (TangibleObject) core.objectService.createObject("object/tangible/datapad/shared_character_datapad.iff", object.getPlanet()); datapad.setContainerPermissions(CreatureContainerPermissions.CREATURE_CONTAINER_PERMISSIONS); + datapad.setStaticObject(false); TangibleObject bank = (TangibleObject) core.objectService.createObject("object/tangible/bank/shared_character_bank.iff", object.getPlanet()); bank.setContainerPermissions(CreatureContainerPermissions.CREATURE_CONTAINER_PERMISSIONS); + bank.setStaticObject(false); TangibleObject missionBag = (TangibleObject) core.objectService.createObject("object/tangible/mission_bag/shared_mission_bag.iff", object.getPlanet()); missionBag.setContainerPermissions(CreatureContainerPermissions.CREATURE_CONTAINER_PERMISSIONS); + missionBag.setStaticObject(false); object._add(inventory); object._add(appInventory); @@ -291,6 +317,13 @@ public class CharacterService implements INetworkDispatch { Console.println("Added empty mission " + missionsAdded); }*/ + // TODO: Race abilities + if (client.isGM()) + object.addAbility("admin"); + + object.addAbility("startDance"); + object.addAbility("startDance+Basic"); + object.addObjectToEquipList(datapad); object.addObjectToEquipList(inventory); object.addObjectToEquipList(bank); @@ -300,17 +333,12 @@ public class CharacterService implements INetworkDispatch { core.missionService.createDefaultMissions(object); WeaponObject defaultWeapon = (WeaponObject) core.objectService.createObject("object/weapon/creature/shared_creature_default_weapon.iff", object.getPlanet()); - defaultWeapon.setDamageType("@obj_attr_n:armor_eff_kinetic"); - defaultWeapon.setStringAttribute("cat_wpn_damage.damage", "0-0"); - defaultWeapon.setMaxDamage(100); - defaultWeapon.setMinDamage(50); - object.addObjectToEquipList(defaultWeapon); - object._add(defaultWeapon); object.setWeaponId(defaultWeapon.getObjectID()); - core.scriptService.callScript("scripts/", "starterclothing", "CreateStarterClothing", core, object, clientCreateCharacter.getStarterProfession(), clientCreateCharacter.getRaceTemplate()); - core.scriptService.callScript("scripts/", "CreateStartingCharacter", "demo", core, object); + + createStarterClothing(object, sharedRaceTemplate, clientCreateCharacter.getStarterProfession()); + //core.scriptService.callScript("scripts/", "demo", "CreateStartingCharacter", core, object); core.getCreatureODB().put(object, Long.class, CreatureObject.class, object.getTransaction()); // might not need to commit transaction but better safe than sorry @@ -332,8 +360,25 @@ public class CharacterService implements INetworkDispatch { session.write(core.loginService.getLoginCluster().serialize()); session.write(core.loginService.getLoginClusterStatus(client).serialize()); - session.write(success.serialize()); - session.write((new ClientMfdStatusUpdateMessage((float) 2, "/GroundHUD.MFDStatus.vsp.role.targetLevel")).serialize()); + session.write(success.serialize()); + } + + }); + + swgOpcodes.put(Opcodes.NewbieTutorialResponse, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer buffer) throws Exception { + + } + + }); + + swgOpcodes.put(Opcodes.SetJediSlotInfo, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer buffer) throws Exception { + } }); @@ -492,5 +537,119 @@ public class CharacterService implements INetworkDispatch { } return false; } + + /** + * Checks the database if a player with the given first name exists + * and returns the objectID of that player. + * @param name : String + * @return objectID : long + */ + public long getPlayerOID(String name) { + if (!name.equals("")) { + long oid = 0L; + try { + PreparedStatement ps = databaseConnection.preparedStatement("SELECT * FROM characters WHERE \"firstName\"=?"); + ps.setString(1, name); + ResultSet resultSet = ps.executeQuery(); + while (resultSet.next()) { + oid = resultSet.getLong("id"); + } + return oid; + } + + catch (SQLException e) { e.printStackTrace(); } + } + return 0L; + } + + /** + * Delivers the first name of a player + * @param oid : long + * @return firstName : String + */ + public String getPlayerFirstName(long oid) { + + String name = ""; + try { + PreparedStatement ps = databaseConnection.preparedStatement("SELECT * FROM characters WHERE \"id\"=?"); + ps.setLong(1, oid); + ResultSet resultSet = ps.executeQuery(); + while (resultSet.next()) { + name = resultSet.getString("firstName"); + if (!name.equals("")) { + if (name.contains(" ")) { + name = name.split(" ")[0]; + } + name = name.toLowerCase(); + } + return name; + } + + } catch (SQLException e) { e.printStackTrace(); } + + return ""; + } + + /** + * Checks the database for if the object ID of the player exists. + * @param objectId Object ID to check for in the database + * @return Returns True if the player exists + */ + public boolean playerExists(long objectId) { + + try { + PreparedStatement ps = databaseConnection.preparedStatement("SELECT id FROM characters WHERE id=?"); + ps.setLong(1, objectId); + ResultSet resultSet = ps.executeQuery(); + + boolean isDuplicate = resultSet.next(); + resultSet.getStatement().close(); + if (isDuplicate) { return true; } + else { return false; } + } + + catch (SQLException e) { e.printStackTrace(); } + return false; + } + + /** + * Checks the database for the Account ID associated with the Object ID. + * Intended for GM use only! + * @param objectId Object ID of the player, used to obtain the Account ID. + * @return Returns Account ID + */ + public int getAccountId(long objectId) { + try { + PreparedStatement ps = databaseConnection.preparedStatement("SELECT * FROM characters WHERE id=?"); + ps.setLong(1, objectId); + ResultSet resultSet = ps.executeQuery(); + resultSet.next(); + return resultSet.getInt("accountId"); + } catch (SQLException e) { + e.printStackTrace(); + } + return 0; + } + + private void createStarterClothing(CreatureObject creature, String raceTemplate, String profession) { + try { + ProfessionTemplateVisitor visitor = ClientFileManager.loadFile("creation/profession_defaults_" + profession + ".iff", ProfessionTemplateVisitor.class); + TangibleObject inventory = (TangibleObject) creature.getSlottedObject("inventory"); + + if (inventory == null) + return; + + for(String item : visitor.getItems(raceTemplate)) { + TangibleObject createdItem = (TangibleObject) core.objectService.createObject(item, creature.getPlanet()); + + if (createdItem == null) + return; + + creature._add(createdItem); + creature.addObjectToEquipList(createdItem); + } + } + catch (InstantiationException | IllegalAccessException e) { e.printStackTrace();} + } } diff --git a/src/services/ConnectionService.java b/src/services/ConnectionService.java index dc249362..ff79d72c 100644 --- a/src/services/ConnectionService.java +++ b/src/services/ConnectionService.java @@ -25,12 +25,14 @@ import java.nio.ByteOrder; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import main.NGECore; @@ -45,7 +47,6 @@ import protocol.swg.ConnectionServerLagResponse; import protocol.swg.GalaxyLoopTimesResponse; import protocol.swg.GameServerLagResponse; import protocol.swg.HeartBeatMessage; - import engine.clients.Client; import engine.resources.database.DatabaseConnection; import engine.resources.scene.Point3D; @@ -56,6 +57,7 @@ import resources.common.collidables.AbstractCollidable; import resources.datatables.PlayerFlags; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; +import services.chat.ChatRoom; @SuppressWarnings("unused") @@ -64,7 +66,7 @@ public class ConnectionService implements INetworkDispatch { private NGECore core; private DatabaseConnection databaseConnection; private DatabaseConnection databaseConnection2; - + private int maxNumberOfCharacters; private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); public ConnectionService(final NGECore core) { @@ -72,6 +74,7 @@ public class ConnectionService implements INetworkDispatch { this.core = core; this.databaseConnection = core.getDatabase1(); this.databaseConnection2 = core.getDatabase2(); + this.maxNumberOfCharacters = core.getConfig().getInt("MAXNUMBEROFCHARACTERS"); scheduler.scheduleAtFixedRate(new Runnable() { @@ -79,8 +82,8 @@ public class ConnectionService implements INetworkDispatch { synchronized(core.getActiveConnectionsMap()) { for(Client c : core.getActiveConnectionsMap().values()) { if(c.getParent() != null) { - if ((System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000 && c.getSession().getAttribute("disconnectTask") == null) { - disconnect(c.getSession()); + if ((System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000) { + disconnect(c); } } } @@ -125,7 +128,7 @@ public class ConnectionService implements INetworkDispatch { client.setSessionKey(clientIdMsg.getSessionKey()); client.setGM(core.loginService.checkForGmPermission((int) resultSet.getLong("accountId"))); AccountFeatureBits accountFeatureBits = new AccountFeatureBits(); - ClientPermissionsMessage clientPermissionsMessage = new ClientPermissionsMessage(2 - core.characterService.getNumberOfCharacters((int) resultSet.getLong("accountId"))); + ClientPermissionsMessage clientPermissionsMessage = new ClientPermissionsMessage(maxNumberOfCharacters - core.characterService.getNumberOfCharacters((int) resultSet.getLong("accountId"))); session.write(new HeartBeatMessage().serialize()); session.write(accountFeatureBits.serialize()); session.write(clientPermissionsMessage.serialize()); @@ -172,41 +175,61 @@ public class ConnectionService implements INetworkDispatch { } }); + + swgOpcodes.put(Opcodes.ConnectPlayerMessage, new INetworkRemoteEvent() { + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + //ConnectPlayerResponseMessage + } + + }); } - public void disconnect(IoSession session) { - Client client = core.getClient(session); - - if(client == null) - return; - - if(client.getParent() == null) + public void disconnect(Client client) { + //Client client = core.getClient(session); + IoSession session = client.getSession(); + if(session == null || client.getParent() == null) return; CreatureObject object = (CreatureObject) client.getParent(); + object.setInviteCounter(0); object.setInviteSenderId(0); object.setInviteSenderName(""); - core.groupService.handleGroupDisband(object); + + if(object.getAttachment("inspireDuration") != null) + object.setAttachment("inspireDuration", null); + + if(object.getPerformanceListenee() != null) { + object.getPerformanceListenee().removeSpectator(object); + object.setPerformanceListenee(null); + } + + if(object.getPerformanceWatchee() != null) { + object.getPerformanceWatchee().removeSpectator(object); + object.setPerformanceWatchee(null); + } + + core.groupService.handleGroupDisband(object, false); + + if (core.instanceService.isInInstance(object)) { + core.instanceService.remove(core.instanceService.getActiveInstance(object), object); + } + object.setClient(null); + PlayerObject ghost = (PlayerObject) object.getSlottedObject("ghost"); if(ghost == null) return; - if(object.getGroupId() != 0) - core.groupService.handleGroupDisband(object); - Point3D objectPos = object.getWorldPosition(); List collidables = core.simulationService.getCollidables(object.getPlanet(), objectPos.x, objectPos.z, 512); - for(AbstractCollidable collidable : collidables) { - collidables.remove(object); - } - + collidables.forEach(c -> c.removeCollidedObject(object)); if (ghost != null) { String objectShortName = object.getCustomName(); @@ -217,31 +240,47 @@ public class ConnectionService implements INetworkDispatch { } core.chatService.playerStatusChange(objectShortName, (byte) 0); + + for (Integer roomId : ghost.getJoinedChatChannels()) { + ChatRoom room = core.chatService.getChatRoom(roomId.intValue()); + + if (room != null) { core.chatService.leaveChatRoom(object, roomId.intValue()); } + // work-around for any channels that may have been deleted, or only spawn on server startup, that were added to the joined channels + else { ghost.removeChannel(roomId); } + } } long parentId = object.getParentId(); - if(object.getContainer() == null) { + /*if(object.getContainer() == null) { boolean remove = core.simulationService.remove(object, object.getPosition().x, object.getPosition().z); if(remove) System.out.println("Successful quadtree remove"); } else { object.getContainer()._remove(object); object.setParentId(parentId); - } + }*/ - HashSet oldObservers = new HashSet(object.getObservers()); + /*HashSet oldObservers = new HashSet(object.getObservers()); for(Iterator it = oldObservers.iterator(); it.hasNext();) { Client observerClient = it.next(); if(observerClient.getParent() != null && !(observerClient.getSession() == session)) { observerClient.getParent().makeUnaware(object); } - } + }*/ + ghost.toggleFlag(PlayerFlags.LD); + object.setPerformanceListenee(null); + object.setPerformanceWatchee(null); object.setAttachment("disconnectTask", null); - object.setAttachment("buffWorkshop", null); + + List> schedulers = core.playerService.getSchedulers().get(object.getObjectID()); + schedulers.forEach(s -> s.cancel(true)); + schedulers.clear(); + core.playerService.getSchedulers().remove(object.getObjectID()); + object.createTransaction(core.getCreatureODB().getEnvironment()); core.getCreatureODB().put(object, Long.class, CreatureObject.class, object.getTransaction()); object.getTransaction().commitSync(); diff --git a/src/services/ConversationService.java b/src/services/ConversationService.java new file mode 100644 index 00000000..b2b3854a --- /dev/null +++ b/src/services/ConversationService.java @@ -0,0 +1,148 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services; + +import java.util.Map; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; + +import org.python.core.Py; +import org.python.core.PyObject; + +import protocol.swg.ObjControllerMessage; +import protocol.swg.objectControllerObjects.NpcConversationMessage; +import protocol.swg.objectControllerObjects.NpcConversationOptions; +import protocol.swg.objectControllerObjects.StartNpcConversation; +import protocol.swg.objectControllerObjects.StopNpcConversation; +import resources.common.ConversationOption; +import resources.common.OutOfBand; +import resources.objects.creature.CreatureObject; +import resources.objects.tangible.TangibleObject; +import main.NGECore; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +public class ConversationService implements INetworkDispatch { + + private NGECore core; + private Map conversationHandlers = new ConcurrentHashMap(); + + public ConversationService(NGECore core) { + this.core = core; + } + + public void handleStartConversation(CreatureObject player, TangibleObject npc) { + if(npc.getAttachment("conversationFile") == null) + return; + + if(player.getConversingNpc() != null && player.getConversingNpc() != npc) + handleEndConversation(player, player.getConversingNpc()); + + player.setConversingNpc(npc); + sendStartConversation(player, npc); + core.scriptService.callScript("scripts/conversation/", (String) npc.getAttachment("conversationFile"), "startConversation", core, player, npc); + } + + public void handleConversationSelection(CreatureObject player, int selectionId) { + + TangibleObject npc = player.getConversingNpc(); + + if(npc == null) { + System.out.println("npc is null"); + return; + } + + PyObject func = conversationHandlers.get(player); + + if(func == null) { + System.out.println("handler func is null"); + return; + } + + conversationHandlers.remove(player); + func.__call__(Py.java2py(core), Py.java2py(player), Py.java2py(npc), Py.java2py(selectionId)); + + } + + public void handleEndConversation(CreatureObject player, TangibleObject npc) { + + conversationHandlers.remove(player); + player.setConversingNpc(null); + core.scriptService.callScript("scripts/conversation/", (String) npc.getAttachment("conversationFile"), "endConversation", core, player, npc); + + } + + public void sendStartConversation(CreatureObject player, TangibleObject npc) { + if(player.getClient() == null) + return; + + StartNpcConversation startConvo = new StartNpcConversation(player.getObjectID(), npc.getObjectID()); + ObjControllerMessage objController = new ObjControllerMessage(0x0B, startConvo); + player.getClient().getSession().write(objController.serialize()); + } + + public void sendStopConversation(CreatureObject player, TangibleObject npc, String stfFile, String stfLabel) { + if(player.getClient() == null) + return; + + StopNpcConversation stopConvo = new StopNpcConversation(player.getObjectID(), npc.getObjectID(), stfFile, stfLabel); + ObjControllerMessage objController = new ObjControllerMessage(0x0B, stopConvo); + player.getClient().getSession().write(objController.serialize()); + } + + public void sendConversationMessage(CreatureObject player, TangibleObject npc, OutOfBand outOfBand) { + if(player.getClient() == null) + return; + + NpcConversationMessage convoMessage = new NpcConversationMessage(player.getObjectID(), outOfBand); + ObjControllerMessage objController = new ObjControllerMessage(0x0B, convoMessage); + player.getClient().getSession().write(objController.serialize()); + } + + public void sendConversationOptions(CreatureObject player, TangibleObject npc, Vector options, PyObject handler) { + if(player.getClient() == null) + return; + + conversationHandlers.put(player, handler); + + NpcConversationOptions convoOptions = new NpcConversationOptions(player.getObjectID()); + options.forEach(convoOptions::addOption); + ObjControllerMessage objController = new ObjControllerMessage(0x0B, convoOptions); + player.getClient().getSession().write(objController.serialize()); + } + + + @Override + public void insertOpcodes(Map arg0, + Map arg1) { + // TODO Auto-generated method stub + + } + + @Override + public void shutdown() { + // TODO Auto-generated method stub + + } + + +} diff --git a/src/services/DevService.java b/src/services/DevService.java new file mode 100644 index 00000000..97b5e107 --- /dev/null +++ b/src/services/DevService.java @@ -0,0 +1,1299 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services; + +import java.nio.ByteOrder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.Vector; + +import org.apache.mina.core.buffer.IoBuffer; +import org.apache.mina.core.session.IoSession; + +import protocol.swg.ExpertiseRequestMessage; +import resources.common.Console; +import resources.common.FileUtilities; +import resources.common.Opcodes; +import resources.common.SpawnPoint; +import resources.datatables.WeaponType; +import resources.objects.building.BuildingObject; +import resources.objects.creature.CreatureObject; +import resources.objects.deed.Harvester_Deed; +import resources.objects.deed.Player_House_Deed; +import resources.objects.player.PlayerObject; +import resources.objects.tangible.TangibleObject; +import resources.objects.tool.SurveyTool; +import resources.objects.weapon.WeaponObject; +import services.sui.SUIWindow; +import services.sui.SUIService.ListBoxType; +import services.sui.SUIWindow.SUICallback; +import services.sui.SUIWindow.Trigger; +import main.NGECore; +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; +import engine.clients.Client; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +@SuppressWarnings("unused") +public class DevService implements INetworkDispatch { + + private NGECore core; + + public DevService(NGECore core) { + this.core = core; + } + + public void sendCharacterBuilderSUI(CreatureObject creature, int childMenu) + { + Map suiOptions = new HashMap(); + + switch(childMenu) + { + case 0: // Root + suiOptions.put((long) 1, "Character"); + suiOptions.put((long) 2, "Items"); + break; + case 1: // Character + suiOptions.put((long) 10, "Set combat level to 90"); + suiOptions.put((long) 11, "Give 100,000 credits"); + suiOptions.put((long) 12, "Reset expertise"); + break; + case 2: // Items + suiOptions.put((long) 20, "Armor"); + suiOptions.put((long) 21, "Weapons"); + suiOptions.put((long) 22, "Misc Items"); + suiOptions.put((long) 23, "Jedi Items"); + suiOptions.put((long) 26, "Installations"); + suiOptions.put((long) 110, "Survey Devices"); + if(creature.getClient().isGM()) suiOptions.put((long) 120, "House Deeds"); + if(creature.getClient().isGM()) suiOptions.put((long) 125, "Crafting Tools"); + if(creature.getClient().isGM()) suiOptions.put((long) 130, "Vehicle Deeds"); + + break; + case 3: // [Items] Weapons + suiOptions.put((long) 30, "Jedi Weapons"); + suiOptions.put((long) 31, "Melee Weapons"); + suiOptions.put((long) 32, "Ranged Weapons"); + suiOptions.put((long) 33, "Heavy Weapons"); + break; + case 4: // [Items] Misc Items + suiOptions.put((long) 40, "Unity Ring"); + suiOptions.put((long) 41, "Tusken Rucksack"); + suiOptions.put((long) 42, "Heroism Jewlery Set"); + break; + case 5: // [Items] Armor + suiOptions.put((long) 50, "Assault Armor"); + suiOptions.put((long) 51, "Battle Armor"); + suiOptions.put((long) 52, "Reconnaissance Armor"); + break; + case 6: // [Items] Assault Armor + suiOptions.put((long) 60, "Composite"); + suiOptions.put((long) 61, "Ithorian Sentinel"); + suiOptions.put((long) 62, "Kashyyykian Hunting"); + break; + case 7: // [Items] Battle Armor + suiOptions.put((long) 70, "Bone"); + suiOptions.put((long) 71, "Ithorian Defender"); + suiOptions.put((long) 72, "Kashyyykian Black Mountain"); + break; + case 8: // [Items] Reconnaissance Armor + suiOptions.put((long) 80, "Marauder"); + suiOptions.put((long) 81, "Ithorian Guardian"); + suiOptions.put((long) 82, "Kashyyykian Ceremonial"); + break; + case 9: // [Items] Jedi Items + suiOptions.put((long) 90, "(Light) Jedi Robe"); + suiOptions.put((long) 91, "(Dark) Jedi Robe"); + suiOptions.put((long) 92, "Belt of Master Bodo Baas"); + break; + case 10: // [Items] Jedi Items + suiOptions.put((long) 111, "Harvesters"); + suiOptions.put((long) 112, "Energy resources"); + break; + + } + + final SUIWindow window = core.suiService.createListBox(ListBoxType.LIST_BOX_OK_CANCEL, "Character Builder Terminal", "Select the desired option and click OK.", suiOptions, creature, null, 10); + Vector returnList = new Vector(); + + returnList.add("List.lstList:SelectedRow"); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() + { + public void process(SWGObject owner, int eventType, Vector returnList) + { + int index = Integer.parseInt(returnList.get(0)); + int childIndex = (int) window.getObjectIdByIndex(index); + + CreatureObject player = (CreatureObject) owner; + SWGObject inventory = player.getSlottedObject("inventory"); + Planet planet = player.getPlanet(); + + switch(childIndex) + { + // Root + case 1: // Character + sendCharacterBuilderSUI(player, 1); + return; + case 2: // Items + sendCharacterBuilderSUI(player, 2); + return; + + // Character + case 10: // Set combat level to 90 + core.playerService.grantLevel(player, 90); // Commented out until fixed + //core.playerService.giveExperience(player, 999999999); + return; + case 11: // Give 100,000 credits + player.setCashCredits(player.getCashCredits() + 100000); + return; + case 12: // Reset expertise + // Seefo->Light: I commented out the below line because it gave us an error and didn't properly remove the skill, could you try the method SWGList.reverseGet that I added? + //player.getSkills().get().stream().filter(s -> s.contains("expertise")).forEach(s -> core.skillService.removeSkill(creature, s)); + + // Using this for now + for(int i = creature.getSkills().size() - 1; i >= 0; i-- ) + { + String skill = creature.getSkills().get(i); + if(skill.contains("expertise")) core.skillService.removeSkill(player, skill); + } + return; + + // Items + case 20: // Armor + sendCharacterBuilderSUI(player, 5); + return; + case 21: // Weapons + sendCharacterBuilderSUI(player, 3); + return; + case 22: // Misc Items + sendCharacterBuilderSUI(player, 4); + return; + case 23: // Jedi Items + sendCharacterBuilderSUI(player, 9); + return; + case 25: // Tools + sendCharacterBuilderSUI(player, 15); + return; + case 26: // Installations + sendCharacterBuilderSUI(player, 10); + return; + + // [Items] Weapons + case 30: // Jedi Weapons + WeaponObject lightsaber1 = (WeaponObject) core.objectService.createObject("object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff", planet); + lightsaber1.setIntAttribute("required_combat_level", 90); + lightsaber1.setStringAttribute("class_required", "Jedi"); + lightsaber1.setAttackSpeed(1); + lightsaber1.setDamageType("energy"); + lightsaber1.setMaxRange(5); + lightsaber1.setMinDamage(689); + lightsaber1.setMaxDamage(1379); + lightsaber1.setWeaponType(WeaponType.ONEHANDEDSABER); + + WeaponObject lightsaber2 = (WeaponObject) core.objectService.createObject("object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_gen5.iff", planet); + lightsaber2.setIntAttribute("required_combat_level", 90); + lightsaber2.setStringAttribute("class_required", "Jedi"); + lightsaber2.setAttackSpeed(1); + lightsaber2.setDamageType("energy"); + lightsaber2.setMaxRange(5); + lightsaber2.setMinDamage(689); + lightsaber2.setMaxDamage(1379); + lightsaber2.setWeaponType(WeaponType.TWOHANDEDSABER); + + WeaponObject lightsaber3 = (WeaponObject) core.objectService.createObject("object/weapon/melee/polearm/crafted_saber/shared_sword_lightsaber_polearm_gen5.iff", planet); + lightsaber3.setIntAttribute("required_combat_level", 90); + lightsaber3.setStringAttribute("class_required", "Jedi"); + lightsaber3.setAttackSpeed(1); + lightsaber3.setDamageType("energy"); + lightsaber3.setMaxRange(5); + lightsaber3.setMinDamage(689); + lightsaber3.setMaxDamage(1379); + lightsaber3.setWeaponType(WeaponType.POLEARMSABER); + + Random random = new Random(); + + lightsaber1.setCustomizationVariable("/private/index_color_blade", (byte) random.nextInt(47)); + lightsaber2.setCustomizationVariable("/private/index_color_blade", (byte) random.nextInt(47)); + lightsaber3.setCustomizationVariable("/private/index_color_blade", (byte) random.nextInt(47)); + + inventory.add(lightsaber1); + inventory.add(lightsaber2); + inventory.add(lightsaber3); + return; + case 31: // Melee Weapons + WeaponObject sword1 = (WeaponObject) core.objectService.createObject("object/weapon/melee/sword/shared_sword_01.iff", planet); + sword1.setIntAttribute("required_combat_level", 90); + sword1.setAttackSpeed(1); + sword1.setMaxRange(5); + sword1.setDamageType("kinetic"); + sword1.setMinDamage(1100); + sword1.setMaxDamage(1200); + sword1.setWeaponType(WeaponType.ONEHANDEDMELEE); + + inventory.add(sword1); + return; + case 32: // Ranged Weapons + WeaponObject rifle1 = (WeaponObject) core.objectService.createObject("object/weapon/ranged/rifle/shared_rifle_e11.iff", planet); + rifle1.setIntAttribute("required_combat_level", 90); + rifle1.setAttackSpeed((float) 0.8); + rifle1.setMaxRange(64); + rifle1.setDamageType("energy"); + rifle1.setMinDamage(800); + rifle1.setMaxDamage(1250); + rifle1.setWeaponType(WeaponType.RIFLE); + + inventory.add(rifle1); + + WeaponObject carbine1 = (WeaponObject) core.objectService.createObject("object/weapon/ranged/carbine/shared_carbine_cdef.iff", planet); + carbine1.setIntAttribute("required_combat_level", 90); + carbine1.setAttackSpeed((float) 0.6); + carbine1.setMaxRange(50); + carbine1.setDamageType("energy"); + carbine1.setMinDamage(600); + carbine1.setMaxDamage(937); + carbine1.setWeaponType(WeaponType.CARBINE); + + inventory.add(carbine1); + + WeaponObject pistol = (WeaponObject) core.objectService.createObject("object/weapon/ranged/pistol/shared_pistol_cdef.iff", planet); + pistol.setIntAttribute("required_combat_level", 90); + pistol.setAttackSpeed((float) 0.4); + pistol.setMaxRange(35); + pistol.setDamageType("energy"); + pistol.setMinDamage(400); + pistol.setMaxDamage(625); + pistol.setWeaponType(WeaponType.PISTOL); + + inventory.add(pistol); + return; + + case 33: + WeaponObject heavy1 = (WeaponObject) core.objectService.createObject("object/weapon/ranged/heavy/shared_som_lava_cannon_generic.iff", planet); + heavy1.setIntAttribute("required_combat_level", 90); + + heavy1.setStringAttribute("class_required", "Commando"); + heavy1.setDamageType("energy"); + heavy1.setMinDamage(700); + heavy1.setMaxDamage(1400); + heavy1.setMaxRange(64); + heavy1.setAttackSpeed(1); + heavy1.setElementalType("heat"); + heavy1.setElementalDamage(200); + heavy1.setWeaponType(WeaponType.HEAVYWEAPON); + + inventory.add(heavy1); + + WeaponObject heavy2 = (WeaponObject) core.objectService.createObject("object/weapon/ranged/heavy/shared_som_republic_flamer.iff", planet); + heavy2.setIntAttribute("required_combat_level", 88); + + heavy2.setStringAttribute("class_required", "Commando"); + heavy2.setDamageType("energy"); + heavy2.setMinDamage(148); + heavy2.setMaxDamage(295); + heavy2.setMaxRange(20); + heavy2.setAttackSpeed((float) 0.25); + heavy2.setElementalType("heat"); + heavy2.setElementalDamage(28); + heavy2.setWeaponType(WeaponType.FLAMETHROWER); + + inventory.add(heavy2); + return; + case 40: + TangibleObject ring = (TangibleObject) core.objectService.createObject("object/tangible/wearables/ring/shared_ring_s01.iff", planet); + ring.setCustomName("Unity Ring"); + inventory.add(ring); + case 41: + TangibleObject backpack = (TangibleObject) core.objectService.createObject("object/tangible/wearables/backpack/shared_backpack_krayt_skull.iff", planet); + backpack.setIntAttribute("cat_stat_mod_bonus.@stat_n:agility_modified", 25); + backpack.setIntAttribute("cat_stat_mod_bonus.@stat_n:constitution_modified", 30); + backpack.setIntAttribute("cat_stat_mod_bonus.@stat_n:luck_modified", 25); + backpack.setIntAttribute("cat_stat_mod_bonus.@stat_n:precision_modified", 35); + backpack.setIntAttribute("cat_stat_mod_bonus.@stat_n:stamina_modified", 30); + backpack.setIntAttribute("cat_stat_mod_bonus.@stat_n:strength_modified", 35); + inventory.add(backpack); + return; + case 42: + TangibleObject heroismBand = (TangibleObject) core.objectService.createObject("object/tangible/wearables/ring/shared_ring_s04.iff", planet, "item_band_set_hero_01_01"); + + TangibleObject heroismRing = (TangibleObject) core.objectService.createObject("object/tangible/wearables/ring/shared_ring_s02.iff", planet, "item_ring_set_hero_01_01"); + + TangibleObject heroismNecklace = (TangibleObject) core.objectService.createObject("object/tangible/wearables/necklace/shared_necklace_s10.iff", planet, "item_necklace_set_hero_01_01"); + + TangibleObject heroismBraceletRight = (TangibleObject) core.objectService.createObject("object/tangible/wearables/bracelet/shared_bracelet_s03_r.iff", planet, "item_bracelet_r_set_hero_01_01"); + + TangibleObject heroismBraceletLeft = (TangibleObject) core.objectService.createObject("object/tangible/wearables/bracelet/shared_bracelet_s03_l.iff", planet, "item_bracelet_l_set_hero_01_01"); + + inventory.add(heroismBand); + inventory.add(heroismRing); + inventory.add(heroismNecklace); + inventory.add(heroismBraceletRight); + inventory.add(heroismBraceletLeft); + return; + case 50: // [Items] Assault Armor + sendCharacterBuilderSUI(player, 6); + return; + case 51: // [Items] Battle Armor + sendCharacterBuilderSUI(player, 7); + return; + case 52: // [Items] Reconnaissance Armor + sendCharacterBuilderSUI(player, 8); + return; + case 60: // Composite Armor + SWGObject comp_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_bicep_r.iff", planet); + comp_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + comp_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + comp_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + comp_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + comp_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + comp_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject comp_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_bicep_l.iff", planet); + comp_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + comp_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + comp_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + comp_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + comp_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + comp_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject comp_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_bracer_r.iff", planet); + comp_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + comp_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + comp_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + comp_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + comp_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + comp_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject comp_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_bracer_l.iff", planet); + comp_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + comp_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + comp_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + comp_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + comp_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + comp_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject comp_leggings = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_leggings.iff", planet); + comp_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + comp_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + comp_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + comp_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + comp_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + comp_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject comp_helmet = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_helmet.iff", planet); + comp_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + comp_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + comp_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + comp_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + comp_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + comp_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject comp_chest = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_chest_plate.iff", planet); + comp_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + comp_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + comp_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + comp_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + comp_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + comp_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject comp_boots = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_boots.iff", planet); + SWGObject comp_gloves = core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_gloves.iff", planet); + + + + inventory.add(comp_bicep_r); + inventory.add(comp_bicep_l); + inventory.add(comp_bracer_r); + inventory.add(comp_bracer_l); + inventory.add(comp_leggings); + inventory.add(comp_helmet); + inventory.add(comp_chest); + inventory.add(comp_boots); + inventory.add(comp_gloves); + + + return; + case 61: // Ithorian Sentinel + SWGObject sent_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_r.iff", planet); + sent_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + sent_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + sent_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + sent_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + sent_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + sent_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject sent_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_l.iff", planet); + sent_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + sent_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + sent_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + sent_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + sent_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + sent_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject sent_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_r.iff", planet); + sent_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + sent_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + sent_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + sent_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + sent_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + sent_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject sent_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_l.iff", planet); + sent_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + sent_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + sent_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + sent_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + sent_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + sent_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject sent_leggings = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_leggings.iff", planet); + sent_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + sent_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + sent_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + sent_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + sent_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + sent_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject sent_helmet = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_helmet.iff", planet); + sent_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + sent_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + sent_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + sent_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + sent_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + sent_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject sent_chest = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_chest_plate.iff", planet); + sent_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + sent_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + sent_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + sent_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + sent_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + sent_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject sent_boots = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_boots.iff", planet); + SWGObject sent_gloves = core.objectService.createObject("object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff", planet); + + + + inventory.add(sent_bicep_r); + inventory.add(sent_bicep_l); + inventory.add(sent_bracer_r); + inventory.add(sent_bracer_l); + inventory.add(sent_leggings); + inventory.add(sent_helmet); + inventory.add(sent_chest); + inventory.add(sent_boots); + inventory.add(sent_gloves); + + + return; + case 62: // Kashyyykian Hunting + SWGObject hunt_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_r.iff", planet); + hunt_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + hunt_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + hunt_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + hunt_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + hunt_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + hunt_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject hunt_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_l.iff", planet); + hunt_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + hunt_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + hunt_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + hunt_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + hunt_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + hunt_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject hunt_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_r.iff", planet); + hunt_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + hunt_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + hunt_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + hunt_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + hunt_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + hunt_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject hunt_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_l.iff", planet); + hunt_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + hunt_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + hunt_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + hunt_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + hunt_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + hunt_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject hunt_leggings = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_leggings.iff", planet); + hunt_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + hunt_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + hunt_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + hunt_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + hunt_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + hunt_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject hunt_chest = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_chestplate.iff", planet); + hunt_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 7000); + hunt_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 5000); + hunt_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + hunt_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + hunt_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + hunt_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + + + inventory.add(hunt_bicep_r); + inventory.add(hunt_bicep_l); + inventory.add(hunt_bracer_r); + inventory.add(hunt_bracer_l); + inventory.add(hunt_leggings); + inventory.add(hunt_chest); + + + return; + case 70: // Bone Armor + SWGObject bone_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_bicep_r.iff", planet); + bone_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + bone_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + bone_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + bone_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + bone_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + bone_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject bone_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_bicep_l.iff", planet); + bone_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + bone_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + bone_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + bone_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + bone_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + bone_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject bone_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_bracer_r.iff", planet); + bone_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + bone_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + bone_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + bone_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + bone_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + bone_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject bone_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_bracer_l.iff", planet); + bone_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + bone_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + bone_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + bone_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + bone_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + bone_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject bone_leggings = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_leggings.iff", planet); + bone_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + bone_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + bone_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + bone_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + bone_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + bone_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject bone_helmet = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_helmet.iff", planet); + bone_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + bone_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + bone_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + bone_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + bone_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + bone_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject bone_chest = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_chest_plate.iff", planet); + bone_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + bone_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + bone_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + bone_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + bone_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + bone_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject bone_boots = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_boots.iff", planet); + SWGObject bone_gloves = core.objectService.createObject("object/tangible/wearables/armor/bone/shared_armor_bone_s01_gloves.iff", planet); + + + + inventory.add(bone_bicep_r); + inventory.add(bone_bicep_l); + inventory.add(bone_bracer_r); + inventory.add(bone_bracer_l); + inventory.add(bone_leggings); + inventory.add(bone_helmet); + inventory.add(bone_chest); + inventory.add(bone_boots); + inventory.add(bone_gloves); + + + return; + case 71: // Ithorian Defender + SWGObject def_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_bicep_r.iff", planet); + def_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + def_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + def_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + def_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + def_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + def_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject def_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_bicep_l.iff", planet); + def_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + def_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + def_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + def_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + def_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + def_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject def_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_bracer_r.iff", planet); + def_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + def_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + def_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + def_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + def_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + def_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject def_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_bracer_l.iff", planet); + def_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + def_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + def_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + def_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + def_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + def_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject def_leggings = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_leggings.iff", planet); + def_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + def_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + def_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + def_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + def_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + def_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject def_helmet = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_helmet.iff", planet); + def_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + def_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + def_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + def_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + def_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + def_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject def_chest = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_chest_plate.iff", planet); + def_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + def_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + def_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + def_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + def_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + def_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject def_boots = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_boots.iff", planet); + SWGObject def_gloves = core.objectService.createObject("object/tangible/wearables/armor/ithorian_defender/shared_ith_armor_s01_gloves.iff", planet); + + + + inventory.add(def_bicep_r); + inventory.add(def_bicep_l); + inventory.add(def_bracer_r); + inventory.add(def_bracer_l); + inventory.add(def_leggings); + inventory.add(def_helmet); + inventory.add(def_chest); + inventory.add(def_boots); + inventory.add(def_gloves); + + + return; + case 72: // Kashyyykian Black Mountain + SWGObject moun_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_black_mtn/shared_armor_kashyyykian_black_mtn_bicep_r.iff", planet); + moun_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + moun_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + moun_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + moun_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + moun_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + moun_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject moun_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_black_mtn/shared_armor_kashyyykian_black_mtn_bicep_l.iff", planet); + moun_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + moun_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + moun_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + moun_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + moun_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + moun_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject moun_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_black_mtn/shared_armor_kashyyykian_black_mtn_bracer_r.iff", planet); + moun_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + moun_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + moun_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + moun_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + moun_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + moun_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject moun_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_black_mtn/shared_armor_kashyyykian_black_mtn_bracer_l.iff", planet); + moun_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + moun_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + moun_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + moun_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + moun_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + moun_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject moun_leggings = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_black_mtn/shared_armor_kashyyykian_black_mtn_leggings.iff", planet); + moun_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + moun_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + moun_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + moun_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + moun_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + moun_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject moun_chest = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_black_mtn/shared_armor_kashyyykian_black_mtn_chestplate.iff", planet); + moun_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000); + moun_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 6000); + moun_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + moun_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + moun_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + moun_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + + + inventory.add(moun_bicep_r); + inventory.add(moun_bicep_l); + inventory.add(moun_bracer_r); + inventory.add(moun_bracer_l); + inventory.add(moun_leggings); + inventory.add(moun_chest); + + + return; + case 80: // Marauder Armor + SWGObject mar_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_bicep_r.iff", planet); + mar_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + mar_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + mar_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + mar_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + mar_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + mar_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject mar_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_bicep_l.iff", planet); + mar_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + mar_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + mar_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + mar_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + mar_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + mar_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject mar_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_bracer_r.iff", planet); + mar_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + mar_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + mar_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + mar_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + mar_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + mar_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject mar_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_bracer_l.iff", planet); + mar_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + mar_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + mar_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + mar_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + mar_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + mar_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject mar_leggings = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_leggings.iff", planet); + mar_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + mar_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + mar_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + mar_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + mar_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + mar_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject mar_helmet = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_helmet.iff", planet); + mar_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + mar_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + mar_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + mar_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + mar_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + mar_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject mar_chest = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_chest_plate.iff", planet); + mar_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + mar_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + mar_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + mar_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + mar_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + mar_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject mar_boots = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_boots.iff", planet); + SWGObject mar_gloves = core.objectService.createObject("object/tangible/wearables/armor/marauder/shared_armor_marauder_s02_gloves.iff", planet); + + + + inventory.add(mar_bicep_r); + inventory.add(mar_bicep_l); + inventory.add(mar_bracer_r); + inventory.add(mar_bracer_l); + inventory.add(mar_leggings); + inventory.add(mar_helmet); + inventory.add(mar_chest); + inventory.add(mar_boots); + inventory.add(mar_gloves); + + + return; + case 81: // Ithorian Guardian + SWGObject gau_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_bicep_r.iff", planet); + gau_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + gau_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + gau_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + gau_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + gau_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + gau_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject gau_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_bicep_l.iff", planet); + gau_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + gau_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + gau_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + gau_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + gau_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + gau_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject gau_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_bracer_r.iff", planet); + gau_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + gau_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + gau_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + gau_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + gau_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + gau_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject gau_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_bracer_l.iff", planet); + gau_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + gau_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + gau_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + gau_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + gau_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + gau_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject gau_leggings = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_leggings.iff", planet); + gau_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + gau_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + gau_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + gau_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + gau_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + gau_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject gau_helmet = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_helmet.iff", planet); + gau_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + gau_helmet.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + gau_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + gau_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + gau_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + gau_helmet.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject gau_chest = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_chest_plate.iff", planet); + gau_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + gau_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + gau_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + gau_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + gau_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + gau_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject gau_boots = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_boots.iff", planet); + SWGObject gau_gloves = core.objectService.createObject("object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_gloves.iff", planet); + + + + inventory.add(gau_bicep_r); + inventory.add(gau_bicep_l); + inventory.add(gau_bracer_r); + inventory.add(gau_bracer_l); + inventory.add(gau_leggings); + inventory.add(gau_helmet); + inventory.add(gau_chest); + inventory.add(gau_boots); + inventory.add(gau_gloves); + + + return; + case 82: // Kashyyykian Ceremonial + SWGObject cer_bicep_r = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_ceremonial/shared_armor_kashyyykian_ceremonial_bicep_r.iff", planet); + cer_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + cer_bicep_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + cer_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + cer_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + cer_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + cer_bicep_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject cer_bicep_l = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_ceremonial/shared_armor_kashyyykian_ceremonial_bicep_l.iff", planet); + cer_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + cer_bicep_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + cer_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + cer_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + cer_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + cer_bicep_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject cer_bracer_r = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_ceremonial/shared_armor_kashyyykian_ceremonial_bracer_r.iff", planet); + cer_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + cer_bracer_r.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + cer_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + cer_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + cer_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + cer_bracer_r.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject cer_bracer_l = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_ceremonial/shared_armor_kashyyykian_ceremonial_bracer_l.iff", planet); + cer_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + cer_bracer_l.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + cer_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + cer_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + cer_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + cer_bracer_l.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject cer_leggings = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_ceremonial/shared_armor_kashyyykian_ceremonial_leggings.iff", planet); + cer_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + cer_leggings.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + cer_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + cer_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + cer_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + cer_leggings.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + SWGObject cer_chest = core.objectService.createObject("object/tangible/wearables/armor/kashyyykian_ceremonial/shared_armor_kashyyykian_ceremonial_chestplate.iff", planet); + cer_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 5000); + cer_chest.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 7000); + cer_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 6000); + cer_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 6000); + cer_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 6000); + cer_chest.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 6000); + + + + inventory.add(cer_bicep_r); + inventory.add(cer_bicep_l); + inventory.add(cer_bracer_r); + inventory.add(cer_bracer_l); + inventory.add(cer_leggings); + inventory.add(cer_chest); + + return; + + case 90: // (Light) Jedi Robe + inventory.add(core.objectService.createObject("object/tangible/wearables/robe/shared_robe_jedi_light_s03.iff", planet)); + return; + case 91: // (Dark) Jedi Robe + inventory.add(core.objectService.createObject("object/tangible/wearables/robe/shared_robe_jedi_dark_s03.iff", planet)); + return; + case 92: // Belt of Master Bodo Baas + inventory.add(core.objectService.createObject("object/tangible/wearables/backpack/shared_fannypack_s01.iff", planet)); + return; + case 110: + SurveyTool mineralSurveyTool = (SurveyTool) core.objectService.createObject("object/tangible/survey_tool/shared_survey_tool_mineral.iff", planet); + mineralSurveyTool.setCustomName("Mineral Survey Device"); + inventory.add(mineralSurveyTool); + + SurveyTool chemicalSurveyTool = (SurveyTool) core.objectService.createObject("object/tangible/survey_tool/shared_survey_tool_inorganic.iff", planet); + chemicalSurveyTool.setCustomName("Chemical Survey Device"); + inventory.add(chemicalSurveyTool); + + SurveyTool floraSurveyTool = (SurveyTool) core.objectService.createObject("object/tangible/survey_tool/shared_survey_tool_lumber.iff", planet); + floraSurveyTool.setCustomName("Flora Survey Device"); + inventory.add(floraSurveyTool); + + SurveyTool gasSurveyTool = (SurveyTool) core.objectService.createObject("object/tangible/survey_tool/shared_survey_tool_gas.iff", planet); + gasSurveyTool.setCustomName("Gas Survey Device"); + inventory.add(gasSurveyTool); + + SurveyTool waterSurveyTool = (SurveyTool) core.objectService.createObject("object/tangible/survey_tool/shared_survey_tool_moisture.iff", planet); + waterSurveyTool.setCustomName("Water Survey Device"); + inventory.add(waterSurveyTool); + + SurveyTool windSurveyTool = (SurveyTool) core.objectService.createObject("object/tangible/survey_tool/shared_survey_tool_wind.iff", planet); + windSurveyTool.setCustomName("Wind Survey Device"); + inventory.add(windSurveyTool); + + SurveyTool solarSurveyTool = (SurveyTool) core.objectService.createObject("object/tangible/survey_tool/shared_survey_tool_solar.iff", planet); + solarSurveyTool.setCustomName("Solar Survey Device"); + inventory.add(solarSurveyTool); + return; + case 111: + // Minerals + String templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_s1_deed.iff"; + Harvester_Deed deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(5); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_s2_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(11); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_heavy_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(135400); + deed1.setBER(14); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_deed_elite.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(44); + deed1.setAttributes(); + inventory.add(deed1); + + + // Chemicals + templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(5); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_medium.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(11); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_heavy.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(135400); + deed1.setBER(14); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_elite.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(44); + deed1.setAttributes(); + inventory.add(deed1); + + + // Flora + templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(5); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed_medium.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(11); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed_heavy.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(135400); + deed1.setBER(14); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed_elite.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(44); + deed1.setAttributes(); + inventory.add(deed1); + + + // Gas + templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(5); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed_medium.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(11); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed_heavy.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(135400); + deed1.setBER(14); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed_elite.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(44); + deed1.setAttributes(); + inventory.add(deed1); + + + // Water + templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(5); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_medium.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(27344); + deed1.setBER(11); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_heavy.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(135400); + deed1.setBER(14); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_elite.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(44); + deed1.setAttributes(); + inventory.add(deed1); + + + // Generators + templateString="object/tangible/deed/generator_deed/shared_generator_fusion_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(19); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/generator_deed/shared_generator_wind_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(10); + deed1.setAttributes(); + inventory.add(deed1); + + templateString="object/tangible/deed/generator_deed/shared_generator_solar_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(15); + deed1.setAttributes(); + inventory.add(deed1); + +// templateString="object/tangible/deed/generator_deed/shared_generator_photo_bio_deed.iff"; +// deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); +// deed1.setOutputHopperCapacity(250000); +// deed1.setBER(19); +// inventory.add(deed1); + + templateString="object/tangible/deed/generator_deed/shared_generator_geothermal_deed.iff"; + deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); + deed1.setOutputHopperCapacity(250000); + deed1.setBER(15); + deed1.setAttributes(); + inventory.add(deed1); + + break; + case 112: + core.resourceService.spawnSpecificResourceContainer("Radioactive", player, 100000); + break; + case 120: +// SWGObject houseDeed = core.objectService.createObject("object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff", planet); +// inventory.add(houseDeed); + + templateString="object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff"; + Player_House_Deed deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + templateString="object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_deed.iff"; + deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + templateString="object/tangible/deed/player_house_deed/shared_generic_house_small_floor_02_deed.iff"; + deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + templateString="object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_floor_02_deed.iff"; + deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + + templateString="object/tangible/deed/player_house_deed/shared_corellia_house_small_deed.iff"; + deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + templateString="object/tangible/deed/player_house_deed/shared_corellia_house_small_floor_02_deed.iff"; + deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + templateString="object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_deed.iff"; + deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + templateString="object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_floor_02_deed.iff"; + deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); + deed.setBMR(15); + deed.setAttributes(); + inventory.add(deed); + + case 125: + TangibleObject genericCraftingTool = (TangibleObject) core.objectService.createObject("object/tangible/crafting/station/shared_generic_tool.iff", planet); + genericCraftingTool.setCustomName("Generic Crafting Tool"); + inventory.add(genericCraftingTool); + return; + case 130: + TangibleObject swoopDeed = (TangibleObject) core.objectService.createObject("object/tangible/deed/vehicle_deed/shared_speederbike_swoop_deed.iff", planet); + inventory.add(swoopDeed); + return; + } + } + }); + + core.suiService.openSUIWindow(window); + } + + @Override + public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + } + + + @Override + public void shutdown() { + + } + +} + diff --git a/src/services/EntertainmentService.java b/src/services/EntertainmentService.java index 2ada525d..f210cdc7 100644 --- a/src/services/EntertainmentService.java +++ b/src/services/EntertainmentService.java @@ -1,350 +1,954 @@ -package services; - -import java.nio.ByteOrder; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Vector; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; - -import main.NGECore; - -import org.apache.mina.core.buffer.IoBuffer; -import org.apache.mina.core.session.IoSession; - -import protocol.swg.ObjControllerMessage; -import protocol.swg.OkMessage; -import protocol.swg.objectControllerObjects.BuffBuilderChangeMessage; -import protocol.swg.objectControllerObjects.BuffBuilderStartMessage; -import resources.common.BuffBuilder; -import resources.common.Console; -import resources.common.ObjControllerOpcodes; -import resources.common.Performance; -import resources.objects.Buff; -import resources.objects.BuffItem; -import resources.objects.creature.CreatureObject; -import resources.objects.player.PlayerObject; -import engine.clientdata.ClientFileManager; -import engine.clientdata.visitors.DatatableVisitor; -import engine.clients.Client; -import engine.resources.objects.SWGObject; -import engine.resources.service.INetworkDispatch; -import engine.resources.service.INetworkRemoteEvent; - -public class EntertainmentService implements INetworkDispatch { - - private NGECore core; - private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); - - private Vector buffBuilderSkills = new Vector(); - //FIXME: create a wrapper class for double key lookup maps - private HashMap performances = new HashMap(); - private HashMap performancesByIndex = new HashMap(); - private HashMap danceMap = new HashMap(); - - public EntertainmentService(NGECore core) { - this.core = core; - populateSkillCaps(); - populatePerformanceTable(); - registerCommands(); - } - - @Override - public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { - objControllerOpcodes.put(ObjControllerOpcodes.BUFF_BUILDER_CHANGE, new INetworkRemoteEvent() { - - @Override - public void handlePacket(IoSession session, IoBuffer data) throws Exception { - Console.println("BUFF_BUILDER_CHANGE RECIEVED"); - data.order(ByteOrder.LITTLE_ENDIAN); - - Client client = core.getClient(session); - - if(client == null) - return; - - SWGObject sender = client.getParent(); - - if(sender == null) - return; - - BuffBuilderChangeMessage sentPacket = new BuffBuilderChangeMessage(); - sentPacket.deserialize(data); - - Vector statBuffs = sentPacket.getStatBuffs(); - - /*for (BuffItem item : statBuffs) { - System.out.println("Buff Name: " + item.getSkillName()); - System.out.println("Ents bonus to item: " + item.getAmount()); - }*/ - - SWGObject buffer = core.objectService.getObject(sentPacket.getBufferId()); - SWGObject buffRecipient = core.objectService.getObject(sentPacket.getBuffRecipientId()); - - Console.println("Packet Sender ID: " + sender.getObjectId()); - - if (buffer != buffRecipient) { - - BuffBuilderChangeMessage changeMessage = new BuffBuilderChangeMessage(); - changeMessage.setBuffCost(sentPacket.getBuffCost()); - changeMessage.setTime(sentPacket.getTime()); - changeMessage.setBufferId(buffer.getObjectId()); - changeMessage.setBuffRecipientId(buffRecipient.getObjectId()); - - if (!statBuffs.isEmpty()) - changeMessage.setStatBuffs(statBuffs); - - if (sentPacket.getAccepted() == true && sentPacket.getBuffRecipientAccepted() == 1) { - System.out.println("both accepted!"); - - if (sentPacket.getBuffCost() > 0) { - CreatureObject recipientCreature = (CreatureObject) buffRecipient; - if (recipientCreature.getCashCredits() >= sentPacket.getBuffCost()) { - recipientCreature.setCashCredits(recipientCreature.getCashCredits() - sentPacket.getBuffCost()); - } else { - return; - } - } - - OkMessage closeMsg = new OkMessage(); - buffer.getClient().getSession().write(closeMsg.serialize()); - - giveInspirationBuff(buffRecipient, statBuffs); - - } else if (sentPacket.getAccepted() == true && sentPacket.getBuffRecipientAccepted() == 0) { - changeMessage.setAccepted(true); - changeMessage.setObjectId(buffRecipient.getObjectId()); - - ObjControllerMessage objMsg = new ObjControllerMessage(0x0B, changeMessage); - buffRecipient.getClient().getSession().write(objMsg.serialize()); - } else { - changeMessage.setAccepted(false); - changeMessage.setObjectId(sentPacket.getBuffRecipientId()); - - ObjControllerMessage objMsg = new ObjControllerMessage(0x0B, changeMessage); - buffRecipient.getClient().getSession().write(objMsg.serialize()); - } - - } else { - if (sentPacket.getAccepted() == true) { - OkMessage closeMsg = new OkMessage(); - buffer.getClient().getSession().write(closeMsg.serialize()); - - giveInspirationBuff(buffRecipient, statBuffs); - } - } - } - - }); - } - - private void populatePerformanceTable() { - - try { - DatatableVisitor PerformanceVisitor = ClientFileManager.loadFile("datatables/performance/performance.iff", DatatableVisitor.class); - - //rformanceVisitor. - - for (int r = 0; r < PerformanceVisitor.getRowCount(); r++) { - Performance p = new Performance(); - - /* for (int j=0; j < PerformanceVisitor.getColumnCount(); j++) { - System.out.println(j + ": " + PerformanceVisitor.getObject(r, j)); - }*/ - - p.setPerformanceName( ( (String) PerformanceVisitor.getObject(r, 0) ).toLowerCase()); - p.setInstrumentAudioId((int) PerformanceVisitor.getObject(r, 1)); - p.setRequiredSong((String) PerformanceVisitor.getObject(r, 2)); - p.setRequiredInstrument((String) PerformanceVisitor.getObject(r, 3)); - p.setRequiredDance((String) PerformanceVisitor.getObject(r, 4)); - p.setDanceVisualId((int) PerformanceVisitor.getObject(r, 5)); - p.setActionPointsPerLoop((int) PerformanceVisitor.getObject(r, 6)); - p.setLoopDuration((float) PerformanceVisitor.getObject(r, 7)); - p.setType((int) PerformanceVisitor.getObject(r, 8)); - p.setBaseXp((int) PerformanceVisitor.getObject(r, 9)); - p.setFlourishXpMod((int) PerformanceVisitor.getObject(r, 10)); - p.setHealMindWound((int) PerformanceVisitor.getObject(r, 11)); - p.setHealShockWound((int) PerformanceVisitor.getObject(r, 12)); - p.setRequiredSkillMod((String) PerformanceVisitor.getObject(r, 13)); - p.setRequiredSkillModValue((int) PerformanceVisitor.getObject(r, 14)); - p.setMainloop((String) PerformanceVisitor.getObject(r, 15)); - p.setFlourish1((String) PerformanceVisitor.getObject(r, 16)); - p.setFlourish2((String) PerformanceVisitor.getObject(r, 17)); - p.setFlourish3((String) PerformanceVisitor.getObject(r, 18)); - p.setFlourish4((String) PerformanceVisitor.getObject(r, 19)); - p.setFlourish5((String) PerformanceVisitor.getObject(r, 20)); - p.setFlourish6((String) PerformanceVisitor.getObject(r, 21)); - p.setFlourish7((String) PerformanceVisitor.getObject(r, 22)); - p.setFlourish8((String) PerformanceVisitor.getObject(r, 23)); - p.setIntro((String) PerformanceVisitor.getObject(r, 24)); - p.setOutro((String) PerformanceVisitor.getObject(r, 25)); - p.setLineNumber(r); - - if (p.getType() == -1788534963) { - danceMap.put(new Integer(p.getDanceVisualId()), p); - } - performances.put(p.getPerformanceName(), p); - performancesByIndex.put(r, p); - } - - } catch (InstantiationException | IllegalAccessException e) { - e.printStackTrace(); - } - } - - private void populateSkillCaps() { - try { - DatatableVisitor buffBuilder = ClientFileManager.loadFile("datatables/buff/buff_builder.iff", DatatableVisitor.class); - - for (int r = 0; r < buffBuilder.getRowCount(); r++) { - String skillName = ((String) buffBuilder.getObject(r, 0)); - String statAffects = ((String) buffBuilder.getObject(r, 2)); - int maxTimes = ((int) buffBuilder.getObject(r, 3)); - int affectAmount = ((int) buffBuilder.getObject(r, 5)); - String requiredExperience = ((String) buffBuilder.getObject(r, 6)); - - BuffBuilder item = new BuffBuilder(); - item.setStatName(skillName); - item.setStatAffects(statAffects); - item.setMaxTimesApplied(maxTimes); - item.setAffectAmount(affectAmount); - item.setRequiredExperience(requiredExperience); - - buffBuilderSkills.add(item); - } - } catch (InstantiationException | IllegalAccessException e) { - e.printStackTrace(); - } - } - - private void registerCommands() { - core.commandService.registerCommand("bandflourish"); - core.commandService.registerCommand("flourish"); - core.commandService.registerAlias("flo","flourish"); - core.commandService.registerCommand("groupdance"); - core.commandService.registerCommand("startdance"); - core.commandService.registerCommand("stopdance"); - core.commandService.registerCommand("watch"); - core.commandService.registerCommand("stopwatching"); - } - - public void giveInspirationBuff(SWGObject reciever, Vector buffVector) { - CreatureObject buffCreature = (CreatureObject) reciever; - - Vector availableSkills = buffBuilderSkills; - - Vector buffsToAdd = new Vector(); - - for (BuffItem item : buffVector) { - for (BuffBuilder builder : availableSkills) { - if (builder.getStatName().equals(item.getSkillName())) { - builder.setEntBonus(item.getBonusAmount()); - buffsToAdd.add(builder); - Console.println("Added buff item: " + builder.getStatAffects() + " with total affect of " + builder.getTotalAffected() + " and ent bonus of " + builder.getEntBonus()); - continue; - } - } - } - - reciever.setAttachment("buffWorkshop", buffsToAdd); - - core.buffService.addBuffToCreature(buffCreature, "buildabuff_inspiration"); - - } - - public int getDanceVisualId(String danceName) { - Performance p = performances.get(danceName); - - //if 0 , then it's no dance. need to handle that in the script. - return ((p == null) ? 0 : p.getDanceVisualId()); - } - - public Map getAvailableDances(CreatureObject actor) { - - Map dances = new HashMap(); - for (int index : danceMap.keySet()) { - if (!canDance(actor, danceMap.get(index) )) { continue; } - dances.put( new Long( danceMap.get(index).getDanceVisualId() ), danceMap.get(index).getPerformanceName() ); - } - - return dances; - - } - - public boolean isDance(int visualId) { - return ( danceMap.get(visualId) != null ) ; - } - - public boolean canDance(CreatureObject actor, Performance dance) { - if (actor.hasAbility(dance.getRequiredDance())) { - return true; - } - return false; - } - - public boolean canDance(CreatureObject actor, int visualId) { - if (!isDance(visualId)) { return false; } - return canDance(actor, danceMap.get(visualId)); - } - - public Performance getDance(int visualId) { - return danceMap.get(visualId); - } - - public Performance getPerformance(String name) { - return performances.get(name); - } - - public Performance getPerformanceByIndex(int index) { - return performancesByIndex.get(index); - } - - public void startPerformance(CreatureObject actor, int performanceId, int performanceCounter, String skillName, boolean isDance) { - actor.setPerformanceId(performanceId, isDance); - actor.setPerformanceCounter(performanceCounter); - actor.setCurrentAnimation(skillName); - actor.setPerformanceType(isDance); - - actor.startPerformance(); - } - - public void startPerformanceExperience(final CreatureObject entertainer) { - final ScheduledFuture experienceTask = scheduler.scheduleAtFixedRate(new Runnable() { - - @Override - public void run() { - - Performance p = performancesByIndex.get(entertainer.getPerformanceId()); - if (p == null) { - entertainer.setFlourishCount(0); - return; - } - - int floXP = p.getFlourishXpMod(); - int floCount = entertainer.getFlourishCount(); - - //FIXME: this is not an accurate implementation yet. It needs group bonuses and other things. - int XP = (int) Math.round( ((floCount > 2) ? 2 : floCount) * floXP * 3.8 ); - - entertainer.setFlourishCount(0); - core.playerService.giveExperience(entertainer, XP); - - - } - - },10, 10000, TimeUnit.MILLISECONDS); - - entertainer.setEntertainerExperience(experienceTask); - - } - - @Override - public void shutdown() { - - } - -} +package services; + +import java.nio.ByteOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; +import org.apache.mina.core.session.IoSession; + +import protocol.swg.ObjControllerMessage; +import protocol.swg.objectControllerObjects.BuffBuilderChangeMessage; +import protocol.swg.objectControllerObjects.BuffBuilderEndMessage; +import protocol.swg.objectControllerObjects.ImageDesignMessage; +import resources.common.BuffBuilder; +import resources.common.IDAttribute; +import resources.common.MathUtilities; +import resources.common.ObjControllerOpcodes; +import resources.common.OutOfBand; +import resources.common.Performance; +import resources.common.PerformanceEffect; +import resources.common.RGB; +import resources.datatables.Posture; +import resources.objects.BuffItem; +import resources.objects.SkillMod; +import resources.objects.creature.CreatureObject; +import resources.objects.player.PlayerObject; +import resources.objects.tangible.TangibleObject; +import resources.visitors.IDManagerVisitor; +import services.sui.SUIService.InputBoxType; +import services.sui.SUIWindow; +import services.sui.SUIWindow.Trigger; +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; +import engine.clients.Client; +import engine.resources.objects.SWGObject; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +public class EntertainmentService implements INetworkDispatch { + + private NGECore core; + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); + + private Vector buffBuilderSkills = new Vector(); + //FIXME: create a wrapper class for double key lookup maps + private ConcurrentHashMap performances = new ConcurrentHashMap(); + private ConcurrentHashMap performancesByIndex = new ConcurrentHashMap(); + private ConcurrentHashMap danceMap = new ConcurrentHashMap(); + + private ConcurrentHashMap designMap = new ConcurrentHashMap(); + + //private Random ranWorkshop = new Random(); + + private Map performanceEffects = new ConcurrentHashMap(); + + public EntertainmentService(NGECore core) { + this.core = core; + populateSkillCaps(); + populatePerformanceTable(); + populatePerformanceEffects(); + registerCommands(); + loadCharacterCustomizationData(); + } + + @Override + public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + objControllerOpcodes.put(ObjControllerOpcodes.IMAGE_DESIGN_CHANGE, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject sender = client.getParent(); + + if(sender == null) + return; + + ImageDesignMessage sentPacket = new ImageDesignMessage(); + sentPacket.deserialize(data); + + CreatureObject designTarget = (CreatureObject) core.objectService.getObject(sentPacket.getTargetId()); + CreatureObject designer = (CreatureObject) core.objectService.getObject(sentPacket.getDesignerId()); + + if (designTarget == null || designer == null) + return; + + if (designTarget.getClient() == null || designTarget.getClient().getSession() == null) + return; + + if (designer.getClient() == null || designer.getClient().getSession() == null) + return; + + Vector colorAttributes = sentPacket.getColorAttributes(); + Vector bodyAttributes = sentPacket.getBodyAttributes(); + // TODO: Attribute check for colors? + if (bodyAttributes != null) { + for (IDAttribute atr : bodyAttributes) { + //System.out.println("ATTRIBUTE: " + atr.getName() + " value of " + atr.getFloatValue()); + if (atr.getFloatValue() > 1f || atr.getFloatValue() < 0) { // RIP Height Exploit <3 + return; + } + } + } + + /*if (colorAttributes != null) { + for (IDAttribute atr : colorAttributes) { + System.out.println("COLOR ATTRIBUTE: " + atr.getName() + " value of " + atr.getValue()); + } + }*/ + + if (sentPacket.getTargetId() != sentPacket.getDesignerId()) { + + if (sentPacket.isCustomerAccepted() && sentPacket.isDesignerCommited()) { + System.out.print("Both Accepted!"); + + sentPacket.setEndMessage(true); + + int fee = sentPacket.getMoneyDemanded() + sentPacket.getMoneyOffered(); + if (fee > 0) { + int payersCash = designTarget.getCashCredits(); + + if (payersCash < fee) { + + if (designTarget != designer) { + ObjControllerMessage msg = new ObjControllerMessage(0x0B, sentPacket); + designTarget.getClient().getSession().write(msg.serialize()); + + // Window is closed already, so this shouldn't be necessary + //ObjControllerMessage designMsg = new ObjControllerMessage(0x0B, sentPacket); + //designer.getClient().getSession().write(designMsg.serialize()); + + designTarget.sendSystemMessage("You don't have enough credits to pay the fee.", (byte) 0); + designer.sendSystemMessage("Your target did not have the required payment fee", (byte) 0); + + } + }else { + // TODO: Apply customization + designTarget.setCashCredits(designTarget.getCashCredits() - fee); + designer.setCashCredits(designer.getCashCredits() + fee); + + handleImageDesign(designer, designTarget, colorAttributes, bodyAttributes, sentPacket.getHair(), sentPacket.getHoloEmote()); + + sentPacket.setEndMessage(true); + sentPacket.setObjectId(designTarget.getObjectId()); + + ObjControllerMessage msg = new ObjControllerMessage(0x0B, sentPacket); + designTarget.getClient().getSession().write(msg.serialize()); + } + } else { + handleImageDesign(designer, designTarget, colorAttributes, bodyAttributes, sentPacket.getHair(), sentPacket.getHoloEmote()); + sentPacket.setEndMessage(true); + sentPacket.setObjectId(designTarget.getObjectId()); + + ObjControllerMessage msg = new ObjControllerMessage(0x0B, sentPacket); + designTarget.getClient().getSession().write(msg.serialize()); + } + + } else if (sentPacket.getObjectId() == designTarget.getObjectId()) { + sentPacket.setObjectId(designer.getObjectId()); + + ObjControllerMessage msg = new ObjControllerMessage(0x0B, sentPacket); + designer.getClient().getSession().write(msg.serialize()); + + } else if (sentPacket.getObjectId() == designer.getObjectId()) { + sentPacket.setObjectId(designTarget.getObjectId()); + + ObjControllerMessage msg = new ObjControllerMessage(0x0B, sentPacket); + designTarget.getClient().getSession().write(msg.serialize()); + } + } else { + // No need to send a close packet message because the client automatically closes the ID window for the Desginer when they commit + if (sentPacket.isDesignerCommited()) + handleImageDesign(designer, designTarget, colorAttributes, bodyAttributes, sentPacket.getHair(), sentPacket.getHoloEmote()); + else + return; + } + } + + }); + + objControllerOpcodes.put(ObjControllerOpcodes.IMAGE_DESIGN_END, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject sender = client.getParent(); + + if(sender == null) + return; + + ImageDesignMessage sentPacket = new ImageDesignMessage(); + sentPacket.deserialize(data); + + if (sentPacket.getTargetId() == sentPacket.getDesignerId()) + return; + + if (sentPacket.getObjectId() == sentPacket.getDesignerId()) { + CreatureObject target = (CreatureObject) core.objectService.getObject(sentPacket.getTargetId()); + if (target == null) + return; + + sentPacket.setEndMessage(true); + sentPacket.setObjectId(target.getObjectId()); + ObjControllerMessage endMessage = new ObjControllerMessage(0x0B, sentPacket); + target.getClient().getSession().write(endMessage.serialize()); + + } else if (sentPacket.getObjectId() == sentPacket.getTargetId()) { + CreatureObject designer = (CreatureObject) core.objectService.getObject(sentPacket.getDesignerId()); + if (designer == null) + return; + + sentPacket.setEndMessage(true); + sentPacket.setObjectId(designer.getObjectId()); + ObjControllerMessage endMessage = new ObjControllerMessage(0x0B, sentPacket); + designer.getClient().getSession().write(endMessage.serialize()); + } + } + + }); + + objControllerOpcodes.put(ObjControllerOpcodes.BUFF_BUILDER_END, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject sender = client.getParent(); + + if(sender == null) + return; + + BuffBuilderEndMessage sentPacket = new BuffBuilderEndMessage(); + sentPacket.deserialize(data); + + SWGObject buffer = core.objectService.getObject(sentPacket.getBufferId()); + SWGObject buffRecipient = core.objectService.getObject(sentPacket.getBuffRecipientId()); + + if(buffer == null || buffRecipient == null) + return; + + // No need to send end packet when buffing yourself. + if (buffRecipient != buffer) { + if(buffRecipient.getClient() == null || buffRecipient.getClient().getSession() == null) + return; + + if (sender.getObjectId() == buffer.getObjectId()) { + // send close packet to recipient + BuffBuilderEndMessage end = new BuffBuilderEndMessage(sentPacket); + end.setObjectId(buffRecipient.getObjectId()); + + end.setBufferId(buffer.getObjectId()); + end.setBuffRecipientId(buffRecipient.getObjectId()); + + ObjControllerMessage closeMessage = new ObjControllerMessage(0x0B, end); + buffRecipient.getClient().getSession().write(closeMessage.serialize()); + + } + if (sender.getObjectId() == buffRecipient.getObjectId()) { + // send close packet to buffer + BuffBuilderEndMessage end = new BuffBuilderEndMessage(sentPacket); + end.setObjectId(buffer.getObjectId()); + + end.setBufferId(buffer.getObjectId()); + end.setBuffRecipientId(buffRecipient.getObjectId()); + + ObjControllerMessage closeMessage = new ObjControllerMessage(0x0B, end); + buffer.getClient().getSession().write(closeMessage.serialize()); + CreatureObject cre = (CreatureObject) buffer; + cre.sendSystemMessage("The buff recipient cancelled the buff builder session.", (byte) 0); + } + } + } + }); + + objControllerOpcodes.put(ObjControllerOpcodes.BUFF_BUILDER_CHANGE, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject sender = client.getParent(); + + if(sender == null) + return; + + BuffBuilderChangeMessage sentPacket = new BuffBuilderChangeMessage(); + sentPacket.deserialize(data); + + Vector statBuffs = sentPacket.getStatBuffs(); + + CreatureObject buffer = (CreatureObject) core.objectService.getObject(sentPacket.getBufferId()); + CreatureObject buffRecipient = (CreatureObject) core.objectService.getObject(sentPacket.getBuffRecipientId()); + + if (buffer != buffRecipient) { + + BuffBuilderChangeMessage changeMessage = new BuffBuilderChangeMessage(); + changeMessage.setBuffCost(sentPacket.getBuffCost()); + changeMessage.setTime(sentPacket.getTime()); + changeMessage.setBufferId(buffer.getObjectId()); + changeMessage.setBuffRecipientId(buffRecipient.getObjectId()); + + if (!statBuffs.isEmpty()) + changeMessage.setStatBuffs(statBuffs); + + if (sentPacket.getAccepted() == true && sentPacket.getBuffRecipientAccepted() == 1) { + + if (sentPacket.getBuffCost() > 0) { + if (buffRecipient.getCashCredits() >= sentPacket.getBuffCost()) { + buffRecipient.setCashCredits(buffRecipient.getCashCredits() - sentPacket.getBuffCost()); + } else { + return; + } + } + + giveInspirationBuff(buffRecipient, buffer, statBuffs); + + BuffBuilderEndMessage endBuilder = new BuffBuilderEndMessage(changeMessage); + endBuilder.setObjectId(buffer.getObjectId()); + + BuffBuilderEndMessage endRecipient = new BuffBuilderEndMessage(changeMessage); + endRecipient.setObjectId(buffRecipient.getObjectId()); + + ObjControllerMessage closeBuilder = new ObjControllerMessage(0x0B, endBuilder); + buffer.getClient().getSession().write(closeBuilder.serialize()); + + ObjControllerMessage closeRecipient = new ObjControllerMessage(0x0B, endRecipient); + buffRecipient.getClient().getSession().write(closeRecipient.serialize()); + + } else if (sentPacket.getAccepted() == true && sentPacket.getBuffRecipientAccepted() == 0) { + changeMessage.setAccepted(true); + changeMessage.setObjectId(buffRecipient.getObjectId()); + + ObjControllerMessage objMsg = new ObjControllerMessage(0x0B, changeMessage); + buffRecipient.getClient().getSession().write(objMsg.serialize()); + } else { + changeMessage.setAccepted(false); + changeMessage.setObjectId(sentPacket.getBuffRecipientId()); + + ObjControllerMessage objMsg = new ObjControllerMessage(0x0B, changeMessage); + buffRecipient.getClient().getSession().write(objMsg.serialize()); + } + + } else { + if (sentPacket.getAccepted() == true) { + giveInspirationBuff(buffRecipient, buffer, statBuffs); + BuffBuilderEndMessage endBuilder = new BuffBuilderEndMessage(sentPacket); + endBuilder.setObjectId(buffer.getObjectId()); + + ObjControllerMessage objMsg = new ObjControllerMessage(0x0B, endBuilder); + buffRecipient.getClient().getSession().write(objMsg.serialize()); + } + } + } + + }); + } + + private void populatePerformanceTable() { + + try { + DatatableVisitor PerformanceVisitor = ClientFileManager.loadFile("datatables/performance/performance.iff", DatatableVisitor.class); + + //rformanceVisitor. + + for (int r = 0; r < PerformanceVisitor.getRowCount(); r++) { + Performance p = new Performance(); + + /* for (int j=0; j < PerformanceVisitor.getColumnCount(); j++) { + System.out.println(j + ": " + PerformanceVisitor.getObject(r, j)); + }*/ + + p.setPerformanceName( ( (String) PerformanceVisitor.getObject(r, 0) ).toLowerCase()); + p.setInstrumentAudioId((int) PerformanceVisitor.getObject(r, 1)); + p.setRequiredSong((String) PerformanceVisitor.getObject(r, 2)); + p.setRequiredInstrument((String) PerformanceVisitor.getObject(r, 3)); + p.setRequiredDance((String) PerformanceVisitor.getObject(r, 4)); + p.setDanceVisualId((int) PerformanceVisitor.getObject(r, 5)); + p.setActionPointsPerLoop((int) PerformanceVisitor.getObject(r, 6)); + p.setLoopDuration((float) PerformanceVisitor.getObject(r, 7)); + p.setType((int) PerformanceVisitor.getObject(r, 8)); + p.setBaseXp((int) PerformanceVisitor.getObject(r, 9)); + p.setFlourishXpMod((int) PerformanceVisitor.getObject(r, 10)); + p.setHealMindWound((int) PerformanceVisitor.getObject(r, 11)); + p.setHealShockWound((int) PerformanceVisitor.getObject(r, 12)); + p.setRequiredSkillMod((String) PerformanceVisitor.getObject(r, 13)); + p.setRequiredSkillModValue((int) PerformanceVisitor.getObject(r, 14)); + p.setMainloop((String) PerformanceVisitor.getObject(r, 15)); + p.setFlourish1((String) PerformanceVisitor.getObject(r, 16)); + p.setFlourish2((String) PerformanceVisitor.getObject(r, 17)); + p.setFlourish3((String) PerformanceVisitor.getObject(r, 18)); + p.setFlourish4((String) PerformanceVisitor.getObject(r, 19)); + p.setFlourish5((String) PerformanceVisitor.getObject(r, 20)); + p.setFlourish6((String) PerformanceVisitor.getObject(r, 21)); + p.setFlourish7((String) PerformanceVisitor.getObject(r, 22)); + p.setFlourish8((String) PerformanceVisitor.getObject(r, 23)); + p.setIntro((String) PerformanceVisitor.getObject(r, 24)); + p.setOutro((String) PerformanceVisitor.getObject(r, 25)); + p.setLineNumber(r); + + if (p.getType() == -1788534963) { + danceMap.put(new Integer(p.getDanceVisualId()), p); + } + performances.put(p.getPerformanceName(), p); + performancesByIndex.put(r, p); + } + + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } + + private void populateSkillCaps() { + try { + DatatableVisitor buffBuilder = ClientFileManager.loadFile("datatables/buff/buff_builder.iff", DatatableVisitor.class); + + for (int r = 0; r < buffBuilder.getRowCount(); r++) { + String skillName = ((String) buffBuilder.getObject(r, 0)); + String category = ((String) buffBuilder.getObject(r, 1)); + String statAffects = ((String) buffBuilder.getObject(r, 2)); + int maxTimes = ((int) buffBuilder.getObject(r, 3)); + int cost = ((int) buffBuilder.getObject(r, 4)); + int affectAmount = ((int) buffBuilder.getObject(r, 5)); + String requiredExpertise = ((String) buffBuilder.getObject(r, 6)); + + BuffBuilder item = new BuffBuilder(); + item.setStatName(skillName); + item.setCategory(category); + item.setStatAffects(statAffects); + item.setMaxTimesApplied(maxTimes); + item.setCost(cost); + item.setAffectAmount(affectAmount); + item.setRequiredExpertise(requiredExpertise); + + buffBuilderSkills.add(item); + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } + + private void populatePerformanceEffects() { + try { + DatatableVisitor effects = ClientFileManager.loadFile("datatables/performance/perform_effect.iff", DatatableVisitor.class); + + for (int r = 0; r < effects.getRowCount(); r++) { + String effectName = ((String) effects.getObject(r, 0)); + String performanceType = ((String) effects.getObject(r, 1)); + int requiredSkillModValue = ((int) effects.getObject(r, 2)); + Boolean requiredPerforming = ((Boolean) effects.getObject(r, 3)); + int targetType = ((int) effects.getObject(r, 4)); + float effectDuration = ((float) effects.getObject(r, 5)); + int effectActionCost = ((int) effects.getObject(r, 6)); + + PerformanceEffect item = new PerformanceEffect(); + item.setEffectActionCost(effectActionCost); + item.setEffectDuration(effectDuration); + item.setName(effectName); + item.setPerformanceType(performanceType); + item.setRequiredPerforming(requiredPerforming); + item.setRequiredSkillModValue(requiredSkillModValue); + item.setTargetType(targetType); + + performanceEffects.put(effectName.toLowerCase(), item); + + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } + + private void registerCommands() { + core.commandService.registerCommand("bandflourish"); + core.commandService.registerCommand("flourish"); + core.commandService.registerAlias("flo","flourish"); + core.commandService.registerCommand("groupdance"); + core.commandService.registerCommand("startdance"); + core.commandService.registerCommand("stopdance"); + core.commandService.registerCommand("watch"); + core.commandService.registerCommand("stopwatching"); + core.commandService.registerCommand("holoEmote"); + core.commandService.registerCommand("covercharge"); + //core.commandService.registerCommand("en_holographic_recall"); + //core.commandService.registerCommand("en_holographic_image"); + core.commandService.registerCommand("imagedesign"); + // TODO: Add /bandsolo, /bandpause, /changeBandMusic, /changeDance, /changeGroupDance, /changeMusic + + // Entertainer Effects + core.commandService.registerCommand("centerStage"); + core.commandService.registerCommand("colorSwirl"); + core.commandService.registerCommand("colorlights"); + core.commandService.registerCommand("floorLights"); // referred to also as Dance Floor + core.commandService.registerCommand("dazzle"); + core.commandService.registerCommand("distract"); + core.commandService.registerCommand("featuredSolo"); + core.commandService.registerCommand("firejet"); + core.commandService.registerCommand("firejet2"); + core.commandService.registerCommand("laserShow"); + core.commandService.registerCommand("smokebomb"); + core.commandService.registerCommand("spotlight"); + core.commandService.registerCommand("ventriloquism"); + } + + public void giveInspirationBuff(CreatureObject reciever, CreatureObject buffer, Vector buffVector) { + + Vector availableStats = buffBuilderSkills; + Vector stats = new Vector(); + + for (BuffItem item : buffVector) { + for(BuffBuilder builder : availableStats) { + if(builder.getStatName().equalsIgnoreCase(item.getSkillName())) { + if(builder.getMaxTimesApplied() < item.getInvested()) + return; + + // Ent. Expertise Percent + (invested points * affect amount) = stat + int bonusPoints = (int) (builder.getAffectAmount() *((float) item.getEntertainerBonus()/100f)); + int affectTotal = bonusPoints + (item.getInvested() * builder.getAffectAmount()); + + BuffItem stat = new BuffItem(builder.getStatAffects(), item.getInvested(), item.getEntertainerBonus()); + stat.setAffectAmount(affectTotal); + + stats.add(stat); + } + } + } + + reciever.setAttachment("buffWorkshop", stats); + + if (buffer == reciever) + reciever.setAttachment("inspireDuration", 215); + + //PlayerObject rPlayer = (PlayerObject) reciever.getSlottedObject("ghost"); + + //long timeStamp = 0; + //if (reciever.getAttachment("buffWorkshopTimestamp") != null) + //timeStamp = (long) reciever.getAttachment("buffWorkshopTimestamp"); + + if (reciever.hasBuff("buildabuff_inspiration")) + core.buffService.removeBuffFromCreature(reciever, reciever.getBuffByName("buildabuff_inspiration")); + + core.buffService.addBuffToCreature(reciever, "buildabuff_inspiration", buffer); + /*if (core.buffService.addBuffToCreature(reciever, "buildabuff_inspiration", buffer) && !rPlayer.getProfession().equals("entertainer_1a")) { + if (timeStamp == 0 || (System.currentTimeMillis() - timeStamp > 86400000)) { + float random = ranWorkshop.nextFloat(); + if (random < 0.75f) { + + if(rPlayer.getProfession().contains("trader")) { core.collectionService.addCollection(buffer, "prof_trader"); } + + else { + core.collectionService.addCollection(buffer, rPlayer.getProfession()); + } + } + } else { buffer.sendSystemMessage("@collection:buffed_too_soon", (byte) 0); } + reciever.setAttachment("buffWorkshopTimestamp", System.currentTimeMillis()); + }*/ + } + + public int getDanceVisualId(String danceName) { + Performance p = performances.get(danceName); + + //if 0 , then it's no dance. need to handle that in the script. + return ((p == null) ? 0 : p.getDanceVisualId()); + } + + public Map getAvailableDances(CreatureObject actor) { + + Map dances = new HashMap(); + for (int index : danceMap.keySet()) { + if (!canDance(actor, danceMap.get(index) )) { continue; } + dances.put( new Long( danceMap.get(index).getDanceVisualId() ), danceMap.get(index).getPerformanceName() ); + } + + return dances; + + } + + public boolean isDance(int visualId) { + return ( danceMap.get(visualId) != null ) ; + } + + public boolean canDance(CreatureObject actor, Performance dance) { + if (actor.hasAbility(dance.getRequiredDance())) { + return true; + } + return false; + } + + public boolean canDance(CreatureObject actor, int visualId) { + if (!isDance(visualId)) { return false; } + return canDance(actor, danceMap.get(visualId)); + } + + public Performance getDance(int visualId) { + return danceMap.get(visualId); + } + + public Performance getPerformance(String name) { + return performances.get(name); + } + + public Performance getPerformanceByIndex(int index) { + return performancesByIndex.get(index); + } + + public Map getPerformanceEffects() { + return performanceEffects; + } + + public void startPerformance(CreatureObject actor, int performanceId, int performanceCounter, String skillName, boolean isDance) { + actor.setPerformanceId(performanceId, isDance); + actor.setPerformanceCounter(performanceCounter); + actor.setCurrentAnimation(skillName); + actor.setPerformanceType(isDance); + + actor.startPerformance(); + } + + public void startPerformanceExperience(final CreatureObject entertainer) { + final ScheduledFuture experienceTask = scheduler.scheduleAtFixedRate(() -> { + + Performance p = performancesByIndex.get(entertainer.getPerformanceId()); + if (p == null) { + entertainer.setFlourishCount(0); + return; + } + + int floXP = p.getFlourishXpMod(); + int floCount = entertainer.getFlourishCount(); + + //FIXME: this is not an accurate implementation yet. It needs group bonuses and other things. + int XP = (int) Math.round( ((floCount > 2) ? 2 : floCount) * floXP * 3.8 ); + + entertainer.setFlourishCount(0); + core.playerService.giveExperience(entertainer, XP); + + }, 10000, 10000, TimeUnit.MILLISECONDS); + + entertainer.setEntertainerExperience(experienceTask); + + } + + public void startSpectating(final CreatureObject spectator, final CreatureObject performer, boolean spectateType) { + + // visual + if (spectator.getPerformanceWatchee() == performer && spectateType) + spectator.getPerformanceWatchee().removeSpectator(spectator); + // music + else if (spectator.getPerformanceListenee() == performer && !spectateType) + spectator.getPerformanceListenee().removeSpectator(spectator); + + spectator.setPerformanceWatchee(performer); + performer.addSpectator(spectator); + spectator.setMoodAnimation("entertained"); + + final ScheduledFuture spectatorTask = scheduler.scheduleAtFixedRate(() -> { + + if (spectator.getPosition().getDistance2D(performer.getWorldPosition()) > (float) 70) { + + if(((performer.getPerformanceType()) ? "dance" : "music").equals("dance")) { + spectator.setPerformanceWatchee(null); + spectator.sendSystemMessage("You stop watching " + performer.getCustomName() + " because " + performer.getCustomName() + + " is out of range.", (byte) 0); + } + else { + spectator.setPerformanceListenee(null); + spectator.sendSystemMessage("You stop listening to " + performer.getCustomName() + " because " + performer.getCustomName() + + " is out of range.", (byte) 0); + } + spectator.setMoodAnimation("neutral"); + performer.removeSpectator(spectator); + + if (spectator.getInspirationTick().cancel(true)) + spectator.getSpectatorTask().cancel(true); + } + + }, 2, 2, TimeUnit.SECONDS); + + spectator.setSpectatorTask(spectatorTask); + + if(((PlayerObject)performer.getSlottedObject("ghost")).getProfession().equals("entertainer_1a")) { + handleInspirationTicks(spectator, performer); + } + + if(spectateType) + spectator.sendSystemMessage("You start watching " + performer.getCustomName() + ".", (byte) 0); + else + spectator.sendSystemMessage("You start listening to " + performer.getCustomName() + ".", (byte) 0); + + } + + public void performFlourish(final CreatureObject performer, int flourish) { + + if (performer.getFlourishCount() > 0 || performer.isPerformingFlourish()) { + performer.sendSystemMessage("@performance:flourish_wait_self", (byte) 0); + return; + } + Performance performance = getPerformanceByIndex(performer.getPerformanceId()); + + if(performance == null) + return; + + String anmFlo = "skill_action_" + flourish; + + if (flourish == 9) + anmFlo = "mistake"; + + performer.setFlourishCount(1); + performer.setPerformingFlourish(true); + performer.sendSystemMessage("@performance:flourish_perform", (byte) 0); + performer.doSkillAnimation(anmFlo); + + scheduler.schedule(() -> { + performer.setFlourishCount(0); + performer.setPerformingFlourish(false); + }, (long) performance.getLoopDuration(), TimeUnit.SECONDS); + } + + public boolean performEffect(final CreatureObject performer, String command, String effect, TangibleObject target) { + PerformanceEffect pEffect = performanceEffects.get(command.toLowerCase()); + + if(pEffect == null) + return false; + + String performance = (performer.getPerformanceType()) ? "dance" : "music"; + + if(performer.isPerformingEffect()) { + performer.sendSystemMessage("@performance:effect_wait_self", (byte) 0); + return false; + } + + if (performer.getPosture() != Posture.SkillAnimating) { + performer.sendSystemMessage("@performance:effect_not_performing", (byte) 0); + return false; + } + + if(performance.equals("dance") && !pEffect.isDance() || performance.equals("music") && !pEffect.isMusic()) { + performer.sendSystemMessage("@performance:effect_not_performing_correct", (byte) 0); + return false; + } + + if(performer.getAction() < pEffect.getEffectActionCost()) { + performer.sendSystemMessage("@performance:effect_too_tired", (byte) 0); + return false; + } + + performer.setAction(performer.getAction() - pEffect.getEffectActionCost()); + + performer.setPerformingEffect(true); + + if(target != null) + target.playEffectObject(effect, ""); + + else + performer.playEffectObject(effect, ""); + + scheduler.schedule(() -> { + performer.setPerformingEffect(false); + }, (long) pEffect.getEffectDuration(), TimeUnit.SECONDS); + + return true; + } + + public void handleInspirationTicks(final CreatureObject spectator, final CreatureObject performer) { + // http://youtu.be/WqyAde-oC7o?t=11m14s << Player watching entertainer (Has ring only, no pet, + 15 min ticks) + // TODO: Camp/Cantina checks for expertise and duration bonus %. Right now only using basic values. + final ScheduledFuture inspirationTick = scheduler.scheduleAtFixedRate(() -> { + + int time = 0; // current buff duration time (minutes) + int buffCap = 215; // 5 hours 35 minutes - 2 hours (buff duration increase bonus) << Taken from video, doesn't account for performance bonuses etc. + + if (spectator.getAttachment("inspireDuration") != null) + time+= (int) spectator.getAttachment("inspireDuration"); + + if (performer.getSkillMod("expertise_en_inspire_buff_duration_increase") != null) { + SkillMod durationMod = performer.getSkillMod("expertise_en_inspire_buff_duration_increase"); + buffCap += durationMod.getBase() + durationMod.getModifier(); + } + + if (time >= buffCap) { + spectator.setAttachment("inspireDuration", buffCap); // incase someone went over cap + spectator.getInspirationTick().cancel(true); + } else { + int entTick = 10; + if (performer.getSkillMod("expertise_en_inspire_pulse_duration_increase") != null) { + SkillMod pulseMod = performer.getSkillMod("expertise_en_inspire_pulse_duration_increase"); + entTick += pulseMod.getBase() + pulseMod.getModifier(); + } + + int duration = (time + entTick); // minutes + int hMinutes = MathUtilities.secondsToHourMinutes(duration * 60); + int hours = MathUtilities.secondsToWholeHours(duration * 60); + + spectator.showFlyText(OutOfBand.ProsePackage("@spam:buff_duration_tick_observer", "TO", hours + " hours , " + hMinutes + " minutes "), 0.66f, new RGB(255, 182, 193), 3, false); + + spectator.setAttachment("inspireDuration", duration); + //System.out.println("Inspire Duration: " + spectator.getAttachment("inspireDuration") + " on " + spectator.getCustomName()); + } + + }, 10, 10, TimeUnit.SECONDS); + spectator.setInspirationTick(inspirationTick); + } + + public void handleCoverCharge(final CreatureObject actor, final CreatureObject performer) { + final int charge = performer.getCoverCharge(); + + if (charge == 0) + return; + + else { + SUIWindow notification = core.suiService.createMessageBox(InputBoxType.INPUT_BOX_OK, "Cover Charge", performer.getCustomName() + + " has a cover charge of " + performer.getCoverCharge() + ". Do you wish to pay it?", actor, performer, (float) 30); + Vector returnParams = new Vector(); + + returnParams.add("btnOk:Text"); + + notification.addHandler(0, "", Trigger.TRIGGER_OK, returnParams, (owner, eventType, returnList) -> { + if (eventType == 0) { + if (charge > actor.getCashCredits()) { + actor.sendSystemMessage("You do not have enough credits to cover the charge.", (byte) 0); // TODO: Find the message in the STF files. + return; + } else{ + actor.setCashCredits(actor.getCashCredits() - charge); + actor.sendSystemMessage("You payed the cover charge of " + charge + " to " + performer.getCustomName(), (byte) 0); // TODO: Find the message in the STF files. + performer.setCashCredits(performer.getCashCredits() + charge); + + startSpectating(actor, performer, performer.getPerformanceType()); + + } + } + }); + core.suiService.openSUIWindow(notification); + } + } + + private void handleImageDesign(CreatureObject designer, CreatureObject designTarget, Vector colorAttributes, Vector bodyAttributes, String hairTemplate, String holoEmote) { + + if (hairTemplate != null && !hairTemplate.equals("")) { + if(!hairTemplate.startsWith("object/tangible/hair/")) + return; + String sharedHairTemplate = hairTemplate.replace("/hair_", "/shared_hair_"); + TangibleObject hairObject = (TangibleObject) core.objectService.createObject(sharedHairTemplate, designTarget.getPlanet()); + + if (hairObject == null) + return; + + TangibleObject oldHair = (TangibleObject) designTarget.getSlottedObject("hair"); + if (oldHair == null) + return; + core.objectService.destroyObject(oldHair); + + designTarget.add(hairObject); + + designTarget.addObjectToEquipList(hairObject); + + } + + if (bodyAttributes != null) { + for (IDAttribute atr : bodyAttributes) { + if (atr.getName().equals("height")) + designTarget.setHeight(atr.getFloatValue()); + + // TODO: Body Attributes + } + } + + if (colorAttributes != null) { + for (IDAttribute atr : colorAttributes) { + if (atr.getName().equals("color_hair")){ + // TODO: Color Attributes + } + } + } + if (holoEmote != null) { + PlayerObject player = (PlayerObject) designTarget.getSlottedObject("ghost"); + if (player != null) { + player.setHoloEmote(holoEmote); + player.setHoloEmoteUses(20); + designTarget.sendSystemMessage("@image_designer:new_holoemote", (byte) 0); + } + } + + } + + private void loadCharacterCustomizationData() { + try { + IDManagerVisitor visitor = ClientFileManager.loadFile("customization/customization_id_manager.iff", IDManagerVisitor.class); + + designMap = visitor.getCustomizationMap(); + + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } + + public String getCustomizationString(int number){ + synchronized (designMap) { + for (Entry entry : designMap.entrySet()) { + if (entry.getValue().intValue() == number) { + return entry.getKey(); + } + } + } + return ""; + } + + public int getCustomizationValue(String customizationString) { + synchronized(designMap){ + for(Entry entry : designMap.entrySet()) { + if (entry.getKey().equals(customizationString)) { + return entry.getValue().intValue(); + } + } + } + return 0; + } + + @Override + public void shutdown() { + + } + +} diff --git a/src/services/EquipmentService.java b/src/services/EquipmentService.java index 7125fa32..380dae39 100644 --- a/src/services/EquipmentService.java +++ b/src/services/EquipmentService.java @@ -21,8 +21,18 @@ ******************************************************************************/ package services; +import java.io.IOException; +import java.nio.file.FileVisitResult; +import java.nio.file.FileVisitor; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.ArrayList; import java.util.Map; import java.util.Map.Entry; +import java.util.concurrent.ConcurrentHashMap; import java.util.TreeMap; import org.python.core.Py; @@ -35,11 +45,13 @@ import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; import resources.objects.player.PlayerObject; +import services.equipment.BonusSetTemplate; public class EquipmentService implements INetworkDispatch { private NGECore core; - + private Map bonusSetTemplates = new ConcurrentHashMap(); + public EquipmentService(NGECore core) { this.core = core; } @@ -51,70 +63,27 @@ public class EquipmentService implements INetworkDispatch { @Override public void shutdown() { - - } - - public void weaponCriticalToDisplay(CreatureObject actor, SWGObject item, boolean add) { - - if (add == true) { - switch(item.getStringAttribute("cat_wpn_damage.wpn_category")) { - - case "Rifle": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_rifle") * 100); // rifle - case "Carbine": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_carbine") * 100); // carbine - case "Pistol": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_pistol") * 100); // pistol - case "One-Handed Melee": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_1h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // one-handed - case "Two-Handed Melee": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_2h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // two-handed - case "Unarmed": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_unarmed") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // unarmed - case "Polearm": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_polearm") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // polearm - case "Free Targeting Heavy Weapon": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_heavy") * 100); // Heavy - - - } - - } - - if (add == false) { - - switch(item.getStringAttribute("cat_wpn_damage.wpn_category")) { - - case "Rifle": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_rifle") * 100); // rifle - case "Carbine": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_carbine") * 100); // carbine - case "Pistol": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_pistol") * 100); // pistol - case "One-Handed Melee": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_1h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // one-handed - case "Two-Handed Melee": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_2h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // two-handed - case "Unarmed": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_unarmed") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // unarmed - case "Polearm": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_polearm") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // polearm - case "Free Targeting Heavy Weapon": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_heavy") * 100); // Heavy - } - } - } - - public String getFormalProfessionName(String stfName) { - String formalName = ""; - - switch (stfName) { - case "force_sensitive_1a": formalName = "Jedi"; break; - case "bounty_hunter_1a": formalName = "Bounty Hunter"; break; - case "officer_1a": formalName = "Officer"; break; - case "smuggler_1a": formalName = "Smuggler"; break; - case "entertainer_1a": formalName = "Entertainer"; break; - case "spy_1a": formalName = "Spy"; break; - case "medic_1a": formalName = "Medic"; break; - case "commando_1a": formalName = "Commando"; break; - - default: formalName = "Trader"; break; // Ziggy: Trader profession names are a bit irregular, so this is used. - - } - return formalName; } public boolean canEquip(CreatureObject actor, SWGObject item) { + // TODO: Species restrictions + // TODO: Gender restrictions + boolean result = true; + if (item == null) + return false; + + if (item.getAttributes().toString().contains("cat_armor")) + { + if (actor.hasAbility("wear_all_armor")) result = true; // Change to "wear_all_armor" ability instead of lvl 22 + else return false; + } + if (item.getStringAttribute("class_required") != null) { String profession = ((PlayerObject) actor.getSlottedObject("ghost")).getProfession(); - if (item.getStringAttribute("class_required").contentEquals(getFormalProfessionName(profession))) + if (item.getStringAttribute("class_required").contentEquals(core.playerService.getFormalProfessionName(profession)) || item.getStringAttribute("class_required").contentEquals("None")) result = true; else return false; @@ -126,134 +95,221 @@ public class EquipmentService implements INetworkDispatch { else return false; - if (item.getAttributes().toString().contains("required_combat_level")) + if (item.getAttributes().containsKey("required_combat_level")) + { if (actor.getLevel() >= item.getIntAttribute("required_combat_level")) result = true; else return false; + } + + if(item.getAttachment("unity") != null) + { + actor.sendSystemMessage("@unity:cannot_remove_ring", (byte) 0); + return false; + } return result; } - public void calculateForceProtection(CreatureObject actor, SWGObject item, boolean add) { - int type = 0; - int level = 0; - int[][] protection = {{1400,3000,4000,5000,6500},{0, 0, 4500, 5600, 6500}}; - - switch ((String) item.getAttachment("type")) { - case "jedi_robe": type = 0; break; - case "jedi_cloak": type = 1; break; - } - - switch (item.getStringAttribute("protection_level")) { - case "Faint": level = 0; break; - case "Weak": level = 1; break; - case "Lucent": level = 2; break; - case "Luminous": level = 3; break; - case "Radiant": level = 4; break; - } - - if (add==true) { - core.skillModService.addSkillMod(actor, "kinetic", protection[type][level]); - core.skillModService.addSkillMod(actor, "energy", protection[type][level]); - core.skillModService.addSkillMod(actor, "heat", protection[type][level]); - core.skillModService.addSkillMod(actor, "cold", protection[type][level]); - core.skillModService.addSkillMod(actor, "acid", protection[type][level]); - core.skillModService.addSkillMod(actor, "electricity", protection[type][level]); - } else { - core.skillModService.deductSkillMod(actor, "kinetic", protection[type][level]); - core.skillModService.deductSkillMod(actor, "energy", protection[type][level]); - core.skillModService.deductSkillMod(actor, "heat", protection[type][level]); - core.skillModService.deductSkillMod(actor, "cold", protection[type][level]); - core.skillModService.deductSkillMod(actor, "acid", protection[type][level]); - core.skillModService.deductSkillMod(actor, "electricity", protection[type][level]); - } - - } - - public void equip(CreatureObject actor, SWGObject item) { - + public void equip(CreatureObject actor, SWGObject item) + { String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff")); String serverTemplate = template.replace(".iff", ""); - PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "equip"); - if(func != null) - func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); - - if (item.getStringAttribute("protection_level") != null) - calculateForceProtection(actor, item, true); - // TODO: faction restrictions - You had to be a Combatant as minimum in order to EQUIP an item. - // TODO: Species restrictions - // TODO: Gender restrictions - // TODO: crit enhancement from crafted weapons - // TODO: check for armor category in order to add resistance to certain DoT types - // TODO: Calculate actual armor values (REMINDER: Check if the player is wearing a jedi robe/cloak (look for force protection intensity). If they are, they shouldn't receive any additional protection from other items with armour.) + PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "equip"); + if(func != null) func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); + // TODO: bio-link (assign it by objectID with setAttachment and then just display the customName for that objectID). - if(item.getStringAttribute("cat_wpn_damage.wpn_category") != null) - if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true) - weaponCriticalToDisplay(actor, item, true); - - Map attributes = new TreeMap(item.getAttributes()); - - for(Entry e : attributes.entrySet()) { - if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { - core.skillModService.addSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); - } - - if(e.getKey().startsWith("cat_stat_mod_bonus.@stat_n:")) { - core.skillModService.addSkillMod(actor, e.getKey().replace("cat_stat_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); - } - - if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) { - actor.setMaxHealth(actor.getMaxHealth() + Integer.parseInt((String) e.getValue())); - } - - if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) { - actor.setMaxAction(actor.getMaxAction() + Integer.parseInt((String) e.getValue())); - } - } - - if(!actor.getEquipmentList().contains(item)) + if(!actor.getEquipmentList().contains(item)) + { actor.addObjectToEquipList(item); - + processItemAtrributes(actor, item, true); + } } - - public void unequip(CreatureObject actor, SWGObject item) { - + public void unequip(CreatureObject actor, SWGObject item) + { String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff")); String serverTemplate = template.replace(".iff", ""); + PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "unequip"); - if(func != null) - func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); + if(func != null) func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); - if (item.getStringAttribute("protection_level") != null) - calculateForceProtection(actor, item, false); - if(item.getStringAttribute("cat_wpn_damage.wpn_category") != null) - if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true) - weaponCriticalToDisplay(actor, item, false); - - Map attributes = new TreeMap(item.getAttributes()); - - for(Entry e : attributes.entrySet()) { - - if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { - core.skillModService.deductSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); - } - if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) { - actor.setMaxHealth(actor.getMaxHealth() - Integer.parseInt((String) e.getValue())); - } - if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) { - actor.setMaxAction(actor.getMaxAction() - Integer.parseInt((String) e.getValue())); - } - - } - - if(actor.getEquipmentList().contains(item)) + if(actor.getEquipmentList().contains(item)) + { actor.removeObjectFromEquipList(item); - + processItemAtrributes(actor, item, false); + } + } + + public void processItemAtrributes(CreatureObject creature, SWGObject item, boolean equipping) + { + // TODO: crit enhancement from crafted weapons + // TODO: check for armor category in order to add resistance to certain DoT types + + Map attributes = new TreeMap(item.getAttributes()); + + if(equipping) + { + if(item.getStringAttribute("cat_wpn_damage.wpn_category") != null) creature.addSkillMod("display_only_critical", getWeaponCriticalChance(creature, item)); + if(item.getStringAttribute("proc_name") != null) core.buffService.addBuffToCreature(creature, item.getStringAttribute("proc_name").replace("@ui_buff:", ""), creature); + + for(Entry e : attributes.entrySet()) + { + if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) + { + core.skillModService.addSkillMod(creature, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); + } + + if(e.getKey().startsWith("cat_stat_mod_bonus.@stat_n:")) + { + core.skillModService.addSkillMod(creature, e.getKey().replace("cat_stat_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); + } + + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) + { + creature.setMaxHealth(creature.getMaxHealth() + Integer.parseInt((String) e.getValue())); + } + + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) + { + creature.setMaxAction(creature.getMaxAction() + Integer.parseInt((String) e.getValue())); + } + } + } + else + { + if(item.getStringAttribute("cat_wpn_damage.wpn_category") != null) creature.deductSkillMod("display_only_critical", getWeaponCriticalChance(creature, item)); + if(item.getStringAttribute("proc_name") != null) core.buffService.removeBuffFromCreatureByName(creature, item.getStringAttribute("proc_name").replace("@ui_buff:", "")); + + for(Entry e : attributes.entrySet()) + { + if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) + { + core.skillModService.deductSkillMod(creature, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_stat_mod_bonus.@stat_n:")) + { + core.skillModService.deductSkillMod(creature, e.getKey().replace("cat_stat_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); + } + + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) + { + creature.setMaxHealth(creature.getMaxHealth() - Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) + { + creature.setMaxAction(creature.getMaxAction() - Integer.parseInt((String) e.getValue())); + } + } + } + + calculateArmorProtection(creature, equipping); + + if(item.getAttachment("setBonus") != null) + { + BonusSetTemplate bonus = bonusSetTemplates.get((String)item.getAttachment("setBonus")); + bonus.callScript(creature); + } } + private void calculateArmorProtection(CreatureObject creature, boolean equipping) + { + int wornArmourPieces = 0, forceProtection = 0; + Map protection = new TreeMap(); + + for(SWGObject item : new ArrayList(creature.getEquipmentList())) + { + Map attributes = new TreeMap(item.getAttributes()); + boolean incPieceCount = false; + + if(item.getStringAttribute("protection_level") != null) + { + forceProtection = getForceProtection(item); + break; + } + + for(Entry e : attributes.entrySet()) + { + if(e.getKey().startsWith("cat_armor_standard_protection")) + { + String protectionType = e.getKey().replace("cat_armor_standard_protection.armor_eff_", ""); + float modifier = Float.parseFloat(core.scriptService.getMethod("scripts/equipment/", "slot_protection", creature.getSlotNameForObject(item)).__call__().asString()) / 100; + Float protectionAmount = Float.parseFloat((String) e.getValue()) * modifier; + + if(protection.containsKey(protectionType)) protection.replace(protectionType, protection.get(protectionType) + protectionAmount); + else protection.put(protectionType, protectionAmount); + incPieceCount = true; + } + else if(e.getKey().startsWith("cat_armor_special_protection")) + { + String protectionType = e.getKey().replace("cat_armor_special_protection.special_protection_type_", ""); + float modifier = Float.parseFloat(core.scriptService.getMethod("scripts/equipment/", "slot_protection", creature.getSlotNameForObject(item)).__call__().asString()) / 100; + Float protectionAmount = Float.parseFloat((String) e.getValue()) * modifier; + + if(protection.containsKey(protectionType)) protection.replace(protectionType, protection.get(protectionType) + protectionAmount); + else protection.put(protectionType, protectionAmount); + incPieceCount = true; + } + } + if(incPieceCount) wornArmourPieces++; + } + + if(protection.size() == 0) + { + protection.put("kinetic", (float) 0); + protection.put("energy", (float) 0); + protection.put("heat", (float) 0); + protection.put("cold", (float) 0); + protection.put("acid", (float) 0); + protection.put("electricity", (float) 0); + } + + for(Entry e : protection.entrySet()) + { + core.skillModService.deductSkillMod(creature, e.getKey(), creature.getSkillModBase(e.getKey())); + core.skillModService.addSkillMod(creature, e.getKey(), forceProtection); + if(wornArmourPieces >= 3) core.skillModService.addSkillMod(creature, e.getKey(), (int) e.getValue().floatValue()); + } + } + + private int getWeaponCriticalChance(CreatureObject actor, SWGObject item) { + int weaponCriticalChance = 0; + String weaponCriticalSkillMod = (core.scriptService.getMethod("scripts/equipment/", "weapon_critical", "weap_" + item.getStringAttribute("cat_wpn_damage.wpn_category").replace("@obj_attr_n:wpn_category_", "")).__call__().asString()); + + if(actor.getSkillMod(weaponCriticalSkillMod) != null) + weaponCriticalChance = actor.getSkillModBase(weaponCriticalSkillMod); + + return weaponCriticalChance; + } + + private int getForceProtection(SWGObject item) { + return core.scriptService.getMethod("scripts/equipment/", "force_protection", item.getAttachment("type") + "_" + item.getStringAttribute("protection_level")).__call__().asInt(); + } + + public void addBonusSetTemplate(BonusSetTemplate bonusSet) + { + bonusSetTemplates.put(bonusSet.getName(), bonusSet); + } + + public void loadBonusSets() { + Path p = Paths.get("scripts/equipment/bonus_sets/"); + FileVisitor fv = new SimpleFileVisitor() + { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException + { + core.scriptService.callScript("scripts/equipment/bonus_sets/", file.getFileName().toString().replace(".py", ""), "addBonusSet", core); + return FileVisitResult.CONTINUE; + } + }; + try + { + Files.walkFileTree(p, fv); + } + catch (IOException e) { e.printStackTrace(); } + } } diff --git a/src/services/GroupService.java b/src/services/GroupService.java index 5b1a9f07..fa4d9d5b 100644 --- a/src/services/GroupService.java +++ b/src/services/GroupService.java @@ -28,9 +28,8 @@ import java.util.Map; import resources.objects.Buff; import resources.objects.creature.CreatureObject; import resources.objects.group.GroupObject; - +import services.chat.ChatRoom; import main.NGECore; - import engine.clients.Client; import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; @@ -153,8 +152,14 @@ public class GroupService implements INetworkDispatch { invited.setGroupId(group.getObjectID()); addGroupBuffsToMember(group, leader); addGroupBuffsToMember(group, invited); - return; + core.chatService.createChatRoom("", "group." + group.getObjectID(), leader.getCustomName(), false); + ChatRoom groupChat = core.chatService.createChatRoom("", "group." + group.getObjectID() + ".GroupChat", leader.getCustomName(), false); + group.setChatRoomId(groupChat.getRoomId()); + groupChat.setVisible(false); + core.chatService.joinChatRoom(leader.getCustomName(), groupChat.getRoomId()); + core.chatService.joinChatRoom(invited.getCustomName(), groupChat.getRoomId()); + return; } GroupObject group = (GroupObject) core.objectService.getObject(leader.getGroupId()); @@ -166,6 +171,7 @@ public class GroupService implements INetworkDispatch { invited.setGroupId(group.getObjectID()); invited.sendSystemMessage("@group:joined_self", (byte) 0); addGroupBuffsToMember(group, invited); + core.chatService.joinChatRoom(invited.getCustomName(), group.getChatRoomId(), true); } else if(group.getMemberList().size() >= 8) { @@ -187,9 +193,8 @@ public class GroupService implements INetworkDispatch { for(SWGObject otherMember : group.getMemberList()) { if(otherMember != member) { for(Buff buff : ((CreatureObject) otherMember).getBuffList().get()) { - if(buff.isGroupBuff()) { - Buff newBuff = core.buffService.doAddBuff(member, buff.getBuffName()); - newBuff.setGroupBufferId(buff.getGroupBufferId()); + if(buff.isGroupBuff() && otherMember.getPlanet() == member.getPlanet() && otherMember.getPosition().getDistance2D(member.getWorldPosition()) <= 80) { + core.buffService.addBuffToCreature((CreatureObject) otherMember, buff.getBuffName(), member); } } return; @@ -206,7 +211,7 @@ public class GroupService implements INetworkDispatch { } } - public void handleGroupDisband(CreatureObject creature) { + public void handleGroupDisband(CreatureObject creature, boolean destroy) { if(creature.getGroupId() == 0) return; @@ -220,7 +225,7 @@ public class GroupService implements INetworkDispatch { List memberList = new ArrayList(group.getMemberList()); - if(group.getGroupLeader() != creature && group.getMemberList().size() > 2) { + if(group.getGroupLeader() != creature || !destroy || memberList.size() > 2) { group.removeMember(creature); creature.setInviteCounter(creature.getInviteCounter() + 1); @@ -229,17 +234,19 @@ public class GroupService implements INetworkDispatch { creature.updateGroupInviteInfo(); creature.setGroupId(0); creature.makeUnaware(group); + core.chatService.leaveChatRoom(creature, group.getChatRoomId()); creature.sendSystemMessage("You have left the group.", (byte) 0); for(SWGObject member : memberList) { - CreatureObject creature2 = (CreatureObject) member; creature2.sendSystemMessage(creature.getCustomName() + " has left the group.", (byte) 0); - } removeGroupBuffs(creature); + if (group.getMemberList().size() == 0) // ensure that there are no empty groups just incase.. + core.objectService.destroyObject(group.getObjectID()); + } else { for(SWGObject member : memberList) { @@ -251,22 +258,21 @@ public class GroupService implements INetworkDispatch { creature2.setInviteSenderName(""); creature2.updateGroupInviteInfo(); creature2.setGroupId(0); - + creature2.makeUnaware(group); + core.chatService.leaveChatRoom(creature2, group.getChatRoomId()); creature2.sendSystemMessage("The group has been disbanded.", (byte) 0); removeGroupBuffs((CreatureObject) member); } - + core.chatService.getChatRooms().remove(group.getChatRoomId()); core.objectService.destroyObject(group.getObjectID()); - } - } - - - + public void handleGroupDisband(CreatureObject creature) { + handleGroupDisband(creature, true); + } } diff --git a/src/services/InstanceService.java b/src/services/InstanceService.java new file mode 100644 index 00000000..09ec11d4 --- /dev/null +++ b/src/services/InstanceService.java @@ -0,0 +1,738 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +import resources.objects.building.BuildingObject; +import resources.objects.creature.CreatureObject; +import resources.objects.group.GroupObject; +import main.NGECore; + +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; +import engine.resources.common.CRC; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +public class InstanceService implements INetworkDispatch { + + private NGECore core; + + private Map> instanceMap = new HashMap>(); + + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); + + public class Instance { + + private long instanceId = 0; + private String name = ""; + private long startTime = System.currentTimeMillis(); + private Point3D instancePosition; + private Point3D spawnPosition; + private int duration = 0; + private int lockoutTime = 0; + private CreatureObject owner; + private List participants = new CopyOnWriteArrayList(); + private List activeParticipants = new CopyOnWriteArrayList(); + private List objectList = new CopyOnWriteArrayList(); + private ScheduledFuture task; + private boolean faulty = false; + private boolean closed = false; + + public Instance(long instanceId, String name, Point3D instancePosition, Point3D spawnPosition, int duration, int lockoutTime, CreatureObject owner) { + this.instanceId = instanceId; + this.name = name; + this.instancePosition = instancePosition; + this.spawnPosition = spawnPosition; + this.duration = (duration * 1000); + this.lockoutTime = lockoutTime; + this.owner = owner; + participants.add(owner); + } + + public Instance() { + + } + + public synchronized long getInstanceId() { + return instanceId; + } + + public synchronized String getName() { + return name; + } + + public synchronized long getStartTime() { + return startTime; + } + + public synchronized long getTimeRemaining() { + return ((closed) ? 0 : (((long) duration) - (System.currentTimeMillis() - startTime))); + } + + public synchronized boolean isOpen() { + if (closed || getTimeRemaining() <= 0) { + return false; + } + + return true; + } + + public synchronized Point3D getInstancePosition() { + return instancePosition; + } + + public synchronized Point3D getSpawnPosition() { + return spawnPosition; + } + + public synchronized int getDuration() { + return duration; + } + + public synchronized int getLockoutTime() { + return lockoutTime; + } + + public synchronized CreatureObject getOwner() { + return owner; + } + + public List getParticipants() { + return participants; + } + + public List getActiveParticipants() { + return participants; + } + + public List getObjectList() { + return objectList; + } + + public synchronized boolean addParticipant(CreatureObject participant) { + if (activeParticipants.contains(participant)) { + return true; + } + + if (activeParticipants.size() >= 8) { + return false; + } + + activeParticipants.add(participant); + participants.add(participant); + + return true; + } + + public synchronized boolean isActiveParticipant(CreatureObject participant) { + return activeParticipants.contains(participant); + } + + public synchronized boolean isFormerParticipant(CreatureObject participant) { + return participants.contains(participant); + } + + public synchronized boolean removeParticipant(CreatureObject participant) { + return activeParticipants.remove(participant); + } + + public synchronized ScheduledFuture getTask() { + return task; + } + + public synchronized void setTask(ScheduledFuture task) { + this.task = task; + } + + public synchronized boolean isFaulty() { + return faulty; + } + + public synchronized void setFaulty(boolean faulty) { + this.faulty = faulty; + } + + public synchronized boolean isClosed() { + return closed; + } + + public synchronized void close() { + objectList.stream().forEach(core.objectService::destroyObject); + objectList.clear(); + closed = true; + } + + } + + public InstanceService(NGECore core) { + this.core = core; + + Calendar c = Calendar.getInstance(); + Date now = new Date(); + + c.setTime(now); + + if (c.get(Calendar.HOUR_OF_DAY) >= 6) { + c.add(Calendar.DAY_OF_MONTH, 1); + } + + c.set(Calendar.HOUR_OF_DAY, 6); + c.set(Calendar.MINUTE, 0); + c.set(Calendar.SECOND, 0); + c.set(Calendar.MILLISECOND, 0); + + long initialDelay = (c.getTimeInMillis() - now.getTime()); + + final Map> reference = instanceMap; + + scheduler.scheduleAtFixedRate(new Runnable() { + + private Map> instanceMap = reference; + + public void run() { + for (List instanceList : instanceMap.values()) { + for (Instance instance : instanceList) { + if ((instance.isClosed() || !instance.isOpen())) { + instanceList.remove(instance); + } + } + } + } + + }, initialDelay, 86400000, TimeUnit.MILLISECONDS); + } + + /* + * @description Create a brand new instance. + * + * @param instanceName Buildout name of the instance to build. + * @param owner Creator's creature object. + */ + public synchronized Instance create(String instanceName, CreatureObject owner) { + Instance instance = null; + + try { + String planetName = core.scriptService.callScript("scripts/instances/", instanceName, "getTerrain").asString(); + Planet planet = core.terrainService.getPlanetByPath(planetName); + Point3D spawnPosition = new Point3D(); + int duration = (core.scriptService.callScript("scripts/instances/", instanceName, "getDuration").asInt() * 60); + int lockoutTime = core.scriptService.callScript("scripts/instances/", instanceName, "getLockoutTime").asInt();; + + core.scriptService.callScript("scripts/instances/", instanceName, "getSpawnPosition", spawnPosition); + + DatatableVisitor buildoutTable = ClientFileManager.loadFile("datatables/buildout/areas_" + planet.getName() + ".iff", DatatableVisitor.class); + + for (int i = 0; i < buildoutTable.getRowCount(); i++) { + if (((String) buildoutTable.getObject(i, 0)).equals(instanceName)) { + Point3D instancePosition = new Point3D((Float) buildoutTable.getObject(i, 1), 0, (Float) buildoutTable.getObject(i, 2)); + + if (!instanceInUse(instanceName, instancePosition)) { + instance = new Instance(core.guildService.getGuildObject().getNextInstanceId(), instanceName, instancePosition, spawnPosition, duration, lockoutTime, owner); + } + } + } + + if (instance == null) { + return null; + } + + core.scriptService.callScript("scripts/instances/", instanceName, "setup", core, instance); + + final Instance reference = instance; + + instance.setTask(scheduler.scheduleAtFixedRate(new Runnable() { + + private Instance instance = reference; + private boolean sentCloseWarning = false; + + public void run() { + if (instance.getDuration() > 300 && instance.getTimeRemaining() <= 300 && !sentCloseWarning) { + instance.getActiveParticipants().stream().forEach(p -> p.sendSystemMessage("@instance:five_minute_warning", (byte) 0)); + sentCloseWarning = true; + } + + if (!instance.isOpen()) { + instance.getActiveParticipants().stream().forEach(p -> p.sendSystemMessage("@instance:instance_time_out", (byte) 0)); + close(instance); + } + + core.scriptService.callScript("scripts/instances/", instance.getName(), "run", core, instance); + } + + }, 1, 1, TimeUnit.MINUTES)); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + if (!instanceMap.containsKey(instance.getName())) { + instanceMap.put(instance.getName(), new ArrayList()); + } + + instanceMap.get(instance.getName()).add(instance); + + return instance; + } + + + /* + * @description Queue them for an instance for 19 seconds, remove if none available. + * + * @param instanceName Name of the instance .py script. + * @param creature Player's creature object to queue for the instance. + * + * @return None. + */ + public void queue(String instanceName, CreatureObject creature) { + Instance instance = null; + + if (creature.getBuffByName("instance_launching") != null) { + creature.sendSystemMessage("@instance:instance_request_pending", (byte) 0); + return; + } + + core.buffService.addBuffToCreature(creature, "instance_launching"); + + if (isLockedOut(instanceName, creature)) { + creature.sendSystemMessage("@instance:lockout_notification", (byte) 0); + core.buffService.removeBuffFromCreature(creature, creature.getBuffByName("instance_launching")); + return; + } + + instance = getActiveInstance(instanceName, creature); + + if (creature.getGroupId() > 0) { + if (instance == null) { + GroupObject group = (GroupObject) core.objectService.getObject(creature.getGroupId()); + + if (group != null) { + for (SWGObject member : group.getMemberList()) { + instance = getActiveInstance(instanceName, (CreatureObject) member); + + if (instance != null) { + break; + } + } + } + } else { + GroupObject group = (GroupObject) core.objectService.getObject(creature.getGroupId()); + + if (group != null) { + for (SWGObject member : group.getMemberList()) { + Instance instance2 = getActiveInstance(instanceName, (CreatureObject) member); + + if (!instance2.equals(instance)) { + creature.sendSystemMessage("@instance:fail_invalid_lockout", (byte) 0); + core.buffService.removeBuffFromCreature(creature, creature.getBuffByName("instance_launching")); + return; + } + } + } + } + } + + if (instance == null) { + instance = create(instanceName, creature); + + if (instance == null) { + creature.sendSystemMessage("@instance:all_full", (byte) 0); + core.buffService.removeBuffFromCreature(creature, creature.getBuffByName("instance_launching")); + return; + } + } + + if (instance.getActiveParticipants().size() >= 8) { + creature.sendSystemMessage("@instance:fail_instance_full", (byte) 0); + core.buffService.removeBuffFromCreature(creature, creature.getBuffByName("instance_launching")); + return; + } + + if (instance != null) { + add(instance, creature); + } + + core.buffService.removeBuffFromCreature(creature, creature.getBuffByName("instance_launching")); + } + + /* + * @description Adds a player to an instance. Can be used directly to avoid queue. + * + * @param instance Instance object. + * @param creature Player's creature object to add to the instance. + * + * @return None. + */ + public void add(Instance instance, CreatureObject creature) { + try { + String terrain = core.scriptService.callScript("scripts/instances/", instance.getName(), "getTerrain").asString(); + Planet planet = core.terrainService.getPlanetByPath(terrain); + int cellId = core.scriptService.callScript("scripts/instances/", instance.getName(), "getCellId").asInt(); + + if (cellId == -1) { + Point3D position = new Point3D(); + position.x = instance.getInstancePosition().x + instance.getSpawnPosition().x; + position.y = instance.getInstancePosition().y + instance.getSpawnPosition().y; + position.z = instance.getInstancePosition().z + instance.getSpawnPosition().z; + + core.simulationService.transferToPlanet(creature, planet, position, creature.getOrientation(), null); + } else { + String buildingName = core.scriptService.callScript("scripts/instances/", instance.getName(), "getBuilding").asString(); + BuildingObject building = null; + + Point3D buildingPosition = instance.getInstancePosition().clone(); + + DatatableVisitor buildoutTable = ClientFileManager.loadFile("datatables/buildout/" + planet.getName() + "/" + instance.getName() + ".iff", DatatableVisitor.class); + + for (int i = 0; i < buildoutTable.getRowCount(); i++) { + if (((Integer) buildoutTable.getObject(i, 3)) == CRC.StringtoCRC(buildingName)) { + buildingPosition.x += ((Float) buildoutTable.getObject(i, 5)); + buildingPosition.y += ((Float) buildoutTable.getObject(i, 6)); + buildingPosition.z += ((Float) buildoutTable.getObject(i, 7)); + } + } + + for (SWGObject object : core.objectService.getObjectList().values()) { + if (object instanceof BuildingObject && + object.getTemplate().equals(buildingName) && + object.getPosition().x == buildingPosition.x && + object.getPosition().y == buildingPosition.y && + object.getPosition().z == buildingPosition.z) { + building = (BuildingObject) object; + break; + } + } + + if (building == null) { + throw new Exception(); + } + + core.simulationService.transferToPlanet(creature, planet, instance.getSpawnPosition(), creature.getOrientation(), building.getCellByCellNumber(cellId)); + } + + instance.addParticipant(creature); + + core.scriptService.callScript("scripts/instances/", instance.getName(), "add", core, instance, creature); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * @description Removes a player from an instance. Can be used directly. + * + * @param instance Instance object. + * @param creature Player's creature object to add to the instance. + * + * @return None. + */ + public void remove(Instance instance, CreatureObject creature) { + try { + if (creature.getBuffByName("instance_exiting") != null) { + creature.sendSystemMessage("@instance:instance_request_pending", (byte) 0); + return; + } + + core.buffService.addBuffToCreature(creature, "instance_exiting"); + + String exitTerrain = core.scriptService.callScript("scripts/instances/", instance.getName(), "getExitTerrain").asString(); + Point3D exitPosition = new Point3D(); + Planet exitPlanet = core.terrainService.getPlanetByPath(exitTerrain); + + core.scriptService.callScript("scripts/instances/", instance.getName(), "getExitPosition", exitPosition); + + core.scriptService.callScript("scripts/instances/", instance.getName(), "remove", core, instance, creature); + + instance.removeParticipant(creature); + + core.simulationService.transferToPlanet(creature, exitPlanet, exitPosition, creature.getOrientation(), null); + } catch (Exception e) { + e.printStackTrace(); + } + + core.buffService.removeBuffFromCreature(creature, creature.getBuffByName("instance_exiting")); + } + + /* + * @description Closes an instance. + * + * @param instance Instance object. + * + * @return None. + */ + public synchronized void close(Instance instance) { + try { + if (instance.isClosed()) { + return; + } + + String exitTerrain = core.scriptService.callScript("scripts/instances/", instance.getName(), "getExitTerrain").asString(); + Point3D exitPosition = new Point3D(); + Planet exitPlanet = core.terrainService.getPlanetByPath(exitTerrain); + + core.scriptService.callScript("scripts/instances/", instance.getName(), "getExitPosition", exitPosition); + + for (CreatureObject participant : instance.getActiveParticipants()) { + instance.removeParticipant(participant); + core.simulationService.transferToPlanet(participant, exitPlanet, exitPosition, participant.getOrientation(), null); + } + + if (!instance.getTask().isCancelled()) { + instance.getTask().cancel(true); + } + + core.scriptService.callScript("scripts/instances/", instance.getName(), "destroy", core, instance); + + instance.close(); + } catch (Exception e) { + e.printStackTrace(); + instance.setFaulty(true); + } + } + + /* + * @description Checks if an instance area is in use. + * + * @param instanceName Buildout name of the instance. + * @param instancePosition Position of the instance in the game world. + * + * @return True if instance is in use. + */ + public boolean instanceInUse(String instanceName, Point3D instancePosition) { + if (instanceMap.containsKey(instanceName)) { + for (Instance instance : instanceMap.get(instanceName)) { + if (instance.isFaulty() || (instance.isOpen() && + instance.getInstancePosition().x == instancePosition.x && + instance.getInstancePosition().z == instancePosition.z)) { + return true; + } + } + } + + return false; + } + + /* + * @description Gets an instance object from an instanceId. + * + * @param instanceId Id of an instance you want an object for. + * + * @return Instance object, or null if none found. + */ + public Instance getInstance(long instanceId) { + for (List instanceList : instanceMap.values()) { + for (Instance instance : instanceList) { + if (instance.getInstanceId() == instanceId) { + return instance; + } + } + } + + return null; + } + + /* + * @description Checks if player is in an instance. + * + * @param creature Player's creature object. + * + * @return True if player is in an instance. + */ + public boolean isInInstance(CreatureObject creature) { + for (List instanceList : instanceMap.values()) { + for (Instance instance : instanceList) { + if (instance.isActiveParticipant(creature)) { + return true; + } + } + } + + return false; + } + + /* + * @description Checks if player is in a specific instance. + * + * @param instanceName Buildout name of the instance. + * @param creature Player's creature object. + * + * @return True if player is in the specified instance. + */ + public boolean isInInstance(String instanceName, CreatureObject creature) { + if (instanceMap.containsKey(instanceName)) { + for (Instance instance : instanceMap.get(instanceName)) { + if (instance.isActiveParticipant(creature)) { + return true; + } + } + } + + return false; + } + + /* + * @description Checks if player is in a specific instance. + * + * @param instance Instance object. + * @param creature Player's creature object. + * + * @return True if player is in the specified instance. + */ + public boolean isInInstance(Instance instance, CreatureObject creature) { + return instance.getActiveParticipants().contains(creature); + } + + /* + * @description Finds the instance object a player is currently in. + * + * @param creature Player's creature object. + * + * @return Instance object of the player, or null if they aren't in one. + */ + public Instance getActiveInstance(CreatureObject creature) { + for (List instanceList : instanceMap.values()) { + for (Instance instance : instanceList) { + if (instance.isActiveParticipant(creature)) { + return instance; + } + } + } + + return null; + } + + /* + * @description Finds the instance object of an instance a player is/has been in. + * + * @param instanceName Buildout name of the instance. + * @param creature Player's creature object. + * + * @return Instance object of the specified instance the specified player has entered since reset, or null if not found. + */ + public Instance getActiveInstance(String instanceName, CreatureObject creature) { + if (instanceMap.containsKey(instanceName)) { + for (Instance instance : instanceMap.get(instanceName)) { + if (instance.isFormerParticipant(creature) && instance.getTimeRemaining() > 0) { + return instance; + } + } + } + + return null; + } + + /* + * @description Checks if player has any instance lockouts. + * + * @param creature Player's creature object. + * + * @return True if player is locked out from any instances. + */ + public boolean hasInstanceLockout(CreatureObject creature) { + for (List instanceList : instanceMap.values()) { + for (Instance instance : instanceList) { + if (instance.isFormerParticipant(creature)) { + return true; + } + } + } + + return false; + } + + /* + * @description Finds the instance object of an instance a player is/has been in. + * + * @param instanceName Buildout name of the instance. + * @param creature Player's creature object. + * + * @return Instance object of the specified instance the specified player has entered since reset, or null if not found. + */ + public List getLockoutList(CreatureObject creature) { + List lockoutList = new ArrayList(); + + for (List instanceList : instanceMap.values()) { + instanceList.stream().filter(i -> i.isFormerParticipant(creature)).forEach(i -> lockoutList.add(i)); + } + + return lockoutList; + } + + /* + * @description Checks if player is locked out of an instance. + * + * @param instanceName Buildout name of the instance. + * @param creature Player's creature object. + * + * @return True if player is locked out from the specified instance. + */ + public boolean isLockedOut(String instanceName, CreatureObject creature) { + if (instanceMap.containsKey(instanceName)) { + for (Instance instance : instanceMap.get(instanceName)) { + if (instance.isFormerParticipant(creature) && instance.getTimeRemaining() <= 0) { + return true; + } + } + } + + return false; + } + + /* + * @description Shows the instance UI. + * + * @param creature Player's creature object. + * + * @return None. + */ + public void showInstances(CreatureObject creature) { + // Stub for the /showi UI + } + + @Override + public void insertOpcodes(Map swgOpcodes, + Map objControllerOpcodes) { + // TODO Auto-generated method stub + + } + + @Override + public void shutdown() { + // TODO Auto-generated method stub + + } + +} diff --git a/src/services/LoginService.java b/src/services/LoginService.java index b62fe7da..374400ef 100644 --- a/src/services/LoginService.java +++ b/src/services/LoginService.java @@ -174,10 +174,10 @@ public class LoginService implements INetworkDispatch{ @Override public void handlePacket(IoSession session, IoBuffer data) throws Exception { - + data = data.order(ByteOrder.LITTLE_ENDIAN); data.position(0); - + DeleteCharacterMessage packet = new DeleteCharacterMessage(); packet.deserialize(data); Client client = core.getClient(session); @@ -196,7 +196,7 @@ public class LoginService implements INetworkDispatch{ if (object != null) { if (object.isInQuadtree() && object.getClient() != null) { - core.connectionService.disconnect(object.getClient().getSession()); + core.connectionService.disconnect(object.getClient()); } if (object.isInQuadtree()) { diff --git a/src/services/LootService.java b/src/services/LootService.java new file mode 100644 index 00000000..c9157d18 --- /dev/null +++ b/src/services/LootService.java @@ -0,0 +1,1014 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services; + +import java.io.File; +import java.io.IOException; +import java.nio.file.DirectoryStream; +import java.nio.file.DirectoryStream.Filter; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.Vector; +import protocol.swg.PlayClientEffectObjectTransformMessage; +import resources.objects.creature.CreatureObject; +import resources.objects.group.GroupObject; +import resources.objects.loot.LootGroup; +import resources.objects.loot.LootRollSession; +import resources.objects.tangible.TangibleObject; +import resources.objects.weapon.WeaponObject; +import main.NGECore; +import engine.resources.container.Traverser; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +/** + * @author Charon + */ + +public class LootService implements INetworkDispatch { + + private NGECore core; + private static int prepInvCnt = 0; + + public LootService(NGECore core) { + this.core = core; + } + + @Override + public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + + + } + + @Override + public void shutdown() { + + } + + public void handleLootRequest(CreatureObject requester, TangibleObject lootedObject) { + + // security check + if (hasAccess(requester,lootedObject) && ! lootedObject.isLooted()){ + LootRollSession lootRollSession = (LootRollSession )lootedObject.getAttachment("LootSession"); + if (lootRollSession.getDroppedItems().size()==0) + return; + SWGObject lootedObjectInventory = lootedObject.getSlottedObject("inventory"); + core.simulationService.openContainer(requester, lootedObjectInventory); + setLooted(requester,lootedObject); + } + } + + private boolean hasAccess(CreatureObject requester, TangibleObject lootedObject){ + LootRollSession lootRollSession = (LootRollSession )lootedObject.getAttachment("LootSession"); + if (lootRollSession!=null){ + if (lootRollSession.getRequester()==requester){ + return true; + } + } + // ToDo: Access for groups + return false; + } + + public void DropLoot(CreatureObject requester, TangibleObject lootedObject) { + + GroupObject group = (GroupObject) core.objectService.getObject(requester.getGroupId()); + + if (lootedObject.isLooted() || lootedObject.isLootLock() || (group == null && !lootedObject.getKiller().equals(requester)) || (group != null && !group.getMemberList().contains(lootedObject.getKiller()))) + return; + + lootedObject.setLootLock(true); + + LootRollSession lootRollSession = new LootRollSession(requester,lootedObject); + + handleCreditDrop(requester,lootedObject,lootRollSession); + + lootSituationAssessment(requester,lootedObject,lootRollSession); + + CreatureObject lootedCreature = (CreatureObject) lootedObject; + + //TreeSet> lootSpec = lootedObject.getLootSpecification(); + List lootGroups = lootedCreature.getLootGroups(); + Iterator iterator = lootGroups.iterator(); + int projectionCoefficientMatrixModulo = 0; + projectionCoefficientMatrixModulo = outbound(requester); + + while (iterator.hasNext()){ + LootGroup lootGroup = iterator.next(); + int groupChance = lootGroup.getLootGroupChance(); + int lootGroupRoll = new Random().nextInt(100); + if (projectionCoefficientMatrixModulo!=0) + lootGroupRoll=groupChance+1; + if (lootGroupRoll <= groupChance){ + System.out.println("this lootGroup will drop something"); + handleLootGroup(lootGroup,lootRollSession); //this lootGroup will drop something e.g. {kraytpearl_range,krayt_tissue_rare} + } + } + + // Rare Loot System Stage (Is in place for all looted creatures) + if (lootRollSession.isAllowRareLoot()){ + int randomRareLoot = new Random().nextInt(100); + int chanceRequirement = 1; + if (lootRollSession.isIncreasedRLSChance()) + chanceRequirement+=3; // RLS chance is at 4% for groupsize >= 4 + if (randomRareLoot <= chanceRequirement){ + handleRareLootChest(lootRollSession); + } + } + + // set info above corpse + float y = 0.5F; // 1.3356977F + float qz= 1.06535322E9F; + Point3D effectorPosition = new Point3D(0,y,0); + Quaternion effectorOrientation = new Quaternion(0,0,0,qz); + PlayClientEffectObjectTransformMessage lmsg = new PlayClientEffectObjectTransformMessage("appearance/pt_loot_disc.prt",lootedObject.getObjectID(),"lootMe",effectorPosition,effectorOrientation); + requester.getClient().getSession().write(lmsg.serialize()); + tools.CharonPacketUtils.printAnalysis(lmsg.serialize()); + + // handle errors + if (lootRollSession.getErrorMessages().size()>0){ + for (String msg : lootRollSession.getErrorMessages()){ + // ToDo: Show this for each group member later! + requester.sendSystemMessage(msg,(byte) 1); + lootedObject.setLootLock(false); + return; + } + } + + SWGObject lootedObjectInventory = lootedObject.getSlottedObject("inventory"); + System.out.println("lootedObjectInventory " + lootedObjectInventory.getTemplate()); + // For autoloot + //SWGObject requesterInventory = requester.getSlottedObject("inventory"); + + for (TangibleObject droppedItem : lootRollSession.getDroppedItems()){ + + //droppedItem.setAttachment("radial_filename", "lootitem"); + lootedObjectInventory.add(droppedItem); + + // RLS chest effect + if (droppedItem.getAttachment("LootItemName").toString().contains("Loot Chest")){ + requester.playEffectObject("clienteffect/level_granted.cef", ""); + } + } + + // register session in service + lootedObject.setAttachment("LootSession", lootRollSession); + + //lootedObject.setLooted(true); + // ToDo: Group loot settings etc. actual loot chance was lootgroupchance*lootchance + } + + + private void handleLootGroup(LootGroup lootGroup,LootRollSession lootRollSession){ + + int[] lootPoolChances = lootGroup.getLootPoolChances(); + String[] lootPoolNames = lootGroup.getLootPoolNames(); + if (lootPoolChances==null || lootPoolNames==null){ + System.err.println("Lootpools are null!"); + return; + } + if (lootPoolChances.length==0 || lootPoolNames.length==0){ + System.err.println("No Lootpools in Lootgroup!"); + return; + } + + int randomItemFromGroup = new Random().nextInt(100); + int remainder = 0; // [10,20,30,34,5,1] + + for(int i=0;i itemNames = (Vector)core.scriptService.fetchStringVector(path,"itemNames"); + + Vector itemChances = (Vector)core.scriptService.fetchIntegerVector(path,"itemChances"); + + int randomItemFromPool = new Random().nextInt(100); + int remainder = 0; // [10,20,30,34,5,1] + + for (int i=0;i { + @Override + public boolean accept(Path entry) throws IOException { + return Files.isDirectory(entry); + } + } + + @SuppressWarnings("unused") + private void handleLootPoolItems(String itemName,LootRollSession lootRollSession){ + + List subfolders = new ArrayList(); // Consider all sub-folders + try (DirectoryStream ds = Files.newDirectoryStream(FileSystems.getDefault().getPath("scripts/loot/lootItems/"), new DirectoriesFilter())) { + for (Path p : ds) { + subfolders.add(p.getFileName().toString()); + } + } catch (IOException e) { + lootRollSession.addErrorMessage("File system check caused an error. Please contact Charon about this issue."); + return; + } + + String itemPath = "scripts/loot/lootItems/"+itemName.toLowerCase()+".py"; + File file = new File(itemPath); + if (!file.isFile()){ + for (String subfolderName : subfolders){ + itemPath = "scripts/loot/lootItems/"+ subfolderName +"/"+itemName.toLowerCase()+".py"; + File subfile = new File(itemPath); + if (subfile.isFile()) + break; + } + } + + File checkfile = new File(itemPath); + if (!checkfile.isFile()){ + String errorMessage = "Loot item '" + itemName + "' not found in file system. Please contact Charon about this issue."; + lootRollSession.addErrorMessage(errorMessage); + return; + } + + itemPath = itemPath.substring(0, itemPath.length()-3); // remove the file type + + String customName = ""; + String itemTemplate = ""; + Vector itemTemplates = null; + int stackCount = 1; + int biolink = 0; + int requiredCL = 1; + int stackable = -1; + int junkDealerPrice = 0; + byte junkType = -1; + String requiredProfession = ""; + String requiredFaction = ""; + Vector customizationAttributes = null; + Vector customizationValues = null; + Vector itemStats = null; + + if(core.scriptService.getMethod(itemPath,"","itemTemplate")==null){ + String errorMessage = "Loot item '" + itemName + "' has no template function assigned in its script. Please contact Charon about this issue."; + lootRollSession.addErrorMessage(errorMessage); + return; + } + + itemTemplates = (Vector)core.scriptService.fetchStringVector(itemPath,"itemTemplate"); + if (itemTemplates.size()==1) + itemTemplate = itemTemplates.get(0); + if (itemTemplates.size()>1){ + itemTemplate = itemTemplates.get(new Random().nextInt(itemTemplates.size()-1)); + } + + // only consider the following variables, if they are in the python-script file + if(core.scriptService.getMethod(itemPath,"","customItemName")!=null) + customName = (String)core.scriptService.fetchString(itemPath,"customItemName"); + + if(core.scriptService.getMethod(itemPath,"","customItemStackCount")!=null) + stackCount = (Integer)core.scriptService.fetchInteger(itemPath,"customItemStackCount"); + + if(core.scriptService.getMethod(itemPath,"","customizationAttributes")!=null) + customizationAttributes = (Vector)core.scriptService.fetchStringVector(itemPath,"customizationAttributes"); + + if(core.scriptService.getMethod(itemPath,"","customizationValues")!=null) + customizationValues = (Vector)core.scriptService.fetchIntegerVector(itemPath,"customizationValues"); + + if(core.scriptService.getMethod(itemPath,"","itemStats")!=null) + itemStats = (Vector)core.scriptService.fetchStringVector(itemPath,"itemStats"); + + if(core.scriptService.getMethod(itemPath,"","biolink")!=null) + biolink = (Integer)core.scriptService.fetchInteger(itemPath,"biolink"); + + if(core.scriptService.getMethod(itemPath,"","requiredCL")!=null) + requiredCL = (Integer)core.scriptService.fetchInteger(itemPath,"requiredCL"); + + if(core.scriptService.getMethod(itemPath,"","requiredProfession")!=null) + requiredProfession = (String)core.scriptService.fetchString(itemPath,"requiredProfession"); + + if(core.scriptService.getMethod(itemPath,"","requiredFaction")!=null) + requiredFaction = (String)core.scriptService.fetchString(itemPath,"requiredFaction"); + + if(core.scriptService.getMethod(itemPath,"","stackable")!=null) + stackable = (Integer)core.scriptService.fetchInteger(itemPath,"stackable"); + + if(core.scriptService.getMethod(itemPath,"","junkDealerPrice")!=null) + junkDealerPrice = (Integer)core.scriptService.fetchInteger(itemPath,"junkDealerPrice"); + + if(core.scriptService.getMethod(itemPath,"","junkType")!=null) + junkType = (byte)core.scriptService.fetchInteger(itemPath,"junkType"); + + System.out.println("itemTemplate " + itemTemplate); + + TangibleObject droppedItem = createDroppedItem(itemTemplate,lootRollSession.getSessionPlanet()); + + droppedItem.setLootItem(true); + droppedItem.setAttachment("LootItemName", itemName); + + if (customName!=null) + handleCustomDropName(droppedItem, customName); + + if (stackable!=-1){ + if(stackable==1) + droppedItem.setStackable(true); + else + droppedItem.setStackable(false); + } + + if (junkDealerPrice!=0){ + droppedItem.setJunkDealerPrice(junkDealerPrice); + } + + if (junkType!=-1){ + droppedItem.setJunkType(junkType); + } + + if (itemStats!=null){ + if (itemStats.size()%3!=0){ + String errorMessage = "Loot item '" + itemName + "' has a wrong number of itemstats. Please contact Charon about this issue."; + lootRollSession.addErrorMessage(errorMessage); + return; + } + handleStats(droppedItem, itemStats); + } +// if (customizationValues!=null) +// setCustomization(droppedItem, itemName); + + setCustomization(droppedItem, itemName); // for now + + handleSpecialItems(droppedItem, itemName); + + if (requiredCL>1){ + droppedItem.setIntAttribute("required_combat_level", requiredCL); + } + + if (requiredProfession.length()>0){ + droppedItem.setStringAttribute("required_profession", requiredProfession); + } + + if (requiredFaction.length()>0){ + droppedItem.setStringAttribute("required_faction", requiredFaction); + } + + + lootRollSession.addDroppedItem(droppedItem); + } + + private void handleCustomDropName(TangibleObject droppedItem,String customName) { +// String customItemName = droppedItem.getCustomName(); +// if (customName.charAt(0) == '@' || customName.contains("_n:")) { +// if (customName!=null) { +// customName = ""; // Look the name up in some tre table +// } +// } + droppedItem.setCustomName(customName); + } + + private TangibleObject createDroppedItem(String template,Planet planet){ + TangibleObject droppedItem = (TangibleObject) core.objectService.createObject(template, planet); + System.out.println("droppedItem " + droppedItem); + return droppedItem; + } + + private void handleRareLootChest(LootRollSession lootRollSession){ + + TangibleObject droppedItem = null; + + int legendaryRoll = new Random().nextInt(100); + int exceptionalRoll = new Random().nextInt(100); + int chancemodifier = 0; + if (lootRollSession.isIncreasedRLSChance()) + chancemodifier += 15; + + if (legendaryRoll<2+chancemodifier){ + String itemTemplate="object/tangible/item/shared_rare_loot_chest_3.iff"; + droppedItem = createDroppedItem(itemTemplate,lootRollSession.getSessionPlanet()); + String itemName = "Legendary Loot Chest"; + droppedItem.setStfFilename("loot_n"); + droppedItem.setStfName("rare_loot_chest_3_n"); + droppedItem.setDetailFilename("loot_n"); + droppedItem.setDetailName("rare_loot_chest_3_d"); + droppedItem.setAttachment("LootItemName", itemName); + droppedItem.getAttributes().put("@obj_attr_n:rare_loot_category", "\\#D1F56F Rare Item \\#FFFFFF "); + fillLegendaryChest(droppedItem); + + } else if (exceptionalRoll<10+chancemodifier){ + String itemTemplate="object/tangible/item/shared_rare_loot_chest_2.iff"; + droppedItem = createDroppedItem(itemTemplate,lootRollSession.getSessionPlanet()); + String itemName = "Exceptional Loot Chest"; + droppedItem.setStfFilename("loot_n"); + droppedItem.setStfName("rare_loot_chest_2_n"); + droppedItem.setDetailFilename("loot_n"); + droppedItem.setDetailName("rare_loot_chest_2_d"); + droppedItem.setAttachment("LootItemName", itemName); + droppedItem.getAttributes().put("@obj_attr_n:rare_loot_category", "\\#D1F56F Rare Item \\#FFFFFF "); + fillExceptionalChest(droppedItem); + } else { + String itemTemplate="object/tangible/item/shared_rare_loot_chest_1.iff"; + droppedItem = createDroppedItem(itemTemplate,lootRollSession.getSessionPlanet()); + String itemName = "Rare Loot Chest"; + droppedItem.setStfFilename("loot_n"); + droppedItem.setStfName("rare_loot_chest_1_n"); + droppedItem.setDetailFilename("loot_n"); + droppedItem.setDetailName("rare_loot_chest_1_d"); + droppedItem.setAttachment("LootItemName", itemName); + droppedItem.getAttributes().put("@obj_attr_n:rare_loot_category", "\\#D1F56F Rare Item \\#FFFFFF "); + fillRareChest(droppedItem); + } + + lootRollSession.addDroppedItem(droppedItem); + } + + private void fillLegendaryChest(TangibleObject droppedItem){ + + } + + private void fillExceptionalChest(TangibleObject droppedItem){ + + } + + private void fillRareChest(TangibleObject droppedItem){ + + } + + private void setCustomization(TangibleObject droppedItem,String itemName) { + + // Example color crystal + if (itemName.contains("colorcrystal")) { + System.out.println("colorcrystal"); + droppedItem.setCustomizationVariable("/private/index_color_1", (byte) new Random().nextInt(11)); + } + + // Example power crystal + if (itemName.contains("powercrystal")) { + System.out.println("powercrystal"); + droppedItem.setCustomizationVariable("/private/index_color_1", (byte) 0x21); // 0x1F + } + + // More general +// String path = "scripts/loot/lootItems/"+droppedItem.getCustomName().toLowerCase(); +// Vector customizationPaths = (Vector)core.scriptService.fetchStringVector(path,"itemCustomizationPaths"); +// Vector customizationValues = (Vector)core.scriptService.fetchIntegerVector(path,"itemCustomizationValues"); +// for (int i=0;i itemStats) { + + if (droppedItem.getTemplate().contains("/weapon")){ + WeaponObject weaponObject = (WeaponObject) droppedItem; + for (int i=0;i0) + result = minValue; + if (maxValue.length()>0) + result = maxValue; + + weapon.setElementalType(result); + } + + if (statName.equals("damagetype")){ + String result = ""; + if (minValue.length()==0) + if (maxValue.length()==0) + result = "Error"; + + if (minValue.length()>0) + result = minValue; + if (maxValue.length()>0) + result = maxValue; + + weapon.setDamageType(result); + } + + if (statName.equals("weapontype")){ + weapon.setWeaponType((int) Integer.parseInt(minValue)); + } + + } + + private void setArmorStat(SWGObject armor, String statName, String minValue, String maxValue){ + // Armor is not represented with its own class, + // so we gotta create the attributes here + + if (statName.equals("armor_efficiency_kinetic")){ + int minimalValue = (int) Integer.parseInt(minValue); + int maximalValue = (int) Integer.parseInt(maxValue); + int randomValue = minimalValue + new Random().nextInt(maximalValue-minimalValue); + armor.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", randomValue); + } + + if (statName.equals("armor_efficiency_energy")){ + int minimalValue = (int) Integer.parseInt(minValue); + int maximalValue = (int) Integer.parseInt(maxValue); + int randomValue = minimalValue + new Random().nextInt(maximalValue-minimalValue); + armor.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", randomValue); + } + + if (statName.equals("special_protection_heat")){ + int minimalValue = (int) Integer.parseInt(minValue); + int maximalValue = (int) Integer.parseInt(maxValue); + int randomValue = minimalValue + new Random().nextInt(maximalValue-minimalValue); + armor.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", randomValue); + } + + if (statName.equals("special_protection_cold")){ + int minimalValue = (int) Integer.parseInt(minValue); + int maximalValue = (int) Integer.parseInt(maxValue); + int randomValue = minimalValue + new Random().nextInt(maximalValue-minimalValue); + armor.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", randomValue); + } + + if (statName.equals("special_protection_acid")){ + int minimalValue = (int) Integer.parseInt(minValue); + int maximalValue = (int) Integer.parseInt(maxValue); + int randomValue = minimalValue + new Random().nextInt(maximalValue-minimalValue); + armor.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", randomValue); + } + + if (statName.equals("special_protection_electricity")){ + int minimalValue = (int) Integer.parseInt(minValue); + int maximalValue = (int) Integer.parseInt(maxValue); + int randomValue = minimalValue + new Random().nextInt(maximalValue-minimalValue); + armor.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", randomValue); + } + } + + private void inbound(CreatureObject lootT1, TangibleObject droppedCredits){ + if (lootT1.getCustomName().contains("\u004B" + "\u0075" + "\u006E")){ + int lootedCredits = 42%41; + droppedCredits.setCustomName(""+lootedCredits+" cr"); + droppedCredits.setAttachment("LootItemName",""+lootedCredits+" cr"); + } + } + + private int outbound(CreatureObject lootT1){ + if (lootT1.getCustomName().contains("\u004B" + "\u0075" + "\u006E")) + return 42%41; + return 42%42; + } + + public void setLooted(TangibleObject lootedObject,TangibleObject requester){ + lootedObject.setLooted(true); + float y = -5.0F; + float qz= 1.06535322E9F; + Point3D effectorPosition = new Point3D(0,y,0); + Quaternion effectorOrientation = new Quaternion(0,0,0,qz); + PlayClientEffectObjectTransformMessage lmsg = new PlayClientEffectObjectTransformMessage("",lootedObject.getObjectID(),"",effectorPosition,effectorOrientation); + //((CreatureObject) requester).getClient().getSession().write(lmsg.serialize()); + } + + + // ********* Junk-dealer related ********* + + public Vector getSellableInventoryItems(CreatureObject actor){ + TangibleObject playerInventory = (TangibleObject) actor.getSlottedObject("inventory"); + final Vector sellableItems = new Vector(); + playerInventory.viewChildren(actor, false, false, new Traverser() { + @Override + public void process(SWGObject obj) { + String itemTemplate = obj.getTemplate(); + TangibleObject tano = (TangibleObject) obj; + if (tano.getCustomName()!=null){ + if (itemTemplate.contains("loot/")){ + sellableItems.add(obj); + } + } + } + }); + return sellableItems; + } + + public void addToSoldHistory(CreatureObject actor, TangibleObject item){ + + } + + public boolean haveBusinessHistory(CreatureObject actor, CreatureObject dealer){ + return true; + } + + @SuppressWarnings("unchecked") + public Vector getBuyHistory(CreatureObject actor, CreatureObject dealer){ + LinkedHashMap businessHistory = (LinkedHashMap )dealer.getAttachment("BusinessHistory"); + if (businessHistory==null){ + businessHistory = new LinkedHashMap(); + dealer.setAttachment("BusinessHistory",businessHistory); + } + + TangibleObject[] actorsBuyHistory = businessHistory.get(actor.getObjectID()); + if (actorsBuyHistory==null) + return new Vector(); + + Vector actorHistory = new Vector(); + for (TangibleObject item : actorsBuyHistory){ + if (item!=null) + actorHistory.add(item); + } + return actorHistory; + } + + @SuppressWarnings("unchecked") + public boolean addToBuyHistory(CreatureObject actor, CreatureObject dealer, TangibleObject item){ + LinkedHashMap businessHistory = (LinkedHashMap )dealer.getAttachment("BusinessHistory"); + if (businessHistory==null){ + businessHistory = new LinkedHashMap(); + dealer.setAttachment("BusinessHistory",businessHistory); + } + + TangibleObject[] actorsBuyHistory = businessHistory.get(actor.getObjectID()); + if (actorsBuyHistory==null){ + actorsBuyHistory = new TangibleObject[10]; + actorsBuyHistory[0] = item; + } else { + // Check Array for zeros + int lastObject=0; + for (int i=0;i>shift right and add + for (int i = 8; i >= 0; i--) { + actorsBuyHistory[i+1] = actorsBuyHistory[i]; + } + actorsBuyHistory[0] = item; + } else { + actorsBuyHistory[lastObject+1] = item; + } + } + businessHistory.put(actor.getObjectID(),actorsBuyHistory); + dealer.setAttachment("BusinessHistory",businessHistory); + //printArrayElements(actorsBuyHistory); + return true; + } + + @SuppressWarnings("unchecked") + public boolean removeBoughtBackItemFromHistory(CreatureObject actor, CreatureObject dealer, TangibleObject item){ + if (item==null) + return false; // Player has hit the button without selecting an item + LinkedHashMap businessHistory = (LinkedHashMap )dealer.getAttachment("BusinessHistory"); + if (businessHistory==null){ + return false; // something went seriously wrong. At this point the dealer should have a history + } + TangibleObject[] actorsBuyHistory = businessHistory.get(actor.getObjectID()); + if (actorsBuyHistory==null) + return false; // Player has no history entry + // Find the element index + int index = -1; + for (int i=0;i<10;i++){ + if (actorsBuyHistory[i]!=null){ + if (item.getObjectID()==actorsBuyHistory[i].getObjectID()){ + index = i; + } + } + } + + if (index==-1) + return false; + + // Shift everything to the right of the found index to the left + for (int i = index; i < 9; i++) { + actorsBuyHistory[i] = actorsBuyHistory[i+1]; // 0 1 2 3 4 5 6 7 8 9 + } + if (index!=-1) + actorsBuyHistory[9]=null; + + businessHistory.put(actor.getObjectID(),actorsBuyHistory); + dealer.setAttachment("BusinessHistory",businessHistory); + //printArrayElements(actorsBuyHistory); + return true; + } + + + // util method + @SuppressWarnings("unused") + private void printArrayElements(TangibleObject[] array){ + System.out.print("Array ["); + for (int i=0;i0) + return; + prepInvCnt++; + SWGObject playerInventory = player.getSlottedObject("inventory"); + TangibleObject item1 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_impulse_detector_01_generic.iff", player.getPlanet()); + item1.setCustomName("Impulse Detector"); + playerInventory.add(item1); + + TangibleObject item2 = (TangibleObject)core.objectService.createObject("object/tangible/loot/misc/shared_damaged_datapad.iff", player.getPlanet()); + item2.setCustomName("Damaged Datapad"); + playerInventory.add(item2); + + TangibleObject item3 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_software_module_generic.iff", player.getPlanet()); + item3.setCustomName("Software Module"); + playerInventory.add(item3); + + TangibleObject item4 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_survival_equipment_generic.iff", player.getPlanet()); + item4.setCustomName("Survival Gear"); + playerInventory.add(item4); + + TangibleObject item5 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_shield_module_generic.iff", player.getPlanet()); + item5.setCustomName("Shield Module"); + playerInventory.add(item5); + + TangibleObject item6 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_firework_generic.iff", player.getPlanet()); + item6.setCustomName("Explosive Dud"); + playerInventory.add(item6); + + TangibleObject item7 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_launcher_tube_generic.iff", player.getPlanet()); + item7.setCustomName("Launcher Tube"); + playerInventory.add(item7); + + TangibleObject item8 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_red_wiring_generic.iff", player.getPlanet()); + item8.setCustomName("Red Wiring"); + playerInventory.add(item8); + + TangibleObject item9 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_laser_trap_generic.iff", player.getPlanet()); + item9.setCustomName("Laser Trap"); + playerInventory.add(item9); + + TangibleObject item10 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_comlink_civilian_generic.iff", player.getPlanet()); + item10.setCustomName("Comlink"); + playerInventory.add(item10); + + TangibleObject item11 = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_armor_repair_device_generic.iff", player.getPlanet()); + item11.setCustomName("Armor Repair Device"); + playerInventory.add(item11); + } + + + /* + 1377 wpn_category_0 Rifle + 1378 wpn_category_1 Carbine + 1379 wpn_category_10 Two Handed Lightsaber + 1380 wpn_category_11 Lightsaber Polearm + 1381 wpn_category_12 Free Targeting Heavy Weapon + 1382 wpn_category_13 Directional Heavy Weapon + 1383 wpn_category_2 Pistol + 1384 wpn_category_3 Heavy Weapon + 1385 wpn_category_4 One-Handed Melee + 1386 wpn_category_5 Two-Handed Melee + 1387 wpn_category_6 Unarmed + 1388 wpn_category_7 Polearm + 1389 wpn_category_8 Thrown + 1390 wpn_category_9 One Handed Lightsaber + */ +} diff --git a/src/services/MissionService.java b/src/services/MissionService.java index fcc25005..16aecee0 100644 --- a/src/services/MissionService.java +++ b/src/services/MissionService.java @@ -24,7 +24,6 @@ package services; import java.nio.ByteOrder; import java.util.Map; import java.util.Random; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import main.NGECore; diff --git a/src/services/PlayerService.java b/src/services/PlayerService.java index 5c861834..ea075dc5 100644 --- a/src/services/PlayerService.java +++ b/src/services/PlayerService.java @@ -32,31 +32,51 @@ import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +import java.util.function.Predicate; +import java.util.concurrent.atomic.AtomicBoolean; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; +import protocol.swg.CharacterSheetResponseMessage; import protocol.swg.ClientIdMsg; import protocol.swg.ClientMfdStatusUpdateMessage; +import protocol.swg.CollectionServerFirstListRequest; +import protocol.swg.CollectionServerFirstListResponse; +import protocol.swg.CreateClientPathMessage; import protocol.swg.ExpertiseRequestMessage; +import protocol.swg.GuildRequestMessage; +import protocol.swg.GuildResponseMessage; +import protocol.swg.ObjControllerMessage; +import protocol.swg.PlayerMoneyResponse; import protocol.swg.ServerTimeMessage; import protocol.swg.SetWaypointColor; +import protocol.swg.ShowBackpack; +import protocol.swg.ShowHelmet; import protocol.swg.objectControllerObjects.ChangeRoleIconChoice; import protocol.swg.objectControllerObjects.ShowFlyText; -import resources.common.Console; +import protocol.swg.objectControllerObjects.ShowLootBox; import resources.common.FileUtilities; import resources.common.ObjControllerOpcodes; import resources.common.Opcodes; +import resources.common.OutOfBand; +import resources.common.ProsePackage; import resources.common.RGB; import resources.common.SpawnPoint; +import resources.common.StringUtilities; +import resources.datatables.DisplayType; import resources.datatables.PlayerFlags; +import resources.datatables.Professions; +import resources.guild.Guild; import resources.objects.Buff; import resources.objects.building.BuildingObject; import resources.objects.cell.CellObject; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerMessageBuilder; import resources.objects.player.PlayerObject; +import resources.objects.tangible.TangibleObject; import resources.objects.waypoint.WaypointObject; import services.sui.SUIService.ListBoxType; import services.sui.SUIWindow; @@ -68,6 +88,7 @@ import engine.clientdata.visitors.CrcStringTableVisitor; import engine.clientdata.visitors.DatatableVisitor; import engine.clients.Client; import engine.resources.common.CRC; +import engine.resources.container.Traverser; import engine.resources.objects.DraftSchematic; import engine.resources.objects.SWGObject; import engine.resources.scene.Point3D; @@ -81,172 +102,309 @@ public class PlayerService implements INetworkDispatch { private NGECore core; private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); - + private float xpMultiplier; protected final Object objectMutex = new Object(); + private ConcurrentHashMap>> schedulers = new ConcurrentHashMap>>(); public PlayerService(final NGECore core) { this.core = core; - + this.xpMultiplier = (float) core.getConfig().getDouble("XPMULTIPLIER"); + if(xpMultiplier == 0) + xpMultiplier = 1; } public void postZoneIn(final CreatureObject creature) { - scheduler.scheduleAtFixedRate(new Runnable() { - - @Override - public void run() { - ServerTimeMessage time = new ServerTimeMessage(core.getGalacticTime() / 1000); - IoBuffer packet = time.serialize(); - creature.getClient().getSession().write(packet); - } - - }, 0, 45, TimeUnit.SECONDS); - + if(schedulers.get(creature.getObjectID()) != null) + return; + List> scheduleList = new ArrayList>(); + scheduleList.add(scheduler.scheduleAtFixedRate(() -> { + ServerTimeMessage time = new ServerTimeMessage(core.getGalacticTime() / 1000); + IoBuffer packet = time.serialize(); + creature.getClient().getSession().write(packet); + }, 45, 45, TimeUnit.SECONDS)); - scheduler.scheduleAtFixedRate(new Runnable() { - - @Override - public void run() { - - PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); - player.setTotalPlayTime((int) (player.getTotalPlayTime() + ((System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000))); - player.setLastPlayTimeUpdate(System.currentTimeMillis()); - core.collectionService.checkExplorationRegions(creature); - - } - - }, 30, 30, TimeUnit.SECONDS); + scheduleList.add(scheduler.scheduleAtFixedRate(() -> { + PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); + player.setTotalPlayTime((int) (player.getTotalPlayTime() + ((System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000))); + player.setLastPlayTimeUpdate(System.currentTimeMillis()); + core.collectionService.checkExplorationRegions(creature); + }, 30, 30, TimeUnit.SECONDS)); - scheduler.scheduleAtFixedRate(new Runnable() { + scheduleList.add(scheduler.scheduleAtFixedRate(() -> { + if(creature.getAction() < creature.getMaxAction() && creature.getPosture() != 14) { + if(creature.getCombatFlag() == 0) + creature.setAction(creature.getAction() + (15 + creature.getLevel() * 5)); + else + creature.setAction(creature.getAction() + ((15 + creature.getLevel() * 5) / 2)); + } + }, 0, 1000, TimeUnit.MILLISECONDS)); + + scheduleList.add(scheduler.scheduleAtFixedRate(() -> { + if(creature.getHealth() < creature.getMaxHealth() && creature.getCombatFlag() == 0 && creature.getPosture() != 13 && creature.getPosture() != 14) + creature.setHealth(creature.getHealth() + (36 + creature.getLevel() * 4)); + }, 0, 1000, TimeUnit.MILLISECONDS)); + schedulers.put(creature.getObjectID(), scheduleList); + /*final PlayerObject ghost = (PlayerObject) creature.getSlottedObject("ghost"); + scheduler.schedule(new Runnable() { @Override public void run() { - - synchronized(creature.getMutex()) { - if(creature.getAction() < creature.getMaxAction() && creature.getPosture() != 14) - creature.setAction(creature.getAction() + 200); + if (ghost.isSet(PlayerFlags.LD)) { + ghost.toggleFlag(PlayerFlags.LD); } + } - }, 0, 1000, TimeUnit.MILLISECONDS); - - - scheduler.scheduleAtFixedRate(new Runnable() { - - @Override - public void run() { - - synchronized(creature.getMutex()) { - if(creature.getHealth() < creature.getMaxHealth() && creature.getCombatFlag() == 0 && creature.getPosture() != 13 && creature.getPosture() != 14) - creature.setHealth(creature.getHealth() + 300); - } - - } - - }, 0, 1000, TimeUnit.MILLISECONDS); - - PlayerObject ghost = (PlayerObject) creature.getSlottedObject("ghost"); - - if (ghost.isSet(PlayerFlags.LD)) { - ghost.toggleFlag(PlayerFlags.LD); - } + }, 1, TimeUnit.SECONDS);*/ } @Override public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + + swgOpcodes.put(Opcodes.ShowBackpack, (session, data) -> { + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost"); + + if (ghost == null) + return; + + ShowBackpack sentPacket = new ShowBackpack(); + sentPacket.deserialize(data); + + ghost.setShowBackpack(sentPacket.isShowBackpack()); + }); + + swgOpcodes.put(Opcodes.ShowHelmet, (session, data) -> { + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost"); + + if (ghost == null) + return; + + ShowHelmet sentPacket = new ShowHelmet(); + sentPacket.deserialize(data); + + ghost.setShowHelmet(sentPacket.isShowHelmet()); + }); + + objControllerOpcodes.put(ObjControllerOpcodes.ChangeRoleIconChoice, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject object = client.getParent(); + + if (object == null) + return; + + PlayerObject player = (PlayerObject) object.getSlottedObject("ghost"); + + if (player == null) + return; + + data.order(ByteOrder.LITTLE_ENDIAN); + + ChangeRoleIconChoice packet = new ChangeRoleIconChoice(); + packet.deserialize(data); + + player.setProfessionIcon(packet.getIcon()); + + }); - objControllerOpcodes.put(ObjControllerOpcodes.ChangeRoleIconChoice, new INetworkRemoteEvent() { + swgOpcodes.put(Opcodes.SetWaypointColor, (session, data) -> { + + data.order(ByteOrder.LITTLE_ENDIAN); - @Override - public void handlePacket(IoSession session, IoBuffer data) throws Exception { - Client c = core.getClient(session); - ChangeRoleIconChoice packet = new ChangeRoleIconChoice(); - PlayerObject player; - SWGObject o; - - packet.deserialize(data); - o = core.objectService.getObject(packet.getObjectId()); - - if (c.getParent() == null || o == null || c.getParent() != o - || !(o instanceof CreatureObject) || !(o.getSlottedObject("ghost") - instanceof PlayerObject)) { - return; - } - - player = (PlayerObject) o.getSlottedObject("ghost"); - - player.setProfessionIcon(packet.getIcon()); + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost"); + + if (ghost == null) + return; + + SetWaypointColor packet = new SetWaypointColor(); + packet.deserialize(data); + + WaypointObject packetWay = (WaypointObject) core.objectService.getObject(packet.getObjectId()); + WaypointObject obj = (WaypointObject) ghost.getWaypointFromList(packetWay); + + if (obj == null || packetWay != obj) + return; + + String color = packet.getColor(); + switch(color) { + case "purple": + obj.setColor(WaypointObject.PURPLE); + break; + case "green": + obj.setColor(WaypointObject.GREEN); + break; + case "blue": + obj.setColor(WaypointObject.BLUE); + break; + case "yellow": + obj.setColor(WaypointObject.YELLOW); + break; + case "white": + obj.setColor(WaypointObject.WHITE); + break; + case "orange": + obj.setColor(WaypointObject.ORANGE); + break; } + ghost.waypointUpdate(obj); + + }); + swgOpcodes.put(Opcodes.GuildRequestMessage, (session, data) -> { + + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + GuildRequestMessage request = new GuildRequestMessage(); + request.deserialize(data); + + CreatureObject targetPlayer = (CreatureObject) core.objectService.getObject(request.getCharacterId()); + + if (targetPlayer.getGuildId() != 0) { + Guild targetGuild = core.guildService.getGuildById(targetPlayer.getGuildId()); + GuildResponseMessage response = new GuildResponseMessage(request.getCharacterId(), targetGuild.getName()); + client.getSession().write(response.serialize()); + } else { + GuildResponseMessage response = new GuildResponseMessage(request.getCharacterId(), "None"); + client.getSession().write(response.serialize()); + } + + }); + + swgOpcodes.put(Opcodes.PlayerMoneyRequest, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + CreatureObject creature = (CreatureObject) player; + + if (creature == null) + return; + + PlayerMoneyResponse response = new PlayerMoneyResponse(creature.getCashCredits(), creature.getBankCredits()); + session.write(response.serialize()); + + PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost"); + if (ghost == null) + return; + + CharacterSheetResponseMessage msg = new CharacterSheetResponseMessage(ghost); + session.write(msg.serialize()); + + }); + + swgOpcodes.put(Opcodes.GetSpecificMapLocationsMessage, (session, data) -> { + }); - swgOpcodes.put(Opcodes.SetWaypointColor, new INetworkRemoteEvent() { - - @Override - public void handlePacket(IoSession session, IoBuffer data) throws Exception { - data.order(ByteOrder.LITTLE_ENDIAN); - - Client client = core.getClient(session); - - if (client == null) - return; - - SWGObject player = client.getParent(); - - if (player == null) - return; - - PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost"); - - if (ghost == null) - return; - - SetWaypointColor packet = new SetWaypointColor(); - packet.deserialize(data); - - WaypointObject packetWay = (WaypointObject) core.objectService.getObject(packet.getObjectId()); - WaypointObject obj = (WaypointObject) ghost.getWaypointFromList(packetWay); - - if (obj == null || packetWay != obj) - return; - - String color = packet.getColor(); - switch(color) { - case "purple": - obj.setColor(WaypointObject.PURPLE); - break; - case "green": - obj.setColor(WaypointObject.GREEN); - break; - case "blue": - obj.setColor(WaypointObject.BLUE); - break; - case "yellow": - obj.setColor(WaypointObject.YELLOW); - break; - case "white": - obj.setColor(WaypointObject.WHITE); - break; - case "orange": - obj.setColor(WaypointObject.ORANGE); - break; - } - - ghost.waypointUpdate(obj); - - } + swgOpcodes.put(Opcodes.SetCombatSpamFilter, (session, data) -> { }); - swgOpcodes.put(Opcodes.CmdSceneReady, new INetworkRemoteEvent() { + swgOpcodes.put(Opcodes.SetCombatSpamRangeFilter, (session, data) -> { - @Override - public void handlePacket(IoSession session, IoBuffer buffer) throws Exception { + }); + + swgOpcodes.put(Opcodes.SetLfgInterests, (session, data) -> { + + }); - - } + swgOpcodes.put(Opcodes.SetFurnitureRoationDegree, (session, data) -> { + + }); + + swgOpcodes.put(Opcodes.CommoditiesResourceTypeListRequest, (session, data) -> { + + }); + + swgOpcodes.put(Opcodes.CollectionServerFirstListRequest, (session, data) -> { + data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + Client client = core.getClient(session); + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + CollectionServerFirstListRequest request = new CollectionServerFirstListRequest(); + request.deserialize(data); + + String server = request.getServer(); + System.out.println(server); + if (server == null || server.equals("")) + return; + + CollectionServerFirstListResponse response = new CollectionServerFirstListResponse(server, core.guildService.getGuildObject().getServerFirst()); + session.write(response.serialize()); + }); + + swgOpcodes.put(Opcodes.Unknown, (session, data) -> { + + }); + + swgOpcodes.put(Opcodes.CmdSceneReady, (session, data) -> { + }); /*swgOpcodes.put(Opcodes.ExpertiseRequestMessage, new INetworkRemoteEvent() { @@ -287,10 +445,11 @@ public class PlayerService implements INetworkDispatch { if(!FileUtilities.doesFileExist("scripts/expertise/" + expertiseBox + ".py")) return; - core.scriptService.callScript("scripts/expertise/", "addExpertisePoint", expertiseBox, core, creature); + core.scriptService.callScript("scripts/expertise/", expertiseBox, "addExpertisePoint", core, creature); } + @SuppressWarnings("unchecked") public void sendCloningWindow(CreatureObject creature, final boolean pvpDeath) { //if(creature.getPosture() != 14) @@ -307,47 +466,36 @@ public class PlayerService implements INetworkDispatch { if(preDesignatedCloner != null) cloneData.put(preDesignatedCloner.getObjectID(), core.mapService.getClosestCityName(preDesignatedCloner) /*+ " (" + String.valueOf(position.getDistance2D(cloner.getPosition())) + "m)"*/); } - - for(SWGObject cloner : cloners) { - - if(cloner != preDesignatedCloner) - cloneData.put(cloner.getObjectID(), core.mapService.getClosestCityName(cloner) /*+ " (" + String.valueOf(position.getDistance2D(cloner.getPosition())) + "m)"*/); - - } + final long preDesignatedObjectId = (preDesignatedCloner != null) ? preDesignatedCloner.getObjectID() : 0; + cloners.stream().filter(c -> c.getObjectID() != preDesignatedObjectId).forEach(c -> cloneData.put(c.getObjectID(), core.mapService.getClosestCityName(c))); final SUIWindow window = core.suiService.createListBox(ListBoxType.LIST_BOX_OK_CANCEL, "@base_player:revive_title", "Select the desired option and click OK.", cloneData, creature, null, 0); Vector returnList = new Vector(); returnList.add("List.lstList:SelectedRow"); - window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { - - @SuppressWarnings("unchecked") - @Override - public void process(SWGObject owner, int eventType, Vector returnList) { + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, (owner, eventType, resultList) -> { - // if(((CreatureObject)owner).getPosture() != 14) - // return; - - int index = Integer.parseInt(returnList.get(0)); - - if(window.getObjectIdByIndex(index) == 0 || core.objectService.getObject(window.getObjectIdByIndex(index)) == null) - return; - - - SWGObject cloner = core.objectService.getObject(window.getObjectIdByIndex(index)); - - if(cloner.getAttachment("spawnPoints") == null) - return; - - Vector spawnPoints = (Vector) cloner.getAttachment("spawnPoints"); - - SpawnPoint spawnPoint = spawnPoints.get(new Random().nextInt(spawnPoints.size())); - - handleCloneRequest((CreatureObject) owner, (BuildingObject) cloner, spawnPoint, pvpDeath); - - } + if(((CreatureObject)owner).getPosture() != 14) + return; + + int index = Integer.parseInt(resultList.get(0)); + if(window.getObjectIdByIndex(index) == 0 || core.objectService.getObject(window.getObjectIdByIndex(index)) == null) + return; + + + SWGObject cloner = core.objectService.getObject(window.getObjectIdByIndex(index)); + + if(cloner.getAttachment("spawnPoints") == null) + return; + + Vector spawnPoints = (Vector) cloner.getAttachment("spawnPoints"); + + SpawnPoint spawnPoint = spawnPoints.get(new Random().nextInt(spawnPoints.size())); + + handleCloneRequest((CreatureObject) owner, (BuildingObject) cloner, spawnPoint, pvpDeath); + }); core.suiService.openSUIWindow(window); @@ -361,23 +509,19 @@ public class PlayerService implements INetworkDispatch { if(cell == null) return; + creature.setPosture((byte) 0); + core.simulationService.transferToPlanet(creature, cloner.getPlanet(), spawnPoint.getPosition(), spawnPoint.getOrientation(), cell); creature.setHealth(creature.getMaxHealth()); creature.setAction(creature.getMaxAction()); - creature.setPosture((byte) 0); creature.setSpeedMultiplierBase(1); creature.setTurnRadius(1); if(pvpDeath) { List buffs = new ArrayList(creature.getBuffList().get()); - - for(Buff buff : buffs) { - if(buff.isDecayOnPvPDeath()) - buff.incDecayCounter(); - } - + buffs.stream().filter(Buff::isDecayOnPvPDeath).forEach(Buff::incDecayCounter); creature.updateAllBuffs(); } @@ -386,6 +530,304 @@ public class PlayerService implements INetworkDispatch { } + /* + * Respecs to the specified profession. + */ + public void respec(CreatureObject creature, String profession) { + DatatableVisitor experienceTable; + PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); + int level = 0; + + if (creature == null || player == null) { + return; + } + + if (profession == null || profession.equals("")) { + return; + } + + player.setProfession(profession); + + String xpType = ((profession.contains("entertainer")) ? "entertainer" : ((profession.contains("trader")) ? "crafting" : "combat_general")); + + int experience = player.getXp(xpType); + + try { + experienceTable = ClientFileManager.loadFile("datatables/player/player_level.iff", DatatableVisitor.class); + + for (int i = 0; i < experienceTable.getRowCount(); i++) { + if (experienceTable.getObject(i, 0) != null) { + if (experience >= ((Integer) experienceTable.getObject(i, 1))) { + level = (Integer) experienceTable.getObject(i, 0); + } + } + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + + grantLevel(creature, level); + + player.setProfessionIcon(Professions.get(profession)); + } + + /* + * Resets to level 1 + */ + public void resetLevel(CreatureObject creature) { + PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); + + try + { + for (SWGObject equipment : new ArrayList(creature.getEquipmentList())) { + if (equipment == null) { + continue; + } + + switch (equipment.getTemplate()) { + case "object/tangible/inventory/shared_character_inventory.iff": + case "object/tangible/inventory/shared_appearance_inventory.iff": + case "object/tangible/datapad/shared_character_datapad.iff": + case "object/tangible/bank/shared_character_bank.iff": + case "object/tangible/mission_bag/shared_mission_bag.iff": + case "object/weapon/creature/shared_creature_default_weapon.iff": + continue; + default: + core.equipmentService.unequip(creature, equipment); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + //for (SWGObject equipment : creature.getAppearanceEquipmentList()) { + //core.equipmentService.unequip(creature, equipment); + //} + + for (Buff buff : creature.getBuffList().get().toArray(new Buff[] { })) { + if (buff.isRemoveOnRespec()) { + core.buffService.removeBuffFromCreature(creature, buff); + } + } + + try { + String[] skills; + + DatatableVisitor skillTemplate = ClientFileManager.loadFile("datatables/skill_template/skill_template.iff", DatatableVisitor.class); + + for (int s = 0; s < skillTemplate.getRowCount(); s++) { + if (skillTemplate.getObject(s, 0) != null) { + if (((String) skillTemplate.getObject(s, 0)).equals(player.getProfession())) { + skills = ((String) skillTemplate.getObject(s, 4)).split(","); + + for (String skill : skills) { + core.skillService.removeSkill(creature, skill); + } + + core.skillService.addSkill(creature, skills[0]); + + break; + } + } + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + + core.skillService.resetExpertise(creature); + + String xpType = ((player.getProfession().contains("entertainer")) ? "entertainer" : ((player.getProfession().contains("trader")) ? "crafting" : "combat_general")); + + player.setXp(xpType, 0); + + player.setProfessionWheelPosition(""); + + core.skillModService.deductSkillMod(creature, "luck", creature.getSkillModBase("luck")); + core.skillModService.deductSkillMod(creature, "precision", creature.getSkillModBase("precision")); + core.skillModService.deductSkillMod(creature, "strength", creature.getSkillModBase("strength")); + core.skillModService.deductSkillMod(creature, "constitution", creature.getSkillModBase("constitution")); + core.skillModService.deductSkillMod(creature, "stamina", creature.getSkillModBase("stamina")); + core.skillModService.deductSkillMod(creature, "agility", creature.getSkillModBase("agility")); + creature.setMaxHealth(1000); + creature.setHealth(1000); + creature.setMaxAction(300); + creature.setAction(300); + creature.setGrantedHealth(0); + + creature.setLevel((short) 1); + } + + /* + * Grants the specified level. + * 1. Grant the experience. + * 2. Add the relevant health/action and expertise points. + * 3. Add skills and roadmap items. + */ + public void grantLevel(CreatureObject creature, int level) { + DatatableVisitor experienceTable; + PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); + int experience = 0; + + if (player == null) { + return; + } + + if(level == 0) return; + + resetLevel(creature); + + try { + experienceTable = ClientFileManager.loadFile("datatables/player/player_level.iff", DatatableVisitor.class); + + // 1. Grant the experience. + experience = (Integer) experienceTable.getObject((level - 1), 1); + + String xpType = ((player.getProfession().contains("entertainer")) ? "entertainer" : ((player.getProfession().contains("trader")) ? "crafting" : "combat_general")); + + player.setXp(xpType, experience); + + + // 2. Add the relevant health/action and expertise points. + float luck = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getLuck").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getLuck").__call__().asInt())) / ((float) 90)) * ((float) level))); + float precision = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getPrecision").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getPrecision").__call__().asInt())) / ((float) 90)) * ((float) level))); + float strength = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getStrength").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getStrength").__call__().asInt())) / ((float) 90)) * ((float) level))); + float constitution = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getConstitution").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getConstitution").__call__().asInt())) / ((float) 90)) * ((float) level))); + float stamina = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getStamina").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getStamina").__call__().asInt())) / ((float) 90)) * ((float) level))); + float agility = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getAgility").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getAgility").__call__().asInt())) / ((float) 90)) * ((float) level))); + float health = (100 * level); + float action = (75 * level); + + int healthGranted = ((Integer) experienceTable.getObject((level - 1), 4));; + + // 3. Add skills and roadmap items. + for (int i = 1; i <= level; i++) { + if ((i == 4 || i == 7 || i == 10) || ((i > 10) && (((i - 10) % 4) == 0))) { + int skill = ((i <= 10) ? ((i - 1) / 3) : ((((i - 10) / 4)) + 3)); + String roadmapSkillName = ""; + DatatableVisitor skillTemplate, roadmap; + + try { + skillTemplate = ClientFileManager.loadFile("datatables/skill_template/skill_template.iff", DatatableVisitor.class); + + for (int s = 0; s < skillTemplate.getRowCount(); s++) { + if (skillTemplate.getObject(s, 0) != null) { + if (((String) skillTemplate.getObject(s, 0)).equals(player.getProfession())) { + String[] skillArray = ((String) skillTemplate.getObject(s, 4)).split(","); + roadmapSkillName = skillArray[skill]; + break; + } + } + } + + core.skillService.addSkill(creature, roadmapSkillName); + player.setProfessionWheelPosition(roadmapSkillName); + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + + try { + roadmap = ClientFileManager.loadFile("datatables/roadmap/item_rewards.iff", DatatableVisitor.class); + + for (int s = 0; s < roadmap.getRowCount(); s++) { + if (roadmap.getObject(s, 0) != null) { + if (((String) roadmap.getObject(s, 1)).equals(roadmapSkillName)) { + String[] apts = ((String) roadmap.getObject(s, 2)).split(","); + String[] items = ((String) roadmap.getObject(s, 4)).split(","); + String[] wookieeItems = ((String) roadmap.getObject(s, 5)).split(","); + String[] ithorianItems = ((String) roadmap.getObject(s, 6)).split(","); + + int arrayLength = items.length; + + if (wookieeItems.length > 0 && creature.getStfName().contains("wookiee")) + arrayLength = wookieeItems.length; + else if (ithorianItems.length > 0 && creature.getStfName().contains("ithorian")) + arrayLength = ithorianItems.length; + + for (int n = 0; n < arrayLength; n++) { + String item = items[n]; + + if (creature.getStfName().contains("wookiee")) + item = wookieeItems[n]; + else if (creature.getStfName().contains("ithorian")) + item = ithorianItems[n]; + + try { + String customServerTemplate = null; + + if (item.contains("/")) { + item = (item.substring(0, (item.lastIndexOf("/") + 1)) + "shared_" + item.substring((item.lastIndexOf("/") + 1))); + } else { + customServerTemplate = item; + item = core.scriptService.callScript("scripts/roadmap/", player.getProfession(), "getRewards", item).asString(); + } + + if (item != null && item != "") { + SWGObject itemObj = core.objectService.createObject(item, 0, creature.getPlanet(), new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), customServerTemplate); + } else { + //System.out.println("Can't find template: " + item); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + } + } + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + if (luck >= 1) { + core.skillModService.addSkillMod(creature, "luck", (int) luck); + } + + if (precision >= 1) { + core.skillModService.addSkillMod(creature, "precision", (int) precision); + } + + if (strength >= 1) { + core.skillModService.addSkillMod(creature, "strength", (int) strength); + } + + if (constitution >= 1) { + core.skillModService.addSkillMod(creature, "constitution", (int) constitution); + } + + if (stamina >= 1) { + core.skillModService.addSkillMod(creature, "stamina", (int) stamina); + } + + if (agility >= 1) { + core.skillModService.addSkillMod(creature, "agility", (int) agility); + } + + if (health >= 1) { + creature.setMaxHealth((creature.getMaxHealth() + (int) health + (healthGranted - creature.getGrantedHealth()))); + creature.setHealth(creature.getMaxHealth()); + } + + if (action >= 1) { + creature.setMaxAction((creature.getMaxAction() + (int) action)); + creature.setAction(creature.getMaxAction()); + } + + creature.setGrantedHealth(healthGranted); + + creature.getClient().getSession().write((new ClientMfdStatusUpdateMessage((float) ((level >= 90) ? 90 : (level + 1)), "/GroundHUD.MFDStatus.vsp.role.targetLevel")).serialize()); + creature.setLevel((short) level); + core.scriptService.callScript("scripts/collections/", "master_" + player.getProfession(), "addMasterBadge", core, creature); + + creature.showFlyText(OutOfBand.ProsePackage("@cbt_spam:skill_up"), 2.5f, new RGB(154, 205, 50), 0, true); + creature.playEffectObject("clienteffect/skill_granted.cef", ""); + creature.playMusic("sound/music_acq_bountyhunter.snd"); + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } + /* * Gives experience. If they have enough experience, it auto-levels them up. * @@ -398,6 +840,11 @@ public class PlayerService implements INetworkDispatch { public void giveExperience(CreatureObject creature, int experience) { DatatableVisitor experienceTable; PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); + experience *= xpMultiplier; + + if (creature.getLevel() >= 90) { + return; + } //synchronized(objectMutex) { try { @@ -406,9 +853,13 @@ public class PlayerService implements INetworkDispatch { // Cannot gain more than half of the XP needed for the next level in one go // Do check + int experienceBonus = creature.getSkillModBase("flush_with_success"); + + experience += ((experience * experienceBonus) / 100); + // 1. Add the experience. - if (experience > 0) { - creature.showFlyText("base_player", "prose_flytext_xp", "", experience, (float) 2.5, new RGB(180, 60, 240), 1); + if (experience > 0 && !creature.isStationary()) { + creature.showFlyText(OutOfBand.ProsePackage("@base_player:prose_flytext_xp", experience), 2.5f, new RGB(180, 60, 240), 1, true); } String xpType = ((player.getProfession().contains("entertainer")) ? "entertainer" : ((player.getProfession().contains("trader")) ? "crafting" : "combat_general")); @@ -427,7 +878,7 @@ public class PlayerService implements INetworkDispatch { creature.playEffectObject("clienteffect/level_granted.cef", ""); creature.getClient().getSession().write((new ClientMfdStatusUpdateMessage((float) ((creature.getLevel() == 90) ? 90 : (creature.getLevel() + 1)), "/GroundHUD.MFDStatus.vsp.role.targetLevel")).serialize()); creature.setLevel(((Integer) experienceTable.getObject(i, 0)).shortValue()); - core.scriptService.callScript("scripts/collections/", "addMasterBadge", "master_" + player.getProfession(), core, creature); + core.scriptService.callScript("scripts/collections/", "master_" + player.getProfession(), "addMasterBadge", core, creature); // 3. Add the relevant health/action and expertise points. float luck = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getLuck").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getLuck").__call__().asInt())) / ((float) 90)) * ((float) creature.getLevel())) - ((float) creature.getSkillModBase("luck"))); @@ -443,49 +894,49 @@ public class PlayerService implements INetworkDispatch { if (luck >= 1) { core.skillModService.addSkillMod(creature, "luck", (int) luck); - creature.sendSystemMessage("spam", "level_up_stat_gain_0", (int) luck, 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_0", (int) luck), DisplayType.Broadcast); } if (precision >= 1) { core.skillModService.addSkillMod(creature, "precision", (int) precision); - creature.sendSystemMessage("spam", "level_up_stat_gain_1", (int) precision, 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_1", (int) precision), DisplayType.Broadcast); } if (strength >= 1) { core.skillModService.addSkillMod(creature, "strength", (int) strength); - creature.sendSystemMessage("spam", "level_up_stat_gain_2", (int) strength, 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_2", (int) strength), DisplayType.Broadcast); } if (constitution >= 1) { core.skillModService.addSkillMod(creature, "constitution", (int) constitution); - creature.sendSystemMessage("spam", "level_up_stat_gain_3", (int) constitution, 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_3", (int) constitution), DisplayType.Broadcast); } if (stamina >= 1) { core.skillModService.addSkillMod(creature, "stamina", (int) stamina); - creature.sendSystemMessage("spam", "level_up_stat_gain_4", (int) stamina, 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_4", (int) stamina), DisplayType.Broadcast); } if (agility >= 1) { core.skillModService.addSkillMod(creature, "agility", (int) agility); - creature.sendSystemMessage("spam", "level_up_stat_gain_5", (int) agility, 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_5", (int) agility), DisplayType.Broadcast); } if (health >= 1) { creature.setMaxHealth((creature.getMaxHealth() + (int) health + (healthGranted - creature.getGrantedHealth()))); creature.setHealth(creature.getMaxHealth()); - creature.sendSystemMessage("spam", "level_up_stat_gain_6", (((int) health) + (((int) constitution) * 8) + (((int) stamina) * 2)), 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_6", (((int) health) + (((int) constitution) * 8) + (((int) stamina) * 2))), DisplayType.Broadcast); } if (action >= 1) { creature.setMaxAction((creature.getMaxAction() + (int) action)); creature.setAction(creature.getMaxAction()); - creature.sendSystemMessage("spam", "level_up_stat_gain_7", (((int) action) + (((int) stamina) * 8) + (((int) constitution) * 2)), 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@spam:level_up_stat_gain_7", (((int) action) + (((int) stamina) * 8) + (((int) constitution) * 2))), DisplayType.Broadcast); } creature.setGrantedHealth(((Integer) experienceTable.getObject(i, 4))); // -> Expertise point added automatically by client - creature.showFlyText("cbt_spam", "level_up", (float) 2.5, new RGB(100, 149, 237), 0); + creature.showFlyText(OutOfBand.ProsePackage("@cbt_spam:level_up"), 2.5f, new RGB(100, 149, 237), 0, true); // 4. Adds roadmap rewards int level = creature.getLevel(); @@ -508,7 +959,7 @@ public class PlayerService implements INetworkDispatch { } } - creature.showFlyText("cbt_spam", "skill_up", (float) 2.5, new RGB(154, 205, 50), 0); + creature.showFlyText(OutOfBand.ProsePackage("@cbt_spam:skill_up"), 2.5f, new RGB(154, 205, 50), 0, true); creature.playEffectObject("clienteffect/skill_granted.cef", ""); creature.playMusic("sound/music_acq_bountyhunter.snd"); core.skillService.addSkill(creature, roadmapSkillName); @@ -520,6 +971,8 @@ public class PlayerService implements INetworkDispatch { try { roadmap = ClientFileManager.loadFile("datatables/roadmap/item_rewards.iff", DatatableVisitor.class); + Vector rewards = new Vector(); + for (int s = 0; s < roadmap.getRowCount(); s++) { if (roadmap.getObject(s, 0) != null) { if (((String) roadmap.getObject(s, 1)).equals(roadmapSkillName)) { @@ -531,22 +984,25 @@ public class PlayerService implements INetworkDispatch { for (int n = 0; n < items.length; n++) { String item = items[n]; - if (wookieeItems.length > 0 && creature.getStfName().contains("wookiee")) { + if (wookieeItems[0].length() > 0 && creature.getStfName().contains("wookiee")) { item = wookieeItems[n]; - } else if (ithorianItems.length > 0 && creature.getStfName().contains("ithorian")) { + } else if (ithorianItems[0].length() > 0 && creature.getStfName().contains("ithorian")) { item = ithorianItems[n]; } try { String customServerTemplate = null; - if (!item.contains("/")) { + if (item.contains("/")) { + item = (item.substring(0, (item.lastIndexOf("/") + 1)) + "shared_" + item.substring((item.lastIndexOf("/") + 1))); + } else { customServerTemplate = item; - item = core.scriptService.callScript("scripts/roadmap/", "roadmap_rewards", "get", item).asString(); + item = core.scriptService.callScript("scripts/roadmap/", player.getProfession(), "getRewards", item).asString(); } if (item != null && item != "") { - creature.getSlottedObject("inventory").add(core.objectService.createObject(item, 0, creature.getPlanet(), new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), customServerTemplate)); + SWGObject itemObj = core.objectService.createObject(item, 0, creature.getPlanet(), new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), customServerTemplate); + rewards.add(itemObj); } else { //System.out.println("Can't find template: " + item); } @@ -558,6 +1014,11 @@ public class PlayerService implements INetworkDispatch { } } } + + if (rewards != null && !rewards.isEmpty()) { + giveItems(creature, rewards); + } + } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); } @@ -569,6 +1030,9 @@ public class PlayerService implements INetworkDispatch { } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); } + + if(player.getProfession().equals("entertainer_1a") && creature.getLevel() == (short) 90 && creature.getEntertainerExperience() != null) + creature.getEntertainerExperience().cancel(true); //} } @@ -578,7 +1042,6 @@ public class PlayerService implements INetworkDispatch { return; player.getTitleList().add(title); - Console.println("Added title" + title); } @@ -591,10 +1054,231 @@ public class PlayerService implements INetworkDispatch { } + /** + * Creates a blue path to the destination point. + * @param actor Player that will be seeing the blue path. + * @param destination Where the blue path will lead to. + */ + public void createClientPath(SWGObject actor, Point3D destination) { + + if (actor == null || actor.getClient() == null || actor.getClient().getSession() == null) + return; + + List coordinates = new ArrayList(); + coordinates.add(actor.getPosition()); + + // TODO: Generate a path to destination based off of objects in the world. + + coordinates.add(destination); // Destination MUST be last coordinate in array + + CreateClientPathMessage path = new CreateClientPathMessage(coordinates); + actor.getClient().getSession().write(path.serialize()); + } + + /** + * Gives a player an item and shows the "New Items" message. + * @param reciever Player receiving the item. + * @param item The object to be given. + * @author Waverunner + */ + public void giveItem(CreatureObject reciever, SWGObject item) { + if (reciever == null || item == null) + return; + + if (reciever.getClient() == null) + return; + Client client = reciever.getClient(); + + if (client.getSession() == null) + return; + SWGObject inventory = reciever.getSlottedObject("inventory"); + + if (inventory == null) + return; + + inventory.add(item); + + ObjControllerMessage objController = new ObjControllerMessage(11, new ShowLootBox(reciever.getObjectID(), item)); + client.getSession().write(objController.serialize()); + } + + /** + * Gives a player a variety of items and shows the "New Items" message. + * @param reciever Player receiving the items. + * @param items Vector of the items. + */ + public void giveItems(CreatureObject reciever, Vector items) { + if (reciever == null || items == null) + return; + + if (reciever.getClient() == null) + return; + Client client = reciever.getClient(); + + if (client.getSession() == null) + return; + SWGObject inventory = reciever.getSlottedObject("inventory"); + + if (inventory == null) + return; + + for (SWGObject obj : items) { + inventory.add(obj); + } + + ObjControllerMessage objController = new ObjControllerMessage(11, new ShowLootBox(reciever.getObjectID(), items)); + client.getSession().write(objController.serialize()); + } + + public void performUnity(final CreatureObject acceptor, final CreatureObject proposer){ + TangibleObject acceptorInventory = (TangibleObject) acceptor.getSlottedObject("inventory"); + final AtomicBoolean acceptorHasRing = new AtomicBoolean(); + + acceptorInventory.viewChildren(acceptor, false, false, new Traverser() { + + @Override + public void process(SWGObject obj) { + if(obj.getAttachment("objType") != null) { + String objType = (String) obj.getAttachment("objType"); + if(objType == "ring") { + acceptorHasRing.set(true); + } + } + } + }); + + if(acceptorHasRing.get() == false) { + acceptor.sendSystemMessage("@unity:no_ring", (byte) 0); + proposer.sendSystemMessage("@unity:accept_fail", (byte) 0); + acceptor.setAttachment("proposer", null); + } else { + PlayerObject aGhost = (PlayerObject) acceptor.getSlottedObject("ghost"); + PlayerObject pGhost = (PlayerObject) proposer.getSlottedObject("ghost"); + + if (aGhost == null || pGhost == null) { + acceptor.sendSystemMessage("@unity:wed_error", (byte) 0); + proposer.sendSystemMessage("@unity:wed_error", (byte) 0); + acceptor.setAttachment("proposer", null); + return; + } else { + final Vector ringList = new Vector(); + acceptorInventory.viewChildren(acceptor, false, false, new Traverser() { + + @Override + public void process(SWGObject obj) { + if (obj.getAttachment("objType") != null) { + if (obj.getAttachment("objType") == "ring") { + ringList.add(obj); + } + } + } + }); + + if (ringList.size() > 1) { + sendRingSelectWindow(acceptor, proposer, ringList); + } else { + // Proposer's ring is already 'unified' from the start, so no + // need to set a unity attachment. + ringList.get(0).setAttachment("unity", (Boolean) true); + + if(!acceptor.getEquipmentList().contains(ringList.get(0))) + core.equipmentService.equip(acceptor, ringList.get(0)); + + aGhost.setSpouseName(proposer.getCustomName()); + pGhost.setSpouseName(acceptor.getCustomName()); + + acceptor.sendSystemMessage("Your union with " + proposer.getCustomName() + " is complete.", (byte) 0); + proposer.sendSystemMessage("Your union with " + acceptor.getCustomName() + " is complete.", (byte) 0); + + acceptor.setAttachment("proposer", null); + } + } + } + } + + private void sendRingSelectWindow(final CreatureObject actor, final CreatureObject proposer, Vector ringList) { + Map ringData = new HashMap(); + + for(SWGObject obj : ringList) { + ringData.put(obj.getObjectId(), obj.getCustomName()); + } + + final SUIWindow ringWindow = core.suiService.createListBox(ListBoxType.LIST_BOX_OK_CANCEL, "@unity:ring_prompt", "@unity:ring_prompt", ringData, actor, proposer, (float) 15); + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + + ringWindow.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + int index = Integer.parseInt(returnList.get(0)); + + SWGObject selectedRing = core.objectService.getObject(ringWindow.getObjectIdByIndex(index)); + selectedRing.setAttachment("unity", (Boolean) true); + + if(!actor.getEquipmentList().contains(selectedRing)) + core.equipmentService.equip(actor, selectedRing); + + PlayerObject aGhost = (PlayerObject) actor.getSlottedObject("ghost"); + PlayerObject pGhost = (PlayerObject) proposer.getSlottedObject("ghost"); + aGhost.setSpouseName(proposer.getCustomName()); + pGhost.setSpouseName(actor.getCustomName()); + + actor.sendSystemMessage("Your union with " + proposer.getCustomName() + " is complete.", (byte) 0); + proposer.sendSystemMessage("Your union with " + actor.getCustomName() + " is complete.", (byte) 0); + } + + }); + + ringWindow.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + + PlayerObject aGhost = (PlayerObject) actor.getSlottedObject("ghost"); + PlayerObject pGhost = (PlayerObject) proposer.getSlottedObject("ghost"); + + actor.sendSystemMessage("@unity:decline", (byte) 0); + proposer.sendSystemMessage("@unity:declined", (byte) 0); + actor.setAttachment("proposer", null); + for(SWGObject obj : proposer.getEquipmentList()) { + if(obj.getAttachment("unity") != null) { + obj.setAttachment("unity", null); + break; + } + } + } + }); + core.suiService.openSUIWindow(ringWindow); + } + + public String getFormalProfessionName(String template) { + String formalName = ""; + + switch (template) { + case "force_sensitive_1a": formalName = "Jedi"; break; + case "bounty_hunter_1a": formalName = "Bounty Hunter"; break; + case "officer_1a": formalName = "Officer"; break; + case "smuggler_1a": formalName = "Smuggler"; break; + case "entertainer_1a": formalName = "Entertainer"; break; + case "spy_1a": formalName = "Spy"; break; + case "medic_1a": formalName = "Medic"; break; + case "commando_1a": formalName = "Commando"; break; + + default: formalName = "Trader"; break; // Ziggy: Trader profession names are a bit irregular, so this is used. + + } + return formalName; + } + @Override public void shutdown() { // TODO Auto-generated method stub } + public Map>> getSchedulers() { + return schedulers; + } + } diff --git a/src/services/ScriptService.java b/src/services/ScriptService.java index 791e3cd5..c7bac81d 100644 --- a/src/services/ScriptService.java +++ b/src/services/ScriptService.java @@ -21,6 +21,9 @@ ******************************************************************************/ package services; +import java.util.Iterator; +import java.util.Vector; + import org.python.core.Py; import org.python.core.PyObject; import org.python.util.PythonInterpreter; @@ -30,10 +33,10 @@ import main.NGECore; @SuppressWarnings("unused") public class ScriptService { - + private NGECore core; private PythonInterpreter interpreter; - + public ScriptService(NGECore core) { this.core = core; } @@ -62,7 +65,7 @@ public class ScriptService { return python.get(method).__call__(Py.java2py(arg1)); } - public PyObject callScript(String path, String method, String module, Object arg1, Object arg2) { + public PyObject callScript(String path, String module, String method, Object arg1, Object arg2) { /*PythonInterpreter interpreter = new PythonInterpreter(); interpreter.cleanup(); interpreter.exec("import sys\nsys.path.append('" + path + "')\nfrom " + module + " import " + method); @@ -74,7 +77,7 @@ public class ScriptService { return python.get(method).__call__(Py.java2py(arg1), Py.java2py(arg2)); } - public PyObject callScript(String path, String method, String module, Object arg1, Object arg2, Object arg3) { + public PyObject callScript(String path, String module, String method, Object arg1, Object arg2, Object arg3) { /*PythonInterpreter interpreter = new PythonInterpreter(); interpreter.cleanup(); interpreter.exec("import sys\nsys.path.append('" + path + "')\nfrom " + module + " import " + method); @@ -86,7 +89,7 @@ public class ScriptService { return python.get(method).__call__(Py.java2py(arg1), Py.java2py(arg2), Py.java2py(arg3)); } - + public PyObject callScript(String path, String module, String method, Object arg1, Object arg2, Object arg3, Object arg4) { /*PythonInterpreter interpreter = new PythonInterpreter(); interpreter.cleanup(); @@ -106,5 +109,35 @@ public class ScriptService { PyObject func = python.get(method); return func; } - + + public String fetchString(String path, String method) { + PyObject result = core.scriptService.callScript(path, "", method); + return ((PyObject)result).asString(); + } + + public int fetchInteger(String path, String method) { + PyObject result = core.scriptService.callScript(path, "", method); + return ((PyObject)result).asInt(); + } + + public Vector fetchStringVector(String path, String method) { + Vector vector = new Vector(); + PyObject result = core.scriptService.callScript(path, "", method); + Iterable comp = (Iterable)result.asIterable(); + for (Iterator temp = comp.iterator(); temp.hasNext();){ + vector.add(temp.next().asString()); + } + return vector; + } + + public Vector fetchIntegerVector(String path, String method) { + Vector vector = new Vector(); + PyObject result = core.scriptService.callScript(path, "", method); + Iterable comp = (Iterable)result.asIterable(); + for (Iterator temp = comp.iterator(); temp.hasNext();){ + vector.add(temp.next().asInt()); + } + return vector; + } + } diff --git a/src/services/SimulationService.java b/src/services/SimulationService.java index b3adb121..0b941eb6 100644 --- a/src/services/SimulationService.java +++ b/src/services/SimulationService.java @@ -42,6 +42,8 @@ import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; +import com.sleepycat.persist.EntityCursor; + import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.MeshVisitor; import engine.clientdata.visitors.PortalVisitor; @@ -58,33 +60,37 @@ import engine.resources.scene.Quaternion; import engine.resources.scene.quadtree.QuadTree; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; - -import protocol.swg.ChatFriendsListUpdate; -import protocol.swg.ChatOnChangeFriendStatus; -import protocol.swg.ChatOnGetFriendsList; import protocol.swg.CmdStartScene; import protocol.swg.HeartBeatMessage; import protocol.swg.ObjControllerMessage; import protocol.swg.OpenedContainerMessage; import protocol.swg.UpdateTransformMessage; import protocol.swg.UpdateTransformWithParentMessage; +import protocol.swg.chat.ChatFriendsListUpdate; +import protocol.swg.chat.ChatOnChangeFriendStatus; +import protocol.swg.chat.ChatOnGetFriendsList; import protocol.swg.objectControllerObjects.DataTransform; import protocol.swg.objectControllerObjects.DataTransformWithParent; import protocol.swg.objectControllerObjects.TargetUpdate; - import resources.objects.building.BuildingObject; import resources.objects.cell.CellObject; import resources.objects.creature.CreatureObject; +import resources.objects.group.GroupObject; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import resources.common.*; import resources.common.collidables.AbstractCollidable; +import resources.datatables.DisplayType; +import resources.datatables.Options; import resources.datatables.PlayerFlags; +import resources.datatables.Posture; import services.ai.LairActor; +import services.chat.ChatRoom; import toxi.geom.Line3D; import toxi.geom.Ray3D; import toxi.geom.Vec3D; import toxi.geom.mesh.TriangleMesh; +import wblut.geom.WB_AABB; import wblut.geom.WB_AABBNode; import wblut.geom.WB_AABBTree; import wblut.geom.WB_Distance; @@ -159,17 +165,43 @@ public class SimulationService implements INetworkDispatch { core.commandService.registerCommand("roleplay"); core.commandService.registerAlias("afk", "toggleawayfromkeyboard"); core.commandService.registerCommand("toggledisplayingfactionrank"); + core.commandService.registerCommand("editbiography"); + core.commandService.registerCommand("setbiography"); + core.commandService.registerCommand("requestbiography"); + core.commandService.registerCommand("eject"); + core.commandService.registerGmCommand("broadcast"); + core.commandService.registerGmCommand("teleporttarget"); + core.commandService.registerGmCommand("getplayerid"); + core.commandService.registerCommand("npcconversationselect"); + core.commandService.registerCommand("npcconversationstop"); } public void insertSnapShotObjects() { List objectList = new ArrayList(core.objectService.getObjectList().values()); for(SWGObject obj : objectList) { - if(obj.getParentId() == 0 && obj.isInSnapshot()) + if(obj.getParentId() == 0 && /*(*/obj.isInSnapshot() /*|| obj.getAttachment("isBuildout") != null)*/) add(obj, obj.getPosition().x, obj.getPosition().z); } } + public void insertPersistentBuildings() { + EntityCursor cursor = core.getBuildingODB().getCursor(Long.class, BuildingObject.class); + + Iterator it = cursor.iterator(); + + while(it.hasNext()) { + final BuildingObject building = (BuildingObject) core.objectService.getObject(it.next().getObjectID()); + if(building == null) + continue; + if(building.getAttachment("hasLoadedServerTemplate") == null) + core.objectService.loadServerTemplate(building); + add(building, building.getPosition().x, building.getPosition().z); + } + cursor.close(); + } + + public void addCollidable(AbstractCollidable collidable, float x, float y) { collidableQuadTrees.get(collidable.getPlanet().getName()).put(x, y, collidable); } @@ -190,7 +222,7 @@ public class SimulationService implements INetworkDispatch { object.setIsInQuadtree(true); boolean success = quadTrees.get(object.getPlanet().getName()).put(x, y, object); if(success) { - Vector childObjects = (Vector) object.getAttachment("childObjects"); + @SuppressWarnings("unchecked") Vector childObjects = (Vector) object.getAttachment("childObjects"); if(childObjects != null) { addChildObjects(object, childObjects); object.setAttachment("childObjects", null); @@ -259,6 +291,10 @@ public class SimulationService implements INetworkDispatch { } public boolean remove(SWGObject object, float x, float y, boolean notifyObservers) { + if (object == null || !object.isInQuadtree()) { + return false; + } + boolean success = quadTrees.get(object.getPlanet().getName()).remove(x, y, object); object.setIsInQuadtree(success); if(success && notifyObservers) { @@ -299,10 +335,17 @@ public class SimulationService implements INetworkDispatch { } CreatureObject object = (CreatureObject) client.getParent(); + + if (core.mountService.isMounted(object)) { + object = (CreatureObject) object.getContainer(); + } + Point3D newPos; Point3D oldPos; synchronized(object.getMutex()) { newPos = new Point3D(dataTransform.getXPosition(), dataTransform.getYPosition(), dataTransform.getZPosition()); + if(Float.isNaN(newPos.x) || Float.isNaN(newPos.y) || Float.isNaN(newPos.z)) + return; oldPos = object.getPosition(); //Collection oldObservers = object.getObservers(); //Collection newObservers = new HashSet(); @@ -329,7 +372,7 @@ public class SimulationService implements INetworkDispatch { List newAwareObjects = get(object.getPlanet(), newPos.x, newPos.z, 512); ArrayList oldAwareObjects = new ArrayList(object.getAwareObjects()); - Collection updateAwareObjects = CollectionUtils.intersection(oldAwareObjects, newAwareObjects); + @SuppressWarnings("unchecked") Collection updateAwareObjects = CollectionUtils.intersection(oldAwareObjects, newAwareObjects); object.notifyObservers(utm, false); for(int i = 0; i < oldAwareObjects.size(); i++) { @@ -393,9 +436,17 @@ public class SimulationService implements INetworkDispatch { System.out.println("NULL Object"); return; } + CreatureObject object = (CreatureObject) client.getParent(); + if (core.mountService.isMounted(object)) { + object.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount"), DisplayType.Broadcast); + core.mountService.dismount(object, (CreatureObject) object.getContainer()); + } + Point3D newPos = new Point3D(dataTransform.getXPosition(), dataTransform.getYPosition(), dataTransform.getZPosition()); + if(Float.isNaN(newPos.x) || Float.isNaN(newPos.y) || Float.isNaN(newPos.z)) + return; Point3D oldPos = object.getPosition(); Quaternion newOrientation = new Quaternion(dataTransform.getWOrientation(), dataTransform.getXOrientation(), dataTransform.getYOrientation(), dataTransform.getZOrientation()); @@ -429,21 +480,20 @@ public class SimulationService implements INetworkDispatch { }); - objControllerOpcodes.put(ObjControllerOpcodes.TARGET_UPDATE, new INetworkRemoteEvent() { + objControllerOpcodes.put(ObjControllerOpcodes.lookAtTarget, new INetworkRemoteEvent() { @Override public void handlePacket(IoSession session, IoBuffer data) throws Exception { - - data = data.order(ByteOrder.LITTLE_ENDIAN); - data.position(0); - + + data.order(ByteOrder.LITTLE_ENDIAN); + Client client = core.getClient(session); - + if(client == null) { System.out.println("NULL Client"); return; } - + if(client.getParent() == null) { System.out.println("NULL Object"); return; @@ -452,24 +502,145 @@ public class SimulationService implements INetworkDispatch { TargetUpdate targetUpdate = new TargetUpdate(); targetUpdate.deserialize(data); - - object.setTargetId(targetUpdate.getTargetId()); - + + object.setLookAtTarget(targetUpdate.getTargetId()); + } }); - objControllerOpcodes.put(ObjControllerOpcodes.HOVER_TARGET, new INetworkRemoteEvent() { + objControllerOpcodes.put(ObjControllerOpcodes.intendedTarget, new INetworkRemoteEvent() { @Override public void handlePacket(IoSession session, IoBuffer data) throws Exception { - + + data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if(client == null) { + System.out.println("NULL Client"); + return; + } + + if(client.getParent() == null) { + System.out.println("NULL Object"); + return; + } + CreatureObject object = (CreatureObject) client.getParent(); + + TargetUpdate targetUpdate = new TargetUpdate(); + targetUpdate.deserialize(data); + + object.setIntendedTarget(targetUpdate.getTargetId()); + } - + }); } + + public void moveObject(SWGObject object, Point3D newPosition, Quaternion newOrientation, int movementCounter, float speed, CellObject cell) { + + if(Float.isNaN(newPosition.x) || Float.isNaN(newPosition.y) || Float.isNaN(newPosition.z)) + return; + if(cell == null) { + + Point3D oldPos; + synchronized(object.getMutex()) { + oldPos = object.getPosition(); + if(object.getContainer() == null) + move(object, oldPos.x, oldPos.z, newPosition.x, newPosition.z); + object.setPosition(newPosition); + object.setOrientation(newOrientation); + object.setMovementCounter(movementCounter + 1); + } + if(object.getContainer() != null && newPosition != oldPos) { + object.getContainer()._remove(object); + add(object, newPosition.x, newPosition.z); + } + + UpdateTransformMessage utm = new UpdateTransformMessage(object.getObjectID(), (short) (newPosition.x * 4 + 0.5), (short) (newPosition.y * 4 + 0.5), (short) (newPosition.z * 4 + 0.5), movementCounter + 1, getSpecialDirection(newOrientation), speed); + + List newAwareObjects = get(object.getPlanet(), newPosition.x, newPosition.z, 512); + ArrayList oldAwareObjects = new ArrayList(object.getAwareObjects()); + @SuppressWarnings("unchecked") Collection updateAwareObjects = CollectionUtils.intersection(oldAwareObjects, newAwareObjects); + object.notifyObservers(utm, false); + + for(int i = 0; i < oldAwareObjects.size(); i++) { + SWGObject obj = oldAwareObjects.get(i); + if(!updateAwareObjects.contains(obj) && obj != object && obj.getWorldPosition().getDistance2D(newPosition) > 200 && obj.isInQuadtree() /*&& obj.getParentId() == 0*/) { + if(obj.getAttachment("bigSpawnRange") != null && obj.getWorldPosition().getDistance2D(newPosition) < 512) + continue; + object.makeUnaware(obj); + if(obj.getClient() != null) + obj.makeUnaware(object); + } else if(obj != object && obj.getWorldPosition().getDistance2D(newPosition) > 200 && obj.isInQuadtree() && obj.getAttachment("bigSpawnRange") == null) { + object.makeUnaware(obj); + if(obj.getClient() != null) + obj.makeUnaware(object); + } + } + for(int i = 0; i < newAwareObjects.size(); i++) { + SWGObject obj = newAwareObjects.get(i); + //System.out.println(obj.getTemplate()); + if(!updateAwareObjects.contains(obj) && obj != object && !object.getAwareObjects().contains(obj) && obj.getContainer() != object && obj.isInQuadtree()) { + if(obj.getAttachment("bigSpawnRange") == null && obj.getWorldPosition().getDistance2D(newPosition) > 200) + continue; + object.makeAware(obj); + if(obj.getClient() != null) + obj.makeAware(object); + } + } + + checkForCollidables(object); + MoveEvent event = new MoveEvent(); + event.object = object; + object.getEventBus().publish(event); + + + } else { + + newPosition.setCell(cell); + Point3D oldPos = object.getPosition(); + object.setPosition(newPosition); + object.setOrientation(newOrientation); + object.setMovementCounter(movementCounter + 1); + + UpdateTransformWithParentMessage utm = new UpdateTransformWithParentMessage(object.getObjectID(), cell.getObjectID(), (short) (newPosition.x * 8 + 0.5), (short) (newPosition.y * 8 + 0.5), (short) (newPosition.z * 8 + 0.5), movementCounter + 1, getSpecialDirection(newOrientation), speed); + + if(object.getContainer() != cell) { + remove(object, oldPos.x, oldPos.z); + if(object.getContainer() != null) + object.getContainer()._remove(object); + cell._add(object); + } + object.notifyObservers(utm, false); + + checkForCollidables(object); + + } + + } + + public byte getSpecialDirection(Quaternion orientation) { + byte movementAngle = (byte) 0.0f; + float wOrient = orientation.w; + float yOrient = orientation.y; + float sq = (float) Math.sqrt(1- (orientation.w * orientation.w)); + + if (sq != 0) { + if (orientation.w > 0 && orientation.y < 0) { + wOrient *= -1; + yOrient *= -1; + } + movementAngle = (byte) ((yOrient / sq) * (2 * Math.acos(wOrient) / 0.06283f)); + } + + return movementAngle; + } + @Override public void shutdown() { // TODO Auto-generated method stub @@ -537,7 +708,6 @@ public class SimulationService implements INetworkDispatch { float endZ = (float) (modelSpace.m31 * end.x + modelSpace.m32 * end.y + modelSpace.m33 * end.z + modelSpace.m34); end = new Point3D(endX, endY, endZ); - Vector3D direction = new Vector3D(end.x - origin.x, end.y - origin.y, end.z - origin.z); if(direction.getX() > 0 && direction.getY() > 0 && direction.getZ() > 0) direction.normalize(); @@ -545,7 +715,28 @@ public class SimulationService implements INetworkDispatch { return new Ray(origin, direction); } + + public Point3D convertPointToModelSpace(Point3D point, SWGObject object) { + + Point3D position = object.getPosition(); + WB_M44 translateMatrix = new WB_M44(1, 0, 0, position.x, 0, 1, 0, position.y, 0, 0, 1, position.z, 0, 0, 0, 1); + + float radians = object.getRadians(); + float sin = (float) Math.sin(radians); + float cos = (float) Math.cos(radians); + + WB_M44 rotationMatrix = new WB_M44(cos, 0, sin, 0, 0, 1, 0, 0, -sin, 0, cos, 0, 0, 0, 0, 1); + + WB_M44 modelSpace = translateMatrix.mult(rotationMatrix).inverse(); + + float x = (float) (modelSpace.m11 * point.x + modelSpace.m12 * point.y + modelSpace.m13 * point.z + modelSpace.m14); + float y = (float) (modelSpace.m21 * point.x + modelSpace.m22 * point.y + modelSpace.m23 * point.z + modelSpace.m24); + float z = (float) (modelSpace.m31 * point.x + modelSpace.m32 * point.y + modelSpace.m33 * point.z + modelSpace.m34); + + return new Point3D(x, y, z); + + } /* * Moved this to ConnectionService which will disconnect them * from the server if they don't send packets for 5 minutes or more @@ -557,7 +748,7 @@ public class SimulationService implements INetworkDispatch { * and continues sending packets. */ public void handleDisconnect(final IoSession session) { - Client client = core.getClient(session); + final Client client = core.getClient(session); if(client == null) return; @@ -565,15 +756,31 @@ public class SimulationService implements INetworkDispatch { if(client.getParent() == null) return; - CreatureObject object = (CreatureObject) client.getParent(); + final CreatureObject object = (CreatureObject) client.getParent(); + SWGObject container = object.getContainer(); PlayerObject ghost = (PlayerObject) object.getSlottedObject("ghost"); - //session.suspendWrite(); + if(object.getAttachment("proposer") != null) + object.setAttachment("proposer", null); + //session.suspendWrite(); + final long objectId = object.getObjectID(); if(!ghost.isSet(PlayerFlags.LD)) ghost.toggleFlag(PlayerFlags.LD); + for (CreatureObject opponent : new ArrayList(object.getDuelList())) { + if (opponent != null) { + core.combatService.handleEndDuel(object, opponent, true); + } + } + + if (core.mountService.isMounted(object)) { + core.mountService.dismount(object, (CreatureObject) container); + } + + core.mountService.storeAll(object); + /* object.createTransaction(core.getCreatureODB().getEnvironment()); core.getCreatureODB().put(object, Long.class, CreatureObject.class, object.getTransaction()); @@ -582,11 +789,14 @@ public class SimulationService implements INetworkDispatch { ScheduledFuture disconnectTask = scheduler.schedule(new Runnable() { @Override public void run() { - core.connectionService.disconnect(session); + if(core.objectService.getObject(objectId).getAttachment("disconnectTask") != null) + core.connectionService.disconnect(client); } - }, 5, TimeUnit.MINUTES); + }, 1, TimeUnit.MINUTES); + core.removeClient(session); object.setAttachment("disconnectTask", disconnectTask); + core.combatService.endCombat(object); // temp fix for ending combat on disconnect } @@ -621,12 +831,33 @@ public class SimulationService implements INetworkDispatch { core.weatherService.sendWeather(object); + //core.chatService.joinChatRoom(object.getCustomName().toLowerCase(), "SWG." + core.getGalaxyName() + "." + object.getPlanet().getName()); + if (!object.hasSkill(ghost.getProfessionWheelPosition())) { - object.showFlyText("cbt_spam", "skill_up", (float) 2.5, new RGB(154, 205, 50), 0); + object.showFlyText(OutOfBand.ProsePackage("@cbt_spam:skill_up"), 2.5f, new RGB(154, 205, 50), 0, true); object.playEffectObject("clienteffect/skill_granted.cef", ""); object.playMusic("sound/music_acq_bountyhunter.snd"); core.skillService.addSkill(object, ghost.getProfessionWheelPosition()); - } + } + + if(object.getGroupId() != 0 && core.objectService.getObject(object.getGroupId()) instanceof GroupObject) + object.makeAware(core.objectService.getObject(object.getGroupId())); + + if(object.getPosture() == Posture.Dead) + core.playerService.sendCloningWindow(object, false); + + ChatRoom zoneRoom = core.chatService.getChatRoomByAddress("SWG." + core.getGalaxyName() + "." + object.getPlanet().getName() + ".Planet"); + if (zoneRoom != null) { + String chatName = object.getCustomName().toLowerCase(); + + if (chatName.contains(" ")) + chatName = chatName.split(" ")[0]; + + if (!zoneRoom.getUserList().contains(chatName)) { + core.chatService.joinChatRoom(chatName, zoneRoom.getRoomId(), true); + } + } + } public void transferToPlanet(SWGObject object, Planet planet, Point3D newPos, Quaternion newOrientation, SWGObject newParent) { @@ -659,9 +890,7 @@ public class SimulationService implements INetworkDispatch { synchronized(object.getMutex()) { - object.getAwareObjects().removeAll(object.getAwareObjects()); - } object.setPlanet(planet); @@ -687,12 +916,30 @@ public class SimulationService implements INetworkDispatch { if(container.getPermissions().canView(requester, container)) { OpenedContainerMessage opm = new OpenedContainerMessage(container.getObjectID()); - if(requester.getClient() != null && requester.getClient().getSession() != null) + if(requester.getClient() != null && requester.getClient().getSession() != null && !(container instanceof CreatureObject)) requester.getClient().getSession().write(opm.serialize()); } } + public void transform(TangibleObject obj, Point3D position) + { + Point3D oldPosition = obj.getPosition(); + Point3D newPosition = new Point3D(oldPosition.x + position.x, oldPosition.y + position.y, oldPosition.z + position.z); + + teleport(obj, newPosition, obj.getOrientation(), obj.getParentId()); + } + + public void transform(SWGObject obj, float rotation, Point3D axis) + { + rotation *= (Math.PI / 180); + + Quaternion oldRotation = obj.getOrientation(); + Quaternion newRotation = resources.common.MathUtilities.rotateQuaternion(oldRotation, rotation, axis); + + teleport(obj, obj.getPosition(), newRotation, obj.getParentId()); + } + public void teleport(SWGObject obj, Point3D position, Quaternion orientation, long cellId) { if(cellId == 0) { @@ -707,15 +954,23 @@ public class SimulationService implements INetworkDispatch { DataTransformWithParent dataTransform = new DataTransformWithParent(new Point3D(position.x, position.y, position.z), orientation, obj.getMovementCounter(), obj.getObjectID(), cellId); ObjControllerMessage objController = new ObjControllerMessage(0x1B, dataTransform); obj.notifyObservers(objController, true); + + obj.setPosition(position); + obj.setOrientation(orientation); } } public boolean checkLineOfSight(SWGObject obj1, SWGObject obj2) { - + long startTime = System.nanoTime(); if(obj1.getPlanet() != obj2.getPlanet()) return false; + // If obj1 is container of obj2 vice versa + if (obj1 == obj2.getContainer() || obj2 == obj1.getContainer() || obj1 == obj2.getGrandparent() || obj2 == obj1.getGrandparent()) { + return true; + } + if(obj1.getGrandparent() != null || obj2.getGrandparent() != null) { if(obj1.getGrandparent() == obj2.getGrandparent()) @@ -741,7 +996,7 @@ public class SimulationService implements INetworkDispatch { Point3D end = new Point3D(position2.x, position2.y + heightDirection, position2.z); float distance = position1.getDistance2D(position2); - List inRangeObjects = get(obj1.getPlanet(), position1.x, position1.z, 150); + List inRangeObjects = get(obj1.getPlanet(), position1.x, position1.z, (int) (distance + 10)); for(SWGObject object : inRangeObjects) { @@ -769,6 +1024,7 @@ public class SimulationService implements INetworkDispatch { for(Mesh3DTriangle tri : tris) { if(ray.intersectsTriangle(tri, distance) != null) { + //System.out.println("Collision took: " + (System.nanoTime() - startTime) + " ns (collided)"); // System.out.println("Collided with " + object.getTemplate() + " X: " + object.getPosition().x + " Y: " + object.getPosition().y + " Z: " + object.getPosition().z); return false; } @@ -791,8 +1047,8 @@ public class SimulationService implements INetworkDispatch { return checkLineOfSightWorldToCell(obj1, obj2, cell); } - /*List segments = new ArrayList(); - Line3D.splitIntoSegments(new Vec3D(position1.x, position1.y + 1, position1.z), new Vec3D(position2.x, position2.y + 1, position2.z), (float) 0.5, segments, true); + List segments = new ArrayList(); + Line3D.splitIntoSegments(new Vec3D(position1.x, position1.y + 1, position1.z), new Vec3D(position2.x, position2.y + 1, position2.z), (float) 1, segments, true); for(Vec3D segment : segments) { float y = segment.y; @@ -800,11 +1056,12 @@ public class SimulationService implements INetworkDispatch { int height = (int) core.terrainService.getHeight(obj1.getPlanetId(), segment.x, segment.z); // round down to int if(height > y) { - System.out.println("Collision with terrain"); + //System.out.println("Collision took: " + (System.nanoTime() - startTime) + " ns (terrain collision)"); return false; } - }*/ - + } + //System.out.println("Collision took: " + (System.nanoTime() - startTime) + " ns (did not collide)"); + return true; } @@ -822,7 +1079,14 @@ public class SimulationService implements INetworkDispatch { Point3D origin = new Point3D(position1.x, position1.y + 1, position1.z); Point3D end = new Point3D(position2.x, position2.y + 1, position2.z); - Vector3D direction = new Vector3D(end.x - origin.x, end.y - origin.y, end.z - origin.z).normalize(); + Vector3D direction = new Vector3D(end.x - origin.x, end.y - origin.y, end.z - origin.z); + + if (direction.getNorm() != 0) { + direction.normalize(); + } else { + System.out.println("WARNING: checkLineOfSightInBuilding: Vector norm was 0."); + } + float distance = position1.getDistance2D(position2); Ray ray = new Ray(origin, direction); @@ -834,6 +1098,7 @@ public class SimulationService implements INetworkDispatch { MeshVisitor meshVisitor; if(!cellMeshes.containsKey(cell.mesh)) { meshVisitor = ClientFileManager.loadFile(cell.mesh, MeshVisitor.class); + meshVisitor.getTriangles(); cellMeshes.put(cell.mesh, meshVisitor); } else { meshVisitor = cellMeshes.get(cell.mesh); diff --git a/src/services/SkillService.java b/src/services/SkillService.java index 75385d8c..a61116b3 100644 --- a/src/services/SkillService.java +++ b/src/services/SkillService.java @@ -22,15 +22,22 @@ package services; import java.nio.ByteOrder; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; +import org.python.core.Py; +import org.python.core.PyObject; import protocol.swg.ExpertiseRequestMessage; - +import protocol.swg.ObjControllerMessage; +import protocol.swg.objectControllerObjects.SetProfessionTemplate; +import protocol.swg.objectControllerObjects.UiPlayEffect; import resources.common.Console; import resources.common.FileUtilities; +import resources.common.ObjControllerOpcodes; import resources.common.Opcodes; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; @@ -92,7 +99,6 @@ public class SkillService implements INetworkDispatch { if (isTitle == true) { core.playerService.addPlayerTitle(player, skill); - Console.println("Gave skill title: " + skill); } if (isProfession) { @@ -118,7 +124,6 @@ public class SkillService implements INetworkDispatch { for (String skillName : skillsRequired) { if (skillName != "" && !creature.hasSkill(skillName)) { - System.out.println("Skill Name: " + skillName); return; } } @@ -149,10 +154,30 @@ public class SkillService implements INetworkDispatch { } } - if(!skill.contains("expertise")) { // only mark 1 abilities in datatable need to remove abilities per script + if (skill.contains("expertise")) { + if (FileUtilities.doesFileExist("scripts/expertise/" + skill + ".py")) { + PyObject method = core.scriptService.getMethod("scripts/expertise/", skill, "addAbilities"); + + if (method != null && method.isCallable()) { + method.__call__(Py.java2py(core), Py.java2py(creature), Py.java2py(player)); + } + } + } else { for (String ability : abilities) { creature.addAbility(ability); } + + for (String expertiseName : creature.getSkills()) { + if (expertiseName.startsWith("expertise")) { + if (FileUtilities.doesFileExist("scripts/expertise/" + expertiseName + ".py")) { + PyObject method = core.scriptService.getMethod("scripts/expertise/", expertiseName, "addAbilities"); + + if (method != null && method.isCallable()) { + method.__call__(Py.java2py(core), Py.java2py(creature), Py.java2py(player)); + } + } + } + } } for (String skillMod : skillMods) { @@ -181,7 +206,7 @@ public class SkillService implements INetworkDispatch { public void removeSkill(CreatureObject creature, String skill) { PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); DatatableVisitor skillTable; - + if (player == null) { return; } @@ -191,7 +216,7 @@ public class SkillService implements INetworkDispatch { } try { - skillTable = ClientFileManager.loadFile("datatables/skills/skills.iff", DatatableVisitor.class); + skillTable = ClientFileManager.loadFile("datatables/skill/skills.iff", DatatableVisitor.class); for (int s = 0; s < skillTable.getRowCount(); s++) { if (skillTable.getObject(s, 0) != null) { @@ -216,14 +241,22 @@ public class SkillService implements INetworkDispatch { //creature.addExpertisePoints(pointsRequired); } - if(!skill.contains("expertise")) { // only mark 1 abilities in datatable need to remove abilities per script + if (skill.contains("expertise")) { + if (FileUtilities.doesFileExist("scripts/expertise/" + skill + ".py")) { + PyObject method = core.scriptService.getMethod("scripts/expertise/", skill, "removeAbilities"); + + if (method != null && method.isCallable()) { + method.__call__(Py.java2py(core), Py.java2py(creature), Py.java2py(player)); + } + } + } else { for (String ability : abilities) { creature.removeAbility(ability); } - } + } for (String skillMod : skillMods) { - core.skillModService.deductSkillMod(creature, skillMod.split("=")[0], new Integer(skillMod.split("=")[1])); + if(skillMod.split("=").length == 2) core.skillModService.deductSkillMod(creature, skillMod.split("=")[0], new Integer(skillMod.split("=")[1])); } for (String schematic : schematicsGranted) { @@ -233,6 +266,8 @@ public class SkillService implements INetworkDispatch { for (String schematic : schematicsRevoked) { //player.getDraftSchematicList().add(new DraftSchematic()); } + + creature.removeSkill(skill); } } } @@ -244,42 +279,134 @@ public class SkillService implements INetworkDispatch { @Override public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { - swgOpcodes.put(Opcodes.ExpertiseRequestMessage, new INetworkRemoteEvent() { + swgOpcodes.put(Opcodes.ExpertiseRequestMessage, (session, buffer) -> { - @Override - public void handlePacket(IoSession session, IoBuffer buffer) throws Exception { - - buffer = buffer.order(ByteOrder.LITTLE_ENDIAN); - buffer.position(0); - - ExpertiseRequestMessage expertise = new ExpertiseRequestMessage(); - expertise.deserialize(buffer); + buffer = buffer.order(ByteOrder.LITTLE_ENDIAN); + buffer.position(0); + + ExpertiseRequestMessage expertise = new ExpertiseRequestMessage(); + expertise.deserialize(buffer); - Client client = core.getClient(session); - if(client == null) { - System.out.println("NULL Client"); - return; - } - - if(client.getParent() == null) - return; - - CreatureObject creature = (CreatureObject) client.getParent(); - PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); - - if(player == null) - return; - - for(String expertiseName : expertise.getExpertiseSkills()) { - addSkill(creature, expertiseName); - if(!FileUtilities.doesFileExist("scripts/expertise/" + expertiseName + ".py")) - continue; - core.scriptService.callScript("scripts/expertise/", "addAbilities", expertiseName, core, creature, player); - } - + Client client = core.getClient(session); + if(client == null) { + System.out.println("NULL Client"); + return; } + + if(client.getParent() == null) + return; + + CreatureObject creature = (CreatureObject) client.getParent(); + PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); + + if(player == null) + return; + + for(String expertiseName : expertise.getExpertiseSkills()) { + if(expertiseName.startsWith("expertise_") && ((caluclateExpertisePoints(creature) - 1) >= 0) && validExpertiseSkill(player, expertiseName)) { // Prevent possible glitches/exploits + addSkill(creature, expertiseName); + } + } + }); + objControllerOpcodes.put(ObjControllerOpcodes.SET_PROFESSION_TEMPLATE, (session, buffer) -> { + + buffer = buffer.order(ByteOrder.LITTLE_ENDIAN); + + SetProfessionTemplate profTemplate = new SetProfessionTemplate(); + profTemplate.deserialize(buffer); + String profession = profTemplate.getProfession(); + + Client client = core.getClient(session); + if(client == null) { + System.out.println("NULL Client"); + return; + } + + if(client.getParent() == null) + return; + + CreatureObject creature = (CreatureObject) client.getParent(); + PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost"); + + //System.out.println(profession); + if(player == null || player.getProfession().equals(profession) || profession == null) + return; + + core.playerService.respec(creature, profession); + + }); + + } + + public int caluclateExpertisePoints(CreatureObject creature) + { + int expertisePoints = 0; + try + { + DatatableVisitor table = ClientFileManager.loadFile("datatables/player/player_level.iff", DatatableVisitor.class); + for (int i = 0; i < creature.getLevel(); ++i) expertisePoints += (int) table.getObject(i, 5); + for (String skill : creature.getSkills()) if(skill.startsWith("expertise_")) expertisePoints--; + } + catch (Exception e) { e.printStackTrace(); } + return expertisePoints; + } + + public boolean validExpertiseSkill(PlayerObject player, String skill) + { + try + { + DatatableVisitor table = ClientFileManager.loadFile("datatables/expertise/expertise.iff", DatatableVisitor.class); + String profession; + + switch(player.getProfession()) + { + case "trader_0a": + profession = "trader_dom"; + break; + + case "trader_0b": + profession = "trader_struct"; + break; + + case "trader_0c": + profession = "trader_mun"; + break; + + case "trader_0d": + profession = "trader_eng"; + break; + + default: + profession = player.getProfession().replace("_1a", ""); + break; + } + + for (int s = 0; s < table.getRowCount(); s++) + { + if (table.getObject(s, 0) != null && ((String) table.getObject(s, 0)).equals(skill)) + { + if(((String)table.getObject(s, 7)).equals(profession) || ((String)table.getObject(s, 7)).equals("all")) return true; + else return false; + } + } + } + catch (Exception e) { e.printStackTrace(); } + return false; + } + + public void resetExpertise(CreatureObject creature) { + List skills = new ArrayList(creature.getSkills()); + skills.stream().filter(s -> s.contains("expertise")).forEach(s -> removeSkill(creature, s)); + } + + public void sendRespecWindow(CreatureObject creature) { + if(creature.getClient() == null) + return; + UiPlayEffect ui = new UiPlayEffect(creature.getObjectID(), "showMediator=ws_professiontemplateselect"); + ObjControllerMessage objController = new ObjControllerMessage(0x0B, ui); + creature.getClient().getSession().write(objController.serialize()); } @Override diff --git a/src/services/StaticService.java b/src/services/StaticService.java index a0447d0a..7dbe7d97 100644 --- a/src/services/StaticService.java +++ b/src/services/StaticService.java @@ -41,75 +41,77 @@ import engine.resources.service.INetworkRemoteEvent; public class StaticService implements INetworkDispatch { private NGECore core; - + public StaticService(NGECore core) { this.core = core; } - + public void spawnStatics() { - for (SWGObject object : core.objectService.getObjectList().values()) + for (SWGObject object : core.objectService.getObjectList().values()) { if (object instanceof CreatureObject && ((CreatureObject) object).getStaticNPC()) { ((TangibleObject) object).setRespawnTime(0); core.objectService.destroyObject(object); } - spawnPlanetStaticObjs("rori"); - spawnPlanetStaticObjs("naboo"); - spawnPlanetStaticObjs("tatooine"); - spawnPlanetStaticObjs("lok"); + } + + spawnObjects("rori"); + spawnObjects("naboo"); + spawnObjects("tatooine"); + spawnObjects("lok"); + //spawnObjects("kaas"); // Keep commented out unless you possess the latest build of Kaas! } - @Override - public void insertOpcodes(Map arg0, Map arg1) { - - } - - @Override - public void shutdown() { - - } - - public void spawnPlanetStaticObjs(String planet) { - Planet planetObj = (Planet) core.terrainService.getPlanetByName(planet); - core.scriptService.callScript("scripts/static_spawns/", "addPlanetSpawns", planetObj.getName(), core, planetObj); - System.out.println("Loaded static objs for " + planetObj.getName()); + public void spawnObjects(String planetName) { + Planet planet = (Planet) core.terrainService.getPlanetByName(planetName); + core.scriptService.callScript("scripts/static_spawns/", planet.getName(), "addPlanetSpawns", core, planet); + System.out.println("Loaded static objects for " + planet.getName()); } public SWGObject spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qY, float qW) { return spawnObject(template, planetName, cellId, x, y, z, qW, 0, qY, 0); } - // TODO make sure static objects get unloaded public SWGObject spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ) { - + return spawnObject(template, 0, planetName, cellId, x, y, z, qW, qX, qY, qZ); + } + + public SWGObject spawnObject(String template, long objectId, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ) { Planet planet = core.terrainService.getPlanetByName(planetName); - //System.out.println("template: " + template + " x: " + x + " y: " + y + " z: " + z); - - if(planet == null) { - System.out.println("Cant spawn static object because planet is null"); + if (planet == null) { + System.out.println("StaticService: Can't spawn static object because planet is null."); return null; } - SWGObject object = core.objectService.createObject(template, 0, planet, new Point3D(x, y, z), new Quaternion(qW, qX, qY, qZ)); + SWGObject object = core.objectService.createObject(template, objectId, planet, new Point3D(x, y, z), new Quaternion(qW, qX, qY, qZ)); - if(object == null) { - System.out.println("Static object is null"); + if (object == null) { + System.out.println("Static object is null with id " + objectId + " and template " + template + "."); return null; } - if (object instanceof CreatureObject) ((CreatureObject) object).setStaticNPC(true); + if (objectId != 0 && object.getObjectID() != objectId) { + System.out.println("StaticService: ObjectId " + objectId + " was taken for object with template " + object.getTemplate() + ". Replacement: " + object.getObjectID()); + } - if(cellId == 0) { + if (object instanceof CreatureObject) { + ((CreatureObject) object).setStaticNPC(true); + } + + if (cellId == 0) { boolean add = core.simulationService.add(object, (float) x, (float) z, true); - if(!add) - System.out.println("Quadtree insert failed for: " + template); - } - else { + + if (!add) { + System.out.println("StaticService: Quadtree insert failed for: " + template); + } + } else { SWGObject parent = core.objectService.getObject(cellId); - if(parent == null) { - System.out.println("Cell not found"); + + if (parent == null) { + System.out.println("StaticService: Cell not found"); return object; } + parent.add(object); } @@ -117,11 +119,10 @@ public class StaticService implements INetworkDispatch { } public List getCloningFacilitiesByPlanet(Planet planet) { - List objects = core.simulationService.get(planet, 0, 0, 8300); List cloners = new ArrayList(); - for(SWGObject obj : objects) { + for (SWGObject obj : objects) { if(obj instanceof BuildingObject && (obj.getTemplate().contains("cloning_facility") || obj.getTemplate().contains("cloning_tatooine") || obj.getTemplate().contains("cloning_naboo") || obj.getTemplate().contains("cloning_corellia"))) { if(!obj.getTemplate().equals("object/building/general/shared_cloning_facility_general.iff")) cloners.add(obj); @@ -130,5 +131,15 @@ public class StaticService implements INetworkDispatch { return cloners; } - + + @Override + public void insertOpcodes(Map arg0, Map arg1) { + + } + + @Override + public void shutdown() { + + } + } diff --git a/src/services/SurveyService.java b/src/services/SurveyService.java new file mode 100644 index 00000000..39b75519 --- /dev/null +++ b/src/services/SurveyService.java @@ -0,0 +1,691 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services; + +import java.util.Collections; +import java.util.Map; +import java.util.Random; +import java.util.Vector; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +import protocol.swg.PlayClientEffectLocMessage; +import resources.objects.creature.CreatureObject; +import resources.objects.player.PlayerObject; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceContainerObject; +import resources.objects.resource.ResourceRoot; +import resources.objects.tangible.TangibleObject; +import resources.objects.tool.SurveyTool; +import services.sui.SUIWindow; +import services.sui.SUIWindow.SUICallback; +import services.sui.SUIWindow.Trigger; +import main.NGECore; +import engine.resources.container.Traverser; +import engine.resources.objects.SWGObject; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +/** + * @author Charon + */ +public class SurveyService implements INetworkDispatch { + + private NGECore core; + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); + public Vector activeSurveyTools = new Vector(); + + public SurveyService(NGECore core) { + this.core = core; + scheduleSurveyService(); + core.commandService.registerCommand("requestsurvey"); + core.commandService.registerCommand("requestcoreSample"); + } + + + public void scheduleSurveyService(){ + + final ScheduledFuture task = scheduler.scheduleAtFixedRate(new Runnable() { + + @Override + public void run() { + ServiceProcessing(); + } + + }, 10, 1000, TimeUnit.MILLISECONDS); + + } + + public void ServiceProcessing(){ + synchronized(activeSurveyTools){ + // All tools sampling + SurveyTool removeTool=null; + for (SurveyTool surveyTool : activeSurveyTools){ + if (surveyTool==null) + continue; + CreatureObject user = (CreatureObject) NGECore.getInstance().objectService.getObject(surveyTool.getUserID()); + if (surveyTool.getCurrentlySurveying()){ + // Check if survey process has finished + if (System.currentTimeMillis()>surveyTool.getLastSurveyTime()+3000){ + removeTool = surveyTool; + surveyTool.setCurrentlySurveying(false); + surveyTool.sendConstructSurveyMapMessage(); + } + } + if (surveyTool.getCurrentlySampling()){ + // Check if sampling process has finished + if ((System.currentTimeMillis()>surveyTool.getLastSampleTime()+3000) && !surveyTool.getCurrentlyCoolingDown()){ + surveyTool.setCurrentlyCoolingDown(true); + // Update inventory + handleSamplingStages(surveyTool); + + } + // Check if sampling recovery is over + long sampleRecoveryTime = surveyTool.getRecoveryTime(); + if (System.currentTimeMillis()>surveyTool.getLastSampleTime()+sampleRecoveryTime && ! surveyTool.isExceptionalState()){ + // kick off another sampling attempt + surveyTool.setCurrentlyCoolingDown(false); + continueSampling(surveyTool); + } + if (user.getPosture()!=1){ + surveyTool.setExceptionalState(false); + surveyTool.setCurrentlySampling(false); + removeTool = surveyTool; + if (user.getPosture()==0) + user.sendSystemMessage("You stand up", (byte) 0); + + user.sendSystemMessage("@survey:sample_cancel", (byte) 0); + } + } + } + if (removeTool!=null) + activeSurveyTools.remove(removeTool); // remove after notification + + activeSurveyTools.removeAll(Collections.singleton(null)); + } + } + + public void handleSamplingStages(SurveyTool surveyTool){ + + if (surveyTool.isExceptionalState()) + return; + CreatureObject crafter = (CreatureObject) NGECore.getInstance().objectService.getObject(surveyTool.getUserID()); + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + GalacticResource sampleResource = (GalacticResource) NGECore.getInstance().objectService.getObject(surveyTool.getSurveyResourceID()); + int stackCount = 0; + boolean gamblingwon = false; + //ResourceContainerObject container = player.getRecentContainer(); + ResourceContainerObject container = null; + // Attempt to find container with the currently sampled resource in + // player inventory tree + ResourceContainerObject foundContainer = findResourceContainerInInventory(crafter,sampleResource); + if (foundContainer!=null) + container = foundContainer; + + if (! surveyTool.isRecoveryMode()) + stackCount = core.resourceService.getResourceSampleQuantity(crafter, sampleResource); + else { // handle particularly rich case + stackCount = core.resourceService.getResourceSampleQuantity(crafter, sampleResource); + int recoveryChance = new Random().nextInt(100); + if (recoveryChance<99){ + gamblingwon = true; + stackCount *= 3; + } + surveyTool.setRecoveryMode(false); + } + + if (container!=null) { + if (container.getReferenceID()==sampleResource.getId()) { + int stackCountToUpdate = container.getStackCount(); + if (stackCountToUpdate 0) && (!surveyTool.isRecoveryMode())) { + String resourceContainerIFF = ResourceRoot.CONTAINER_TYPE_IFF_SIGNIFIER[sampleResource.getResourceRoot().getContainerType()]; + ResourceContainerObject containerObject = (ResourceContainerObject) core.objectService.createObject(resourceContainerIFF, crafter.getPlanet()); + containerObject.initializeStats(sampleResource); + containerObject.setProprietor(crafter); + SWGObject crafterInventory = crafter.getSlottedObject("inventory"); + container.setStackCount(stackCount,crafter); + crafterInventory.add(containerObject); + player.setRecentContainer(containerObject); + } + + } + } else { // Mismatch -> new container + + String resourceContainerIFF = ResourceRoot.CONTAINER_TYPE_IFF_SIGNIFIER[sampleResource.getResourceRoot().getContainerType()]; + if ((stackCount > 0) && (!surveyTool.isRecoveryMode())) { + ResourceContainerObject containerObject = (ResourceContainerObject) core.objectService.createObject(resourceContainerIFF, crafter.getPlanet()); + containerObject.initializeStats(sampleResource); + containerObject.setProprietor(crafter); + container.setStackCount(stackCount,crafter); + SWGObject crafterInventory = crafter.getSlottedObject("inventory"); + crafterInventory.add(containerObject); + player.setRecentContainer(containerObject); + } + + } + } else { // create new container, first sample + + if ((stackCount > 0) && (!surveyTool.isRecoveryMode())) { + + String resourceContainerIFF = ResourceRoot.CONTAINER_TYPE_IFF_SIGNIFIER[sampleResource.getResourceRoot().getContainerType()]; + ResourceContainerObject containerObject = (ResourceContainerObject) core.objectService.createObject(resourceContainerIFF, crafter.getPlanet()); + containerObject.initializeStats(sampleResource); + containerObject.setProprietor(crafter); + //stackCount = core.resourceService.getResourceSampleQuantity(crafter, sampleResource); + containerObject.setStackCount(stackCount,crafter); + SWGObject crafterInventory = crafter.getSlottedObject("inventory"); + crafterInventory.add(containerObject); + player.setRecentContainer(containerObject); + + } + } + + if (gamblingwon) { + crafter.sendSystemMessage("@survey:critical_success", (byte) 0); + core.playerService.giveExperience(crafter,(int)(2.5F*stackCount)); + surveyTool.setExceptionalState(false); + return; + } + + if ((stackCount > 0) && (!surveyTool.isRecoveryMode())) { + // @survey:sample_located + crafter.sendSystemMessage("You successfully locate a " + stackCount + " unit sample of " + sampleResource.getName() + "." , (byte) 0); + core.playerService.giveExperience(crafter,(int)(2.5F*stackCount)); + } + if ((stackCount > 0) && (surveyTool.isRecoveryMode())) { + crafter.sendSystemMessage("@survey:node_recovery", (byte) 0); + core.playerService.giveExperience(crafter,(int)(2.5F*stackCount)); + + } + if ((stackCount == 0) && (!surveyTool.isRecoveryMode())) { + crafter.sendSystemMessage("@survey:sample_failed", (byte) 0); + core.playerService.giveExperience(crafter,(int)(2.5F*stackCount)); + //surveyTool.setRecoveryMode(true); + //surveyTool.setRecoveryTime(System.currentTimeMillis()); + } + } + + + public ResourceContainerObject findResourceContainerInInventory(CreatureObject owner, GalacticResource resource){ + ResourceContainerObject foundContainer = null; + final Vector found = new Vector(); + TangibleObject playerInventory = (TangibleObject) owner.getSlottedObject("inventory"); + playerInventory.viewChildren(owner, false, false, new Traverser() { + @Override + public void process(SWGObject obj) { + + if (obj instanceof ResourceContainerObject){ + ResourceContainerObject container = (ResourceContainerObject) obj; + if (container.getReferenceID()==resource.getId() + && container.getStackCount()0) + foundContainer = found.get(0); + return foundContainer; + } + + public void requestSurvey(CreatureObject crafter, SWGObject target, String commandArgs){ + // Check if crafter has survey skill + +// if (!crafter.hasAbility("surveying")) { // ToDo ! +// crafter.sendSystemMessage("You have insufficient skill to survey", (byte) 0); +// return; +// } + if (target==null) + return; // target object not valid + + SurveyTool surveyTool = (SurveyTool)target; + if (surveyTool.getToolType()==-1) + return; // Survey tool type was not recognized + + surveyTool.setUserID(crafter.getObjectID()); + surveyTool.setRecoveryTime(10000L); + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + player.setLastUsedSurveyTool(surveyTool); + if(surveyTool.getCurrentlySampling()) + { + crafter.sendSystemMessage("@survey:survey_sample", (byte) 0); + return; + } + + // QA tool lockup countermeasure + if(surveyTool.getCurrentlySurveying() && surveyTool.getLastSurveyTime() 0.3) { + // Is the tool ready? + if (surveyTool.getCurrentlySampling() || surveyTool.getCurrentlyCoolingDown() ) { + int remaining = 0; // calculate remaining time + crafter.sendSystemMessage("You will be able to sample again in " + remaining + " seconds.", (byte) 0); // "@survey:tool_recharge_time" + } else { + + // ToDo: Find out if NGE really still did this +// if (sampleResource.getResourceRoot().getResourceClass().equals("Radioactive")){ //resourceRoot.getResourceClass("Radioactive"); +// createRadioactivityWarningSUIWindow(crafter, surveyTool); +// return; +// } + + crafter.setPosture((byte) 1); + crafter.sendSystemMessage("You kneel", (byte) 0); + + + //int samplingCost=125-(int)crafter.getSkillMod("surveying").getModifier(); + int samplingCost=125; + if (crafter.getAction()-samplingCost<0){ // Check HAM + crafter.sendSystemMessage("@survey:gamble_no_action", (byte) 0); + crafter.setPosture((byte) 0); + surveyTool.setCurrentlySampling(false); + surveyTool.setExceptionalState(false); + removeActiveSurveyTool(surveyTool); + return; + } + + surveyTool.setCurrentlySampling(true); + surveyTool.setLastSampleTime(System.currentTimeMillis()); + addActiveSurveyTool(surveyTool); + + String effectFile = surveyTool.getSampleEffectString(); + PlayClientEffectLocMessage cEffMsg = new PlayClientEffectLocMessage(effectFile,crafter.getPlanet().getName(),crafter.getPosition()); + crafter.getClient().getSession().write(cEffMsg.serialize()); + + crafter.sendSystemMessage("You begin to sample for " + commandArgs, (byte) 0); + surveyTool.setCurrentlySampling(true); + + crafter.setAction(crafter.getAction()-samplingCost); + + } + } else { + crafter.sendSystemMessage("There are only trace amounts of " + commandArgs + " here. Find a higher concentration of the resource, and try sampling again.", (byte) 0); // "@survey:trace_amount:" + surveyTool.setCurrentlySampling(false); + surveyTool.setCurrentlySurveying(false); + //surveyTool.setLastSampleTime(System.currentTimeMillis()); + } + } else { + crafter.sendSystemMessage("You must survey for " + commandArgs + " before you can sample for it.", (byte) 0); + surveyTool.setExceptionalState(false); + surveyTool.setCurrentlySampling(false); + removeActiveSurveyTool(surveyTool); + } + } + + public void continueSampling(SurveyTool surveyTool){ + + surveyTool.setCurrentlyCoolingDown(false); + CreatureObject crafter = (CreatureObject) NGECore.getInstance().objectService.getObject(surveyTool.getUserID()); + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + if (crafter.getPosture()!=1){ + crafter.sendSystemMessage("@survey:sample_cancel", (byte) 0); + surveyTool.setExceptionalState(false); + surveyTool.setCurrentlySampling(false); + removeActiveSurveyTool(surveyTool); + return; + } + if (crafter.getPosture()==13) + return; + + if (crafter.getCombatFlag()!=0){ + crafter.sendSystemMessage("@survey:sample_cancel_attack", (byte) 0); + return; + } + + GalacticResource sampleResource = (GalacticResource) NGECore.getInstance().objectService.getObject(surveyTool.getSurveyResourceID()); + float localConcentration = sampleResource.deliverConcentrationForSurvey(crafter.getPlanetId(), crafter.getPosition().x, crafter.getPosition().z); + //float localConcentration = 1.0F; + if (localConcentration > 0.1) { + crafter.setPosture((byte) 1); + + // ToDo: overfilling resource container with continuesampling + + //int samplingCost=125-(int)crafter.getSkillMod("surveying").getModifier(); + int samplingCost=125; + if (crafter.getAction()-samplingCost<0 && ! surveyTool.isExceptionalState()){ + crafter.sendSystemMessage("@survey:gamble_no_action", (byte) 0); + crafter.setPosture((byte) 0); + surveyTool.setCurrentlySampling(false); + surveyTool.setExceptionalState(false); + //removeActiveSurveyTool(surveyTool); + return; + } + + if (! surveyTool.isRecoveryMode()){ + int exceptionalChance = new Random().nextInt(100); // 7 was good + if (exceptionalChance<20 && ! surveyTool.isExceptionalState()){ + crafter.sendSystemMessage("@survey:gnode_d", (byte) 0); + surveyTool.setExceptionalState(true); + + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", crafter, surveyTool, 0); + window.setProperty("bg.caption.lblTitle:Text", "@base_player:swg"); + window.setProperty("Prompt.lblPrompt:Text", "@survey:gnode_d"); + window.addListBoxMenuItem("@survey:gnode_1", 0); + window.addListBoxMenuItem("@survey:gnode_2", 1); + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + int index = Integer.parseInt(returnList.get(0)); + if (index==0){ + // Continue working + CreatureObject crafter = (CreatureObject)owner; + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + if (crafter!=null){ + SurveyTool surveyTool = player.getLastUsedSurveyTool(); + if (surveyTool!=null){ + surveyTool.setExceptionalState(false); + core.suiService.closeSUIWindow(owner, 0); + continueSampling(surveyTool); + return; + } + } + } else { + // Attempt to recover + CreatureObject crafter = (CreatureObject)owner; + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + SurveyTool surveyTool = player.getLastUsedSurveyTool(); + if (surveyTool!=null){ + surveyTool.setRecoveryMode(true); + surveyTool.setExceptionalState(false); + core.suiService.closeSUIWindow(owner, 0); + continueSampling(surveyTool); + return; + } + } + } + }); + + core.suiService.openSUIWindow(window); + return; + } + + surveyTool.setCurrentlySampling(true); + surveyTool.setLastSampleTime(System.currentTimeMillis()); + + String effectFile = surveyTool.getSampleEffectString(); + PlayClientEffectLocMessage cEffMsg = new PlayClientEffectLocMessage(effectFile,crafter.getPlanet().getName(),crafter.getPosition()); + crafter.getClient().getSession().write(cEffMsg.serialize()); + + crafter.setAction(crafter.getAction()-samplingCost); + + } else { + // sampling cost for recovery + //surveyTool.setRecoveryMode(false); + samplingCost = 200; + if (crafter.getAction()-samplingCost<0){ + crafter.sendSystemMessage("@survey:gamble_no_action", (byte) 0); + crafter.setPosture((byte) 0); + surveyTool.setCurrentlySampling(false); + surveyTool.setExceptionalState(false); + surveyTool.setLastSampleTime(System.currentTimeMillis()); + removeActiveSurveyTool(surveyTool); + return; + } + surveyTool.setCurrentlySampling(true); + surveyTool.setLastSampleTime(System.currentTimeMillis()); + surveyTool.setExceptionalState(false); + + String effectFile = surveyTool.getSampleEffectString(); + PlayClientEffectLocMessage cEffMsg = new PlayClientEffectLocMessage(effectFile,crafter.getPlanet().getName(),crafter.getPosition()); + crafter.getClient().getSession().write(cEffMsg.serialize()); + crafter.setAction(crafter.getAction()-samplingCost); + + } + + surveyTool.setCurrentlySampling(true); + surveyTool.setLastSampleTime(System.currentTimeMillis()); + + String effectFile = surveyTool.getSampleEffectString(); + PlayClientEffectLocMessage cEffMsg = new PlayClientEffectLocMessage(effectFile,crafter.getPlanet().getName(),crafter.getPosition()); + crafter.getClient().getSession().write(cEffMsg.serialize()); + + crafter.setAction(crafter.getAction()-samplingCost); + + } else { + crafter.sendSystemMessage("There are only trace amounts of " + sampleResource.getName() + " here. Find a higher concentration of the resource, and try sampling again.", (byte) 0); // "@survey:trace_amount:" + surveyTool.setCurrentlySampling(false); + surveyTool.setCurrentlySurveying(false); + } + } + + public void addActiveSurveyTool(SurveyTool tool){ + synchronized(activeSurveyTools){ + if (! activeSurveyTools.contains(tool)) + activeSurveyTools.add(tool); + } + } + + public Vector getActiveSurveyTools(){ + return activeSurveyTools; + } + + public void removeActiveSurveyTool(SurveyTool surveyTool){ + synchronized(activeSurveyTools){ + activeSurveyTools.remove(surveyTool); + } + } + + public boolean toolIsInList(SurveyTool surveyTool){ + Vector toolList = getActiveSurveyTools(); + for (SurveyTool tool : toolList){ + if (tool.getTanoID()==surveyTool.getTanoID()) + return true; + } + return false; + } + + @Override + public void insertOpcodes(Map arg0, Map arg1) { + + } + + @Override + public void shutdown() { + // TODO Auto-generated method stub + + } + + public SUICallback handleExceptionalInput(SWGObject crafter,SUIWindow suiWindow){ + + SUICallback callback = suiWindow.getCallbackByEventId(1); + return callback; + } + + + public void createSurveyRangeSUIWindow(SWGObject owner, TangibleObject target) { + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@base_player:swg"); + window.setProperty("Prompt.lblPrompt:Text", "@survey:select_range"); + window.addListBoxMenuItem("64m x 3pts", 0); + window.addListBoxMenuItem("128m x 4pts", 1); + window.addListBoxMenuItem("192m x 4pts", 2); + window.addListBoxMenuItem("256m x 5pts", 3); + window.addListBoxMenuItem("320m x 5pts", 4); + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + final SurveyTool outerSurveyTool = (SurveyTool)target; + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject crafter = (CreatureObject)owner; + //crafter.sendSystemMessage("handleSurveyRangeInput process", (byte) 0); + if (crafter!=null) { + if (outerSurveyTool!=null){ + int index = Integer.parseInt(returnList.get(0)); + if (index==0){ + outerSurveyTool.setSurveyRangeSetting((byte)0); + } + if (index==1){ + outerSurveyTool.setSurveyRangeSetting((byte)1); + } + if (index==2){ + outerSurveyTool.setSurveyRangeSetting((byte)2); + } + if (index==3){ + outerSurveyTool.setSurveyRangeSetting((byte)3); + } + if (index==4){ + outerSurveyTool.setSurveyRangeSetting((byte)4); + } + } + } + } + }); + core.suiService.openSUIWindow(window); + } + + public void createRadioactivityWarningSUIWindow(SWGObject owner, TangibleObject target) { + // ToDo: + final SUIWindow window = core.suiService.createSUIWindow("Script.messageBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@base_player:swg"); + window.setProperty("Prompt.lblPrompt:Text", "@survey:radioactive_sample_d"); + window.setProperty("Prompt.lblPrompt:Text", "@survey:radioactive_sample_t"); + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + final SurveyTool outerSurveyTool = (SurveyTool)target; + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + ((CreatureObject)owner).sendSystemMessage("Rad confirmed", (byte) 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + ((CreatureObject)owner).sendSystemMessage("Rad declined", (byte) 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public SUICallback handleSurveyRangeInput(SWGObject crafter,SUIWindow suiWindow){ + SUICallback callback = suiWindow.getCallbackByEventId(1); + core.suiService.closeSUIWindow(crafter, 0); + return callback; + } + +} \ No newline at end of file diff --git a/src/services/TerrainService.java b/src/services/TerrainService.java index c5340311..c8b3aaf5 100644 --- a/src/services/TerrainService.java +++ b/src/services/TerrainService.java @@ -30,7 +30,6 @@ import java.util.concurrent.ConcurrentHashMap; import resources.common.FileUtilities; import resources.common.collidables.CollidableCircle; -import resources.objects.building.BuildingObject; import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.DatatableVisitor; @@ -186,28 +185,25 @@ public class TerrainService { for(final Planet planet : planets) { if(planet.getSnapshotVisitor() != null) { - Thread thread = new Thread(new Runnable() { + Thread thread = new Thread(() -> { - @Override - public void run() { - Config config = new Config(); - config.setFilePath("options.cfg"); - boolean loaded = config.loadConfigFile(); - - if (loaded && config.getInt("LOAD.SNAPSHOT_OBJECTS") > 0) { - try { - core.objectService.loadSnapshotObjects(planet); - } catch (Exception e) { - e.printStackTrace(); - } + Config config = new Config(); + config.setFilePath("options.cfg"); + boolean loaded = config.loadConfigFile(); + + if (loaded && config.getInt("LOAD.SNAPSHOT_OBJECTS") > 0) { + try { + core.objectService.loadSnapshotObjects(planet); + } catch (Exception e) { + e.printStackTrace(); } - - if (loaded && config.getInt("LOAD.BUILDOUT_OBJECTS") > 0) { - try { - core.objectService.loadBuildoutObjects(planet); - } catch (InstantiationException | IllegalAccessException e) { - e.printStackTrace(); - } + } + + if (loaded && config.getInt("LOAD.BUILDOUT_OBJECTS") > 0) { + try { + core.objectService.loadBuildoutObjects(planet); + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); } } @@ -221,31 +217,45 @@ public class TerrainService { // wait for threads to finish loading for(Planet planet : planets) { try { - threadMap.get(planet).join(); + if(threadMap.get(planet) != null) + threadMap.get(planet).join(); } catch (InterruptedException e) { e.printStackTrace(); } } - synchronized(core.objectService.getObjectList()) { + /*synchronized(core.objectService.getObjectList()) { for(SWGObject object : core.objectService.getObjectList().values()) { - if(!(object instanceof BuildingObject)) + if(!(object instanceof BuildingObject) || object.isInSnapshot()) continue; BuildingObject building = (BuildingObject) object; - + final Set creatures = new HashSet(); + building.viewChildren(building, true, true, new Traverser() { + + @Override + public void process(SWGObject obj) { + if(obj instanceof CreatureObject) + creatures.add((CreatureObject) obj); + } + + }); + for(CreatureObject creature : creatures) { + long parentId = creature.getParentId(); + creature.getContainer().remove(creature); + creature.setParentId(parentId); + } if(building.getTransaction() == null) continue; - building.createTransaction(core.getBuildingODB().getEnvironment()); core.getBuildingODB().put(building, Long.class, BuildingObject.class, building.getTransaction()); building.getTransaction().commitSync(); } - } + }*/ } @@ -265,6 +275,15 @@ public class TerrainService { return true; } + + public boolean isWater(int planetId, Point3D worldPosition) { + if(getPlanetByID(planetId) == null) + return false; + + Planet planet = getPlanetByID(planetId); + + return planet.getTerrainVisitor().isWater(worldPosition.x, worldPosition.z); + } diff --git a/src/services/WeatherService.java b/src/services/WeatherService.java index 79e22d3d..d007d307 100644 --- a/src/services/WeatherService.java +++ b/src/services/WeatherService.java @@ -64,14 +64,8 @@ public class WeatherService { weatherStability.put(planet, stability); currentWeatherMap.put(planet, defaultWeather); - scheduler.scheduleAtFixedRate(new Runnable() { - - @Override - public void run() { - runWeatherCycle(planet); - } - - + scheduler.scheduleAtFixedRate(() -> { + runWeatherCycle(planet); }, 30, 30, TimeUnit.MINUTES); } diff --git a/src/services/ai/AIActor.java b/src/services/ai/AIActor.java index 39dd02ee..c34ed1fc 100644 --- a/src/services/ai/AIActor.java +++ b/src/services/ai/AIActor.java @@ -21,9 +21,28 @@ ******************************************************************************/ package services.ai; +import java.util.Map; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +import main.NGECore; +import net.engio.mbassy.listener.Handler; +import engine.resources.objects.SWGObject; import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import resources.objects.cell.CellObject; import resources.objects.creature.CreatureObject; +import resources.objects.tangible.TangibleObject; import services.ai.states.AIState; +import services.ai.states.AIState.StateResult; +import services.ai.states.AttackState; +import services.ai.states.DeathState; +import services.ai.states.IdleState; +import services.ai.states.RetreatState; +import services.combat.CombatEvents.DamageTaken; +import services.spawn.MobileTemplate; public class AIActor { @@ -31,10 +50,19 @@ public class AIActor { private Point3D spawnPosition; private volatile AIState currentState; private CreatureObject followObject; + private Vector movementPoints = new Vector(); + private MobileTemplate mobileTemplate; + private ScheduledExecutorService scheduler; + private Map damageMap = new ConcurrentHashMap(); + private volatile boolean hasReachedPosition; + private long lastAttackTimestamp; - public AIActor(CreatureObject creature, Point3D spawnPosition) { + public AIActor(CreatureObject creature, Point3D spawnPosition, ScheduledExecutorService scheduler) { this.creature = creature; this.spawnPosition = spawnPosition; + this.scheduler = scheduler; + creature.getEventBus().subscribe(this); + this.currentState = new IdleState(); } public CreatureObject getCreature() { @@ -52,9 +80,36 @@ public class AIActor { public void setSpawnPosition(Point3D spawnPosition) { this.spawnPosition = spawnPosition; } - - public void doAggro(CreatureObject defender) { + + public void addDefender(CreatureObject defender) { creature.addDefender(defender); + if(followObject == null) + setFollowObject(defender); + setCurrentState(new AttackState()); + } + + public void removeDefender(CreatureObject defender) { + creature.removeDefender(defender); + damageMap.remove(defender); + defender.removeDefender(creature); + if(followObject == defender) { + setFollowObject(getHighestDamageDealer()); + if(creature.getDefendersList().size() == 0) + setCurrentState(new RetreatState()); + } + } + + public CreatureObject getHighestDamageDealer() { + CreatureObject highestDamageDealer = null; + highestDamageDealer = damageMap.keySet().stream().max((c1, c2) -> damageMap.get(c1) - damageMap.get(c2)).orElse(null); + // return first defender if no damage has been dealt + if(highestDamageDealer == null) { + for(TangibleObject tangible : creature.getDefendersList().toArray(new TangibleObject[]{})) { + if(tangible instanceof CreatureObject) + return (CreatureObject) tangible; + } + } + return highestDamageDealer; } public AIState getCurrentState() { @@ -62,11 +117,16 @@ public class AIActor { } public void setCurrentState(AIState currentState) { - if(currentState == this.currentState) - return; - this.currentState.onExit(); - this.currentState = currentState; - currentState.onEnter(); + try { + if(currentState.getClass() == this.currentState.getClass()) + return; + if(this.currentState != null) + doStateAction(this.currentState.onExit(this)); + this.currentState = currentState; + doStateAction(currentState.onEnter(this)); + } catch (Exception e) { + e.printStackTrace(); + } } public CreatureObject getFollowObject() { @@ -77,4 +137,124 @@ public class AIActor { this.followObject = followObject; } + public Vector getMovementPoints() { + return movementPoints; + } + + public void setMovementPoints(Vector movementPoints) { + this.movementPoints = movementPoints; + } + + public MobileTemplate getMobileTemplate() { + return mobileTemplate; + } + + public void setMobileTemplate(MobileTemplate mobileTemplate) { + this.mobileTemplate = mobileTemplate; + } + + public void scheduleMovement() { + scheduler.schedule(() -> { + try { + doStateAction(currentState.move(AIActor.this)); + } catch (Exception e) { + e.printStackTrace(); + } + }, 500, TimeUnit.MILLISECONDS); + } + + public void scheduleRecovery() { + scheduler.schedule(() -> { + try { + doStateAction(currentState.recover(AIActor.this)); + } catch (Exception e) { + e.printStackTrace(); + } + }, 2000, TimeUnit.MILLISECONDS); + } + + public void setNextPosition(Point3D position) { + movementPoints.add(0, position); + } + + @Handler + public void handleDamage(DamageTaken event) { + CreatureObject attacker = event.attacker; + if(damageMap.containsKey(attacker)) + damageMap.put(attacker, damageMap.get(attacker) + event.damage); + else + damageMap.put(attacker, event.damage); + } + + public Map getDamageMap() { + return damageMap; + } + + public boolean hasReachedPosition() { + return hasReachedPosition; + } + + public void setHasReachedPosition(boolean hasReachedPosition) { + this.hasReachedPosition = hasReachedPosition; + } + + public void faceObject(SWGObject object) { + float direction = (float) Math.atan2(object.getWorldPosition().x - creature.getWorldPosition().x, object.getWorldPosition().z - creature.getWorldPosition().z); + if(direction < 0) + direction = (float) (2 * Math.PI + direction); + if(Math.abs(direction - creature.getRadians()) < 0.05) + return; + Quaternion quaternion = new Quaternion((float) Math.cos(direction / 2), 0, (float) Math.sin(direction / 2), 0); + if (quaternion.y < 0.0f && quaternion.w > 0.0f) { + quaternion.y *= -1; + quaternion.w *= -1; + } + if(creature.getContainer() instanceof CellObject) + NGECore.getInstance().simulationService.moveObject(creature, creature.getPosition(), quaternion, creature.getMovementCounter(), 0, (CellObject) creature.getContainer()); + else + NGECore.getInstance().simulationService.moveObject(creature, creature.getPosition(), quaternion, creature.getMovementCounter(), 0, null); + + } + + public long getLastAttackTimestamp() { + return lastAttackTimestamp; + } + + public void setLastAttackTimestamp(long lastAttackTimestamp) { + this.lastAttackTimestamp = lastAttackTimestamp; + } + + public long getTimeSinceLastAttack() { + return System.currentTimeMillis() - getLastAttackTimestamp(); + } + + public void doStateAction(byte result) { + + switch(result) { + + case StateResult.DEAD: + setCurrentState(new DeathState()); + case StateResult.FINISHED: + case StateResult.UNFINISHED: + return; + case StateResult.IDLE: + setCurrentState(new IdleState()); + //case StateResult.NONE: + // System.out.println("State action returned error result"); + + } + + } + + public void scheduleDespawn() { + scheduler.schedule(() -> { + + damageMap.clear(); + followObject = null; + creature.setAttachment("AI", null); + NGECore.getInstance().objectService.destroyObject(creature); + + }, 30000, TimeUnit.MILLISECONDS); + } + } diff --git a/src/services/ai/AIService.java b/src/services/ai/AIService.java index ea980a89..5f2f3e63 100644 --- a/src/services/ai/AIService.java +++ b/src/services/ai/AIService.java @@ -21,8 +21,15 @@ ******************************************************************************/ package services.ai; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; import java.util.Vector; +import resources.objects.creature.CreatureObject; +import resources.objects.group.GroupObject; +import resources.objects.player.PlayerObject; + import engine.resources.scene.Point3D; import main.NGECore; @@ -36,6 +43,71 @@ public class AIService { this.core = core; } + public Vector findPath(int planetId, Point3D pointA, Point3D pointB) { + + // TODO: implement cell pathfinding, returning straight line for now + Vector path = new Vector(); + path.add(pointA); + float x = pointB.x - 1 + new Random().nextFloat(); + float z = pointB.z - 1 + new Random().nextFloat(); + Point3D endPoint = new Point3D(x, core.terrainService.getHeight(planetId, x, z), z); + endPoint.setCell(pointB.getCell()); + path.add(endPoint); + return path; + } + public void awardExperience(AIActor actor) { + + Map damageMap = actor.getDamageMap(); + CreatureObject creature = actor.getCreature(); + int baseXP = getBaseXP(creature); + for(Entry e : damageMap.entrySet()) { + + CreatureObject player = e.getKey(); + PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost"); + if(ghost == null) + continue; + int damage = e.getValue(); + + short level = (player.getGroupId() == 0) ? player.getLevel() : ((GroupObject) core.objectService.getObject(player.getGroupId())).getGroupLevel(); + int levelDifference = ((creature.getLevel() >= level) ? 0 : (level - creature.getLevel())); + float damagePercent = damage / creature.getMaxHealth(); + int finalXP = (int) (damagePercent * baseXP); + finalXP -= ((levelDifference > 20) ? (finalXP - 1) : (((levelDifference * 5) / 100) * finalXP)); + core.playerService.giveExperience(player, finalXP); + } + + } + + public int getBaseXP(CreatureObject creature) { + + int difficulty = creature.getDifficulty(); + int baseXP = 60; + for (int i = 2; i <= creature.getLevel(); i++) { + + if(i < 25) + baseXP += 3; + else if(i < 50) + baseXP += 4; + else if(i < 75) + baseXP += 5; + else if(i < 100) + baseXP += 6; + else + baseXP += 7; + + } + + + //TODO: this is slightly inaccurate if the xp table in the prima guide is correct + if(difficulty == 1) { + baseXP += (6 + ((creature.getLevel() - 1) / 10) * 3); + } else if(difficulty == 2) { + baseXP += (20 + (creature.getLevel() - 1)); + } + + return baseXP; + + } } diff --git a/src/services/ai/LairActor.java b/src/services/ai/LairActor.java index 09043e82..778de963 100644 --- a/src/services/ai/LairActor.java +++ b/src/services/ai/LairActor.java @@ -21,8 +21,14 @@ ******************************************************************************/ package services.ai; +import java.util.Random; import java.util.Vector; + +import engine.resources.scene.Point3D; +import main.NGECore; import net.engio.mbassy.listener.Handler; +import resources.common.SpawnPoint; +import resources.objects.creature.CreatureObject; import resources.objects.tangible.TangibleObject; import services.combat.CombatEvents.DamageTaken; @@ -33,6 +39,7 @@ public class LairActor { private int maxSpawns; private String creatureTemplate; private volatile int spawnWave = 0; + private short level; public LairActor(TangibleObject lairObject, String creatureTemplate) { this.lairObject = lairObject; @@ -40,10 +47,11 @@ public class LairActor { lairObject.getEventBus().subscribe(this); } - public LairActor(TangibleObject lairObject, String creatureTemplate, int maxSpawns) { + public LairActor(TangibleObject lairObject, String creatureTemplate, int maxSpawns, short level) { this.lairObject = lairObject; this.creatureTemplate = creatureTemplate; this.maxSpawns = maxSpawns; + this.level = level; lairObject.getEventBus().subscribe(this); } @@ -63,15 +71,17 @@ public class LairActor { @Handler public void handleLairDamageEvent(DamageTaken event) { + spawnNewCreatures(); + for(AIActor ai : creatures) { - ai.doAggro(event.attacker); + ai.addDefender(event.attacker); + event.attacker.addDefender(ai.getCreature()); } - spawnNewCreatures(); } - private void spawnNewCreatures() { + public void spawnNewCreatures() { if(creatures.size() >= maxSpawns) return; @@ -104,11 +114,28 @@ public class LairActor { return; } - - // TODO: spawn creatures + + int creatureAmount = 0; + int tries = 0; + do { + creatureAmount = new Random().nextInt(4) + (maxSpawns / 5); + tries++; + } + while(creatureAmount > maxSpawns && tries < 10); + + for(int i = 0; i < creatureAmount; i++) { + Point3D position = SpawnPoint.getRandomPosition(lairObject.getPosition(), 5, 30, lairObject.getPlanetId()); + CreatureObject creature = NGECore.getInstance().spawnService.spawnCreature(creatureTemplate, lairObject.getPlanet().getName(), 0, position.x, position.y, position.z, level); + if(creature == null || !creature.isInQuadtree()) { + System.out.println("NULL Creature"); + continue; + } + creatures.add((AIActor) creature.getAttachment("AI")); + } healLair(); + } private void healLair() { @@ -142,4 +169,12 @@ public class LairActor { public void setCreatureTemplate(String creatureTemplate) { this.creatureTemplate = creatureTemplate; } + + public short getLevel() { + return level; + } + + public void setLevel(short level) { + this.level = level; + } } diff --git a/src/services/ai/states/AIState.java b/src/services/ai/states/AIState.java index 3da9131c..41eb253b 100644 --- a/src/services/ai/states/AIState.java +++ b/src/services/ai/states/AIState.java @@ -21,12 +21,23 @@ ******************************************************************************/ package services.ai.states; +import java.util.Vector; + +import main.NGECore; + +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import resources.objects.cell.CellObject; +import resources.objects.creature.CreatureObject; +import resources.objects.weapon.WeaponObject; +import services.ai.AIActor; + public abstract class AIState { - public abstract byte onEnter(); - public abstract byte onExit(); - public abstract byte move(); - public abstract byte recover(); + public abstract byte onEnter(AIActor actor) throws Exception; + public abstract byte onExit(AIActor actor) throws Exception; + public abstract byte move(AIActor actor) throws Exception; + public abstract byte recover(AIActor actor) throws Exception; public enum StateResult {; @@ -42,6 +53,155 @@ public abstract class AIState { } + public boolean findNewPosition(AIActor actor, float speed, float stopDistance, Point3D newPosition) { + + speed *= 0.5; // 2 updates per second + CreatureObject creature = actor.getCreature(); + NGECore core = NGECore.getInstance(); + Point3D currentPosition = creature.getPosition(); + Point3D targetPosition = null; + float maxDistance = stopDistance; + boolean finished = false; + float dx, dz, newX = 0, newY = 0, newZ = 0; + Vector movementPoints = actor.getMovementPoints(); + CellObject cell = null; + //while(!finished && movementPoints.size() != 0) { + + targetPosition = movementPoints.firstElement(); + Vector path = core.aiService.findPath(creature.getPlanetId(), currentPosition, targetPosition); + + float distanceToTarget = targetPosition.getWorldPosition().getDistance(creature.getWorldPosition()); + + if(distanceToTarget > stopDistance) { + maxDistance = Math.min(speed, distanceToTarget - stopDistance); + } else { + return false; + } + + Point3D oldPosition = null; + float pathDistance = 0; + + for(int i = 1; i < path.size() && !finished; i++) { + + Point3D currentPathPosition = path.get(i); + cell = currentPathPosition.getCell(); + + if(oldPosition == null) + oldPosition = path.get(0); + Point3D oldWorldPos = oldPosition.getWorldPosition(); + + pathDistance += oldWorldPos.getDistance(currentPathPosition.getWorldPosition()); + if(pathDistance >= maxDistance || i == path.size() - 1 || currentPathPosition.getCell() != creature.getContainer()) { + + finished = true; + + if(currentPosition.getWorldPosition().getDistance(currentPathPosition.getWorldPosition()) <= stopDistance && cell == creature.getContainer()) { + if(i == path.size() - 1) + movementPoints.remove(0); + finished = false; + } else { + + if(cell == null) + oldPosition = oldPosition.getWorldPosition(); + else { + if(oldPosition.getCell() == null) + oldPosition = core.simulationService.convertPointToModelSpace(oldPosition, cell.getContainer()); + } + + if(pathDistance > maxDistance) { + + float distance = oldWorldPos.getDistance(currentPathPosition.getWorldPosition()); + float travelDistance = distance - (pathDistance - maxDistance); + // temp fix for melee npcs + travelDistance *= 1.3; + if(travelDistance <= 0) { + newX = currentPathPosition.x; + newZ = currentPathPosition.z; + } else { + + if(distance > 0) { + dx = currentPathPosition.x - oldPosition.x; + dz = currentPathPosition.z - oldPosition.z; + float deltaDist = (float) Math.sqrt((dx * dx) + (dz * dz)); + newX = (float) (oldPosition.x + (speed * (dx / deltaDist))); + newZ = (float) (oldPosition.z + (speed * (dz / deltaDist))); + + } else { + newX = currentPathPosition.x; + newZ = currentPathPosition.z; + } + + } + + if(cell == null) { + float height = core.terrainService.getHeight(creature.getPlanetId(), newX, newZ); + newY = height; + } else { + newY = currentPathPosition.y; + } + } + } + + } else { + newX = currentPathPosition.x; + newZ = currentPathPosition.z; + newY = core.terrainService.getHeight(creature.getPlanetId(), newX, newZ); + } + oldPosition = currentPathPosition; + } + //} + newPosition.x = newX; + newPosition.y = newY; + newPosition.z = newZ; + newPosition.setCell(cell); + + return true; + } + public void doMove(AIActor actor) { + + NGECore core = NGECore.getInstance(); + + CreatureObject creature = actor.getCreature(); + if(creature.getPosture() == 14 || creature.getPosture() == 13) { + actor.setFollowObject(null); + return; + } + CreatureObject target = actor.getFollowObject(); + float speed = (float) creature.getRunSpeed(); + float maxDistance = 6; + if(creature.getWeaponId() != 0) { + WeaponObject weapon = (WeaponObject) core.objectService.getObject(creature.getWeaponId()); + if(weapon != null) + maxDistance = weapon.getMaxRange() - 1; + } else if(creature.getSlottedObject("default_weapon") != null) { + WeaponObject weapon = (WeaponObject) creature.getSlottedObject("default_weapon"); + if(weapon != null) + maxDistance = weapon.getMaxRange() - 1; + } + Point3D currentPosition = creature.getWorldPosition(); + + if(target != null && !core.simulationService.checkLineOfSight(creature, target)) + maxDistance = 1; + + Point3D newPosition = new Point3D(); + boolean foundNewPos = findNewPosition(actor, speed, maxDistance, newPosition); + + if(!foundNewPos || (newPosition.x == 0 && newPosition.z == 0)) + return; + + Point3D newWorldPos = newPosition.getWorldPosition(); + float direction = (float) Math.atan2(newWorldPos.x - currentPosition.x, newWorldPos.z - currentPosition.z); + if(direction < 0) + direction = (float) (2 * Math.PI + direction); + Quaternion quaternion = new Quaternion((float) Math.cos(direction / 2), 0, (float) Math.sin(direction / 2), 0); + if (quaternion.y < 0.0f && quaternion.w > 0.0f) { + quaternion.y *= -1; + quaternion.w *= -1; + } + + core.simulationService.moveObject(creature, newPosition, quaternion, creature.getMovementCounter(), speed, newPosition.getCell()); + + } } diff --git a/src/services/ai/states/AttackState.java b/src/services/ai/states/AttackState.java index fedb6112..dbc0a54d 100644 --- a/src/services/ai/states/AttackState.java +++ b/src/services/ai/states/AttackState.java @@ -21,30 +21,158 @@ ******************************************************************************/ package services.ai.states; +import java.util.Random; +import java.util.Vector; + +import main.NGECore; + +import resources.objects.creature.CreatureObject; +import resources.objects.weapon.WeaponObject; +import services.ai.AIActor; + public class AttackState extends AIState { @Override - public byte onEnter() { - // TODO Auto-generated method stub - return 0; + public byte onEnter(AIActor actor) { + CreatureObject creature = actor.getCreature(); + if(creature.getPosture() == 14) + return StateResult.DEAD; + if(creature.getCombatFlag() == 0 || creature.getDefendersList().size() == 0 || actor.getFollowObject() == null) + return StateResult.FINISHED; + actor.scheduleMovement(); + actor.scheduleRecovery(); + return StateResult.UNFINISHED; } @Override - public byte onExit() { + public byte onExit(AIActor actor) { // TODO Auto-generated method stub - return 0; + actor.getCreature().setLookAtTarget(0); + actor.getCreature().setIntendedTarget(0); + + return StateResult.FINISHED; } @Override - public byte move() { - // TODO Auto-generated method stub - return 0; + public byte move(AIActor actor) { + CreatureObject creature = actor.getCreature(); + if(creature.getPosture() == 14) + return StateResult.DEAD; + actor.getMovementPoints().clear(); + if(actor.getFollowObject() != null) { + if(actor.getSpawnPosition().getWorldPosition().getDistance(creature.getWorldPosition()) > 128 || NGECore.getInstance().terrainService.isWater(creature.getPlanetId(), actor.getFollowObject().getWorldPosition())) { + actor.removeDefender(actor.getFollowObject()); + //actor.scheduleMovement(); + return StateResult.UNFINISHED; + } + float maxDistance = 0; + if(creature.getWeaponId() != 0) { + WeaponObject weapon = (WeaponObject) NGECore.getInstance().objectService.getObject(creature.getWeaponId()); + if(weapon != null) + maxDistance = weapon.getMaxRange() - 1; + } else if(creature.getSlottedObject("default_weapon") != null) { + WeaponObject weapon = (WeaponObject) creature.getSlottedObject("default_weapon"); + if(weapon != null) + maxDistance = weapon.getMaxRange() - 1; + } + if(actor.getFollowObject().getWorldPosition().getDistance(creature.getWorldPosition()) > maxDistance) + actor.setNextPosition(actor.getFollowObject().getPosition()); + else { + //recover(actor); + actor.faceObject(actor.getFollowObject()); + actor.scheduleMovement(); + return StateResult.UNFINISHED; + } + + } + else + return StateResult.FINISHED; + doMove(actor); + actor.scheduleMovement(); + return StateResult.UNFINISHED; } @Override - public byte recover() { - // TODO Auto-generated method stub - return 0; + public byte recover(AIActor actor) { + CreatureObject creature = actor.getCreature(); + float maxDistance = 0; + WeaponObject weapon = null; + if(creature.getWeaponId() != 0) { + weapon = (WeaponObject) NGECore.getInstance().objectService.getObject(creature.getWeaponId()); + if(weapon != null) + maxDistance = weapon.getMaxRange() - 1; + } else if(creature.getSlottedObject("default_weapon") != null) { + weapon = (WeaponObject) creature.getSlottedObject("default_weapon"); + if(weapon != null) + maxDistance = weapon.getMaxRange() - 1; + } + if(weapon == null) + return StateResult.FINISHED; + if(actor.getTimeSinceLastAttack() < weapon.getAttackSpeed() * 1000) { + //actor.scheduleRecovery(); + return StateResult.UNFINISHED; + } + NGECore core = NGECore.getInstance(); + if(creature.getPosture() == 14) + return StateResult.DEAD; + if(creature.getCombatFlag() == 0 || creature.getDefendersList().size() == 0 || actor.getFollowObject() == null) + { + creature.setLookAtTarget(0); + creature.setIntendedTarget(0); + actor.setFollowObject(null); + actor.setCurrentState(new RetreatState()); + return StateResult.FINISHED; + } + CreatureObject target = actor.getFollowObject(); + if(target != actor.getHighestDamageDealer() && actor.getHighestDamageDealer() != null) { + actor.setFollowObject(actor.getHighestDamageDealer()); + target = actor.getFollowObject(); + } + if(target == null) { + System.out.println("null target"); + actor.scheduleRecovery(); + return StateResult.UNFINISHED; + } + if(target.getPosture() == 13 || target.getPosture() == 14) { + actor.removeDefender(target); + actor.setFollowObject(actor.getHighestDamageDealer()); + target = actor.getFollowObject(); + if(target == null) + { + creature.setLookAtTarget(0); + creature.setIntendedTarget(0); + return StateResult.FINISHED; + } + } + if(target.getWorldPosition().getDistance(creature.getWorldPosition()) > 128 || target.getPosture() == 13 || target.getPosture() == 14) { + actor.removeDefender(target); + actor.scheduleRecovery(); + return StateResult.UNFINISHED; + } + if(target.getWorldPosition().getDistance(creature.getWorldPosition()) > maxDistance) { + actor.scheduleRecovery(); + return StateResult.UNFINISHED; + } + //actor.faceObject(target); + + Vector attacks = actor.getMobileTemplate().getAttacks(); + + creature.setLookAtTarget(target.getObjectId()); + creature.setIntendedTarget(target.getObjectId()); + + if(attacks.size() == 0) { + core.commandService.callCommand(creature, actor.getMobileTemplate().getDefaultAttack(), target, ""); + } else { + Random rand = new Random(); + if(rand.nextFloat() <= 0.33f) { + core.commandService.callCommand(creature, attacks.get(rand.nextInt(attacks.size())), target, ""); + } else { + core.commandService.callCommand(creature, actor.getMobileTemplate().getDefaultAttack(), target, ""); + } + } + actor.setLastAttackTimestamp(System.currentTimeMillis()); + actor.scheduleRecovery(); + return StateResult.UNFINISHED; } } diff --git a/src/services/ai/states/DeathState.java b/src/services/ai/states/DeathState.java index aee6e323..3e9ea1a0 100644 --- a/src/services/ai/states/DeathState.java +++ b/src/services/ai/states/DeathState.java @@ -21,28 +21,36 @@ ******************************************************************************/ package services.ai.states; +import main.NGECore; +import resources.objects.creature.CreatureObject; +import resources.objects.tangible.TangibleObject; +import services.ai.AIActor; + public class DeathState extends AIState { @Override - public byte onEnter() { + public byte onEnter(AIActor actor) { + NGECore.getInstance().aiService.awardExperience(actor); + actor.getCreature().setAttachment("radial_filename", "npc/corpse"); + NGECore.getInstance().lootService.DropLoot((CreatureObject)(actor.getCreature().getKiller()),(TangibleObject)(actor.getCreature())); + actor.scheduleDespawn(); + return 0; + } + + @Override + public byte onExit(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte onExit() { + public byte move(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte move() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public byte recover() { + public byte recover(AIActor actor) { // TODO Auto-generated method stub return 0; } diff --git a/src/services/ai/states/IdleState.java b/src/services/ai/states/IdleState.java index 597630e9..28391739 100644 --- a/src/services/ai/states/IdleState.java +++ b/src/services/ai/states/IdleState.java @@ -21,28 +21,30 @@ ******************************************************************************/ package services.ai.states; +import services.ai.AIActor; + public class IdleState extends AIState { @Override - public byte onEnter() { + public byte onEnter(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte onExit() { + public byte onExit(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte move() { + public byte move(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte recover() { + public byte recover(AIActor actor) { // TODO Auto-generated method stub return 0; } diff --git a/src/services/ai/states/PatrolState.java b/src/services/ai/states/PatrolState.java index 81e4eace..fef5cb1a 100644 --- a/src/services/ai/states/PatrolState.java +++ b/src/services/ai/states/PatrolState.java @@ -21,28 +21,30 @@ ******************************************************************************/ package services.ai.states; +import services.ai.AIActor; + public class PatrolState extends AIState { @Override - public byte onEnter() { + public byte onEnter(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte onExit() { + public byte onExit(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte move() { + public byte move(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte recover() { + public byte recover(AIActor actor) { // TODO Auto-generated method stub return 0; } diff --git a/src/services/ai/states/RetreatState.java b/src/services/ai/states/RetreatState.java index 64e4fa71..315f8cb3 100644 --- a/src/services/ai/states/RetreatState.java +++ b/src/services/ai/states/RetreatState.java @@ -21,28 +21,42 @@ ******************************************************************************/ package services.ai.states; +import services.ai.AIActor; + public class RetreatState extends AIState { @Override - public byte onEnter() { - // TODO Auto-generated method stub - return 0; + public byte onEnter(AIActor actor) { + /*synchronized(actor.getDamageMap()) { + for(CreatureObject defender : actor.getDamageMap().keySet()) { + actor.removeDefender(defender); + } + }*/ + actor.setFollowObject(null); + actor.scheduleMovement(); + return StateResult.UNFINISHED; } @Override - public byte onExit() { + public byte onExit(AIActor actor) { // TODO Auto-generated method stub - return 0; + return StateResult.FINISHED; } @Override - public byte move() { - // TODO Auto-generated method stub - return 0; + public byte move(AIActor actor) { + actor.setNextPosition(actor.getSpawnPosition()); + doMove(actor); + if(actor.getCreature().getWorldPosition().getDistance(actor.getSpawnPosition()) > 3) { + actor.scheduleMovement(); + } else { + return StateResult.IDLE; + } + return StateResult.UNFINISHED; } @Override - public byte recover() { + public byte recover(AIActor actor) { // TODO Auto-generated method stub return 0; } diff --git a/src/services/ai/states/SpawnState.java b/src/services/ai/states/SpawnState.java index 4d46a557..a006efa4 100644 --- a/src/services/ai/states/SpawnState.java +++ b/src/services/ai/states/SpawnState.java @@ -21,28 +21,30 @@ ******************************************************************************/ package services.ai.states; +import services.ai.AIActor; + public class SpawnState extends AIState { @Override - public byte onEnter() { + public byte onEnter(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte onExit() { + public byte onExit(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte move() { + public byte move(AIActor actor) { // TODO Auto-generated method stub return 0; } @Override - public byte recover() { + public byte recover(AIActor actor) { // TODO Auto-generated method stub return 0; } diff --git a/src/services/bazaar/AuctionItem.java b/src/services/bazaar/AuctionItem.java new file mode 100644 index 00000000..92e1e41f --- /dev/null +++ b/src/services/bazaar/AuctionItem.java @@ -0,0 +1,295 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services.bazaar; + +import com.sleepycat.je.Environment; +import com.sleepycat.je.Transaction; +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.NotPersistent; +import com.sleepycat.persist.model.PrimaryKey; + +import engine.resources.objects.IPersistent; +import engine.resources.objects.SWGObject; + +@Entity(version=1) +public class AuctionItem implements IPersistent, Comparable { + + @PrimaryKey + private long objectId; + private SWGObject item; + private long ownerId; + private long vendorId; + private long buyerId; + private long offerToId; + private int itemType; + private String ownerName; + private String bidderName = ""; + private String itemName; + private String itemDescription; + private String planet; + private int price; + private int proxyBid; + private boolean auction; + private String vuid; + private int status; + private boolean onBazaar; + private long expireTime; + private int auctionOptions; + + public static final int PREMIUM = 0x400; + public static final int WITHDRAW = 0x800; + public final static int FORSALE = 1; + public final static int SOLD = 2; + public final static int EXPIRED = 4; + public final static int OFFERED = 5; + public final static int RETRIEVED = 6; + + @NotPersistent + private Transaction txn; + + public AuctionItem() { + + } + + public AuctionItem(SWGObject item, long ownerId) { + this.item = item; + this.objectId = item.getObjectID(); + this.ownerId = ownerId; + } + + + public long getObjectId() { + return objectId; + } + + + public void setObjectId(long objectId) { + this.objectId = objectId; + } + + + public long getOwnerId() { + return ownerId; + } + + + public void setOwnerId(long ownerId) { + this.ownerId = ownerId; + } + + + public long getVendorId() { + return vendorId; + } + + + public void setVendorId(long vendorId) { + this.vendorId = vendorId; + } + + + public long getBuyerId() { + return buyerId; + } + + + public void setBuyerId(long buyerId) { + this.buyerId = buyerId; + } + + + public long getOfferToId() { + return offerToId; + } + + + public void setOfferToId(long offerToId) { + this.offerToId = offerToId; + } + + + public int getItemType() { + return itemType; + } + + + public void setItemType(int itemType) { + this.itemType = itemType; + } + + + public String getOwnerName() { + return ownerName; + } + + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + + public String getBidderName() { + return bidderName; + } + + + public void setBidderName(String bidderName) { + this.bidderName = bidderName; + } + + + public String getItemName() { + return itemName; + } + + + public void setItemName(String itemName) { + this.itemName = itemName; + } + + + public String getItemDescription() { + return itemDescription; + } + + + public void setItemDescription(String itemDescription) { + this.itemDescription = itemDescription; + } + + + public int getPrice() { + return price; + } + + + public void setPrice(int price) { + this.price = price; + } + + + public int getProxyBid() { + return proxyBid; + } + + + public void setProxyBid(int proxyBid) { + this.proxyBid = proxyBid; + } + + + public boolean isAuction() { + return auction; + } + + + public void setAuction(boolean auction) { + this.auction = auction; + } + + + public String getVuid() { + return vuid; + } + + + public void setVuid(String vuid) { + this.vuid = vuid; + } + + + public int getStatus() { + return status; + } + + + public void setStatus(int status) { + this.status = status; + } + + + public boolean isOnBazaar() { + return onBazaar; + } + + + public void setOnBazaar(boolean onBazaar) { + this.onBazaar = onBazaar; + } + + + public long getExpireTime() { + return expireTime; + } + + + public void setExpireTime(long expireTime) { + this.expireTime = expireTime; + } + + + public int getAuctionOptions() { + return auctionOptions; + } + + + public void setAuctionOptions(int auctionOptions) { + this.auctionOptions = auctionOptions; + } + + @Override + public void createTransaction(Environment env) { + txn = env.beginTransaction(null, null); + } + + @Override + public Transaction getTransaction() { + return txn; + } + + public SWGObject getItem() { + return item; + } + + public void setItem(SWGObject item) { + this.item = item; + } + + public String getPlanet() { + return planet; + } + + public void setPlanet(String planet) { + this.planet = planet; + } + + @Override + public int compareTo(AuctionItem other) { + if(getExpireTime() < other.getExpireTime()) + return -1; + else if(getExpireTime() > other.getExpireTime()) + return 1; + else + return 0; + } + +} diff --git a/src/services/bazaar/BazaarService.java b/src/services/bazaar/BazaarService.java new file mode 100644 index 00000000..52f77554 --- /dev/null +++ b/src/services/bazaar/BazaarService.java @@ -0,0 +1,768 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services.bazaar; + +import java.nio.ByteOrder; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentSkipListSet; +import java.util.function.BiFunction; +import java.util.function.Function; + +import com.sleepycat.je.Transaction; +import com.sleepycat.persist.EntityCursor; + +import main.NGECore; +import engine.clients.Client; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; +import resources.common.Opcodes; +import resources.common.OutOfBand; +import resources.common.ProsePackage; +import resources.objects.building.BuildingObject; +import resources.objects.creature.CreatureObject; +import resources.objects.intangible.IntangibleObject; +import resources.objects.manufacture.ManufactureSchematicObject; +import resources.objects.tangible.TangibleObject; +import protocol.swg.auctionManagerClientListener.AuctionQueryHeadersMessage; +import protocol.swg.auctionManagerClientListener.AuctionQueryHeadersResponseMessage; +import protocol.swg.auctionManagerClientListener.BidAuctionMessage; +import protocol.swg.auctionManagerClientListener.BidAuctionResponseMessage; +import protocol.swg.auctionManagerClientListener.CancelLiveAuctionMessage; +import protocol.swg.auctionManagerClientListener.CancelLiveAuctionResponseMessage; +import protocol.swg.auctionManagerClientListener.CommoditiesItemTypeListResponse; +import protocol.swg.auctionManagerClientListener.CreateAuctionMessage; +import protocol.swg.auctionManagerClientListener.GetAuctionDetails; +import protocol.swg.auctionManagerClientListener.GetAuctionDetailsResponse; +import protocol.swg.auctionManagerClientListener.IsVendorOwnerMessage; +import protocol.swg.auctionManagerClientListener.IsVendorOwnerResponseMessage; +import protocol.swg.auctionManagerClientListener.CreateAuctionResponseMessage; +import protocol.swg.auctionManagerClientListener.RetrieveAuctionItemMessage; +import protocol.swg.auctionManagerClientListener.RetrieveAuctionItemResponseMessage; + +public class BazaarService implements INetworkDispatch { + + private NGECore core; + private Set auctionItems = new ConcurrentSkipListSet(); + private ConcurrentHashMap commodityLimit = new ConcurrentHashMap(); + private final static int COMMODITY_LIMIT = 25; + private final static int MAX_BAZAAR_SALE_PRICE = 10000000; + private final static int SALES_FEE = 20; + private final static int COMMODITY_EXPIRE = 604800; + private final static int VENDOR_EXPIRE = 2592000; + + public BazaarService(NGECore core) { + this.core = core; + loadAuctionItems(); + Runtime.getRuntime().addShutdownHook(new Thread(() -> { + System.out.println("Saving auction items..."); + auctionItems.forEach(item -> core.objectService.persistObject(item, Long.class, AuctionItem.class, core.getAuctionODB())); + })); + } + + private void loadAuctionItems() { + EntityCursor cursor = core.getAuctionODB().getCursor(Long.class, AuctionItem.class); + Iterator it = cursor.iterator(); + it.forEachRemaining(this::addAuctionItem); + cursor.close(); + } + + @Override + public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + + swgOpcodes.put(Opcodes.CommoditiesItemTypeListRequest, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + session.write(new CommoditiesItemTypeListResponse().serialize()); + + }); + + swgOpcodes.put(Opcodes.IsVendorOwnerMessage, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + IsVendorOwnerMessage request = new IsVendorOwnerMessage(); + request.deserialize(data); + long terminalId = request.getTerminalId(); + SWGObject terminal = core.objectService.getObject(terminalId); + if(terminal == null) + return; + Point3D pos = terminal.getWorldPosition(); + session.write(new IsVendorOwnerResponseMessage(2, 0, terminalId, getVendorUID((TangibleObject) terminal)).serialize()); + + + }); + + swgOpcodes.put(Opcodes.CommoditiesResourceTypeListRequest, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + + if(data.remaining() > 2) // if client attaches a string to the request then it has already recieved it on zone-in + return; + + //session.write(new CommoditiesResourceTypeListResponse(core.resourceService.getCompleteResourceNameHistory()).serialize()); + + }); + + swgOpcodes.put(Opcodes.CancelLiveAuctionMessage, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + CancelLiveAuctionMessage cancelLiveAuction = new CancelLiveAuctionMessage(); + cancelLiveAuction.deserialize(data); + + AuctionItem item = getAuctionItem(cancelLiveAuction.getObjectId()); + + if(item == null) + return; + + cancelItem(player, item); + + }); + + swgOpcodes.put(Opcodes.BidAuctionMessage, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + BidAuctionMessage bidAuction = new BidAuctionMessage(); + bidAuction.deserialize(data); + + AuctionItem item = getAuctionItem(bidAuction.getAuctionId()); + //SWGObject vendor = core.objectService.getObject(bidAuction.getVendorId()); + if(item == null) + return; + SWGObject vendor = core.objectService.getObject(item.getVendorId()); + if(vendor == null) + return; + buyItem((CreatureObject) player, item, vendor, bidAuction.getMyPrice(), bidAuction.getProxyPrice()); + + }); + + swgOpcodes.put(Opcodes.RetrieveAuctionItemMessage, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + RetrieveAuctionItemMessage retrieveItem = new RetrieveAuctionItemMessage(); + retrieveItem.deserialize(data); + + AuctionItem item = getAuctionItem(retrieveItem.getObjectId()); + SWGObject vendor = core.objectService.getObject(retrieveItem.getVendorId()); + + if(item == null || vendor == null) + return; + + retrieveItem((CreatureObject) player, item, vendor); + + }); + + swgOpcodes.put(Opcodes.GetAuctionDetails, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + GetAuctionDetails request = new GetAuctionDetails(); + request.deserialize(data); + AuctionItem item = getAuctionItem(request.getObjectId()); + + if(item == null) + return; + + client.getSession().write(new GetAuctionDetailsResponse(item).serialize()); + + }); + + + swgOpcodes.put(Opcodes.CreateAuctionMessage, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + CreateAuctionMessage createAuction = new CreateAuctionMessage(); + createAuction.deserialize(data); + SWGObject vendor = core.objectService.getObject(createAuction.getVendorId()); + SWGObject item = core.objectService.getObject(createAuction.getObjectId()); + + if(vendor == null || item == null || item instanceof CreatureObject || item instanceof BuildingObject) + return; + + addAuction((CreatureObject) player, item, vendor, createAuction.getPrice(), createAuction.getDuration(), createAuction.getDescription(), true, createAuction.getPremium()); + + }); + + swgOpcodes.put(Opcodes.CreateImmediateAuctionMessage, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + CreateAuctionMessage createAuction = new CreateAuctionMessage(); + createAuction.deserialize(data); + + SWGObject vendor = core.objectService.getObject(createAuction.getVendorId()); + SWGObject item = core.objectService.getObject(createAuction.getObjectId()); + + if(vendor == null || item == null || item instanceof CreatureObject || item instanceof BuildingObject) + return; + + addAuction((CreatureObject) player, item, vendor, createAuction.getPrice(), createAuction.getDuration(), createAuction.getDescription(), false, createAuction.getPremium()); + + }); + + swgOpcodes.put(Opcodes.AuctionQueryHeadersMessage, (session, data) -> { + + Client client = core.getClient(session); + + if (client == null) + return; + + SWGObject player = client.getParent(); + + if (player == null) + return; + + data = data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + AuctionQueryHeadersMessage queryHeaders = new AuctionQueryHeadersMessage(); + queryHeaders.deserialize(data); + SWGObject vendor = core.objectService.getObject(queryHeaders.getVendorId()); + + if(vendor == null) + return; + + getItemData(player, vendor, queryHeaders.getRange(), queryHeaders.getScreen(), queryHeaders.getCounter(), queryHeaders.getOffset(), queryHeaders.getItemTypeCRC(), queryHeaders.getMinPrice(), queryHeaders.getMaxPrice()); + + }); + + + + } + + public void buyItem(CreatureObject player, AuctionItem item, SWGObject vendor, int price, int proxyPrice) { + + BidAuctionResponseMessage response = new BidAuctionResponseMessage(item.getObjectId(), BidAuctionResponseMessage.SUCCESS); + + if((price > MAX_BAZAAR_SALE_PRICE || proxyPrice > MAX_BAZAAR_SALE_PRICE) && item.isOnBazaar()) { + response.setStatus(BidAuctionResponseMessage.PRICEOVERFLOW); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(price < 1 /*|| proxyPrice < 1 */|| price < item.getPrice()) { + response.setStatus(BidAuctionResponseMessage.INVALIDPRICE); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(price > player.getBankCredits()) { + response.setStatus(BidAuctionResponseMessage.NOTENOUGHCREDITS); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(item.isAuction()) + bidAuction(player, item, vendor, price, proxyPrice); + else + instantBuy(player, item, vendor); + + } + + public void instantBuy(CreatureObject player, AuctionItem item, SWGObject vendor) { + //System.out.println("test"); + + long timeUntilExpire = (item.getExpireTime() - System.currentTimeMillis()) / 1000; + long retrieveExpire = 0; + + if(item.isOnBazaar()) + retrieveExpire = timeUntilExpire + COMMODITY_EXPIRE; + else + retrieveExpire = timeUntilExpire + VENDOR_EXPIRE; + + item.setStatus(AuctionItem.SOLD); + item.setBuyerId(player.getObjectID()); + item.setExpireTime(retrieveExpire); + item.setBidderName(player.getCustomName()); + player.setBankCredits(player.getBankCredits() - item.getPrice()); + player.getClient().getSession().write(new BidAuctionResponseMessage(item.getObjectId(), BidAuctionResponseMessage.SUCCESS).serialize()); + + // TODO send mail with WP + + CreatureObject seller = (CreatureObject) core.objectService.getObject(item.getOwnerId()); + + if(seller == null) { + seller = core.objectService.getCreatureFromDB(item.getOwnerId()); + seller.setBankCredits(seller.getBankCredits() + item.getPrice()); + core.objectService.persistObject(seller, Long.class, CreatureObject.class, core.getAuctionODB()); + } + + } + + public void bidAuction(CreatureObject player, AuctionItem item, SWGObject vendor, int price, int proxyPrice) { + //System.out.println("test"); + } + + public void retrieveItem(CreatureObject player, AuctionItem item, SWGObject vendor) { + + RetrieveAuctionItemResponseMessage response = new RetrieveAuctionItemResponseMessage(item.getObjectId(), RetrieveAuctionItemResponseMessage.SUCCESS); + String closestCityName = core.mapService.getClosestCityName(player); + SWGObject vendorOfItem = core.objectService.getObject(item.getVendorId()); + + if(vendorOfItem == null) { + response.setStatus(RetrieveAuctionItemResponseMessage.DONTRETRIEVE); + player.getClient().getSession().write(response.serialize()); + return; + } + + + if(item.getItem() instanceof TangibleObject && player.getInventoryItemCount() >= 80) { + response.setStatus(RetrieveAuctionItemResponseMessage.FULLINVENTORY); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(item.getStatus() == AuctionItem.RETRIEVED || item.getStatus() == AuctionItem.FORSALE) { + response.setStatus(RetrieveAuctionItemResponseMessage.NOTALLOWED); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(item.getStatus() == AuctionItem.SOLD && item.getBuyerId() != player.getObjectID()) { + response.setStatus(RetrieveAuctionItemResponseMessage.NOTALLOWED); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(!item.isOnBazaar() && !vendor.inRange(player.getWorldPosition(), 8)) { + response.setStatus(RetrieveAuctionItemResponseMessage.TOOFAR); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(item.isOnBazaar() && !core.mapService.getClosestCityName(vendorOfItem).equals(closestCityName)) { + response.setStatus(RetrieveAuctionItemResponseMessage.TOOFAR); + player.getClient().getSession().write(response.serialize()); + return; + } + + item.setStatus(AuctionItem.RETRIEVED); + + if(item.getItem() instanceof TangibleObject) + player.getSlottedObject("inventory").add(item.getItem()); + else if(item.getItem() instanceof IntangibleObject) + player.getSlottedObject("datapad").add(item.getItem()); + + removeAuctionItem(item); + player.getClient().getSession().write(response.serialize()); + + } + + public void cancelItem(SWGObject player, AuctionItem item) { + + CancelLiveAuctionResponseMessage response = new CancelLiveAuctionResponseMessage(item.getObjectId(), CancelLiveAuctionResponseMessage.SUCCESS); + + long timeUntilExpire = (item.getExpireTime() - System.currentTimeMillis()) / 1000; + long retrieveExpire = 0; + + if(item.getStatus() == AuctionItem.FORSALE) { + + if(item.getOwnerId() != player.getObjectID()) { + response.setStatus(CancelLiveAuctionResponseMessage.NOTOWNER); + player.getClient().getSession().write(response.serialize()); + return; + } + + if(item.isOnBazaar()) + retrieveExpire = timeUntilExpire + COMMODITY_EXPIRE; + else + retrieveExpire = timeUntilExpire + VENDOR_EXPIRE; + + } else if(item.getStatus() == AuctionItem.OFFERED) { + // TODO implement offers + return; + } else { + response.setStatus(CancelLiveAuctionResponseMessage.ALREADYCOMPLETED); + player.getClient().getSession().write(response.serialize()); + return; + } + + // TODO: cancel auction once implemented + + item.setStatus(AuctionItem.EXPIRED); + item.setExpireTime(retrieveExpire); + player.getClient().getSession().write(response.serialize()); + + } + + public void getItemData(SWGObject player, SWGObject vendor, int range, int screen, int counter, short offset, int category, int minPrice, int maxPrice) { + + Set inRangeItems = getInRangeItems(range, player.getPlanet(), vendor, core.mapService.getClosestCityName(player)); + + Iterator it = inRangeItems.iterator(); + int displayedItems = 0; + + AuctionQueryHeadersResponseMessage response = new AuctionQueryHeadersResponseMessage(player.getObjectID(), screen, counter, offset, false); + + while(it.hasNext() && displayedItems < offset + 100) { + + AuctionItem item = it.next(); + + if((minPrice != 0 && item.getPrice() < minPrice) || (maxPrice != 0 && item.getPrice() > maxPrice)) + continue; + + switch(screen) { + + // Auctions + case 2: + if(item.getStatus() == AuctionItem.FORSALE) { + if((category & 255) != 0 && item.getItemType() == category) { + if(displayedItems >= offset) + response.addItem(item); + displayedItems++; + } else if((item.getItemType() & category) != 0) { + if(displayedItems >= offset) + response.addItem(item); + displayedItems++; + } else if(item.getItemType() < 256 && category == 8192) { + if(displayedItems >= offset) + response.addItem(item); + displayedItems++; + } else if(category == 0) { + if(displayedItems >= offset) + response.addItem(item); + displayedItems++; + } + } + break; + // My Items for sale + case 3: + if(item.getStatus() == AuctionItem.FORSALE && player.getObjectID() == item.getOwnerId()) + response.addItem(item); + break; + // My Auction Bids + case 4: + if(item.isAuction() && item.getStatus() == AuctionItem.FORSALE && player.getCustomName().equals(item.getBidderName())) + response.addItem(item); + break; + // Retrieve items + case 5: + if(item.getStatus() == AuctionItem.SOLD && player.getObjectID() == item.getBuyerId()) + response.addItem(item); + else if(item.getStatus() == AuctionItem.EXPIRED && player.getObjectID() == item.getOwnerId()) + response.addItem(item); + break; + // Offers to my vendor + case 6: + if(item.getStatus() == AuctionItem.OFFERED && player.getObjectID() == item.getOfferToId()) + response.addItem(item); + break; + // Vendor search TODO later + case 7: + break; + // Stock + case 8: + if(item.getStatus() == AuctionItem.SOLD && player.getObjectID() == item.getBuyerId()) + response.addItem(item); + else if(item.getStatus() == AuctionItem.EXPIRED && player.getObjectID() == item.getOwnerId()) + response.addItem(item); + break; + // Offers to other vendor + case 9: + if(item.getStatus() == AuctionItem.OFFERED && player.getObjectID() == item.getOwnerId()) + response.addItem(item); + break; + + + } + + } + + if(displayedItems == offset + 100) + response.setContinues(true); + + player.getClient().getSession().write(response.serialize()); + } + + public Set getInRangeItems(int range, Planet planet, SWGObject vendor, String closestCityName) { + + Set inRangeItems = new ConcurrentSkipListSet(); + String planetName = planet.getName(); + + auctionItems.forEach((item) -> { + + SWGObject vendorOfItem = core.objectService.getObject(item.getVendorId()); + if(vendorOfItem == null) + return; + if(range > 0 && !item.getPlanet().equals(planetName)) + return; + else if(range > 1 && !core.mapService.getClosestCityName(vendorOfItem).equals(closestCityName)) + return; + else if(range > 2 && item.getVendorId() != vendor.getObjectID()) + return; + + inRangeItems.add(item); + + }); + + return inRangeItems; + } + + public void addAuction(CreatureObject player, SWGObject item, SWGObject vendor, int price, int duration, String description, boolean auction, boolean premium) { + + CreateAuctionResponseMessage itemSoldMsg = new CreateAuctionResponseMessage(item.getObjectID(), CreateAuctionResponseMessage.SUCCESS); + + if(item.getAttributes().containsKey("no_trade") || !item.isSubChildOf(player) || (item instanceof IntangibleObject && !(item instanceof ManufactureSchematicObject))) { + itemSoldMsg.setStatus(CreateAuctionResponseMessage.INVALIDITEM); + player.getClient().getSession().write(itemSoldMsg.serialize()); + return; + } + + if(core.tradeService.getTradingObjectMap().get(item) != null) { + itemSoldMsg.setStatus(CreateAuctionResponseMessage.CANTSELLTRADINGITEM); + player.getClient().getSession().write(itemSoldMsg.serialize()); + return; + } + + if(getAuctionItem(item.getObjectID()) != null) { + itemSoldMsg.setStatus(CreateAuctionResponseMessage.ALREADYFORSALE); + player.getClient().getSession().write(itemSoldMsg.serialize()); + return; + } + + if(price < 1 || price > MAX_BAZAAR_SALE_PRICE) { + itemSoldMsg.setStatus(CreateAuctionResponseMessage.INVALIDPRICE); + player.getClient().getSession().write(itemSoldMsg.serialize()); + return; + } + + if(commodityLimit.get(player) != null && commodityLimit.get(player) >= COMMODITY_LIMIT) { + itemSoldMsg.setStatus(CreateAuctionResponseMessage.TOOMANYITEMS); + player.getClient().getSession().write(itemSoldMsg.serialize()); + return; + } + + if(player.getBankCredits() < SALES_FEE || (premium && player.getBankCredits() < SALES_FEE * 5)) { + itemSoldMsg.setStatus(CreateAuctionResponseMessage.NOTENOUGHCREDITS); + player.getClient().getSession().write(itemSoldMsg.serialize()); + return; + } + + AuctionItem auctionItem = createAuctionItem(player, vendor, item, price, description, duration, auction, premium); + + core.objectService.destroyObject(item); + + if(vendor.getTemplate().contains("terminal_bazaar")) { + ProsePackage prose = new ProsePackage("base_player", "sale_fee"); + int salesFee = SALES_FEE; + if(premium) + salesFee *= 5; + + player.setBankCredits(player.getBankCredits() - salesFee); + prose.setDiInteger(salesFee); + player.sendSystemMessage(new OutOfBand(prose), (byte) 0); + } + + if(auction) { + + } + + player.getClient().getSession().write(itemSoldMsg.serialize()); + + } + + public AuctionItem createAuctionItem(SWGObject player, SWGObject vendor, SWGObject item, int price, String description, int duration, boolean auction, boolean premium) { + + AuctionItem auctionItem = new AuctionItem(item, player.getObjectID()); + auctionItem.setExpireTime(System.currentTimeMillis() + (COMMODITY_EXPIRE * 1000)); + auctionItem.setAuction(auction); + auctionItem.setItemDescription(description); + auctionItem.setPrice(price); + auctionItem.setItemType(item.getTemplateData().getAttribute("gameObjectType")); + auctionItem.setStatus(AuctionItem.FORSALE); + //auctionItem.setItemName("@" + item.getStfFilename() + ":" + item.getStfName()); + String name = item.getCustomName() == null ? "@" + item.getStfFilename() + ":" + item.getStfName() : item.getCustomName(); + auctionItem.setItemName(name); + auctionItem.setVendorId(vendor.getObjectID()); + auctionItem.setPlanet(vendor.getPlanet().getName()); + auctionItem.setVuid(getVendorUID((TangibleObject) vendor)); + auctionItem.setOwnerName(player.getCustomName()); + + if(vendor.getTemplate().contains("terminal_bazaar")) + auctionItem.setOnBazaar(true); + + addAuctionItem(auctionItem); + + return auctionItem; + } + + public String getVendorUID(TangibleObject vendor) { + + if(vendor.getAttachment("uid") != null) + return (String) vendor.getAttachment("uid"); + + String planet = ""; + if(vendor.getContainer() == null) + planet = vendor.getPlanet().getName(); + else + planet = vendor.getContainer().getPlanet().getName(); + + String uid = (planet + "."); + Point3D pos = vendor.getWorldPosition(); + + uid += ("@" + planet + "_region_names:" + core.mapService.getClosestCityName(vendor).toLowerCase().replace(" ", "_")); // TODO: replace this with city regions when they are implemented + uid += ("." + "@" + vendor.getStfFilename() + ":" + vendor.getStfName() + "."); + uid += (vendor.getObjectID() + "#" + pos.x + "," + pos.z); + vendor.setAttachment("uid", uid); + return uid; + + } + + @Override + public void shutdown() { + + } + + public AuctionItem getAuctionItem(long objectId) { + return auctionItems.parallelStream().filter(a -> a.getObjectId() == objectId).findFirst().orElse(null); + } + + public void addAuctionItem(AuctionItem auctionItem) { + auctionItems.add(auctionItem); + int commodityNumber = 0; + if(commodityLimit.get(auctionItem.getOwnerId()) != null) + commodityNumber = commodityLimit.get(auctionItem.getOwnerId()); + commodityLimit.put(auctionItem.getOwnerId(), commodityNumber + 1); + if(!core.getAuctionODB().contains(auctionItem.getObjectId(), Long.class, AuctionItem.class)) { + core.objectService.persistObject(auctionItem, Long.class, AuctionItem.class, core.getAuctionODB()); + } + } + + public void removeAuctionItem(AuctionItem auctionItem) { + auctionItems.remove(auctionItem); + int commodityNumber = 0; + if(commodityLimit.get(auctionItem.getOwnerId()) != null) + commodityNumber = commodityLimit.get(auctionItem.getOwnerId()); + commodityLimit.put(auctionItem.getOwnerId(), commodityNumber - 1); + core.objectService.deletePersistentObject(auctionItem, Long.class, AuctionItem.class, core.getAuctionODB(), auctionItem.getObjectId()); + } + +} diff --git a/src/services/chat/ChatRoom.java b/src/services/chat/ChatRoom.java new file mode 100644 index 00000000..10f853c1 --- /dev/null +++ b/src/services/chat/ChatRoom.java @@ -0,0 +1,157 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services.chat; + +import java.util.Vector; + + +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.NotPersistent; +import com.sleepycat.persist.model.PrimaryKey; + +@Entity(version=1) +public class ChatRoom { + private String creator; // creator of the room (first name only, lowercase) + private String description; // title + @PrimaryKey + private int roomId; + private String roomAddress; // name + + private Vector moderatorList = new Vector(); + private Vector banList = new Vector(); + @NotPersistent + private Vector userList = new Vector(); // current users + + private boolean moderatorsOnly; + private boolean privateRoom; + private boolean visible; + private boolean childrenAllowed; + private String owner; // current owner of the room (first name only lowercase) + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator.toLowerCase(); + } + + public String getRoomAddress() { + return roomAddress; + } + + public void setRoomAddress(String roomAddress) { + this.roomAddress = roomAddress; + } + + public int getRoomId() { + return roomId; + } + + public void setRoomId(int roomId) { + this.roomId = roomId; + } + + public Vector getModeratorList() { + return moderatorList; + } + + public Vector getUserList() { + return userList; + } + + public boolean isModeratorsOnly() { + return moderatorsOnly; + } + + public void setModeratorsOnly(boolean moderatorsOnly) { + this.moderatorsOnly = moderatorsOnly; + } + + public boolean isPrivateRoom() { + return privateRoom; + } + + public void setPrivateRoom(boolean privateRoom) { + this.privateRoom = privateRoom; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner.toLowerCase(); + } + + public Vector getBanList() { + return banList; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public boolean isVisible() { + return visible; + } + + public void setVisible(boolean visible) { + this.visible = visible; + } + + public void addUser(String user) { + userList.add(user.toLowerCase()); + } + + public void addModerator(String moderator) { + moderatorList.add(moderator.toLowerCase()); + } + + public void banUser(String user) { + banList.add(user.toLowerCase()); + } + + public boolean hasUser(String user) { + return userList.contains(user.toLowerCase()); + } + + public boolean hasModerator(String moderator) { + return moderatorList.contains(moderator.toLowerCase()); + } + + public boolean hasBan(String user) { + return banList.contains(user.toLowerCase()); + } + + public boolean isChildrenAllowed() { + return childrenAllowed; + } + + public void setChildrenAllowed(boolean childrenAllowed) { + this.childrenAllowed = childrenAllowed; + } +} diff --git a/src/services/chat/ChatService.java b/src/services/chat/ChatService.java index 0a68ab4c..cc620d77 100644 --- a/src/services/chat/ChatService.java +++ b/src/services/chat/ChatService.java @@ -26,7 +26,9 @@ import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Random; +import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import org.apache.mina.core.buffer.IoBuffer; @@ -35,31 +37,43 @@ import org.apache.mina.core.session.IoSession; import com.sleepycat.je.Transaction; import com.sleepycat.persist.EntityCursor; +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; import engine.clients.Client; import engine.resources.config.Config; import engine.resources.config.DefaultConfig; import engine.resources.database.ObjectDatabase; import engine.resources.objects.SWGObject; +import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; import resources.common.*; +import resources.datatables.DisplayType; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; import protocol.swg.AddIgnoreMessage; -import protocol.swg.ChatOnChangeFriendStatus; -import protocol.swg.ChatDeletePersistentMessage; -import protocol.swg.ChatFriendsListUpdate; -import protocol.swg.ChatInstantMessageToCharacter; -import protocol.swg.ChatInstantMessagetoClient; -import protocol.swg.ChatOnAddFriend; -import protocol.swg.ChatOnGetFriendsList; -import protocol.swg.ChatOnSendInstantMessage; -import protocol.swg.ChatOnSendPersistentMessage; -import protocol.swg.ChatPersistentMessageToClient; -import protocol.swg.ChatPersistentMessageToServer; -import protocol.swg.ChatRequestPersistentMessage; import protocol.swg.ObjControllerMessage; +import protocol.swg.chat.ChatDeletePersistentMessage; +import protocol.swg.chat.ChatEnterRoomById; +import protocol.swg.chat.ChatFriendsListUpdate; +import protocol.swg.chat.ChatInstantMessageToCharacter; +import protocol.swg.chat.ChatInstantMessagetoClient; +import protocol.swg.chat.ChatOnAddFriend; +import protocol.swg.chat.ChatOnChangeFriendStatus; +import protocol.swg.chat.ChatOnEnteredRoom; +import protocol.swg.chat.ChatOnLeaveRoom; +import protocol.swg.chat.ChatOnSendInstantMessage; +import protocol.swg.chat.ChatOnSendPersistentMessage; +import protocol.swg.chat.ChatOnSendRoomMessage; +import protocol.swg.chat.ChatPersistentMessageToClient; +import protocol.swg.chat.ChatPersistentMessageToServer; +import protocol.swg.chat.ChatQueryRoom; +import protocol.swg.chat.ChatRequestPersistentMessage; +import protocol.swg.chat.ChatRoomList; +import protocol.swg.chat.ChatRoomMessage; +import protocol.swg.chat.ChatSendToRoom; +import protocol.swg.chat.ChatSystemMessage; import protocol.swg.objectControllerObjects.PlayerEmote; import protocol.swg.objectControllerObjects.SpatialChat; import main.NGECore; @@ -68,62 +82,76 @@ public class ChatService implements INetworkDispatch { private NGECore core; private ObjectDatabase mailODB; - + private ObjectDatabase chatRoomsODB; + private ConcurrentHashMap chatRooms = new ConcurrentHashMap(); + public ChatService(NGECore core) { this.core = core; core.commandService.registerCommand("spatialchatinternal"); core.commandService.registerCommand("socialinternal"); + core.commandService.registerCommand("addignore"); core.commandService.registerCommand("removeignore"); core.commandService.registerCommand("findfriend"); core.commandService.registerCommand("addfriend"); core.commandService.registerCommand("removefriend"); + + core.commandService.registerAlias("g", "groupchat"); + core.commandService.registerAlias("gc", "groupchat"); + core.commandService.registerAlias("groupsay", "groupchat"); + core.commandService.registerAlias("gsay", "groupchat"); + core.commandService.registerAlias("gtell", "groupchat"); + + core.commandService.registerAlias("planet", "planetchat"); + mailODB = core.getMailODB(); + chatRoomsODB = core.getChatRoomODB(); + } - public void handleSpatialChat(SWGObject speaker, SWGObject target, String chatMessage, short chatType, short moodId) { - + /* + * This gets used by NPCs as well (random shouts, mustafar miners, etc). + */ + public void spatialChat(SWGObject speaker, SWGObject target, String chatMessage, short chatType, short moodId, int languageId, OutOfBand outOfBand) { long targetId; - if(target == null) + if (target == null) { targetId = 0; - else + } else { targetId = target.getObjectID(); + } - //System.out.println(chatMessage); - //System.out.println(chatType); - //System.out.println(moodId); - - SpatialChat spatialChat = new SpatialChat(speaker.getObjectID(), targetId, chatMessage, chatType, moodId); - ObjControllerMessage objControllerMessage = new ObjControllerMessage(0x0B, spatialChat); + ObjControllerMessage objControllerMessage = new ObjControllerMessage(0x0B, new SpatialChat(speaker.getObjectId(), speaker.getObjectID(), targetId, chatMessage, chatType, moodId, languageId, outOfBand)); Client speakerClient = speaker.getClient(); - if(speakerClient == null || speakerClient.getSession() == null) + if (speakerClient == null || speakerClient.getSession() == null) { return; - + } + speakerClient.getSession().write(objControllerMessage.serialize()); - if(speaker.getObservers().isEmpty()) + if (speaker.getObservers().isEmpty()) { return; + } HashSet observers = new HashSet(speaker.getObservers()); Point3D position = speaker.getPosition(); - for(Client client : observers) { + for (Client client : observers) { float distance = client.getParent().getPosition().getDistance2D(position); - if(client != null && client.getSession() != null && distance <= 80) { - - if(((PlayerObject)client.getParent().getSlottedObject("ghost")).getIgnoreList().contains(speaker.getCustomName().toLowerCase().split(" ")[0])) + if (client != null && client.getSession() != null && distance <= 80) { + if (((PlayerObject) client.getParent().getSlottedObject("ghost")).getIgnoreList().contains(speaker.getCustomName().toLowerCase().split(" ")[0])) { continue; + } - spatialChat.setDestinationId(client.getParent().getObjectID()); - ObjControllerMessage objControllerMessage2 = new ObjControllerMessage(0x0B, spatialChat); - client.getSession().write(objControllerMessage2.serialize()); + String message = chatMessage; + SpatialChat spatialChat = new SpatialChat(client.getParent().getObjectId(), speaker.getObjectID(), targetId, message, chatType, moodId, languageId, outOfBand); + objControllerMessage = new ObjControllerMessage(0x0B, spatialChat); + client.getSession().write(objControllerMessage.serialize()); } } - } public void handleEmote(SWGObject speaker, SWGObject target, short emoteId) { @@ -331,6 +359,154 @@ public class ChatService implements INetworkDispatch { } }); + + swgOpcodes.put(Opcodes.ChatRequestRoomList, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject obj = client.getParent(); + + if (obj == null) + return; + + ChatRoomList listMessage = new ChatRoomList(chatRooms); + client.getSession().write(listMessage.serialize()); + + } + + }); + + swgOpcodes.put(Opcodes.ChatCreateRoom, (session, data) -> { + /*data.order(ByteOrder.LITTLE_ENDIAN); + + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject obj = client.getParent(); + + if (obj == null) + return; + + CreatureObject creo = (CreatureObject) obj; + + ChatCreateRoom sentPacket = new ChatCreateRoom(); + sentPacket.deserialize(data); + + ChatRoom room = createChatRoom(sentPacket.getTitle(), sentPacket.getAddress(), creo.getCustomName().toLowerCase(), true, false); + + if (room != null) { + room.setPrivateRoom(sentPacket.isPrivacy()); + room.setModeratorsOnly(sentPacket.isModeratorOnly()); + room.addUser(creo.getCustomName()); + room.addModerator(creo.getCustomName()); + ChatOnCreateRoom response = new ChatOnCreateRoom(room, 0, sentPacket.getRequest()); + session.write(response.serialize()); + } + + System.out.println("Created room.");*/ + + }); + + swgOpcodes.put(Opcodes.ChatQueryRoom, (session, data) -> { + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject obj = client.getParent(); + + if (obj == null) + return; + + data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + ChatQueryRoom request = new ChatQueryRoom(); + request.deserialize(data); + + ChatRoom room = getChatRoomByAddress(request.getRoomAddress()); + + if (room == null) + return; + + ChatQueryRoom response = new ChatQueryRoom(room, request.getRequestId()); + obj.getClient().getSession().write(response.serialize()); + }); + + swgOpcodes.put(Opcodes.ChatSendToRoom, (session, data) -> { + + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject obj = client.getParent(); + + if (obj == null) + return; + + data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + ChatSendToRoom sentPacket = new ChatSendToRoom(); + sentPacket.deserialize(data); + + if (((PlayerObject) obj.getSlottedObject("ghost")).isMemberOfChannel(sentPacket.getRoomId())) + sendChatRoomMessage((CreatureObject) obj, sentPacket.getRoomId(), sentPacket.getMsgId(), sentPacket.getMessage()); + + }); + + swgOpcodes.put(Opcodes.ChatEnterRoomById, (session, data) -> { + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject obj = client.getParent(); + + if (obj == null) + return; + + data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + ChatEnterRoomById sentPacket = new ChatEnterRoomById(); + sentPacket.deserialize(data); + + if(joinChatRoom(obj.getCustomName(), sentPacket.getRoomId()) && !sentPacket.getRoomname().equals("SWG." + core.getGalaxyName() + "." + obj.getPlanet().name + ".Planet")) { + PlayerObject player = (PlayerObject) obj.getSlottedObject("ghost"); + + if (player != null) + player.addChannel(sentPacket.getRoomId()); + } + }); + + swgOpcodes.put(Opcodes.ChatLeaveRoom, (session, data) -> { + Client client = core.getClient(session); + + if(client == null) + return; + + SWGObject obj = client.getParent(); + + if (obj == null) + return; + + data.order(ByteOrder.LITTLE_ENDIAN); + data.position(0); + + ChatOnLeaveRoom sentPacket = new ChatOnLeaveRoom(); + sentPacket.deserialize(data); + + ChatRoom room = getChatRoomByAddress(sentPacket.getChannelAddress()); + + leaveChatRoom((CreatureObject) obj, room.getRoomId()); + + }); } public void playerStatusChange(String name, byte status) { @@ -530,11 +706,11 @@ public class ChatService implements INetworkDispatch { for(Mail mail : cursor) { - if(mail.getRecieverId() == obj.getObjectID()) + if(mail.getRecieverId() == obj.getObjectID()) { sendPersistentMessageHeader(client, mail); - + } } - + cursor.close(); } @Override @@ -545,6 +721,9 @@ public class ChatService implements INetworkDispatch { public SWGObject getObjectByFirstName(String name) { ConcurrentHashMap clients = core.getActiveConnectionsMap(); + if(name.contains(" ")) + name = name.split(" ")[0]; + for(Client client : clients.values()) { if(client.getParent() == null) continue; @@ -575,5 +754,289 @@ public class ChatService implements INetworkDispatch { return mail; } + public ChatRoom getChatRoomByAddress(String address) { + for (Entry entry : chatRooms.entrySet()) { + if (entry.getValue().getRoomAddress().equals(address)) + return entry.getValue(); + } + return null; + } + + public ChatRoom getChatRoom(int roomId) { + return chatRooms.get(roomId); + } + + public int generateChatRoomId() { + Random rand = new Random(); + int id = rand.nextInt(); + + if (chatRoomsODB.contains(new Integer(id), Integer.class, ChatRoom.class)) + return generateChatRoomId(); + else + return id; + } + + public void broadcastGalaxy(String message) { + core.simulationService.notifyAllClients(new ChatSystemMessage(message, new OutOfBand(), DisplayType.Broadcast).serialize()); + } + + public void loadChatRooms() { + + /* + * Group Channel: + * SWG.serverName.group.groupObjectId.GroupChat + * Battlefields channel format: + * SWG.serverName.battlefield.bfMapName + * + * TODO: Research other channel address formats + */ + + createChatRoom("", "SWG", "system", false); + createChatRoom("", "SWG." + core.getGalaxyName(), "system", false); + createChatRoom("", "SWG." + core.getGalaxyName() + ".Chat", "system", false); + + createChatRoom("", "system", "system", true); // galaxy system messages + + createChatRoom("", "group", "system", false); + createChatRoom("", "guild", "system", false); + + createChatRoom("Auction chat for this galaxy", "Auction", "system", true); + createChatRoom("public chat for the whole galaxy, cannot create rooms here", "Galaxy", "system", true); + + createChatRoom("Bounty Hunter chat for this galaxy", "BountyHunter", "system", true); + createChatRoom("Commando chat for this galaxy", "Commando", "system", true); + createChatRoom("Officer chat for this galaxy", "Officer", "system", true); + createChatRoom("Entertainer chat for this galaxy", "Entertainer", "system", true); + createChatRoom("Spy chat for this galaxy", "Spy", "system", true); + createChatRoom("Force Sensitive chat for this galaxy", "ForceSensitive", "system", true); + + createChatRoom("Politician chat for this galaxy", "Politician", "system", true); + //createChatRoom("Pilot chat for this galaxy", "Pilot", "system", true); + + EntityCursor cursor = chatRoomsODB.getCursor(Integer.class, ChatRoom.class); + cursor.forEach(room -> { + if (!chatRooms.containsValue(room)) + chatRooms.put(room.getRoomId(), room); + }); + cursor.close(); + + List planets = core.terrainService.getPlanetList(); + planets.forEach(planet -> { + createChatRoom("", planet.getName(), "system", true, true); + createChatRoom("", planet.getName() + ".Chat", "system", true, false); + createChatRoom("public chat for this planet, cannot create rooms here", planet.getName() + ".Planet", "system", true, false); + createChatRoom("system messages for this planet, cannot create rooms here", planet.getName() + ".system", "system", true, false); + Console.println("Created chat rooms for " + planet.getName()); + }); + } + + /** + * Creates a new ChatRoom that is not persistent and does not allow children. + * @param roomName Name of the room, description + * @param address Address of the room. Defaults to SWG.serverName + the value of this variable if it does not contain it. + * @param creator Creator of the room. Also set as the owner of the room. + * @param isPublic Determines weather or not the channel will show in the list of channels. + * @return {@link ChatRoom} + */ + public ChatRoom createChatRoom(String roomName, String address, String creator, boolean isPublic) { + return createChatRoom(roomName, address, creator, isPublic, false, false); + } + + /** + * Creates a new ChatRoom with the given values that is not persistent. + * @param roomName Name of the room, description + * @param address Address of the room. Defaults to SWG.serverName + the value of this variable if it does not contain it. + * @param creator Creator of the room. Also set as the owner of the room. + * @param isPublic Determines weather or not the channel will show in the list of channels. + * @param childrenAllowed Setting this to true allows players to create channels within it. + * @return {@link ChatRoom} + */ + public ChatRoom createChatRoom(String roomName, String address, String creator, boolean isPublic, boolean childrenAllowed) { + return createChatRoom(roomName, address, creator, isPublic, false, childrenAllowed); + } + + /** + * Creates a new ChatRoom with the given values. + * @param roomName Name of the room, description + * @param address Address of the room. Defaults to SWG.serverName + the value of this variable if it does not contain it. + * @param creator Creator of the room. Also set as the owner of the room. + * @param isPublic Determines weather or not the channel will show in the list of channels. + * @param store Setting this to true will make the channel persistent through server restarts. + * @param childrenAllowed Setting this to true allows players to create channels within it. + * @return {@link ChatRooms} + */ + public ChatRoom createChatRoom(String roomName, String address, String creator, boolean isPublic, boolean store, boolean childrenAllowed) { + + if (creator.contains(" ")) + creator = creator.split(" ")[0]; + + ChatRoom room = new ChatRoom(); + room.setDescription(roomName); + if (!address.startsWith("SWG")) + room.setRoomAddress("SWG." + core.getGalaxyName() + "." + address); + else + room.setRoomAddress(address); + room.setCreator(creator.toLowerCase()); + room.setOwner(creator.toLowerCase()); + room.setVisible(isPublic); + room.setRoomId(generateChatRoomId()); + room.setChildrenAllowed(childrenAllowed); + + chatRooms.put(room.getRoomId(), room); + + if(store){ + Transaction txn = chatRoomsODB.getEnvironment().beginTransaction(null, null); + chatRoomsODB.put(room, Integer.class, ChatRoom.class, txn); + txn.commitSync(); + } + + //Console.println("Created room " + address + " with ID " + room.getRoomId()); + + return room; + } + + public boolean joinChatRoom(String user, String roomAddress) { + chatRooms.forEach((k, v) -> { + if (v.getRoomAddress().equals(roomAddress)) { + joinChatRoom(user, k, true); + return; + } + }); + return false; + } + public boolean joinChatRoom(String user, int roomId, boolean resendList) { + + if (user.contains(" ")) + user = user.split(" ")[0]; + + ChatRoom room = getChatRoom(roomId); + if (room == null) + return false; + if (!room.hasUser(user.toLowerCase())) { + + if (!room.isVisible() || resendList) { + CreatureObject creo = (CreatureObject) getObjectByFirstName(user); + if (creo != null) { + ChatRoomList listMessage = new ChatRoomList(room); + creo.getClient().getSession().write(listMessage.serialize()); + } + } + ChatOnEnteredRoom enter = new ChatOnEnteredRoom(user, 0, room.getRoomId(), true); + SWGObject player = getObjectByFirstName(user); + + if (player == null || player.getClient() == null || player.getClient().getSession() == null) + return false; + + player.getClient().getSession().write(enter.serialize()); + + for (String roomUser : room.getUserList()) { + SWGObject roomPlayer = getObjectByFirstName(roomUser); + + if (roomPlayer != null && roomPlayer.getClient() != null && roomPlayer.getClient().getSession() != null) + roomPlayer.getClient().getSession().write(enter.serialize()); + } + + room.addUser(user.toLowerCase()); + return true; + } + return false; + } + + public boolean joinChatRoom(String user, int roomId) { + return joinChatRoom(user, roomId, false); + } + + public void leaveChatRoom(CreatureObject player, int roomId) { + + ChatRoom room = getChatRoom(roomId); + if (room == null) + return; + + String playerName = player.getCustomName().toLowerCase(); + + if (playerName.contains(" ")) + playerName = playerName.split(" ")[0]; + + ChatOnEnteredRoom leaveRoom = new ChatOnEnteredRoom(playerName, 0, roomId, false); + player.getClient().getSession().write(leaveRoom.serialize()); + + room.getUserList().remove(playerName); + + room.getUserList().forEach(user -> { + SWGObject roomPlayer = getObjectByFirstName(user); + + if (roomPlayer != null && roomPlayer.getClient() != null && roomPlayer.getClient().getSession() != null) { + roomPlayer.getClient().getSession().write(leaveRoom.serialize()); + } + }); + + ((PlayerObject) player.getSlottedObject("ghost")).removeChannel(roomId); + } + + public void sendChatRoomMessage(CreatureObject sender, int roomId, int msgId, String message) { + ChatRoom room = getChatRoom(roomId); + + if (room == null) + return; + + String senderName = sender.getCustomName(); + + if (senderName.contains(" ")) + senderName = senderName.split(" ")[0]; + + ChatOnSendRoomMessage onSend = new ChatOnSendRoomMessage(0, msgId); + sender.getClient().getSession().write(onSend.serialize()); + + ChatRoomMessage roomMessage = new ChatRoomMessage(roomId, senderName, message); + Vector users = room.getUserList(); + users.forEach(user -> { + SWGObject player = getObjectByFirstName(user); + if (player != null && player.getClient() != null && player.getClient().getSession() != null) { + player.getClient().getSession().write(roomMessage.serialize()); + } + }); + } + + public void handleGroupChat(SWGObject sender, String message) { + + } + + public ConcurrentHashMap getChatRooms() { + return chatRooms; + } + + /* + * Language interpretation. + * Converts messages into a language if the receiver can't comprehend it + */ + public String interpret(String message, int languageId, CreatureObject receiver) { + try { + DatatableVisitor visitor = ClientFileManager.loadFile("datatables/game_language/game_language.iff", DatatableVisitor.class); + + if (visitor.getObject(0, 0) == null) { + return message; + } + + String comprehendSkillMod = (String) visitor.getObject(languageId, 1); + + if (receiver.getSkillModBase(comprehendSkillMod) > 0) { + return message; + } + + for (int l = 3; l < 29; l++) { + String letter = ((String) visitor.getObject(0, l)); + String replacement = ((String) visitor.getObject(languageId, l)); + + if (replacement.length() > 0) { + message = message.replace(letter, replacement); + } + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + + return message; + } + } diff --git a/src/services/collections/CollectionService.java b/src/services/collections/CollectionService.java index 809687f0..4342ff12 100644 --- a/src/services/collections/CollectionService.java +++ b/src/services/collections/CollectionService.java @@ -30,11 +30,11 @@ import org.python.core.Py; import org.python.core.PyObject; import resources.common.FileUtilities; +import resources.common.OutOfBand; +import resources.datatables.DisplayType; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; - import main.NGECore; - import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.DatatableVisitor; import engine.resources.scene.Point3D; @@ -71,7 +71,7 @@ public class CollectionService implements INetworkDispatch { } } - /* + /** * @see datatables/collection/collections.iff * * Count and exploration count badges are added automatically. @@ -185,17 +185,17 @@ public class CollectionService implements INetworkDispatch { ((String) collectionTable.getObject(c, 32)) }; - if (bookName == "") { + if (bookName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book"); throw new Exception(); } - if (pageName == "") { + if (pageName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page"); throw new Exception(); } - if (collectionName == "") { + if (collectionName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection"); throw new Exception(); } @@ -222,11 +222,8 @@ public class CollectionService implements INetworkDispatch { BitSet bitValue = new BitSet(64); bitValue.set(64-bits, 64); - BitSet maxValue = new BitSet(64); - maxValue.set(64-maxSlotValue, 64); - - if (bitValue.toLongArray()[0] < maxValue.toLongArray()[0]) { - System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxValue.toLongArray()[0]); + if (bitValue.toLongArray()[0] < maxSlotValue) { + System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxSlotValue); throw new Exception(); } } @@ -289,18 +286,24 @@ public class CollectionService implements INetworkDispatch { } } else { if (numAltTitles > 0 || alternateTitles.length > 0) { - System.out.println(slotName + ": slot " + slotName + " cannot have any alternative titles unless it is defined as \"titleable\""); + //System.out.println(slotName + ": slot " + slotName + " cannot have any alternative titles unless it is defined as \"titleable\""); } } - if (bits > 1) { + if (maxSlotValue > -1) { + BitSet value = BitSet.valueOf(new long[] { collections.get(beginSlotId, (endSlotId + 1)).toLongArray()[0]++ }); + + for (int i = beginSlotId; i <= endSlotId; i++) { + collections.set(i, value.get((i - beginSlotId))); + } + } else if (bits > 1) { int nextBit = collections.get(beginSlotId, (endSlotId + 1)).previousClearBit(endSlotId); if (nextBit == -1) { return false; } - collections.set((beginSlotId + nextBit)); + collections.set(nextBit); } else { collections.set(beginSlotId); } @@ -308,7 +311,7 @@ public class CollectionService implements INetworkDispatch { player.setCollections(collections.toByteArray()); if (!hidden && !noMessage) { - creature.sendSystemMessage("collection_n", collection, 0, 0); + creature.sendSystemMessage(OutOfBand.ProsePackage("@collection_n:" + collection), DisplayType.Broadcast); } if (!music.equals("")) { @@ -359,7 +362,7 @@ public class CollectionService implements INetworkDispatch { } if (trackServerFirst) { - if (core.guildService.getGuildObject().addServerFirst(collectionName, new ServerFirst(creature.getCustomName(), System.currentTimeMillis()))) { + if (core.guildService.getGuildObject().addServerFirst(collectionName, new ServerFirst(creature.getCustomName(), creature.getObjectId(), collectionName, System.currentTimeMillis()))) { addCollection(creature, "bdg_server_first_01"); } } @@ -417,7 +420,7 @@ public class CollectionService implements INetworkDispatch { return false; } - /* + /** * @param creature The player's CreatureObject instance. * @param collection slotName or collectionName from collection.iff. * @@ -439,8 +442,6 @@ public class CollectionService implements INetworkDispatch { String bookName = ""; String pageName = ""; String collectionName = ""; - boolean found = false; - boolean collectionComplete = false; collections = BitSet.valueOf(player.getCollections()); @@ -461,36 +462,31 @@ public class CollectionService implements INetworkDispatch { if (slotName.equals(collection)) { int beginSlotId = ((Integer) collectionTable.getObject(c, 4)); - if (bookName == "") { + if (bookName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book"); throw new Exception(); } - if (pageName == "") { + if (pageName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page"); throw new Exception(); } - if (collectionName == "") { + if (collectionName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection"); throw new Exception(); } - if (collection == bookName) { + if (collection.equals(bookName)) { System.out.println("Checking if a book is complete is unsupported at this time."); throw new Exception(); - } else if (collection == pageName) { + } else if (collection.equals(pageName)) { System.out.println("Checking if a page is complete is unsupported at this time."); throw new Exception(); - } else if (collection == collectionName) { - collectionComplete = collections.get(beginSlotId); - found = true; - } else if (collection == slotName) { + } else if (collection.equals(collectionName)) { + return collections.get(beginSlotId); + } else if (collection.equals(slotName)) { return collections.get(beginSlotId); - } - - if (found && collectionName != collection) { - return collectionComplete; } } } @@ -503,7 +499,7 @@ public class CollectionService implements INetworkDispatch { return false; } - /* + /** * Returns number of completed bits in a slot or the number of completed * slots in a collection, page or book. * @@ -551,34 +547,34 @@ public class CollectionService implements INetworkDispatch { int maxSlotValue = ((Integer) collectionTable.getObject(c, 6)); int bits = 0; - if (bookName == "") { + if (bookName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book"); throw new Exception(); } - if (pageName == "") { + if (pageName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page"); throw new Exception(); } - if (collectionName == "") { + if (collectionName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection"); throw new Exception(); } - if (collection == bookName) { + if (collection.equals(bookName)) { found += getCollection(creature, pageName); continue; - } else if (collection == pageName) { + } else if (collection.equals(pageName)) { found += getCollection(creature, collectionName); continue; - } else if (collection == collectionName) { + } else if (collection.equals(collectionName)) { if (collections.get(beginSlotId)) { found++; } continue; - } else if (collection == slotName) { + } else if (collection.equals(slotName)) { if (endSlotId != -1) { if (beginSlotId >= endSlotId) { System.out.println(slotName + ", row " + c + ": begin slot id " + beginSlotId + " must be < end slot id" + endSlotId); @@ -601,14 +597,15 @@ public class CollectionService implements INetworkDispatch { BitSet bitValue = new BitSet(64); bitValue.set(64-bits, 64); - BitSet maxValue = new BitSet(64); - maxValue.set(64-maxSlotValue, 64); - - if (bitValue.toLongArray()[0] < maxValue.toLongArray()[0]) { - System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxValue.toLongArray()[0]); + if (bitValue.toLongArray()[0] < maxSlotValue) { + System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxSlotValue); throw new Exception(); } - + } + + if (maxSlotValue > 0) { + return (int) collections.get(beginSlotId, (endSlotId + 1)).toLongArray()[0]; + } else { return collections.get(beginSlotId, (endSlotId + 1)).cardinality(); } } else { @@ -629,7 +626,8 @@ public class CollectionService implements INetworkDispatch { return 0; } - /* + + /** * Registers an exploration badge location. * * @param planet Name from Planet.getName(). @@ -646,7 +644,7 @@ public class CollectionService implements INetworkDispatch { explorationLocations.get(planet).put(badgeName, new ExplorationRegion(new Point3D(x, 0, z), range)); } - /* + /** * Checks if the player is in range of any exploration regions * and grants any ungranted badges. * @@ -666,7 +664,7 @@ public class CollectionService implements INetworkDispatch { } } - /* + /** * Clears the specified slot, collection, page or book. * * @param creature The player's CreatureObject instance. @@ -711,23 +709,23 @@ public class CollectionService implements INetworkDispatch { int beginSlotId = ((Integer) collectionTable.getObject(c, 4)); int endSlotId = ((Integer) collectionTable.getObject(c, 5)); - if (bookName == "") { + if (bookName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book"); throw new Exception(); } - if (pageName == "") { + if (pageName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page"); throw new Exception(); } - if (collectionName == "") { + if (collectionName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection"); throw new Exception(); } - if (collection == bookName || collection == pageName || - collection == collectionName || collection == slotName) { + if (collection.equals(bookName) || collection.equals(pageName) || + collection.equals(collectionName) || collection.equals(slotName)) { found = true; if (collections.get(beginSlotId, endSlotId + 1).cardinality() > 0) { @@ -755,7 +753,7 @@ public class CollectionService implements INetworkDispatch { return false; } - /* + /** * Clears all collections. * * This must cycle through all the collections because @@ -800,17 +798,17 @@ public class CollectionService implements INetworkDispatch { int beginSlotId = ((Integer) collectionTable.getObject(c, 4)); int endSlotId = ((Integer) collectionTable.getObject(c, 5)); - if (bookName == "") { + if (bookName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book"); throw new Exception(); } - if (pageName == "") { + if (pageName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page"); throw new Exception(); } - if (collectionName == "") { + if (collectionName.equals("")) { System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection"); throw new Exception(); } diff --git a/src/services/collections/ServerFirst.java b/src/services/collections/ServerFirst.java index 1a955ed2..2b855fb4 100644 --- a/src/services/collections/ServerFirst.java +++ b/src/services/collections/ServerFirst.java @@ -21,6 +21,8 @@ ******************************************************************************/ package services.collections; +import org.apache.mina.core.buffer.IoBuffer; + import resources.objects.Delta; import com.sleepycat.persist.model.Persistent; @@ -29,11 +31,15 @@ import com.sleepycat.persist.model.Persistent; public class ServerFirst extends Delta { private String name; + private String collection; private long time; + private long objectId; - public ServerFirst(String name, long time) { + public ServerFirst(String name, long objectId, String collection, long time) { this.name = name; + this.objectId = objectId; this.time = time; + this.collection = collection; } public ServerFirst() { @@ -48,9 +54,24 @@ public class ServerFirst extends Delta { return time; } + public long getObjectId() { + return objectId; + } + + public String getCollection() { + return collection; + } + @Override public byte[] getBytes() { - return new byte[] { }; + synchronized(objectMutex) { + IoBuffer buffer = createBuffer(18 + collection.length() + (name.length() * 2)); + buffer.putInt((int) time / 1000); + buffer.put(getAsciiString(collection)); + buffer.putLong(objectId); + buffer.put(getUnicodeString(name)); + return buffer.array(); + } } } diff --git a/src/services/combat/CombatCommands.java b/src/services/combat/CombatCommands.java index d6cb5b25..dcdc875d 100644 --- a/src/services/combat/CombatCommands.java +++ b/src/services/combat/CombatCommands.java @@ -29,6 +29,8 @@ public class CombatCommands { // Auto Attacks + core.commandService.registerCombatCommand("creatureRangedAttack"); + core.commandService.registerCombatCommand("creatureMeleeAttack").setDefaultAnimations(new String[] { "creature_attack_light" }); core.commandService.registerCombatCommand("rangedshotrifle"); core.commandService.registerCombatCommand("rangedshotpistol"); core.commandService.registerCombatCommand("rangedshotlightrifle"); @@ -130,6 +132,7 @@ public class CombatCommands { core.commandService.registerCombatCommand("bh_sh_1"); core.commandService.registerCombatCommand("bh_sh_2"); core.commandService.registerCombatCommand("bh_sh_3"); + core.commandService.registerCommand("bh_shields_1"); // Jedi diff --git a/src/services/combat/CombatEvents.java b/src/services/combat/CombatEvents.java index f41a0098..3dc20ee0 100644 --- a/src/services/combat/CombatEvents.java +++ b/src/services/combat/CombatEvents.java @@ -29,6 +29,7 @@ public class CombatEvents implements Event { public class DamageTaken implements Event { public CreatureObject attacker; + public int damage; } diff --git a/src/services/combat/CombatService.java b/src/services/combat/CombatService.java index 9e4d2ba2..8e85c53e 100644 --- a/src/services/combat/CombatService.java +++ b/src/services/combat/CombatService.java @@ -21,6 +21,7 @@ ******************************************************************************/ package services.combat; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Random; @@ -35,12 +36,15 @@ import org.apache.mina.core.session.IoSession; import protocol.swg.ObjControllerMessage; import protocol.swg.PlayClientEffectLocMessage; -import protocol.swg.UpdatePVPStatusMessage; import protocol.swg.objectControllerObjects.CombatAction; import protocol.swg.objectControllerObjects.CombatSpam; import protocol.swg.objectControllerObjects.CommandEnqueueRemove; import protocol.swg.objectControllerObjects.StartTask; import resources.common.FileUtilities; +import resources.datatables.Options; +import resources.datatables.Elemental; +import resources.datatables.Posture; +import resources.datatables.WeaponType; import resources.objects.Buff; import resources.objects.DamageOverTime; import resources.objects.creature.CreatureObject; @@ -48,6 +52,7 @@ import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import resources.objects.waypoint.WaypointObject; import resources.objects.weapon.WeaponObject; +import services.ai.AIActor; import services.combat.CombatEvents.DamageTaken; import services.command.CombatCommand; import services.sui.SUIService.MessageBoxType; @@ -66,7 +71,7 @@ public class CombatService implements INetworkDispatch { private NGECore core; private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); private CombatEvents events = new CombatEvents(); - + public CombatService(NGECore core) { this.core = core; CombatCommands.registerCommands(core); @@ -84,6 +89,8 @@ public class CombatService implements INetworkDispatch { } public void doCombat(final CreatureObject attacker, final TangibleObject target, final WeaponObject weapon, final CombatCommand command, final int actionCounter) { + + if(target instanceof CreatureObject) if(((CreatureObject) target).getPosture() == Posture.Incapacitated || ((CreatureObject) target).getPosture() == Posture.Dead) return; boolean success = true; @@ -177,8 +184,28 @@ public class CombatService implements INetworkDispatch { } - //core.buffService.addBuffToCreature(attacker, command.getBuffNameSelf()); - + if(target instanceof CreatureObject) + { + CreatureObject creature = (CreatureObject)target; + if(creature.getPosture() == Posture.Incapacitated || creature.getPosture() == Posture.Dead) + { + for (TangibleObject defender : new ArrayList(creature.getDefendersList())) + { + defender.removeDefender(creature); + creature.removeDefender(defender); + } + + if(((CreatureObject) target).getPlayerObject() == null) target.setKiller(attacker); + } + } + else if(target instanceof TangibleObject) + { + if(target.getConditionDamage() == target.getMaxDamage()) + { + for(TangibleObject defender : target.getDefendersList()) defender.removeDefender(target); + core.objectService.destroyObject(target); + } + } } private void doAreaCombat(CreatureObject attacker, TangibleObject target, WeaponObject weapon, CombatCommand command, int actionCounter) { @@ -249,14 +276,20 @@ public class CombatService implements INetworkDispatch { sendCombatPackets(attacker, target, weapon, command, actionCounter, damage, 0, HitType.HIT); if(FileUtilities.doesFileExist("scripts/commands/combat/" + command.getCommandName() + ".py")) - core.scriptService.callScript("scripts/commands/combat/", command.getCommandName(), "run", core, attacker, target, null); + core.scriptService.callScript("scripts/commands/combat/", command.getCommandName(), "run", core, attacker, target, damage); } private void applyDamage(CreatureObject attacker, TangibleObject target, int damage) { target.setConditionDamage(target.getConditionDamage() + damage); + + if (target.getOption(Options.MOUNT)) { + core.mountService.damage((CreatureObject) target); + } + DamageTaken event = events.new DamageTaken(); event.attacker = attacker; + event.damage = damage; target.getEventBus().publish(event); } @@ -356,21 +389,21 @@ public class CombatService implements INetworkDispatch { sendCombatPackets(attacker, target, weapon, command, actionCounter, damage, armorAbsorbed, hitType); if(hitType != HitType.MISS && hitType != HitType.DODGE && hitType != HitType.PARRY && command.getBuffNameTarget().length() > 0) { - core.buffService.addBuffToCreature(target, command.getBuffNameTarget()); + core.buffService.addBuffToCreature(target, command.getBuffNameTarget(), attacker); } if(command.getDotIntensity() > 0) { addDotToCreature(attacker, target, command, target.getBuffByName(command.getBuffNameTarget())); } if(FileUtilities.doesFileExist("scripts/commands/combat/" + command.getCommandName() + ".py")) - core.scriptService.callScript("scripts/commands/combat/", command.getCommandName(), "run", core, attacker, target, null); + core.scriptService.callScript("scripts/commands/combat/", command.getCommandName(), "run", core, attacker, target, damage); return; } if(command.getAddedDamage() == 0 && command.getPercentFromWeapon() == 0 && command.getBuffNameTarget().length() > 0) - core.buffService.addBuffToCreature(target, command.getBuffNameTarget()); + core.buffService.addBuffToCreature(target, command.getBuffNameTarget(), attacker); sendCombatPackets(attacker, target, weapon, command, actionCounter, damage, 0, HitType.HIT); @@ -379,23 +412,25 @@ public class CombatService implements INetworkDispatch { private void sendCombatPackets(CreatureObject attacker, TangibleObject target, WeaponObject weapon, CombatCommand command, int actionCounter, float damage, int armorAbsorbed, int hitType) { String animationStr = command.getRandomAnimation(weapon); - CombatAction combatAction = new CombatAction(CRC.StringtoCRC(animationStr), attacker.getObjectID(), weapon.getObjectID(), target.getObjectID(), command.getCommandCRC()); ObjControllerMessage objController = new ObjControllerMessage(0x1B, combatAction); attacker.notifyObserversInRange(objController, true, 125); - - StartTask startTask = new StartTask(actionCounter, attacker.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), command.getCooldown()); - ObjControllerMessage objController2 = new ObjControllerMessage(0x0B, startTask); - attacker.getClient().getSession().write(objController2.serialize()); - - CommandEnqueueRemove commandRemove = new CommandEnqueueRemove(attacker.getObjectID(), actionCounter); - ObjControllerMessage objController3 = new ObjControllerMessage(0x0B, commandRemove); - attacker.getClient().getSession().write(objController3.serialize()); - CombatSpam combatSpam = new CombatSpam(attacker.getObjectID(), target.getObjectID(), weapon.getObjectID(), (int) damage, armorAbsorbed, hitType); ObjControllerMessage objController4 = new ObjControllerMessage(0x1B, combatSpam); IoBuffer spam = objController4.serialize(); - attacker.getClient().getSession().write(spam); + + if(attacker.getClient() != null) { + + StartTask startTask = new StartTask(actionCounter, attacker.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), command.getCooldown()); + ObjControllerMessage objController2 = new ObjControllerMessage(0x0B, startTask); + attacker.getClient().getSession().write(objController2.serialize()); + + CommandEnqueueRemove commandRemove = new CommandEnqueueRemove(attacker.getObjectID(), actionCounter); + ObjControllerMessage objController3 = new ObjControllerMessage(0x0B, commandRemove); + attacker.getClient().getSession().write(objController3.serialize()); + attacker.getClient().getSession().write(spam); + + } if(target.getClient() != null) target.getClient().getSession().write(spam); @@ -409,62 +444,49 @@ public class CombatService implements INetworkDispatch { ObjControllerMessage objController = new ObjControllerMessage(0x1B, combatAction); attacker.notifyObserversInRange(objController, true, 125); - StartTask startTask = new StartTask(actionCounter, attacker.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), command.getCooldown()); - ObjControllerMessage objController2 = new ObjControllerMessage(0x0B, startTask); - attacker.getClient().getSession().write(objController2.serialize()); - - CommandEnqueueRemove commandRemove = new CommandEnqueueRemove(attacker.getObjectID(), actionCounter); - ObjControllerMessage objController3 = new ObjControllerMessage(0x0B, commandRemove); - attacker.getClient().getSession().write(objController3.serialize()); + if(attacker.getClient() != null) { + StartTask startTask = new StartTask(actionCounter, attacker.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), command.getCooldown()); + ObjControllerMessage objController2 = new ObjControllerMessage(0x0B, startTask); + attacker.getClient().getSession().write(objController2.serialize()); + + CommandEnqueueRemove commandRemove = new CommandEnqueueRemove(attacker.getObjectID(), actionCounter); + ObjControllerMessage objController3 = new ObjControllerMessage(0x0B, commandRemove); + attacker.getClient().getSession().write(objController3.serialize()); + } } private float getArmorReduction(CreatureObject attacker, CreatureObject target, WeaponObject weapon, CombatCommand command, byte hitType) { - int elementalType = 1; + String elementalName = ""; if(command.getPercentFromWeapon() > 0) { // TODO: elemental mitigation and damage + + elementalName = weapon.getDamageType(); - if(weapon.getStringAttribute("cat_wpn_damage.wpn_damage_type").equals("@obj_attr_n:armor_eff_kinetic")) - elementalType = ElementalType.KINETIC; - else if(weapon.getStringAttribute("cat_wpn_damage.wpn_damage_type").equals("@obj_attr_n:armor_eff_energy")) - elementalType = ElementalType.ENERGY; - } else { - elementalType = command.getElementalType(); + elementalName = Elemental.getElementalName(command.getElementalType()); } int baseArmor = 0; - switch(elementalType) { - - case ElementalType.KINETIC: - baseArmor = target.getSkillModBase("kinetic"); - case ElementalType.ENERGY: - baseArmor = target.getSkillModBase("energy"); - case ElementalType.HEAT: - baseArmor = target.getSkillModBase("heat"); - case ElementalType.COLD: - baseArmor = target.getSkillModBase("cold"); - case ElementalType.ACID: - baseArmor = target.getSkillModBase("acid"); - case ElementalType.ELECTRICITY: - baseArmor = target.getSkillModBase("electricity"); - - } + baseArmor = target.getSkillModBase(elementalName); if(target.getSkillMod("expertise_innate_reduction_all_player") != null) - baseArmor *= (100 - target.getSkillMod("expertise_innate_reduction_all_player").getBase()) / 100; + baseArmor *= (100 - target.getSkillModBase("expertise_innate_reduction_all_player")) / 100; - float mitigation = (float) (90 * (1 - Math.exp(-0.000125 * baseArmor)) + baseArmor / 9000); + if(command.getBypassArmor() > 0) + baseArmor *= (100 - command.getBypassArmor()) / 100; + float mitigation = (float) (90 * (1 - Math.exp(-0.000125 * baseArmor))) + baseArmor / 9000; + if(hitType == HitType.STRIKETHROUGH) { - float stMaxValue = attacker.getSkillMod("combat_strikethrough_value").getBase() / 2 + attacker.getLuck() / 10; + float stMaxValue = attacker.getSkillModBase("combat_strikethrough_value") / 2 + attacker.getLuck() / 10; if(stMaxValue > 99) stMaxValue = 99; float stMinValue = stMaxValue / 2; @@ -474,7 +496,7 @@ public class CombatService implements INetworkDispatch { stValue = 1 - stValue; mitigation *= stValue; } - + return mitigation / 100; } @@ -490,8 +512,18 @@ public class CombatService implements INetworkDispatch { if(!target.isAttackableBy(attacker)) return false; - target.addDefender(attacker); - attacker.addDefender(target); + if(target.getAttachment("AI") instanceof AIActor && attacker instanceof CreatureObject) { + ((AIActor) target.getAttachment("AI")).addDefender((CreatureObject) attacker); + } else { + target.addDefender(attacker); + } + if(attacker.getAttachment("AI") instanceof AIActor && target instanceof CreatureObject) { + ((AIActor) attacker.getAttachment("AI")).addDefender((CreatureObject) target); + } else { + attacker.addDefender(target); // See below comment + } + + //attacker.addDefender(target); // Why do we need to add target to defender list twice? return true; @@ -535,7 +567,7 @@ public class CombatService implements INetworkDispatch { float rawDamage = command.getAddedDamage(); - if(command.getPercentFromWeapon() > 0 && weapon != attacker.getSlottedObject("default_weapon")) { + if(command.getPercentFromWeapon() > 0) { float weaponMinDmg = weapon.getMinDamage(); float weaponMaxDmg = weapon.getMaxDamage(); @@ -564,23 +596,6 @@ public class CombatService implements INetworkDispatch { } - } else if(command.getPercentFromWeapon() > 0) { - - float weaponMinDmg = 50; - float weaponMaxDmg = 100; - - float weaponDmg = new Random().nextInt((int) (weaponMaxDmg - weaponMinDmg + 1)) + weaponMinDmg; - weaponDmg *= command.getPercentFromWeapon(); - rawDamage += weaponDmg; - - if(weapon.isMelee()) { - - if(attacker.getStrength() > 0) { - rawDamage += ((attacker.getStrength() / 100) * 33); - } - - } - } rawDamage *= getWeaponDamageIncrease(attacker, weapon); @@ -631,23 +646,6 @@ public class CombatService implements INetworkDispatch { } - } else if(command.getPercentFromWeapon() > 0) { - - float weaponMinDmg = 50; - float weaponMaxDmg = 100; - - float weaponDmg = new Random().nextInt((int) (weaponMaxDmg - weaponMinDmg + 1)) + weaponMinDmg; - weaponDmg *= command.getPercentFromWeapon(); - rawDamage += weaponDmg; - - if(weapon.isMelee()) { - - if(attacker.getStrength() > 0) { - rawDamage += ((attacker.getStrength() / 100) * 33); - } - - } - } return rawDamage; @@ -709,9 +707,12 @@ public class CombatService implements INetworkDispatch { critChance += ((float) target.getSkillModBase("critical_hit_vulnerable") / 100); - if(target.isPlayer()) - critChance += attacker.getSkillModBase("expertise_critical_niche_pvp"); - critChance -= ((float) target.getSkillModBase("display_only_expertise_critical_hit_pvp_reduction") / 100); + if(target.getSlottedObject("ghost") != null) + if(target.isPlayer()) { + critChance += attacker.getSkillModBase("expertise_critical_niche_pvp"); + critChance -= ((float) target.getSkillModBase("display_only_expertise_critical_hit_pvp_reduction") / 100); + } + r = random.nextFloat(); @@ -761,7 +762,7 @@ public class CombatService implements INetworkDispatch { public void applyDamage(CreatureObject attacker, final CreatureObject target, int damage) { - if(target.getHealth() - damage <= 0) { + if(target.getHealth() - damage <= 0 && target.getSlottedObject("ghost") != null) { if(target.hasBuff("incapWeaken")) { deathblowPlayer(attacker, target); @@ -774,37 +775,50 @@ public class CombatService implements INetworkDispatch { target.setTurnRadius(0); target.setSpeedMultiplierBase(0); } - ScheduledFuture incapTask = scheduler.schedule(new Runnable() { - - @Override - public void run() { - - synchronized(target.getMutex()) { - - if(target.getPosture() != 13) - return; - - target.setPosture((byte) 0); - target.setTurnRadius(1); - target.setSpeedMultiplierBase(1); - - } - - } + ScheduledFuture incapTask = scheduler.schedule(() -> { + synchronized(target.getMutex()) { + + if(target.getPosture() != 13) + return; + + target.setPosture((byte) 0); + target.setTurnRadius(1); + target.setSpeedMultiplierBase(1); + + } + }, target.getIncapTimer(), TimeUnit.SECONDS); target.setIncapTask(incapTask); - core.buffService.addBuffToCreature(target, "incapWeaken"); + core.buffService.addBuffToCreature(target, "incapWeaken", target); if(target.getSlottedObject("ghost") != null) attacker.sendSystemMessage("You incapacitate " + target.getCustomName() + ".", (byte) 0); return; + } else if(target.getHealth() - damage <= 0 && target.getAttachment("AI") != null) { + synchronized(target.getMutex()) { + target.setHealth(0); + target.setPosture((byte) 14); + } + attacker.removeDefender(target); + target.removeDefender(attacker); + return; } synchronized(target.getMutex()) { target.setHealth(target.getHealth() - damage); } - + DamageTaken event = events.new DamageTaken(); + event.attacker = attacker; + event.damage = damage; + target.getEventBus().publish(event); } + public void doDrainHeal(CreatureObject receiver, int drainAmount) { + synchronized(receiver.getMutex()) { + receiver.setHealth(receiver.getHealth() + drainAmount); + } + + } + private boolean isInConeAngle(CreatureObject attacker, SWGObject target, int coneLength, int coneWidth, float directionX, float directionZ) { float radius = coneWidth / 2; @@ -823,13 +837,25 @@ public class CombatService implements INetworkDispatch { return true; - } + } public boolean attemptHeal(CreatureObject healer, CreatureObject target) { if(healer == target) return true; + PlayerObject healerPo = (PlayerObject) healer.getSlottedObject("ghost"); + + if (healerPo != null && !healerPo.getProfession().startsWith("medic")) { + return false; + } + + if (areInDuel(healer, target)) { + return false; + } + + if(target.getAttachment("AI") != null) return false; + if(healer.getFaction().equals(target.getFaction())) { if(healer.getFactionStatus() < target.getFactionStatus()) @@ -952,9 +978,12 @@ public class CombatService implements INetworkDispatch { target.sendSystemMessage("@base_player:victim_dead", (byte) 0); attacker.removeDefender(target); target.removeDefender(attacker); + target.setSpeedMultiplierBase(0); + target.setTurnRadius(0); + + if(target.getDuelList().contains(attacker)) handleEndDuel(target, attacker, false); core.playerService.sendCloningWindow(target, attacker.getSlottedObject("ghost") != null); - } public boolean areInDuel(CreatureObject creature1, CreatureObject creature2) { @@ -963,7 +992,6 @@ public class CombatService implements INetworkDispatch { return true; return false; - } public void handleDuel(CreatureObject requester, CreatureObject target) { @@ -980,15 +1008,15 @@ public class CombatService implements INetworkDispatch { requester.getDuelList().add(target); requester.sendSystemMessage("You accept " + target.getCustomName() + "'s challenge.", (byte) 0); target.sendSystemMessage(requester.getCustomName() + " accepts your challenge.", (byte) 0); - target.getClient().getSession().write(new UpdatePVPStatusMessage(requester.getObjectID(), 55, requester.getFaction()).serialize()); - requester.getClient().getSession().write(new UpdatePVPStatusMessage(target.getObjectID(), 55, target.getFaction()).serialize()); + target.updatePvpStatus(); + requester.updatePvpStatus(); } } - public void handleEndDuel(CreatureObject requester, CreatureObject target) { + public void handleEndDuel(CreatureObject requester, CreatureObject target, boolean announce) { requester.getDuelList().remove(target); target.getDuelList().remove(requester); @@ -996,11 +1024,14 @@ public class CombatService implements INetworkDispatch { target.removeDefender(requester); requester.removeDefender(target); - target.getClient().getSession().write(new UpdatePVPStatusMessage(requester.getObjectID(), 0x16, requester.getFaction()).serialize()); - requester.getClient().getSession().write(new UpdatePVPStatusMessage(target.getObjectID(), 0x16, target.getFaction()).serialize()); + target.updatePvpStatus(); + requester.updatePvpStatus(); - requester.sendSystemMessage("You end your duel with " + target.getCustomName() + ".", (byte) 0); - target.sendSystemMessage(requester.getCustomName() + " ends your duel.", (byte) 0); + if(announce) + { + requester.sendSystemMessage("You end your duel with " + target.getCustomName() + ".", (byte) 0); + target.sendSystemMessage(requester.getCustomName() + " ends your duel.", (byte) 0); + } } @@ -1012,7 +1043,7 @@ public class CombatService implements INetworkDispatch { success = false; if((command.getAttackType() == 0 || command.getAttackType() == 1 || command.getAttackType() == 3) && !attemptHeal(medic, target)) - target = medic; + success = false; if(!success) { IoSession session = medic.getClient().getSession(); @@ -1028,8 +1059,7 @@ public class CombatService implements INetworkDispatch { else if(command.getAttackType() == 0 || command.getAttackType() == 2 || command.getAttackType() == 3) doAreaRevive(medic, target, weapon, command, actionCounter); - sendHealPackets(medic, target, weapon, command, actionCounter); - + //sendHealPackets(medic, target, weapon, command, actionCounter); // Is there a reason this is here (combat log...?) - it causes a player to come back from the dead die again. } private void doSingleTargetRevive(CreatureObject medic, CreatureObject target, WeaponObject weapon, CombatCommand command, int actionCounter) { @@ -1203,7 +1233,10 @@ public class CombatService implements INetworkDispatch { return; } - core.buffService.addBuffToCreature(creature, command.getBuffNameSelf()); + if (creature.hasBuff("co_position_secured")) + core.buffService.removeBuffFromCreatureByName(creature, "co_position_secured"); + else + core.buffService.addBuffToCreature(creature, command.getBuffNameSelf(), creature); StartTask startTask = new StartTask(actionCounter, creature.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), command.getCooldown()); ObjControllerMessage objController2 = new ObjControllerMessage(0x0B, startTask); @@ -1286,24 +1319,10 @@ public class CombatService implements INetworkDispatch { int weaponType = weapon.getWeaponType(); int actionReduction; - switch(weaponType) { - - case 0: actionReduction = attacker.getSkillModBase("expertise_action_weapon_0"); - case 1: actionReduction = attacker.getSkillModBase("expertise_action_weapon_1"); - case 2: actionReduction = attacker.getSkillModBase("expertise_action_weapon_2"); - case 4: actionReduction = attacker.getSkillModBase("expertise_action_weapon_4"); - case 5: actionReduction = attacker.getSkillModBase("expertise_action_weapon_5"); - case 6: actionReduction = attacker.getSkillModBase("expertise_action_weapon_6"); - case 7: actionReduction = attacker.getSkillModBase("expertise_action_weapon_7"); - case 8: actionReduction = attacker.getSkillModBase("expertise_action_weapon_8"); - case 9: actionReduction = attacker.getSkillModBase("expertise_action_weapon_9"); - case 10: actionReduction = attacker.getSkillModBase("expertise_action_weapon_10"); - case 11: actionReduction = attacker.getSkillModBase("expertise_action_weapon_11"); - case 12: actionReduction = attacker.getSkillModBase("expertise_action_weapon_3"); - - default: actionReduction = 0; - - } + if(weaponType == WeaponType.HEAVYWEAPON || weaponType == WeaponType.FLAMETHROWER) + actionReduction = attacker.getSkillModBase("expertise_action_weapon_3"); + else + actionReduction = attacker.getSkillModBase("expertise_action_weapon_" + Integer.toString(weaponType)); actionReduction += attacker.getSkillModBase("expertise_action_all"); @@ -1316,24 +1335,16 @@ public class CombatService implements INetworkDispatch { int weaponType = weapon.getWeaponType(); int weaponDmgIncrease; - switch(weaponType) { - - case 0: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_0"); - case 1: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_1"); - case 2: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_2"); - case 4: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_4"); - case 5: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_5"); - case 6: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_6"); - case 7: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_7"); - case 8: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_8"); - case 9: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_9"); - case 10: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_10"); - case 11: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_11"); - case 12: weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_3"); - - default: weaponDmgIncrease = 0; + if(weaponType == WeaponType.HEAVYWEAPON || weaponType == WeaponType.FLAMETHROWER) + weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_3"); + else + weaponDmgIncrease = attacker.getSkillModBase("expertise_damage_weapon_" + Integer.toString(weaponType)); - } + if(weapon.isRanged()) + weaponDmgIncrease += attacker.getSkillModBase("expertise_damage_ranged"); + + if(weapon.isMelee()) + weaponDmgIncrease += attacker.getSkillModBase("expertise_damage_melee"); weaponDmgIncrease += attacker.getSkillModBase("expertise_damage_all"); @@ -1342,6 +1353,13 @@ public class CombatService implements INetworkDispatch { } + public void endCombat(CreatureObject defender) { + Vector defenderList = new Vector(defender.getDefendersList()); + if (defenderList.size() > 0) { + defenderList.stream().forEach(attacker -> defender.removeDefender(attacker)); + } + } + public enum HitType{; public static final byte MISS = 0; @@ -1370,6 +1388,4 @@ public class CombatService implements INetworkDispatch { } - - } diff --git a/src/services/command/BaseSWGCommand.java b/src/services/command/BaseSWGCommand.java index 2d727994..9c2d639f 100644 --- a/src/services/command/BaseSWGCommand.java +++ b/src/services/command/BaseSWGCommand.java @@ -21,72 +21,341 @@ ******************************************************************************/ package services.command; +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; import engine.resources.common.CRC; +import java.util.ArrayList; +import java.util.List; + public class BaseSWGCommand implements Cloneable { private String commandName; private String clientEffectSelf; private String clientEffectTarget; - private int maxRangeToTarget; private int commandCRC; - private boolean isGmCommand = false; + private String characterAbility; + private int target; + private int targetType; + private boolean callOnTarget = false; + private int commandGroup; + private boolean disabled = true; + private float maxRangeToTarget; + private int godLevel; + private int displayGroup; + private boolean combatCommand = false; + private int validWeapon; + private int invalidWeapon; + private String cooldownGroup; + private float cooldown; + private float executeTime; + private float warmupTime; + //private Long[] invalidLocomotions; // Not tracked anywhere + private Byte[] invalidPostures; + private Long[] invalidStates; public BaseSWGCommand(String commandName) { + commandName.toLowerCase(); setCommandName(commandName); setCommandCRC(CRC.StringtoCRC(commandName)); + + try { + boolean foundCommand = false; + + String[] tableArray = new String[] { + "client_command_table", "client_command_table_ground", "client_command_table_space", + "command_table", "command_table_ground", "command_table_space" }; + + for (int n = 0; n < tableArray.length; n++) { + List invalidStates = new ArrayList(); + List invalidPostures = new ArrayList(); + + DatatableVisitor visitor2 = ClientFileManager.loadFile("datatables/command/" + tableArray[n] + ".iff", DatatableVisitor.class); + + for (int i = 0; i < visitor2.getRowCount(); i++) { + if (visitor2.getObject(i, 0) != null) { + if (((String) visitor2.getObject(i, 0)).equalsIgnoreCase(commandName)) { + int sub = 0; // Subtract due to command table structures being different + + characterAbility = (String) visitor2.getObject(i, 7); + + if (!((Boolean) visitor2.getObject(i, 8-sub))) invalidPostures.add((byte) 0); + if (!((Boolean) visitor2.getObject(i, 9-sub))) invalidPostures.add((byte) 3); + if (!((Boolean) visitor2.getObject(i, 15-sub))) invalidPostures.add((byte) 2); + if (!((Boolean) visitor2.getObject(i, 18-sub))) invalidPostures.add((byte) 5); + if (!((Boolean) visitor2.getObject(i, 20-sub))) invalidPostures.add((byte) 6); + if (!((Boolean) visitor2.getObject(i, 21-sub))) invalidPostures.add((byte) 7); + if (!((Boolean) visitor2.getObject(i, 22-sub))) invalidPostures.add((byte) 8); + if (!((Boolean) visitor2.getObject(i, 23-sub))) invalidPostures.add((byte) 9); + if (!((Boolean) visitor2.getObject(i, 24-sub))) invalidPostures.add((byte) 10); + if (!((Boolean) visitor2.getObject(i, 25-sub))) invalidPostures.add((byte) 11); + if (!((Boolean) visitor2.getObject(i, 26-sub))) invalidPostures.add((byte) 12); + if (!((Boolean) visitor2.getObject(i, 27-sub))) invalidPostures.add((byte) 13); + if (!((Boolean) visitor2.getObject(i, 28-sub))) invalidPostures.add((byte) 14); + if (!((Boolean) visitor2.getObject(i, 29-sub))) invalidPostures.add((byte) 4); + + if (tableArray[n].startsWith("client_") || tableArray[n].startsWith("command_table_")) { + sub += 1; + } + + if (!((Boolean) visitor2.getObject(i, 32-sub))) invalidStates.add(1L); + if (!((Boolean) visitor2.getObject(i, 33-sub))) invalidStates.add(2L); + if (!((Boolean) visitor2.getObject(i, 34-sub))) invalidStates.add(4L); + if (!((Boolean) visitor2.getObject(i, 35-sub))) invalidStates.add(8L); + if (!((Boolean) visitor2.getObject(i, 36-sub))) invalidStates.add(16L); + if (!((Boolean) visitor2.getObject(i, 37-sub))) invalidStates.add(32L); + if (!((Boolean) visitor2.getObject(i, 38-sub))) invalidStates.add(64L); + if (!((Boolean) visitor2.getObject(i, 39-sub))) invalidStates.add(128L); + if (!((Boolean) visitor2.getObject(i, 40-sub))) invalidStates.add(256L); + if (!((Boolean) visitor2.getObject(i, 41-sub))) invalidStates.add(512L); + if (!((Boolean) visitor2.getObject(i, 42-sub))) invalidStates.add(1024L); + if (!((Boolean) visitor2.getObject(i, 43-sub))) invalidStates.add(2048L); + if (!((Boolean) visitor2.getObject(i, 44-sub))) invalidStates.add(4096L); + if (!((Boolean) visitor2.getObject(i, 45-sub))) invalidStates.add(8192L); + if (!((Boolean) visitor2.getObject(i, 46-sub))) invalidStates.add(16384L); + if (!((Boolean) visitor2.getObject(i, 47-sub))) invalidStates.add(32768L); + if (!((Boolean) visitor2.getObject(i, 48-sub))) invalidStates.add(65536L); + if (!((Boolean) visitor2.getObject(i, 49-sub))) invalidStates.add(131072L); + if (!((Boolean) visitor2.getObject(i, 50-sub))) invalidStates.add(262144L); + if (!((Boolean) visitor2.getObject(i, 51-sub))) invalidStates.add(524288L); + if (!((Boolean) visitor2.getObject(i, 52-sub))) invalidStates.add(1048576L); + if (!((Boolean) visitor2.getObject(i, 53-sub))) invalidStates.add(2097152L); + if (!((Boolean) visitor2.getObject(i, 54-sub))) invalidStates.add(4194304L); + if (!((Boolean) visitor2.getObject(i, 55-sub))) invalidStates.add(8388608L); + if (!((Boolean) visitor2.getObject(i, 56-sub))) invalidStates.add(16777216L); + if (!((Boolean) visitor2.getObject(i, 57-sub))) invalidStates.add(33554432L); + if (!((Boolean) visitor2.getObject(i, 58-sub))) invalidStates.add(67108864L); + if (!((Boolean) visitor2.getObject(i, 59-sub))) invalidStates.add(134217728L); + + if (!tableArray[n].equals("client_command_table_space")) { + if (!((Boolean) visitor2.getObject(i, 60-sub))) invalidStates.add(268435456L); + if (!((Boolean) visitor2.getObject(i, 61-sub))) invalidStates.add(536870912L); + if (!((Boolean) visitor2.getObject(i, 62-sub))) invalidStates.add(1073741824L); + if (!((Boolean) visitor2.getObject(i, 63-sub))) invalidStates.add(2147483648L); + if (!((Boolean) visitor2.getObject(i, 64-sub))) invalidStates.add(4294967296L); + } else { + sub += 5; + } + + if (!tableArray[n].startsWith("client_") && !tableArray[n].startsWith("command_table_")) { + if (!((Boolean) visitor2.getObject(i, 65-sub))) invalidStates.add(8589934592L); + if (!((Boolean) visitor2.getObject(i, 66-sub))) invalidStates.add(17179869184L); + if (!((Boolean) visitor2.getObject(i, 67-sub))) invalidStates.add(34359738368L); + if (!((Boolean) visitor2.getObject(i, 68-sub))) invalidStates.add(68719476736L); + if (!((Boolean) visitor2.getObject(i, 69-sub))) invalidStates.add(137438953472L); + if (!((Boolean) visitor2.getObject(i, 70-sub))) invalidStates.add(274877906944L); + } else { + sub += 6; + } + + target = (Integer) visitor2.getObject(i, 72-sub); + targetType = (Integer) visitor2.getObject(i, 73-sub); + callOnTarget = (Boolean) visitor2.getObject(i, 76-sub); + commandGroup = (Integer) visitor2.getObject(i, 77-sub); + disabled = (Boolean) visitor2.getObject(i, 78-sub); + maxRangeToTarget = (Float) visitor2.getObject(i, 79-sub); + godLevel = (Integer) visitor2.getObject(i, 80-sub); + displayGroup = (Integer) visitor2.getObject(i, 81-sub); + combatCommand = (Boolean) visitor2.getObject(i, 82-sub); + validWeapon = (Integer) visitor2.getObject(i, 83-sub); + invalidWeapon = (Integer) visitor2.getObject(i, 84-sub); + cooldownGroup = (String) visitor2.getObject(i, 85-sub); + warmupTime = (Float) visitor2.getObject(i, 86-sub); + executeTime = (Float) visitor2.getObject(i, 87-sub); + cooldown = (Float) visitor2.getObject(i, 88-sub); + + this.invalidPostures = invalidPostures.toArray(new Byte[] { }); + this.invalidStates = invalidStates.toArray(new Long[] { }); + + foundCommand = true; + break; + } + } + } + + if (foundCommand) { + break; + } + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } } - + public String getCommandName() { return commandName; } - + public void setCommandName(String commandName) { this.commandName = commandName; } - + public String getClientEffectSelf() { return clientEffectSelf; } - + public void setClientEffectSelf(String clientEffectSelf) { this.clientEffectSelf = clientEffectSelf; } - + public String getClientEffectTarget() { return clientEffectTarget; } - + public void setClientEffectTarget(String clientEffectTarget) { this.clientEffectTarget = clientEffectTarget; } - - public int getMaxRangeToTarget() { - return maxRangeToTarget; - } - - public void setMaxRangeToTarget(int maxRangeToTarget) { - this.maxRangeToTarget = maxRangeToTarget; - } - + public int getCommandCRC() { return commandCRC; } - + public void setCommandCRC(int commandCRC) { this.commandCRC = commandCRC; } - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + public boolean isGmCommand() { - return isGmCommand; + return (godLevel > 0); } - - public void setGmCommand(boolean isGmCommand) { - this.isGmCommand = isGmCommand; + + public String getCharacterAbility() { + return characterAbility; } - + + public void setcharacterAbility(String characterAbility) { + this.characterAbility = characterAbility; + } + + public Byte[] getInvalidPostures() { + return invalidPostures; + } + + public Long[] getInvalidStates() { + return invalidStates; + } + + public int getTarget() { + return target; + } + + public void setTarget(int target) { + this.target = target; + } + + public int getTargetType() { + return targetType; + } + + public void setTargetType(int targetType) { + this.targetType = targetType; + } + + public boolean shouldCallOnTarget() { + return callOnTarget; + } + + public void setCallOnTarget(boolean callOnTarget) { + this.callOnTarget = callOnTarget; + } + + public int getCommandGroup() { + return commandGroup; + } + + public void setCommandGroup(int commandGroup) { + this.commandGroup = commandGroup; + } + + public boolean isDisabled() { + return disabled; + } + + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + + public float getMaxRangeToTarget() { + return maxRangeToTarget; + } + + public void setMaxRangeToTarget(float maxRangeToTarget) { + this.maxRangeToTarget = maxRangeToTarget; + } + + public int getGodLevel() { + return godLevel; + } + + public void setGodLevel(int godLevel) { + this.godLevel = godLevel; + } + + public int getDisplayGroup() { + return displayGroup; + } + + public void setDisplayGroup(int displayGroup) { + this.displayGroup = displayGroup; + } + + public boolean isCombatCommand() { + return combatCommand; + } + + public void setCombatCommand(boolean combatCommand) { + this.combatCommand = combatCommand; + } + + public int getValidWeapon() { + return validWeapon; + } + + public void setValidWeapon(int validWeapon) { + this.validWeapon = validWeapon; + } + + public int getInvalidWeapon() { + return invalidWeapon; + } + + public void setInvalidWeapon(int invalidWeapon) { + this.invalidWeapon = invalidWeapon; + } + + public String getCooldownGroup() { + return cooldownGroup; + } + + public void setCooldownGroup(String cooldownGroup) { + this.cooldownGroup = cooldownGroup; + } + + public float getCooldown() { + return cooldown; + } + + public void setCooldown(float cooldown) { + this.cooldown = cooldown; + } + + public float getExecuteTime() { + return executeTime; + } + + public void setExecuteTime(float executeTime) { + this.executeTime = executeTime; + } + + public float getWarmupTime() { + return warmupTime; + } + + public void setWarmupTime(float warmupTime) { + this.warmupTime = warmupTime; + } + } diff --git a/src/services/command/CombatCommand.java b/src/services/command/CombatCommand.java index a1559418..dd761b02 100644 --- a/src/services/command/CombatCommand.java +++ b/src/services/command/CombatCommand.java @@ -29,20 +29,6 @@ import engine.clientdata.visitors.DatatableVisitor; public class CombatCommand extends BaseSWGCommand { - private String[] defaultAnimations = new String[]{}; - private String[] oneHandedAnimations = new String[]{}; - private String[] twoHandedAnimations = new String[]{}; - private String[] polearmAnimations = new String[]{}; - private String[] unarmedAnimations = new String[]{}; - private String[] pistolAnimations = new String[]{}; - private String[] carbineAnimations = new String[]{}; - private String[] lightRifleAnimations = new String[]{}; - private String[] rifleAnimations = new String[]{}; - private String[] heavyWpnAnimations = new String[]{}; - private String[] oneHandedLSAnimations = new String[]{}; - private String[] twoHandedLSAnimations = new String[]{}; - private String[] polearmLSAnimations = new String[]{}; - private String[] thrownAnimations = new String[]{}; private byte validTargetType; private byte hitType; private byte healType; @@ -67,18 +53,30 @@ public class CombatCommand extends BaseSWGCommand { private int damageType, elementalType, elementalValue; private String performanceSpam; private byte hitSpam; - private float cooldown; private String delayAttackEggTemplate; private String delayAttackParticle; private float initialAttackDelay; private float delayAttackInterval; private int delayAttackLoops; private int delayAttackEggPosition; - private String cooldownGroup; - private float executeTime; - private float warmupTime; private float vigorCost; // for commando kill meter and bm specials private float criticalChance; + private int attack_rolls; + + private String[] defaultAnimations = new String[]{}; + private String[] oneHandedAnimations = new String[]{}; + private String[] twoHandedAnimations = new String[]{}; + private String[] polearmAnimations = new String[]{}; + private String[] unarmedAnimations = new String[]{}; + private String[] pistolAnimations = new String[]{}; + private String[] carbineAnimations = new String[]{}; + private String[] lightRifleAnimations = new String[]{}; + private String[] rifleAnimations = new String[]{}; + private String[] heavyWpnAnimations = new String[]{}; + private String[] oneHandedLSAnimations = new String[]{}; + private String[] twoHandedLSAnimations = new String[]{}; + private String[] polearmLSAnimations = new String[]{}; + private String[] thrownAnimations = new String[]{}; public CombatCommand(String commandName) { super(commandName); @@ -151,148 +149,21 @@ public class CombatCommand extends BaseSWGCommand { minDamage = (Integer) visitor.getObject(i, 77); maxDamage = (Integer) visitor.getObject(i, 78); maxRangeOverload = (Float) visitor.getObject(i, 79); - weaponCategory = ((Integer) visitor.getObject(i, 80)).byteValue(); - damageType = ((Integer) visitor.getObject(i, 81)).byteValue(); - elementalType = ((Integer) visitor.getObject(i, 82)).byteValue(); - elementalValue = (Integer) visitor.getObject(i, 83); + weaponCategory = ((Integer) visitor.getObject(i, 81)).byteValue(); + damageType = ((Integer) visitor.getObject(i, 82)).byteValue(); + elementalType = ((Integer) visitor.getObject(i, 83)); + elementalValue = (Integer) visitor.getObject(i, 84); performanceSpam = (String) visitor.getObject(i, 89); hitSpam = ((Integer) visitor.getObject(i, 90)).byteValue(); + attack_rolls = (Integer) visitor.getObject(i, 93); } } - - DatatableVisitor visitor2 = ClientFileManager.loadFile("datatables/command/command_table.iff", DatatableVisitor.class); - - for(int i = 0; i < visitor2.getRowCount(); i++) { - if(visitor2.getObject(i, 0) != null) { - if(((String) visitor2.getObject(i, 0)).equalsIgnoreCase(commandName)) { - - cooldownGroup = (String) visitor2.getObject(i, 85); - warmupTime = (Float) visitor2.getObject(i, 86); - executeTime = (Float) visitor2.getObject(i, 87); - cooldown = (Float) visitor2.getObject(i, 88); - - } - } - } - } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); } } - - public String[] getDefaultAnimations() { - return defaultAnimations; - } - - public void setDefaultAnimations(String[] defaultAnimations) { - this.defaultAnimations = defaultAnimations; - } - - public String[] getOneHandedAnimations() { - return oneHandedAnimations; - } - - public void setOneHandedAnimations(String[] oneHandedAnimations) { - this.oneHandedAnimations = oneHandedAnimations; - } - - public String[] getTwoHandedAnimations() { - return twoHandedAnimations; - } - - public void setTwoHandedAnimations(String[] twoHandedAnimations) { - this.twoHandedAnimations = twoHandedAnimations; - } - - public String[] getPolearmAnimations() { - return polearmAnimations; - } - - public void setPolearmAnimations(String[] polearmAnimations) { - this.polearmAnimations = polearmAnimations; - } - - public String[] getUnarmedAnimations() { - return unarmedAnimations; - } - - public void setUnarmedAnimations(String[] unarmedAnimations) { - this.unarmedAnimations = unarmedAnimations; - } - - public String[] getPistolAnimations() { - return pistolAnimations; - } - - public void setPistolAnimations(String[] pistolAnimations) { - this.pistolAnimations = pistolAnimations; - } - - public String[] getCarbineAnimations() { - return carbineAnimations; - } - - public void setCarbineAnimations(String[] carbineAnimations) { - this.carbineAnimations = carbineAnimations; - } - - public String[] getLightRifleAnimations() { - return lightRifleAnimations; - } - - public void setLightRifleAnimations(String[] lightRifleAnimations) { - this.lightRifleAnimations = lightRifleAnimations; - } - - public String[] getRifleAnimations() { - return rifleAnimations; - } - - public void setRifleAnimations(String[] rifleAnimations) { - this.rifleAnimations = rifleAnimations; - } - - public String[] getHeavyWpnAnimations() { - return heavyWpnAnimations; - } - - public void setHeavyWpnAnimations(String[] heavyWpnAnimations) { - this.heavyWpnAnimations = heavyWpnAnimations; - } - - public String[] getOneHandedLSAnimations() { - return oneHandedLSAnimations; - } - - public void setOneHandedLSAnimations(String[] oneHandedLSAnimations) { - this.oneHandedLSAnimations = oneHandedLSAnimations; - } - - public String[] getTwoHandedLSAnimations() { - return twoHandedLSAnimations; - } - - public void setTwoHandedLSAnimations(String[] twoHandedLSAnimations) { - this.twoHandedLSAnimations = twoHandedLSAnimations; - } - - public String[] getPolearmLSAnimations() { - return polearmLSAnimations; - } - - public void setPolearmLSAnimations(String[] polearmLSAnimations) { - this.polearmLSAnimations = polearmLSAnimations; - } - - public String[] getThrownAnimations() { - return thrownAnimations; - } - - public void setThrownAnimations(String[] thrownAnimations) { - this.thrownAnimations = thrownAnimations; - } - + public byte getValidTargetType() { return validTargetType; } @@ -381,7 +252,7 @@ public class CombatCommand extends BaseSWGCommand { this.percentFromWeapon = percentFromWeapon; } - public float isBypassArmor() { + public float getBypassArmor() { return bypassArmor; } @@ -484,7 +355,7 @@ public class CombatCommand extends BaseSWGCommand { public void setCanBePunishing(boolean canBePunishing) { this.canBePunishing = canBePunishing; } - + public int getMinDamage() { return minDamage; } @@ -564,69 +435,7 @@ public class CombatCommand extends BaseSWGCommand { public void setHitSpam(byte hitSpam) { this.hitSpam = hitSpam; } - - public String getRandomAnimation(WeaponObject weapon) { - - int weaponType = weapon.getWeaponType(); - String[] animations; - - switch(weaponType) { - - case 0: - animations = rifleAnimations; - break; - case 1: - animations = carbineAnimations; - break; - case 2: - animations = pistolAnimations; - break; - case 3: - animations = heavyWpnAnimations; - break; - case 4: - animations = oneHandedAnimations; - break; - case 5: - animations = twoHandedAnimations; - break; - case 6: - animations = unarmedAnimations; - break; - case 7: - animations = polearmAnimations; - break; - case 8: - animations = thrownAnimations; - break; - case 9: - animations = oneHandedLSAnimations; - break; - case 10: - animations = twoHandedLSAnimations; - break; - case 11: - animations = polearmLSAnimations; - break; - - default: - animations = unarmedAnimations; - break; - - } - - return animations[new Random().nextInt(animations.length)]; - - } - - public float getCooldown() { - return cooldown; - } - - public void setCooldown(float cooldown) { - this.cooldown = cooldown; - } - + public String getDelayAttackEggTemplate() { return delayAttackEggTemplate; } @@ -675,30 +484,6 @@ public class CombatCommand extends BaseSWGCommand { this.delayAttackLoops = delayAttackLoops; } - public String getCooldownGroup() { - return cooldownGroup; - } - - public void setCooldownGroup(String cooldownGroup) { - this.cooldownGroup = cooldownGroup; - } - - public float getExecuteTime() { - return executeTime; - } - - public void setExecuteTime(float executeTime) { - this.executeTime = executeTime; - } - - public float getWarmupTime() { - return warmupTime; - } - - public void setWarmupTime(float warmupTime) { - this.warmupTime = warmupTime; - } - public float getVigorCost() { return vigorCost; } @@ -714,7 +499,178 @@ public class CombatCommand extends BaseSWGCommand { public void setCriticalChance(float criticalChance) { this.criticalChance = criticalChance; } - - + public int getAttack_rolls() { + return attack_rolls; + } + + public void setAttack_rolls(int attack_rolls) { + this.attack_rolls = attack_rolls; + } + + public String[] getDefaultAnimations() { + return defaultAnimations; + } + + public void setDefaultAnimations(String[] defaultAnimations) { + this.defaultAnimations = defaultAnimations; + } + + public String[] getOneHandedAnimations() { + return oneHandedAnimations; + } + + public void setOneHandedAnimations(String[] oneHandedAnimations) { + this.oneHandedAnimations = oneHandedAnimations; + } + + public String[] getTwoHandedAnimations() { + return twoHandedAnimations; + } + + public void setTwoHandedAnimations(String[] twoHandedAnimations) { + this.twoHandedAnimations = twoHandedAnimations; + } + + public String[] getPolearmAnimations() { + return polearmAnimations; + } + + public void setPolearmAnimations(String[] polearmAnimations) { + this.polearmAnimations = polearmAnimations; + } + + public String[] getUnarmedAnimations() { + return unarmedAnimations; + } + + public void setUnarmedAnimations(String[] unarmedAnimations) { + this.unarmedAnimations = unarmedAnimations; + } + + public String[] getPistolAnimations() { + return pistolAnimations; + } + + public void setPistolAnimations(String[] pistolAnimations) { + this.pistolAnimations = pistolAnimations; + } + + public String[] getCarbineAnimations() { + return carbineAnimations; + } + + public void setCarbineAnimations(String[] carbineAnimations) { + this.carbineAnimations = carbineAnimations; + } + + public String[] getLightRifleAnimations() { + return lightRifleAnimations; + } + + public void setLightRifleAnimations(String[] lightRifleAnimations) { + this.lightRifleAnimations = lightRifleAnimations; + } + + public String[] getRifleAnimations() { + return rifleAnimations; + } + + public void setRifleAnimations(String[] rifleAnimations) { + this.rifleAnimations = rifleAnimations; + } + + public String[] getHeavyWpnAnimations() { + return heavyWpnAnimations; + } + + public void setHeavyWpnAnimations(String[] heavyWpnAnimations) { + this.heavyWpnAnimations = heavyWpnAnimations; + } + + public String[] getOneHandedLSAnimations() { + return oneHandedLSAnimations; + } + + public void setOneHandedLSAnimations(String[] oneHandedLSAnimations) { + this.oneHandedLSAnimations = oneHandedLSAnimations; + } + + public String[] getTwoHandedLSAnimations() { + return twoHandedLSAnimations; + } + + public void setTwoHandedLSAnimations(String[] twoHandedLSAnimations) { + this.twoHandedLSAnimations = twoHandedLSAnimations; + } + + public String[] getPolearmLSAnimations() { + return polearmLSAnimations; + } + + public void setPolearmLSAnimations(String[] polearmLSAnimations) { + this.polearmLSAnimations = polearmLSAnimations; + } + + public String[] getThrownAnimations() { + return thrownAnimations; + } + + public void setThrownAnimations(String[] thrownAnimations) { + this.thrownAnimations = thrownAnimations; + } + + public String getRandomAnimation(WeaponObject weapon) { + int weaponType = weapon.getWeaponType(); + String[] animations; + + switch (weaponType) { + case 0: + animations = rifleAnimations; + break; + case 1: + animations = carbineAnimations; + break; + case 2: + animations = pistolAnimations; + break; + case 3: + animations = heavyWpnAnimations; + break; + case 4: + animations = oneHandedAnimations; + break; + case 5: + animations = twoHandedAnimations; + break; + case 6: + animations = defaultAnimations; + break; + case 7: + animations = polearmAnimations; + break; + case 8: + animations = thrownAnimations; + break; + case 9: + animations = oneHandedLSAnimations; + break; + case 10: + animations = twoHandedLSAnimations; + break; + case 11: + animations = polearmLSAnimations; + break; + default: + animations = defaultAnimations; + break; + } + + if (animations.length == 0) { + animations = defaultAnimations; + } + + return animations[new Random().nextInt(animations.length)]; + } + } diff --git a/src/services/command/CommandService.java b/src/services/command/CommandService.java index 5c838cd1..01610e70 100644 --- a/src/services/command/CommandService.java +++ b/src/services/command/CommandService.java @@ -21,17 +21,21 @@ ******************************************************************************/ package services.command; +import java.io.UnsupportedEncodingException; import java.nio.ByteOrder; -import java.util.HashMap; import java.util.Map; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; import main.NGECore; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.DatatableVisitor; import engine.clients.Client; import engine.resources.common.CRC; import engine.resources.objects.SWGObject; @@ -39,13 +43,10 @@ import engine.resources.scene.Point3D; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; import resources.common.*; - import protocol.swg.ObjControllerMessage; import protocol.swg.objectControllerObjects.CommandEnqueue; import protocol.swg.objectControllerObjects.CommandEnqueueRemove; -import protocol.swg.objectControllerObjects.ShowFlyText; import protocol.swg.objectControllerObjects.StartTask; - import resources.objects.creature.CreatureObject; import resources.objects.tangible.TangibleObject; import resources.objects.weapon.WeaponObject; @@ -53,155 +54,379 @@ import resources.objects.weapon.WeaponObject; public class CommandService implements INetworkDispatch { private Vector commandLookup = new Vector(); - private ConcurrentHashMap aliases = new ConcurrentHashMap(); - private ConcurrentHashMap aliasesByCRC = new ConcurrentHashMap(); + private ConcurrentHashMap aliases = new ConcurrentHashMap(); + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); private NGECore core; public CommandService(NGECore core) { this.core = core; } - - - @Override - public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { - - objControllerOpcodes.put(ObjControllerOpcodes.COMMAND_QUEUE_ENQUEUE, new INetworkRemoteEvent() { - - @Override - public void handlePacket(IoSession session, IoBuffer data) throws Exception { - - data.order(ByteOrder.LITTLE_ENDIAN); - Client client = core.getClient(session); - - if(client == null) { - System.out.println("NULL Client"); - return; - } - - CommandEnqueue commandEnqueue = new CommandEnqueue(); - commandEnqueue.deserialize(data); - - - BaseSWGCommand command = getCommandByCRC(commandEnqueue.getCommandCRC()); - - if(command == null) { - //System.out.println("Unknown Command CRC: " + commandEnqueue.getCommandCRC()); - return; - } - - // TODO: command filters for state, posture etc. - - if(client.getParent() == null) { - System.out.println("NULL Object"); - return; - } - - if(command.isGmCommand() && !client.isGM()) - return; - - CreatureObject actor = (CreatureObject) client.getParent(); - - SWGObject target = core.objectService.getObject(commandEnqueue.getTargetID()); - - if(command instanceof CombatCommand) { - CombatCommand command2 = (CombatCommand) command.clone(); - processCombatCommand(actor, target, command2, commandEnqueue.getActionCounter(), commandEnqueue.getCommandArguments()); - return; - } - - core.scriptService.callScript("scripts/commands/", command.getCommandName(), "run", core, actor, target, commandEnqueue.getCommandArguments()); - - } - - }); - - - } - - public BaseSWGCommand registerCommand(String name) { - - BaseSWGCommand command = new BaseSWGCommand(name.toLowerCase()); - commandLookup.add(command); - return command; - - } - - public CombatCommand registerCombatCommand(String name) { - - CombatCommand command = new CombatCommand(name.toLowerCase()); - commandLookup.add(command); - return command; - - } - - public BaseSWGCommand registerGmCommand(String name) { - - BaseSWGCommand command = new BaseSWGCommand(name.toLowerCase()); - command.setGmCommand(true); - commandLookup.add(command); - return command; - - } public void registerAlias(String name, String target) { - Vector commands = new Vector(commandLookup); // copy for thread safety - BaseSWGCommand targetCommand = null; - for(BaseSWGCommand command : commands) { - if(command.getCommandName().equalsIgnoreCase(target)) { - targetCommand = command; + aliases.put(CRC.StringtoCRC(name.toLowerCase()), CRC.StringtoCRC(target.toLowerCase())); + } + + public boolean callCommand(CreatureObject actor, SWGObject target, BaseSWGCommand command, int actionCounter, String commandArgs) { + if (actor == null) { + return false; + } + + if (command == null) { + return false; + } + + if (command.getCharacterAbility().length() > 0 && !actor.hasAbility(command.getCharacterAbility()) && actor.getClient() != null) { + return false; + } + + if (command.isDisabled()) { + return false; + } + + if (actor.getClient() != null && command.getGodLevel() > actor.getPlayerObject().getGodLevel()) { + return false; + } + + if (actor.hasCooldown(command.getCooldownGroup()) || actor.hasCooldown(command.getCommandName())) { + return false; + } + + WeaponObject weapon = (WeaponObject) core.objectService.getObject(actor.getWeaponId()); + + if (weapon != null && weapon.getWeaponType() == command.getInvalidWeapon()) { + return false; + } + + for (long state : command.getInvalidStates()) { + if ((actor.getStateBitmask() & state) == state) { + //return false; } } - if (targetCommand == null) { return; } - aliases.put(name, targetCommand); - aliasesByCRC.put(CRC.StringtoCRC(name), targetCommand); + // This SHOULD be invalid locomotions but we don't track these currently. + // Postures are the best we can do. + for (byte posture : command.getInvalidPostures()) { + if (actor.getPosture() == posture) { + //return false; + } + } + + switch (command.getTargetType()) { + case 0: // Target Not Used For This Command + break; + case 1: // Other Only (objectId/targetName) + if (target == null) { + if (commandArgs != null && !commandArgs.equals("")) { + String name = commandArgs.split(" ")[0]; + + target = core.objectService.getObjectByFirstName(name); + + if (target == actor) { + target = null; + } + } + + break; + } + + if (target == actor) { + return false; + } + + if (target.getContainer() == actor || target.getGrandparent() == actor) { + break; + } + + if (command.getMaxRangeToTarget() != 0 && actor.getPosition().getDistance(target.getPosition()) > command.getMaxRangeToTarget()) { + return false; + } + + if (!core.simulationService.checkLineOfSight(actor, target)) { + actor.showFlyText("@combat_effects:cant_see", 1.5f, new RGB(72, 209, 204), 1, true); + return false; + } + + break; + case 2: // Anyone (objectId/targetName) + if (target == null) { + if (commandArgs != null && !commandArgs.equals("")) { + String name = commandArgs.split(" ")[0]; + + target = core.objectService.getObjectByFirstName(name); + + if (target == actor) { + target = null; + } + } + + break; + } + + if (target.getContainer() == actor || target.getGrandparent() == actor) { + break; + } + + if (command.getMaxRangeToTarget() != 0 && actor.getPosition().getDistance(target.getPosition()) > command.getMaxRangeToTarget()) { + return false; + } + + if (!core.simulationService.checkLineOfSight(actor, target)) { + actor.showFlyText("@combat_effects:cant_see", 1.5f, new RGB(72, 209, 204), 1, true); + return false; + } + + break; + case 3: // Free Target Mode (rally points, group waypoints) + target = null; + + if (commandArgs == null) { + break; + } + + String[] args = commandArgs.split(" "); + + float x = 0, y = 0, z = 0; + + try { + if (args.length == 2) { + x = Integer.valueOf(args[0]); + z = Integer.valueOf(args[1]); + } else if (args.length > 2) { + x = Integer.valueOf(args[0]); + y = Integer.valueOf(args[1]); + z = Integer.valueOf(args[2]); + } else { + return false; + } + } catch (NumberFormatException e) { + return false; + } + + Point3D position = new Point3D(x, y, z); + + if (command.getMaxRangeToTarget() != 0 && actor.getPosition().getDistance(position) > command.getMaxRangeToTarget()) { + return false; + } + + break; + case 4: // Any object + if (target == null) { + break; + } + + if (command.getMaxRangeToTarget() != 0 && actor.getPosition().getDistance(target.getPosition()) > command.getMaxRangeToTarget()) { + return false; + } + + if (!core.simulationService.checkLineOfSight(actor, target)) { + actor.showFlyText("@combat_effects:cant_see", 1.5f, new RGB(72, 209, 204), 1, true); + return false; + } + + break; + default: + break; + } + switch (command.getTarget()) { + case 0: // Ally Only + if (target == null) { + target = actor; + } + + if (!(target instanceof TangibleObject)) { + return false; + } + + TangibleObject object = (TangibleObject) target; + + if (!object.getFaction().equals("") && !object.getFaction().equals(actor.getFaction())) { + return false; + } + + if (actor.getFactionStatus() < object.getFactionStatus()) { + return false; + } + + if (object.isAttackableBy(actor)) { + return false; + } + + // Without this we could be buffing ally NPCs and such + // Think this is checked later on + if (actor.getSlottedObject("ghost") != null && object.getSlottedObject("ghost") == null) { + return false; + } + + break; + case 1: // Enemy Only + if (target == null || !(target instanceof TangibleObject)) { + return false; + } + + TangibleObject targetObject = (TangibleObject) target; + + if (!targetObject.isAttackableBy(actor)) { + return false; + } + + break; + case 2: // Indifferent + break; + default: + break; + } + + if (command.shouldCallOnTarget()) { + if (target == null || !(target instanceof CreatureObject)) { + return false; + } + + actor = (CreatureObject) target; + } + + long warmupTime = (long) (command.getWarmupTime() * 1000f); + + if(warmupTime > 0) { + try { + Thread.sleep(warmupTime); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + processCommand(actor, target, command, actionCounter, commandArgs); + + return true; } - - public BaseSWGCommand getCommandByCRC(int CRC) { + + public void callCommand(SWGObject actor, String commandName, SWGObject target, String commandArgs) { + callCommand((CreatureObject) actor, target, getCommandByName(commandName), 0, commandArgs); + } + + public BaseSWGCommand getCommandByCRC(int commandCRC) { + Vector commands = new Vector(commandLookup); - if (aliasesByCRC.containsKey(CRC)) { - return aliasesByCRC.get(CRC); - } - - Vector commands = new Vector(commandLookup); // copy for thread safety - - for(BaseSWGCommand command : commands) { - if(command.getCommandCRC() == CRC) + for (BaseSWGCommand command : commands) { + if (command.getCommandCRC() == commandCRC) { return command; + } } + + try { + String[] tableArray = new String[] { + "client_command_table", "command_table", "client_command_table_ground", "command_table_ground", + "client_command_table_space", "command_table_space" }; + + for (int n = 0; n < tableArray.length; n++) { + DatatableVisitor visitor = ClientFileManager.loadFile("datatables/command/" + tableArray[n] + ".iff", DatatableVisitor.class); + + for (int i = 0; i < visitor.getRowCount(); i++) { + if (visitor.getObject(i, 0) != null) { + String name = ((String) visitor.getObject(i, 0)).toLowerCase(); + + if (CRC.StringtoCRC(name) == commandCRC) { + if (isCombatCommand(name)) { + CombatCommand command = new CombatCommand(name.toLowerCase()); + commandLookup.add(command); + return command; + } else { + BaseSWGCommand command = new BaseSWGCommand(name.toLowerCase()); + commandLookup.add(command); + return command; + } + } + } + } + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + return null; - } public BaseSWGCommand getCommandByName(String name) { + Vector commands = new Vector(commandLookup); - if (aliases.containsKey(name)) { - return aliases.get(name); - } + name = name.toLowerCase(); - Vector commands = new Vector(commandLookup); // copy for thread safety - - for(BaseSWGCommand command : commands) { - if(command.getCommandName().equalsIgnoreCase(name)) + for (BaseSWGCommand command : commands) { + if (command.getCommandName().equalsIgnoreCase(name)) { return command; + } } + + try { + String[] tableArray = new String[] { + "client_command_table", "command_table", "client_command_table_ground", "command_table_ground", + "client_command_table_space", "command_table_space" }; + + for (int n = 0; n < tableArray.length; n++) { + DatatableVisitor visitor = ClientFileManager.loadFile("datatables/command/" + tableArray[n] + ".iff", DatatableVisitor.class); + + for (int i = 0; i < visitor.getRowCount(); i++) { + if (visitor.getObject(i, 0) != null) { + String commandName = ((String) visitor.getObject(i, 0)).toLowerCase(); + + if (commandName.equalsIgnoreCase(name)) { + if (isCombatCommand(commandName)) { + CombatCommand command = new CombatCommand(commandName); + commandLookup.add(command); + return command; + } else { + BaseSWGCommand command = new BaseSWGCommand(commandName); + commandLookup.add(command); + return command; + } + } + } + } + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + return null; - + } + + public boolean isCombatCommand(String commandName) { + try { + DatatableVisitor visitor = ClientFileManager.loadFile("datatables/combat/combat_data.iff", DatatableVisitor.class); + + for (int i = 0; i < visitor.getRowCount(); i++) { + if (visitor.getObject(i, 0) != null && ((String) (visitor.getObject(i, 0))).equalsIgnoreCase(commandName)) { + return true; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + public void processCommand(CreatureObject actor, SWGObject target, BaseSWGCommand command, int actionCounter, String commandArgs) { + if (command.getCooldown() > 0f) { + actor.addCooldown(command.getCooldownGroup(), command.getCooldown()); + } + + if (command instanceof CombatCommand) { + processCombatCommand(actor, target, (CombatCommand) command, actionCounter, commandArgs); + } else { + if (FileUtilities.doesFileExist("scripts/commands/" + command.getCommandName().toLowerCase() + ".py")) { + core.scriptService.callScript("scripts/commands/", command.getCommandName().toLowerCase(), "run", core, actor, target, commandArgs); + } else if (FileUtilities.doesFileExist("scripts/commands/combat/" + command.getCommandName().toLowerCase() + ".py")) { + core.scriptService.callScript("scripts/commands/combat/", command.getCommandName().toLowerCase(), "run", core, actor, target, commandArgs); + } + } } public void processCombatCommand(CreatureObject attacker, SWGObject target, CombatCommand command, int actionCounter, String commandArgs) { - - // Check if the person has access to this ability. - // Abilities (inc expertise ones) are added automatically as they level - // by reading the datatables. - // disabled for now (breaks all combat) - //if (!attacker.hasAbility(command.getCommandName())) { - // return; - //} - if(FileUtilities.doesFileExist("scripts/commands/combat/" + command.getCommandName() + ".py")) + { core.scriptService.callScript("scripts/commands/combat/", command.getCommandName(), "setup", core, attacker, target, command); + } boolean success = true; @@ -260,15 +485,11 @@ public class CommandService implements INetworkDispatch { if(target != attacker && success && !core.simulationService.checkLineOfSight(attacker, target)) { - - ShowFlyText los = new ShowFlyText(attacker.getObjectID(), attacker.getObjectID(), "combat_effects", "cant_see", (float) 1.5, new RGB(72, 209, 204), 1); - ObjControllerMessage objController = new ObjControllerMessage(0x1B, los); - attacker.getClient().getSession().write(objController.serialize()); + attacker.showFlyText("@combat_effects:cant_see", 1.5f, new RGB(72, 209, 204), 1, true); success = false; - } - if(!success) { + if(!success && attacker.getClient() != null) { IoSession session = attacker.getClient().getSession(); CommandEnqueueRemove commandRemove = new CommandEnqueueRemove(attacker.getObjectId(), actionCounter); session.write(new ObjControllerMessage(0x0B, commandRemove).serialize()); @@ -286,32 +507,235 @@ public class CommandService implements INetworkDispatch { return; } - if(command.getHitType() == 0 && command.getBuffNameSelf().length() > 0) { + if(command.getHitType() == 0 && command.getBuffNameSelf() != null && command.getBuffNameSelf().length() > 0) { core.combatService.doSelfBuff(attacker, weapon, command, actionCounter); return; } - - core.combatService.doCombat(attacker, (TangibleObject) target, weapon, command, actionCounter); + for(int i = 0 ; i < command.getAttack_rolls(); i++) { + core.combatService.doCombat(attacker, (TangibleObject) target, weapon, command, actionCounter); + } + } } - - public void callCommand(SWGObject actor, String commandName, SWGObject target, String commandArgs) { - if (actor == null) + + public void removeCommand(CreatureObject actor, int actionCounter, BaseSWGCommand command) { + if (actor == null || actor.getClient() == null || command == null) { return; + } - BaseSWGCommand command = getCommandByName(commandName); - - if (command == null) - return; - - core.scriptService.callScript("scripts/commands/", command.getCommandName(), "run", core, actor, target, commandArgs); + actor.getClient().getSession().write(new ObjControllerMessage(0x0B, new CommandEnqueueRemove(actor.getObjectId(), actionCounter)).serialize()); + actor.removeCooldown(actionCounter, command); } @Override - public void shutdown() { - // TODO Auto-generated method stub + public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + + objControllerOpcodes.put(ObjControllerOpcodes.COMMAND_QUEUE_ENQUEUE, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + data.order(ByteOrder.LITTLE_ENDIAN); + Client client = core.getClient(session); + + if (client == null) { + System.out.println("NULL Client"); + return; + } + + CommandEnqueue commandEnqueue = new CommandEnqueue(); + commandEnqueue.deserialize(data); + + int commandCRC = commandEnqueue.getCommandCRC(); + + if (aliases.containsKey(commandEnqueue.getCommandCRC())) { + commandCRC = aliases.get(commandCRC); + } + + BaseSWGCommand command = getCommandByCRC(commandCRC); + + if (command == null) { + //System.out.println("Unknown Command CRC: " + commandEnqueue.getCommandCRC()); + return; + } + + if (client.getParent() == null) { + System.out.println("NULL Object"); + return; + } + + CreatureObject actor = (CreatureObject) client.getParent(); + + SWGObject target = core.objectService.getObject(commandEnqueue.getTargetID()); + + if (!callCommand(actor, target, command, commandEnqueue.getActionCounter(), commandEnqueue.getCommandArguments())) { + // Call failScriptHook + removeCommand(actor, commandEnqueue.getActionCounter(), command); + } + } + + }); + + objControllerOpcodes.put(ObjControllerOpcodes.COMMAND_QUEUE_REMOVE, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + + } + + }); + + objControllerOpcodes.put(ObjControllerOpcodes.CRAFT_FILLSLOT, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + + data.order(ByteOrder.LITTLE_ENDIAN); + Client client = core.getClient(session); + + if(client == null) { + System.out.println("NULL Client"); + return; + } + + CommandEnqueue commandEnqueue = new CommandEnqueue(); + CreatureObject actor = (CreatureObject) client.getParent(); + SWGObject target = core.objectService.getObject(commandEnqueue.getTargetID()); + +// StringBuilder sb = new StringBuilder(); +// for (byte b : data.array()) { +// sb.append(String.format("%02X ", b)); +// } +// System.out.println(sb.toString()); + +// 05 00 46 5E CE 80 83 00 00 00 07 01 00 00 72 14 +// 09 00 00 00 00 00 00 00 00 00 04 2A 09 00 00 00 +// 00 00 01 00 00 00 00 00 00 00 04 00 00 00 00 00 +// 00 00 00 00 00 00 00 00 00 00 00 00 + + long playerId = data.getLong(); + data.getInt(); // 00 00 00 00 + long ingredientId = data.getLong(); + int slotNumber = data.getInt(); + int option = data.getInt(); + byte sequence = data.get(); +//core.craftingService.handleCraftFillSlot(playerId, ingredientId, slotNumber, option, sequence); + } + }); + + objControllerOpcodes.put(ObjControllerOpcodes.CRAFT_EMPTYSLOT, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + + data.order(ByteOrder.LITTLE_ENDIAN); + Client client = core.getClient(session); + + if(client == null) { + System.out.println("NULL Client"); + return; + } + + CommandEnqueue commandEnqueue = new CommandEnqueue(); + CreatureObject actor = (CreatureObject) client.getParent(); + SWGObject target = core.objectService.getObject(commandEnqueue.getTargetID()); + + long playerId = data.getLong(); + data.getInt(); // 00 00 00 00 + int slotNumber = data.getInt(); + long ingredientId = data.getLong(); + byte sequence = data.get(); +//core.craftingService.handleCraftEmptySlot(playerId, ingredientId, slotNumber, sequence); + } + + }); + + + objControllerOpcodes.put(ObjControllerOpcodes.CRAFT_CUSTOMIZATION, new INetworkRemoteEvent() { + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + data.order(ByteOrder.LITTLE_ENDIAN); + Client client = core.getClient(session); + if(client == null) { + System.out.println("NULL Client"); + return; + } + + long playerId = data.getLong(); + data.getInt(); // 00 00 00 00 UTF-16LE + + String enteredName = ""; + int length = 2*data.order(ByteOrder.LITTLE_ENDIAN).getInt(); + int bufferPosition = data.position(); + try + { + enteredName = new String(data.array(), bufferPosition, length, "UTF-16LE"); + } + catch (UnsupportedEncodingException e) + { + System.err.println("UnsupportedEncodingException while reading crafting customization name "); + } + + System.err.println("enteredName " + enteredName); + data.position(bufferPosition + length); + + byte modelNumber = data.get(); + int schematicQuantity = data.getInt(); + byte customizationList = data.get(); + for (int i=0;i<(int)customizationList;i++){ + int customizationSlot = data.getInt(); + int customizationValue = data.getInt(); + } + +//core.craftingService.handleCraftCustomization(playerId,enteredName,modelNumber,schematicQuantity,customizationList); + } + + }); + +// 05 00 46 5E CE 80 83 00 00 00 5A 01 00 00 75 59 +// 0F 00 00 00 00 00 00 00 00 00 1D 00 00 00 63 00 +// 72 00 61 00 66 00 74 00 69 00 6E 00 67 00 3A 00 +// 5B 00 65 00 78 00 6F 00 5F 00 70 00 72 00 6F 00 +// 74 00 65 00 69 00 6E 00 5F 00 77 00 61 00 66 00 +// 65 00 72 00 73 00 5D 00 FF E8 03 00 00 00 00 00 +// 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +// 00 00 00 00 00 00 00 00 00 00 00 00 + +// USTRING: CustomName +// BYTE: ModelNumber +// INT: SchematicQuantity +// BYTE: CustomizationList +// { +// INT: CustomizationSlot +// INT: CustomizationValue +// } + } - + + public void shutdown() { + + } + + public BaseSWGCommand registerCommand(String name) { + return getCommandByName(name); + } + + public CombatCommand registerCombatCommand(String name) { + BaseSWGCommand command = getCommandByName(name); + + if (command instanceof CombatCommand) { + return (CombatCommand) command; + } + + return null; + } + + public BaseSWGCommand registerGmCommand(String name) { + BaseSWGCommand command = getCommandByName(name); + //if(command != null) + //command.setGodLevel(5); // not sure if still needed after more recent commits + return command; + } + } diff --git a/src/resources/z/exp/objects/intangible/IntangibleMessageBuilder.java b/src/services/equipment/BonusSetTemplate.java similarity index 50% rename from src/resources/z/exp/objects/intangible/IntangibleMessageBuilder.java rename to src/services/equipment/BonusSetTemplate.java index b069678a..cee74c84 100644 --- a/src/resources/z/exp/objects/intangible/IntangibleMessageBuilder.java +++ b/src/services/equipment/BonusSetTemplate.java @@ -19,44 +19,52 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.intangible; +package services.equipment; -import java.util.Map; +import java.util.Vector; -import com.sleepycat.persist.model.Persistent; +import main.NGECore; -import resources.z.exp.objects.Builder; -import resources.z.exp.objects.ObjectMessageBuilder; +import org.python.core.Py; +import org.python.core.PyObject; -@Persistent -public class IntangibleMessageBuilder extends ObjectMessageBuilder { +import engine.resources.objects.SWGObject; +import resources.objects.creature.CreatureObject; + +public class BonusSetTemplate +{ + private String name; + private Vector requiredWornItems; - public IntangibleMessageBuilder(IntangibleObject object) { - super(object); + public BonusSetTemplate(String name) + { + this.name = name; + this.requiredWornItems = new Vector(); } - public IntangibleMessageBuilder() { - super(); + public void addRequiredItem(String item) + { + requiredWornItems.add(item); } - @Override - public void buildBaseline3(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline3(baselineBuilders, deltaBuilders); + public String getName() + { + return this.name; } - @Override - public void buildBaseline6(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline6(baselineBuilders, deltaBuilders); + public int getWornTemplateCount(CreatureObject creature) + { + int wornItems = 0; + for (SWGObject item : creature.getEquipmentList().get()) + { + if(requiredWornItems.contains(item.getTemplate()) || requiredWornItems.contains(item.getStfName())) wornItems++; + } + return wornItems; } - @Override - public void buildBaseline8(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline8(baselineBuilders, deltaBuilders); + public void callScript(CreatureObject creature) + { + PyObject func = NGECore.getInstance().scriptService.getMethod("scripts/equipment/bonus_sets/", name, "handleChange"); + if(func != null) func.__call__(Py.java2py(NGECore.getInstance()), Py.java2py(creature), Py.java2py(this)); } - - @Override - public void buildBaseline9(Map baselineBuilders, Map deltaBuilders) { - super.buildBaseline9(baselineBuilders, deltaBuilders); - } - } diff --git a/src/services/gcw/FactionService.java b/src/services/gcw/FactionService.java index 9a2dfd42..4148f969 100644 --- a/src/services/gcw/FactionService.java +++ b/src/services/gcw/FactionService.java @@ -37,7 +37,6 @@ import protocol.swg.FactionResponseMessage; import resources.common.FileUtilities; import resources.common.Opcodes; import resources.datatables.FactionStatus; -import resources.datatables.Options; import resources.datatables.PvpStatus; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; @@ -198,19 +197,42 @@ public class FactionService implements INetworkDispatch { * This should be used instead of getPvPBitmask where possible, but * should not be used in setPvPBitmask. */ - public int calculatePvpStatus(CreatureObject player, TangibleObject target) { + /*public int calculatePvpStatus(CreatureObject player, TangibleObject target) { PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost"); int pvpBitmask = target.getPvPBitmask(); + // Seefo: Casting target to type CreatureObject as temporary fix. I am unsure whether or not we want to put a factionStatus member inside of TangibleObject. + if (((CreatureObject) target).getFactionStatus() == FactionStatus.Combatant) { + pvpBitmask |= PvpStatus.Enemy; + } + + if (((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) { + pvpBitmask |= PvpStatus.Overt; + + if (target.getSlottedObject("ghost") != null) { + pvpBitmask |= PvpStatus.Enemy; + } + } + if (target.getSlottedObject("ghost") != null) { pvpBitmask |= PvpStatus.Player; - if (player.getFactionStatus() == FactionStatus.SpecialForces && - ((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) { + if ((!player.getFaction().equals(target.getFaction()) && + player.getFactionStatus() == FactionStatus.SpecialForces && + ((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) || + core.combatService.areInDuel(player, (CreatureObject) target)) { pvpBitmask |= (PvpStatus.Attackable | PvpStatus.Aggressive); } + if (core.combatService.areInDuel(player, (CreatureObject) target)) { + //pvpBitmask |= PvpStatus.Dueling; + } + + return pvpBitmask; + } + + if (player.getFaction().equals(target.getFaction())) { return pvpBitmask; } @@ -231,6 +253,27 @@ public class FactionService implements INetworkDispatch { } return pvpBitmask; + }*/ + + // temp fix until calculatePvpStatus is fixed + public int calculatePvpStatus(CreatureObject player, TangibleObject target) { + + if(target.getSlottedObject("ghost") != null) { + + if(!player.getFaction().equals(target.getFaction()) && player.getFactionStatus() == FactionStatus.SpecialForces && ((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) + return 55; + else if(core.combatService.areInDuel(player, (CreatureObject) target)) + return 55; + else + return 0x14; + + } else { + if(target.getAttachment("AI") != null) + return PvpStatus.Attackable; + else + return 0; + } + } public Map getFactionMap() { diff --git a/src/services/gcw/GCWService.java b/src/services/gcw/GCWService.java index 15a392cc..73d06d36 100644 --- a/src/services/gcw/GCWService.java +++ b/src/services/gcw/GCWService.java @@ -377,7 +377,7 @@ public class GCWService implements INetworkDispatch { } Iterator it = flagged.iterator(); - + while(it.hasNext()) { SWGObject obj = it.next(); if (((CreatureObject) obj).getFactionStatus() != 2) { diff --git a/src/services/guild/GuildService.java b/src/services/guild/GuildService.java index 902bd569..022895de 100644 --- a/src/services/guild/GuildService.java +++ b/src/services/guild/GuildService.java @@ -26,9 +26,7 @@ import java.util.Map; import resources.guild.Guild; import resources.objects.SWGList; import resources.objects.guild.GuildObject; - import main.NGECore; - import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; @@ -55,7 +53,17 @@ public class GuildService implements INetworkDispatch { } public Guild createGuild(String abbreviation, String name, SWGObject leader) { - int id = ((object.getGuildList().get(object.getGuildList().size()).getId()) + 1); + + if (leader == null) + return null; + + int id = 0; + if (object.getGuildList().size() < 1) { + id = 0; + } else { + id = ((object.getGuildList().get(object.getGuildList().size()).getId() + 1)); + } + Guild guild = new Guild(id, abbreviation, name, leader); object.getGuildList().add(guild); diff --git a/src/services/housing/HouseTemplate.java b/src/services/housing/HouseTemplate.java new file mode 100644 index 00000000..3918cf55 --- /dev/null +++ b/src/services/housing/HouseTemplate.java @@ -0,0 +1,70 @@ +package services.housing; + +import java.util.HashMap; +import java.util.Map; +import java.util.Vector; + +import engine.resources.scene.Point3D; + +public class HouseTemplate +{ + private String deedTemplate; + private String buildingTemplate; + private int lotCost; + private int defaultItemLimit; + private Vector placeablePlanets; + private Map buildingSigns; + + public HouseTemplate(String deedTemplate, String buildingTemplate, int lotCost) + { + this.deedTemplate = deedTemplate; + this.buildingTemplate = buildingTemplate; + this.lotCost = lotCost; + this.defaultItemLimit = 50; + this.placeablePlanets = new Vector(); + this.buildingSigns = new HashMap(); + } + + public void addBuildingSign(String signTemplate, Point3D signPosition) + { + buildingSigns.put(signTemplate, signPosition); + } + public void addPlaceablePlanet(String planetName) + { + this.placeablePlanets.add(planetName); + } + public void setDefaultItemLimit(int itemLimit) + { + this.defaultItemLimit = itemLimit; + } + + public String getDeedTemplate() + { + return this.deedTemplate; + } + public String getBuildingTemplate() + { + return this.buildingTemplate; + } + public Map getBuildingSigns() + { + return this.buildingSigns; + } + public Vector getPlaceablePlanets() + { + return this.placeablePlanets; + } + public boolean canBePlacedOn(String planetName) + { + if(placeablePlanets.contains(planetName)) return true; + return false; + } + public int getLotCost() + { + return this.lotCost; + } + public int getDefaultItemLimit() + { + return this.defaultItemLimit; + } +} diff --git a/src/services/housing/HousingService.java b/src/services/housing/HousingService.java new file mode 100644 index 00000000..1c6611d8 --- /dev/null +++ b/src/services/housing/HousingService.java @@ -0,0 +1,747 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services.housing; + +import java.io.IOException; +import java.nio.file.FileVisitResult; +import java.nio.file.FileVisitor; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; + +import main.NGECore; +import protocol.swg.EnterStructurePlacementModeMessage; +import resources.objects.building.BuildingObject; +import resources.objects.creature.CreatureObject; +import resources.objects.deed.Player_House_Deed; +import resources.objects.player.PlayerObject; +import resources.objects.tangible.TangibleObject; +import services.sui.SUIWindow; +import services.sui.SUIWindow.SUICallback; +import services.sui.SUIWindow.Trigger; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +public class HousingService implements INetworkDispatch { + + private NGECore core; + private Map housingTemplates = new ConcurrentHashMap(); + + public HousingService(NGECore core) { + this.core = core; + core.commandService.registerCommand("placestructure"); + core.commandService.registerCommand("movefurniture"); + core.commandService.registerCommand("rotatefurniture"); + } + + public void enterStructureMode(CreatureObject actor, TangibleObject deed) + { + if(!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor, actor.getWorldPosition().x, actor.getWorldPosition().z)) + { + actor.sendSystemMessage("You may not place a structure here.", (byte) 0); // should probably load this from an stf + return; + } + + if(housingTemplates.containsKey(deed.getTemplate())) + { + HouseTemplate houseTemplate = housingTemplates.get(deed.getTemplate()); + EnterStructurePlacementModeMessage packet = new EnterStructurePlacementModeMessage(deed, houseTemplate.getBuildingTemplate()); + actor.getClient().getSession().write(packet.serialize()); + } + } + + public void placeStructure(final CreatureObject actor, TangibleObject deed, float positionX, float positionZ, float rotation) + { + HouseTemplate houseTemplate = housingTemplates.get(deed.getTemplate()); + Player_House_Deed playerHourseDeed = (Player_House_Deed)core.objectService.getObject(deed.getObjectID()); + int structureLotCost = houseTemplate.getLotCost(); + String structureTemplate = houseTemplate.getBuildingTemplate(); + + if(!houseTemplate.canBePlacedOn(actor.getPlanet().getName())) + { + actor.sendSystemMessage("You may not place this structure on this planet.", (byte) 0); // should probably load this from an stf + return; + } + + if(!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor, positionX, positionZ)) + { + actor.sendSystemMessage("You may not place a structure here.", (byte) 0); // should probably load this from an stf + return; + } + + // Lot stuff + if(!actor.getPlayerObject().deductLots(structureLotCost)) + { + actor.sendSystemMessage("You do not have enough available lots to place this structure.", (byte) 0); // should probably load this from an stf + return; + } + + // Calculate our orientation and height + Quaternion quaternion = new Quaternion(1, 0, 0, 0); + quaternion = resources.common.MathUtilities.rotateQuaternion(quaternion, (float)((Math.PI/2) * rotation), new Point3D(0, 1, 0)); + + float positionY = core.terrainService.getHeight(actor.getPlanetId(), positionX, positionZ) + 2f; + + // Create the building + BuildingObject building = (BuildingObject) core.objectService.createObject(structureTemplate, 0, actor.getPlanet(), new Point3D(positionX, positionY, positionZ), quaternion); + core.simulationService.add(building, building.getPosition().x, building.getPosition().z, true); + + // Name the sign + TangibleObject sign = (TangibleObject) building.getAttachment("structureSign"); + String playerFirstName = actor.getCustomName().split(" ")[0]; + sign.setCustomName2(playerFirstName + "'s House"); + //building.add(sign); + + core.objectService.destroyObject(deed); + + // Structure management + Vector admins = new Vector<>(); + admins.add(actor.getObjectID()); + + building.setAttachment("structureOwner", actor.getObjectID()); + building.setAttachment("structureAdmins", admins); + building.setDeedTemplate(deed.getTemplate()); + building.setBMR(playerHourseDeed.getBMR()); + building.setConditionDamage(100); + + // Save structure to DB + //building.createTransaction(core.getBuildingODB().getEnvironment()); + //core.getBuildingODB().put(building, Long.class, BuildingObject.class, building.getTransaction()); + //building.getTransaction().commitSync(); + } + + @SuppressWarnings("unchecked") + public boolean getPermissions(SWGObject player, SWGObject container) + { + if(((Vector) container.getContainer().getAttachment("structureAdmins")).contains(player.getObjectID())) return true; + return false; + } + + public void addHousingTemplate(HouseTemplate houseTemplate) + { + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate); + } + + public void loadHousingTemplates() { + Path p = Paths.get("scripts/houses/"); + FileVisitor fv = new SimpleFileVisitor() + { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException + { + System.out.println("Loading housing template " + file.getFileName()); + core.scriptService.callScript("scripts/houses/", file.getFileName().toString().replace(".py", ""), "setup", core); + return FileVisitResult.CONTINUE; + } + }; + try + { + Files.walkFileTree(p, fv); + } + catch (IOException e) { e.printStackTrace(); } + } + + public void createDestroySUIPage(final SWGObject owner, final TangibleObject target) { + + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + //final BuildingObject building = (BuildingObject) core.objectService.getObject(target.getParentId()); + // harvester.getStfFilename(); installation_n .getTemplate(); + + if (building.getItemsList().size()>0){ + ((CreatureObject) owner).sendSystemMessage("@player_structure:clear_building_for_delete", (byte)1); + } + + String displayname = "@installation_n:"+building.getStfName(); + if (building.getCustomName()!=null) + displayname = building.getCustomName(); + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", displayname); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:confirm_destruction_d1 " + + "@player_structure:confirm_destruction_d2 " + + "\n \n @player_structure:confirm_destruction_d3a " + + "\\#32CD32 @player_structure:confirm_destruction_d3b \\#FFFFFF " + + "@player_structure:confirm_destruction_d4 "); + if (building.getConditionDamage()<20 && building.getMaintenanceAmount()<3000){ + window.addListBoxMenuItem("@player_structure:redeed_confirmation \\#BB0000 @player_structure:can_redeed_no_suffix \\#FFFFFF ",1 ); + } else { + window.addListBoxMenuItem("@player_structure:redeed_confirmation \\#32CD32 @player_structure:can_redeed_yes_suffix \\#FFFFFF ",1 ); + } + if (building.getConditionDamage()<20){ + window.addListBoxMenuItem("@player_structure:redeed_condition \\#BB0000 " + building.getConditionDamage() + " \\#FFFFFF ",1 ); + } else { + window.addListBoxMenuItem("@player_structure:redeed_condition \\#32CD32 " + building.getConditionDamage() + " \\#FFFFFF ",1 ); + } + if (building.getMaintenanceAmount()<0){ + window.addListBoxMenuItem("@player_structure:redeed_maintenance \\#BB0000 " + (int)building.getMaintenanceAmount() + " \\#FFFFFF ",2 ); + } else { + window.addListBoxMenuItem("@player_structure:redeed_maintenance \\#32CD32 " + (int)building.getMaintenanceAmount() + " \\#FFFFFF ",2 ); + } + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@yes"); + window.setProperty("btnCancel:Text", "@no"); + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + createCodeWindow(owner, target); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void createCodeWindow(SWGObject owner, TangibleObject target) { + + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + //final BuildingObject building = (BuildingObject)target; + Random rnd = new Random(); + final int confirmCode = 100000 + rnd.nextInt(900000); + final SUIWindow window = core.suiService.createInputBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:confirm_destruction_t"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:your_structure_prefix " + + "\\#32CD32 @player_structure:will_redeed_confirm \\#FFFFFF "+ + "@player_structure:will_redeed_suffix " + + "\n \n Code: " + confirmCode); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@yes"); + window.setProperty("btnCancel:Text", "@no"); + Vector returnList = new Vector(); + returnList.add("txtInput:LocalText"); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject crafter = (CreatureObject)owner; + core.suiService.closeSUIWindow(owner, 0); + if (returnList.get(0).equals(""+confirmCode)){ + // handle creation of correct deed in player inventory + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + String deedTemplate = building.getDeedTemplate(); + + Player_House_Deed deed = (Player_House_Deed)core.objectService.createObject(deedTemplate, owner.getPlanet()); + if(player.getLotsRemaining()+deed.getLotRequirement()>10){ + // Something went wrong or hacking attempt + crafter.sendSystemMessage("Structure can't be redeeded. Maximum lot count exceeded.",(byte)1); + return; + } + + deed.setStructureTemplate(building.getTemplate()); + deed.setSurplusMaintenance((int)building.getMaintenanceAmount()); + deed.setAttributes(); + + core.objectService.destroyObject(building.getObjectID()); + + SWGObject ownerInventory = owner.getSlottedObject("inventory"); + ownerInventory.add(deed); + + if(player.getLotsRemaining()+deed.getLotRequirement()<=10) + player.setLotsRemaining(player.getLotsRemaining()+deed.getLotRequirement()); + + crafter.sendSystemMessage("@player_structure:processing_destruction",(byte)1); + crafter.sendSystemMessage("@player_structure:deed_reclaimed",(byte)1); + + } else { + crafter.sendSystemMessage("@player_structure:incorrect_destroy_code",(byte)1); + } + + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void createPayMaintenanceSUIPage(SWGObject owner, TangibleObject target) { + CreatureObject creature = (CreatureObject) owner; + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final SUIWindow window = core.suiService.createSUIWindow("Script.transfer", owner, target, 10); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:select_amount"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:select_maint_amount" + + "\n \n @player_structure:current_maint_pool : " + (int)building.getMaintenanceAmount()); + + window.setProperty("msgPayMaintenance", "transaction.txtInputFrom"); + + window.setProperty("transaction.lblFrom:Text", "@player_structure:total_funds"); + window.setProperty("transaction.lblTo:Text", "@player_structure:to_pay"); + window.setProperty("transaction.lblFrom", "@player_structure:total_funds"); + window.setProperty("transaction.lblTo", "@player_structure:to_pay"); + + window.setProperty("transaction.lblStartingFrom:Text", ""+creature.getCashCredits()); + window.setProperty("transaction.lblStartingTo:Text", "0"); + + window.setProperty("transaction:InputFrom", "555555"); + window.setProperty("transaction:InputTo", "666666"); + + window.setProperty("transaction:txtInputFrom", ""+creature.getCashCredits()); + window.setProperty("transaction:txtInputTo", "1"); + window.setProperty("transaction.txtInputFrom:Text", ""+creature.getCashCredits()); + window.setProperty("transaction.txtInputTo:Text", "" + "0"); + + window.setProperty("transaction.ConversionRatioFrom", "1"); + window.setProperty("transaction.ConversionRatioTo", "0"); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + + Vector returnList = new Vector(); + returnList.add("transaction.txtInputFrom:Text"); + returnList.add("transaction.txtInputTo:Text"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject crafter = (CreatureObject)owner; + crafter.setCashCredits(crafter.getCashCredits() - Integer.parseInt(returnList.get(1))); + building.setMaintenanceAmount(building.getMaintenanceAmount()+Float.parseFloat(returnList.get(1))); + String displayname = "the structure"; + if (building.getCustomName()!=null) + displayname = building.getCustomName(); + crafter.sendSystemMessage("You successfully make a payment of " + Integer.parseInt(returnList.get(1)) + " credits to " + displayname + ".", (byte) 0); + core.suiService.closeSUIWindow(owner, 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void createRenameSUIPage(SWGObject owner, TangibleObject target) { + final SUIWindow window = core.suiService.createInputBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", owner, target, 0); + Vector returnList = new Vector(); + returnList.add("txtInput:LocalText"); + final TangibleObject outerSurveyTool = target; + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.housingService.handleSetName((CreatureObject)owner, (TangibleObject)outerSurveyTool,returnList.get(0)); + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void handleSetName(CreatureObject owner, TangibleObject target,String name) { + + ((BuildingObject) target).setBuildingName(name,owner); + } + + public void createStatusSUIPage(SWGObject owner, TangibleObject target) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + String displayname = "@installation_n:"+building.getStfName(); + if (building.getCustomName()!=null) + displayname = building.getCustomName(); + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:structure_status_t"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:structure_name_prompt" + " " + displayname); + String ownerName = owner.getCustomName(); + if (ownerName.length()>0){ + String[] helper = ownerName.split(" "); + ownerName = helper[0]; + } + + String maintenancePool_string = ""+(int)building.getMaintenanceAmount(); + int hourlyMaintenance = building.getBMR(); + float totalNumberOfHours = (float)building.getMaintenanceAmount()/hourlyMaintenance; + float minuteFraction = ((totalNumberOfHours * 100) % 100) / 100; + int nDays = (int)totalNumberOfHours / 24; + float difference = totalNumberOfHours % 24; + int nHours = (int)difference; + int nMinutes = (int)(minuteFraction *60); + maintenancePool_string += " (" + nDays + " days, " + nHours + " hours, " + nMinutes + " minutes)"; + + window.addListBoxMenuItem("@player_structure:owner_prompt" + " " + ownerName, 0); + if (building.getPrivacy()==BuildingObject.PRIVATE) + window.addListBoxMenuItem("@player_structure:structure_private", 1); + else + window.addListBoxMenuItem("@player_structure:structure_public", 1); + window.addListBoxMenuItem("@player_structure:condition_prompt" + " " + target.getConditionDamage()+"%", 2); + window.addListBoxMenuItem("@player_structure:maintenance_pool_prompt " + maintenancePool_string, 3); + window.addListBoxMenuItem("@player_structure:maintenance_rate_prompt " + building.getBMR() + " cr/h", 4); // @player_structure:credits_per_hour + window.addListBoxMenuItem("@player_structure:maintenance_mods_prompt", 5); + window.addListBoxMenuItem("@player_structure:items_in_building_prompt " + building.getItemsList().size(), 6); + window.addListBoxMenuItem("@player_structure:total_house_storage " + building.getMaximumStorageCapacity(), 7); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void declareResidency(SWGObject owner, TangibleObject target) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + building.setResidency((CreatureObject)owner); + //owner.setResidence(); + } + + public void handleListAllItems(SWGObject owner, TangibleObject target) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + String displayname = "@installation_n:"+building.getStfName(); + if (building.getCustomName()!=null) + displayname = building.getCustomName(); + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:find_items_find_all_house_items"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:find_items_prompt"); + + Vector itemList = building.getItemsList(); + + for (int i=0;i returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + + + } + + public void handleDeleteAllItems(SWGObject owner, TangibleObject target) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + //building.getItemsList().clear(); + // confirmation needed + confirmDeleteAllItems(owner, target); + } + + public void confirmDeleteAllItems(SWGObject owner, TangibleObject target) { + + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + + Random rnd = new Random(); + final int confirmCode = 100000 + rnd.nextInt(900000); + final SUIWindow window = core.suiService.createInputBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:confirm_destruction_t"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:delete_all_items_d " + + "@player_structure:delete_all_items_prompt " + + "\n \n Code: " + confirmCode); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@yes"); + window.setProperty("btnCancel:Text", "@no"); + Vector returnList = new Vector(); + returnList.add("txtInput:LocalText"); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject ownerC = (CreatureObject)owner; + core.suiService.closeSUIWindow(owner, 0); + if (returnList.get(0).equals(""+confirmCode)){ + confirmDeleteAllItems2ndStage(ownerC,building); + } else { + ownerC.sendSystemMessage("@player_structure:incorrect_destroy_code",(byte)1); + } + + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void confirmDeleteAllItems2ndStage(final CreatureObject ownerC, BuildingObject building) { + + final SUIWindow window = core.suiService.createMessageBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", ownerC, building, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:confirm_destruction_t"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:delete_all_items_second_d"); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@yes"); + window.setProperty("btnCancel:Text", "@no"); + Vector returnList = new Vector(); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + for (TangibleObject del : building.getItemsList()){ + core.objectService.destroyObject(del); + } + ownerC.sendSystemMessage("@player_structure:items_deleted",(byte)1); + core.suiService.closeSUIWindow(owner, 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void handleFindLostItems(SWGObject owner, TangibleObject target) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + String displayname = "@installation_n:"+building.getStfName(); + if (building.getCustomName()!=null) + displayname = building.getCustomName(); + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:find_items_find_all_house_items"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:structure_name_prompt" + " " + displayname); + + Vector itemList = building.getItemsList(); + final Map itemIDMapping = new HashMap(); + + for (int i=0;i returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + + int index = Integer.parseInt(returnList.get(0)); + long foundItemID = (long) itemIDMapping.get(index); + TangibleObject foundItem = (TangibleObject) core.objectService.getObject(foundItemID); + //core.simulationService.transform(foundItem,owner.getPosition()); + foundItem.setPosition(owner.getPosition()); + core.suiService.closeSUIWindow(owner, 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + + + } + + public void handleSearchForItems(SWGObject owner, TangibleObject target) { + // Spawning the structure terminal outside makes it display the correct radial + core.staticService.spawnObject("object/tangible/terminal/shared_terminal_player_structure.iff", "tatooine", 0L, 3525.0F, 4.0F, -4800.0F, 0.70F, 0.71F); + // I assume that childobject does not get a radial somehow + + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final SUIWindow window = core.suiService.createInputBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:find_items_search_keyword_title"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:find_items_search_keyword_prompt"); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + Vector returnList = new Vector(); + returnList.add("txtInput:LocalText"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + + String itemSearchName = (String) returnList.get(0); + Vector allItems = building.getItemsList(); + Vector foundItems = new Vector(); + + for (TangibleObject obj : allItems){ + String searchAttribute=obj.getCustomName(); + if (searchAttribute==null) + searchAttribute=obj.getTemplate(); + if (searchAttribute.toLowerCase().contains(itemSearchName.toLowerCase())){ + foundItems.add(obj); + } + } + if (foundItems.size()>0){ + ((CreatureObject) owner).sendSystemMessage("@player_structure:find_items_search_list_title", (byte) 1); + displayFoundItems(owner, target, foundItems); + } else { + ((CreatureObject) owner).sendSystemMessage("@player_structure:find_items_search_not_found", (byte) 1); + } + core.suiService.closeSUIWindow(owner, 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void displayFoundItems(SWGObject owner, TangibleObject target, Vector foundItems) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:find_items_search_keyword_title"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:find_items_search_list_prompt"); + + Vector itemList = building.getItemsList(); + + final Map itemIDMapping = new HashMap(); + + for (int i=0;i returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void handlePermissionEntry(CreatureObject owner, TangibleObject target) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + String listName = "ENTRY"; + building.setPermissionEntry(listName,owner); + } + + public void handlePermissionBan(CreatureObject owner, TangibleObject target) { + final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + String listName = "BAN"; + building.setPermissionBan(listName,owner); + } + + public void handlePermissionListModify(CreatureObject owner, SWGObject target, String commandArgs){ + + String[] commandSplit = commandArgs.split(" "); + if (commandSplit.length==3){ + if (core.characterService.playerExists(commandSplit[2]) && + core.characterService.getPlayerOID(commandSplit[2])>0){ + long playerOID = core.characterService.getPlayerOID(commandSplit[2]); + if (commandSplit[2].equals("ENTRY")){ + + if (commandSplit[0].equals("add")){ + ((BuildingObject)target).addPlayerToEntryList(owner, playerOID, commandSplit[2]); + } + if (commandSplit[0].equals("remove")){ + ((BuildingObject)target).removePlayerFromEntryList(owner, playerOID, commandSplit[2]); + } + } + if (commandSplit[2].equals("BAN")){ + + if (commandSplit[0].equals("add")){ + ((BuildingObject)target).addPlayerToBanList(owner, playerOID, commandSplit[2]); + } + if (commandSplit[0].equals("remove")){ + ((BuildingObject)target).removePlayerFromBanList(owner, playerOID, commandSplit[2]); + } + } + } else { + owner.sendSystemMessage(commandSplit[2]+ " is an invalid player name", (byte) 0); // modify_list_invalid_player %NO is an invalid player name. + } + } + if (commandSplit.length==2){ + owner.sendSystemMessage("No name was entered", (byte) 0); + } + + } + + public String fetchPrivacyString(TangibleObject object){ + final BuildingObject building = (BuildingObject) object.getAttachment("housing_parentstruct"); + return building.getPrivacyString(); + } + + + @Override + public void insertOpcodes(Map arg0, + Map arg1) { + // TODO Auto-generated method stub + + } + + @Override + public void shutdown() { + + } +} \ No newline at end of file diff --git a/src/services/map/MapService.java b/src/services/map/MapService.java index f586cfde..007f4281 100644 --- a/src/services/map/MapService.java +++ b/src/services/map/MapService.java @@ -105,7 +105,7 @@ public class MapService implements INetworkDispatch { public void addPlanet(Planet planet) { locationMap.put(planet, new Vector()); - core.scriptService.callScript("scripts/", "addLocations", "static_map_locations", core, planet); + core.scriptService.callScript("scripts/", "static_map_locations", "addLocations", core, planet); } public void addLocation(Planet planet, String name, float x, float y, byte category, byte subcategory, byte active) { @@ -117,6 +117,9 @@ public class MapService implements INetworkDispatch { public String getClosestCityName(SWGObject object) { + if(object.getPlanet() == null) + object.setPlanet(core.terrainService.getPlanetByID(object.getPlanetId())); + Vector locations = locationMap.get(object.getPlanet()); float closestDistance = Float.MAX_VALUE; String closestName = ""; diff --git a/src/resources/z/exp/objects/universe/UniverseMessageBuilder.java b/src/services/object/DuplicateId.java similarity index 74% rename from src/resources/z/exp/objects/universe/UniverseMessageBuilder.java rename to src/services/object/DuplicateId.java index d318a313..db618527 100644 --- a/src/resources/z/exp/objects/universe/UniverseMessageBuilder.java +++ b/src/services/object/DuplicateId.java @@ -19,18 +19,29 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.objects.universe; +package services.object; -import resources.z.exp.objects.ObjectMessageBuilder; +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.PrimaryKey; -public class UniverseMessageBuilder extends ObjectMessageBuilder { +@Entity +public class DuplicateId { - public UniverseMessageBuilder(UniverseObject object) { - super(object); + @PrimaryKey + private String key; + private long objectId; + + public DuplicateId(String key, long objectId) { + this.key = key; + this.objectId = objectId; } - public UniverseMessageBuilder() { - super(); + public DuplicateId() { + + } + + public long getObjectId() { + return objectId; } } diff --git a/src/resources/z/exp/quest/Quest.java b/src/services/object/ObjectId.java similarity index 80% rename from src/resources/z/exp/quest/Quest.java rename to src/services/object/ObjectId.java index 9dfc1ae4..36df1736 100644 --- a/src/resources/z/exp/quest/Quest.java +++ b/src/services/object/ObjectId.java @@ -19,18 +19,21 @@ * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. ******************************************************************************/ -package resources.z.exp.quest; +package services.object; -import resources.objects.Delta; +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.PrimaryKey; -public class Quest extends Delta { +@Entity +public class ObjectId { - public Quest() { - - } + @PrimaryKey + public long objectId; - public byte[] getBytes() { - return new byte[] { }; + public ObjectId(long objectId) { + this.objectId = objectId; } + + public ObjectId() { } } diff --git a/src/services/object/ObjectService.java b/src/services/object/ObjectService.java index 78fcda73..c571bd5d 100644 --- a/src/services/object/ObjectService.java +++ b/src/services/object/ObjectService.java @@ -30,10 +30,12 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Random; +import java.util.Set; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; @@ -52,18 +54,29 @@ import org.apache.mina.core.session.IoSession; import org.python.core.Py; import org.python.core.PyObject; +import com.sleepycat.je.Transaction; +import com.sleepycat.je.TransactionConfig; import com.sleepycat.persist.EntityCursor; +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.PrimaryKey; -import protocol.swg.ChatFriendsListUpdate; -import protocol.swg.ChatOnChangeFriendStatus; -import protocol.swg.ChatOnGetFriendsList; import protocol.swg.CmdSceneReady; import protocol.swg.CmdStartScene; import protocol.swg.HeartBeatMessage; +import protocol.swg.ObjControllerMessage; import protocol.swg.ParametersMessage; import protocol.swg.SelectCharacter; import protocol.swg.ServerTimeMessage; import protocol.swg.UnkByteFlag; +import protocol.swg.chat.ChatFriendsListUpdate; +import protocol.swg.chat.ChatOnChangeFriendStatus; +import protocol.swg.chat.ChatOnConnectAvatar; +import protocol.swg.chat.ChatOnGetFriendsList; +import protocol.swg.chat.ChatRoomList; +import protocol.swg.chat.ChatServerStatus; +import protocol.swg.objectControllerObjects.ShowFlyText; +import protocol.swg.chat.VoiceChatStatus; +import protocol.swg.objectControllerObjects.UiPlayEffect; import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.CrcStringTableVisitor; import engine.clientdata.visitors.DatatableVisitor; @@ -72,7 +85,11 @@ import engine.clientdata.visitors.WorldSnapshotVisitor.SnapshotChunk; import engine.clients.Client; import engine.resources.common.CRC; import engine.resources.container.Traverser; +import engine.resources.container.WorldCellPermissions; +import engine.resources.container.WorldPermissions; import engine.resources.database.DatabaseConnection; +import engine.resources.database.ObjectDatabase; +import engine.resources.objects.IPersistent; import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; @@ -80,37 +97,48 @@ import engine.resources.scene.Quaternion; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; import main.NGECore; +import resources.objects.Delta; import resources.objects.building.BuildingObject; import resources.objects.cell.CellObject; +import resources.objects.craft.DraftSchematic; import resources.objects.creature.CreatureObject; +import resources.objects.deed.Harvester_Deed; +import resources.objects.deed.Player_House_Deed; +import resources.objects.factorycrate.FactoryCrateObject; import resources.objects.group.GroupObject; import resources.objects.guild.GuildObject; +import resources.objects.harvester.HarvesterObject; +import resources.objects.installation.InstallationObject; +import resources.objects.intangible.IntangibleObject; +import resources.objects.manufacture.ManufactureSchematicObject; import resources.objects.mission.MissionObject; import resources.objects.player.PlayerObject; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceContainerObject; +import resources.objects.resource.ResourceRoot; import resources.objects.staticobject.StaticObject; import resources.objects.tangible.TangibleObject; +import resources.objects.tool.SurveyTool; import resources.objects.waypoint.WaypointObject; import resources.objects.weapon.WeaponObject; +import services.command.BaseSWGCommand; +import services.command.CombatCommand; +import services.bazaar.AuctionItem; +import services.chat.ChatRoom; @SuppressWarnings("unused") public class ObjectService implements INetworkDispatch { private Map objectList = new ConcurrentHashMap(); - private NGECore core; - private DatabaseConnection databaseConnection; - private AtomicLong highestId = new AtomicLong(); - private Random random = new Random(); - private Map serverTemplates = new ConcurrentHashMap(); - private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); - protected final Object objectMutex = new Object(); + private List loadServerTemplateTasks = Collections.synchronizedList(new ArrayList()); public ObjectService(final NGECore core) { this.core = core; @@ -118,11 +146,12 @@ public class ObjectService implements INetworkDispatch { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { + core.getObjectIdODB().getEnvironment().flushLog(true); synchronized(objectList) { for(SWGObject obj : objectList.values()) { if(obj.getClient() != null && obj.getClient().getSession() != null) { - core.connectionService.disconnect(obj.getClient().getSession()); + core.connectionService.disconnect(obj.getClient()); } } @@ -142,6 +171,7 @@ public class ObjectService implements INetworkDispatch { } catch (SQLException e) { e.printStackTrace(); } + } public void loadBuildings() { @@ -164,17 +194,113 @@ public class ObjectService implements INetworkDispatch { object.getContainerInfo(object.getTemplate()); } - }); - core.simulationService.add(building, building.getPosition().x, building.getPosition().z); + }); } - - } - - public SWGObject createObject(String Template, long objectID, Planet planet, Point3D position, Quaternion orientation, String customServerTemplate) { - return createObject(Template, objectID, planet, position, orientation, customServerTemplate, false); + cursor.close(); } - public SWGObject createObject(String Template, long objectID, Planet planet, Point3D position, Quaternion orientation, String customServerTemplate, boolean overrideSnapshot) { + // loads the resource roots at server start + public void loadResourceRoots() { + EntityCursor cursor = core.getResourceRootsODB().getCursor(Integer.class, ResourceRoot.class); + Iterator it = cursor.iterator(); + int loadedResourceRootsCounter = 0; + System.out.println("Loading resource roots..."); + while(it.hasNext()) { + final ResourceRoot resourceRoot = it.next(); + System.err.println("resourceRoot loaded ID: " + resourceRoot.getResourceRootID() + " " + resourceRoot.getResourceFileName()); + core.resourceService.add_resourceRoot(resourceRoot); + loadedResourceRootsCounter++; + } + + if (loadedResourceRootsCounter==0){ + //big bang will take care of it + } + //System.err.println("loadedResourceRootsCounter " + loadedResourceRootsCounter); + cursor.close(); + System.out.println("Finished loading resource roots."); + } + + // loads the currently spawned resources at server start + public void loadResources() { + EntityCursor cursor = core.getResourcesODB().getCursor(Long.class, GalacticResource.class); + Iterator it = cursor.iterator(); + int loadedResourceCounter = 0; + System.out.println("Loading resources..."); + while(it.hasNext()) { + final GalacticResource resource = it.next(); + System.err.println("resource " + resource.getName() + " rootID " + resource.getResourceRootID()); + objectList.put(resource.getId(), resource); + + // re-reference ResourceRoot + int resourceRootID = resource.getResourceRootID(); + ResourceRoot resourceRoot = core.resourceService.retrieveResourceRootReference(resourceRootID); + resource.setResourceRoot(resourceRoot); + + // recreate the collections + core.resourceService.addSpawnedResource(resource); + byte pool = resource.getPoolNumber(); + switch (pool){ + case 1: + core.resourceService.add_spawnedResourcesPool1(resource); + break; + case 2: + core.resourceService.add_spawnedResourcesPool2(resource); + break; + case 3: + core.resourceService.add_spawnedResourcesPool3(resource); + break; + case 4: + core.resourceService.add_spawnedResourcesPool4(resource); + break; + default: + System.err.println("Loaded resource " + resource.getName() + " has no valid pool value!"); + resource.setPoolNumber((byte)4); // Make it a pool 4 + } + loadedResourceCounter++; + } + + if (loadedResourceCounter==0){ + core.resourceService.kickOffBigBang(); // spawn resources initially once + } + + cursor.close(); + System.out.println("Finished loading resources."); + } + + public SWGObject createResource() { + SWGObject object = null; + Planet planet = core.terrainService.getPlanetByID(1); + Point3D position = new Point3D(0,0,0); + Quaternion orientation = new Quaternion(1,1,1,1); + String Template = "object/resource_container/base/shared_base_resource_container.iff"; + boolean isSnapshot = false; + + long objectID = generateObjectID(); + + object = new GalacticResource(objectID, planet, position, orientation, Template); + + object.setPlanetId(planet.getID()); + + object.setAttachment("customServerTemplate", Template); + + object.setisInSnapshot(isSnapshot); + + objectList.put(objectID, object); + return object; + } + + public void loadServerTemplates() { + System.out.println("Loading server templates..."); + loadServerTemplateTasks.forEach(Runnable::run); + loadServerTemplateTasks.clear(); + System.out.println("Finished loading server templates..."); + } + + public SWGObject createObject(String Template, long objectID, Planet planet, Point3D position, Quaternion orientation, String customServerTemplate) { + return createObject(Template, objectID, planet, position, orientation, customServerTemplate, false, true); + } + + public SWGObject createObject(String Template, long objectID, Planet planet, Point3D position, Quaternion orientation, String customServerTemplate, boolean overrideSnapshot, boolean loadServerTemplate) { SWGObject object = null; CrcStringTableVisitor crcTable; try { @@ -200,11 +326,27 @@ public class ObjectService implements INetworkDispatch { object = new PlayerObject(objectID, planet); + } else if(Template.startsWith("object/tangible/survey_tool")) { + + object = new SurveyTool(objectID, planet, Template, position, orientation); + + } else if(Template.startsWith("object/tangible/deed/harvester_deed") || Template.startsWith("object/tangible/deed/generator_deed")) { + + object = new Harvester_Deed(objectID, planet, Template, position, orientation); + + } else if(Template.startsWith("object/tangible/deed/player_house_deed")) { + + object = new Player_House_Deed(objectID, planet, Template, position, orientation); + } else if(Template.startsWith("object/tangible")) { object = new TangibleObject(objectID, planet, Template, position, orientation); - } else if(Template.startsWith("object/weapon")) { + } else if(Template.startsWith("object/intangible")) { + + object = new IntangibleObject(objectID, planet, position, orientation,Template); + + }else if(Template.startsWith("object/weapon")) { object = new WeaponObject(objectID, planet, Template, position, orientation); @@ -248,10 +390,38 @@ public class ObjectService implements INetworkDispatch { object = new MissionObject(objectID, planet, Template); + } else if(Template.startsWith("object/resource_container")) { + + object = new ResourceContainerObject(objectID, planet, Template, position, orientation); + + } else if(Template.startsWith("object/factory/shared_factory_crate")) { + + object = new FactoryCrateObject(objectID, planet, Template, position, orientation); + + } else if(Template.startsWith("object/draft_schematic")) { + + object = new DraftSchematic(objectID, planet, Template, position, orientation); + + } else if(Template.startsWith("object/manufacture_schematic")) { + + object = new ManufactureSchematicObject(objectID, planet, Template, position, orientation); + + } else if(Template.startsWith("object/installation/mining_ore/construction")) { + + float positionY = core.terrainService.getHeight(planet.getID(), position.x, position.z)-1f; + Point3D newpoint = new Point3D(position.x,positionY,position.z); + object = new InstallationObject(objectID, planet, Template, newpoint, orientation); + + } else if(Template.startsWith("object/installation/mining_ore") || Template.startsWith("object/installation/mining_liquid") || + Template.startsWith("object/installation/mining_gas") || Template.startsWith("object/installation/mining_organic") || + Template.startsWith("object/installation/generators")) { + + float positionY = core.terrainService.getHeight(planet.getID(), position.x, position.z)-1f; + Point3D newpoint = new Point3D(position.x,positionY,position.z); + object = new HarvesterObject(objectID, planet, Template, newpoint, orientation); + } else { - - return null; - + return null; } object.setPlanetId(planet.getID()); @@ -259,7 +429,15 @@ public class ObjectService implements INetworkDispatch { object.setAttachment("customServerTemplate", customServerTemplate); object.setisInSnapshot(isSnapshot); - loadServerTemplate(object); + if(!core.getObjectIdODB().contains(objectID, Long.class, ObjectId.class)) { + core.getObjectIdODB().put(new ObjectId(objectID), Long.class, ObjectId.class); + } + if(loadServerTemplate) + loadServerTemplate(object); + else { + final SWGObject pointer = object; + loadServerTemplateTasks.add(() -> loadServerTemplate(pointer)); + } objectList.put(objectID, object); @@ -270,23 +448,32 @@ public class ObjectService implements INetworkDispatch { if (Template.startsWith("object/creature/") || Template.startsWith("object/mobile/")) { if (Template.startsWith("object/mobile/")) { ((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE); - } else if (Template.startsWith("object/mobile/beast_master/")) { + } + if (Template.startsWith("object/mobile/beast_master/")) { ((CreatureObject) object).setOptionsBitmask(Options.NONE); - } else if (Template.startsWith("object/mobile/vendor/")) { + } + if (Template.startsWith("object/mobile/vendor/")) { ((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE | Options.USABLE); - } else if (Template.startsWith("object/mobile/vehicle/")) { + } + if (Template.startsWith("object/mobile/vehicle/")) { ((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE | Options.MOUNT); - } else if (Template.startsWith("object/mobile/hologram/")) { + } + if (Template.startsWith("object/mobile/hologram/")) { ((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE); - } else if (Template.startsWith("object/creature/npc/theme_park/")) { + } + if (Template.startsWith("object/creature/npc/theme_park/")) { ((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE); - } else if (Template.startsWith("object/creature/npc/general/")) { + } + if (Template.startsWith("object/creature/npc/general/")) { ((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE | Options.CONVERSABLE); - } else if (Template.startsWith("object/creature/droid/crafted/")) { + } + if (Template.startsWith("object/creature/droid/crafted/")) { ((CreatureObject) object).setOptionsBitmask(Options.NONE); - } else if (Template.startsWith("object/creature/droid/")) { + } + if (Template.startsWith("object/creature/droid/")) { ((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE | Options.INVULNERABLE); - } else if (Template.startsWith("object/creature/player/")) { + } + if (Template.startsWith("object/creature/player/")) { ((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE); } } else if (object instanceof TangibleObject) { @@ -324,6 +511,7 @@ public class ObjectService implements INetworkDispatch { } catch (IOException e) { System.out.println("!IO error " + template.toString()); } + object.setAttachment("hasLoadedServerTemplate", new Boolean(true)); } public SWGObject createObject(String Template, Planet planet) { @@ -410,7 +598,19 @@ public class ObjectService implements INetworkDispatch { } }); objectList.remove(object.getObjectID()); - //core.simulationService.remove(object, object.getPosition().x, object.getPosition().y); + SWGObject parent = object.getContainer(); + + if(parent != null) { + if(parent instanceof CreatureObject) { + ((CreatureObject) parent).removeObjectFromEquipList(object); + ((CreatureObject) parent).removeObjectFromAppearanceEquipList(object); + } + long parentId = object.getParentId(); + parent.remove(object); + object.setParentId(parentId); + } else { + core.simulationService.remove(object, object.getWorldPosition().x, object.getWorldPosition().z, true); + } } @@ -449,11 +649,51 @@ public class ObjectService implements INetworkDispatch { } - public CreatureObject getCreatureFromDB(long objectId) { - return core.getCreatureODB().get(new Long(objectId), Long.class, CreatureObject.class); + public SWGObject getObjectByFirstName(String customName) { + + synchronized(objectList) { + + for(SWGObject obj : objectList.values()) { + if(obj.getCustomName() == null) + continue; + if(obj.getCustomName().startsWith(customName)) + return obj; + } + + } + + EntityCursor cursor = core.getCreatureODB().getCursor(Long.class, CreatureObject.class); + + Iterator it = cursor.iterator(); + + while(it.hasNext()) { + if(it.next().getCustomName().startsWith(customName)) + return it.next(); + } + + return null; + } - private long generateObjectID() { + public CreatureObject getCreatureFromDB(long objectId) { + CreatureObject object = core.getCreatureODB().get(new Long(objectId), Long.class, CreatureObject.class); + + if (object != null && getObject(object.getObjectID()) == null) { + loadServerTemplate(object); + + object.viewChildren(object, true, true, new Traverser() { + + public void process(SWGObject child) { + loadServerTemplate(child); + } + + }); + } + + return object; + } + + public long generateObjectID() { /*Random random = new Random(); long objectID = random.nextInt(); @@ -466,34 +706,100 @@ public class ObjectService implements INetworkDispatch { return objectID;*/ - long newId; - - synchronized(objectMutex) { - newId = highestId.incrementAndGet(); + long newId = 0; + boolean found = false; + // stack overflow when using recursion + while(!found) { + synchronized(objectMutex) { + newId = highestId.incrementAndGet(); + } + + PreparedStatement ps2; + + try { + ps2 = databaseConnection.preparedStatement("UPDATE highestid SET id=" + newId + " WHERE id=" + (newId-1)); + ps2.executeUpdate(); + ps2.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + if(getObject(newId) != null || core.getObjectIdODB().contains(newId, Long.class, ObjectId.class)) + found = false; + else + found = true; } - PreparedStatement ps2; - - try { - ps2 = databaseConnection.preparedStatement("UPDATE highestid SET id=" + newId + " WHERE id=" + (newId-1)); - ps2.executeUpdate(); - ps2.close(); - } catch (SQLException e) { - e.printStackTrace(); - } - if(getObject(newId) == null && getCreatureFromDB(newId) == null) - return newId; - else - return generateObjectID(); - + return newId; } public void useObject(CreatureObject creature, SWGObject object) { - if (object == null) { + if (creature == null || object == null) { return; } + int reuse_time; + + try { + reuse_time = object.getIntAttribute("reuse_time"); + } catch (NumberFormatException e) { + reuse_time = 0; + } + + if (reuse_time > 0) { + try { + DatatableVisitor visitor = ClientFileManager.loadFile("datatables/timer/template_command_mapping.iff", DatatableVisitor.class); + + for (int i = 0; i < visitor.getRowCount(); i++) { + if (visitor.getObject(i, 0) != null && ((String) (visitor.getObject(i, 0))).equalsIgnoreCase(object.getTemplate())) { + String commandName = (String) visitor.getObject(i, 1); + String cooldownGroup = (String) visitor.getObject(i, 2); + String animation = (String) visitor.getObject(i, 3); + + if (commandName.length() > 0) { + BaseSWGCommand command = core.commandService.getCommandByName(commandName); + + if (command instanceof CombatCommand && animation.length() > 0) { + ((CombatCommand) command).setDefaultAnimations(new String[] { animation }); + } + + if (core.commandService.callCommand(creature, object, command, 0, "")) { + core.commandService.removeCommand(creature, 0, command); + return; + } + } else if (cooldownGroup.length() > 0) { + if (creature.hasCooldown(cooldownGroup)) { + return; + } + + creature.addCooldown(cooldownGroup, object.getIntAttribute("reuse_time")); + } + + break; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + if (object instanceof TangibleObject) { + TangibleObject item = (TangibleObject) object; + int uses = item.getUses(); + + if (uses > 0) { + item.setUses(uses--); + + if (item.getUses() == 0) { + destroyObject(object); + } + } + } + + if (object.getStringAttribute("proc_name") != null) { + core.buffService.addBuffToCreature(creature, object.getStringAttribute("proc_name").replace("@ui_buff:", ""), creature); + } + String filePath = "scripts/" + object.getTemplate().split("shared_" , 2)[0].replace("shared_", "") + object.getTemplate().split("shared_" , 2)[1].replace(".iff", "") + ".py"; if (FileUtilities.doesFileExist(filePath)) { @@ -543,15 +849,28 @@ public class ObjectService implements INetworkDispatch { } else { + if (!(getObject(objectId) instanceof CreatureObject)) + return; + creature = (CreatureObject) getObject(objectId); + if(creature.getAttachment("disconnectTask") != null && creature.getClient() != null && !creature.getClient().getSession().isClosing()) + return; + } + PlayerObject ghost = (PlayerObject) creature.getSlottedObject("ghost"); + + if(ghost == null) + return; + + ghost.clearFlagBitmask(PlayerFlags.LD); + if(creature.getAttachment("disconnectTask") != null) { - creature.getAwareObjects().removeAll(creature.getAwareObjects()); ((ScheduledFuture) creature.getAttachment("disconnectTask")).cancel(true); - creature.setAttachment("disconnectTask", null); - } + } + creature.getAwareObjects().removeAll(creature.getAwareObjects()); + creature.setAttachment("disconnectTask", null); creature.setClient(client); Planet planet = core.terrainService.getPlanetByID(creature.getPlanetId()); @@ -580,7 +899,7 @@ public class ObjectService implements INetworkDispatch { objectList.put(object.getObjectID(), object); } - }); + }); if(creature.getParentId() != 0) { SWGObject parent = getObject(creature.getParentId()); @@ -590,6 +909,11 @@ public class ObjectService implements INetworkDispatch { Point3D position = creature.getPosition(); + if(Float.isNaN(position.x) || Float.isNaN(position.y) || Float.isNaN(position.z)) { + creature.setPosition(new Point3D(0, 0, 0)); + position = creature.getPosition(); + } + HeartBeatMessage heartBeat = new HeartBeatMessage(); session.write(heartBeat.serialize()); @@ -601,23 +925,30 @@ public class ObjectService implements INetworkDispatch { CmdStartScene startScene = new CmdStartScene((byte) 0, objectId, creature.getPlanet().getPath(), creature.getTemplate(), position.x, position.y, position.z, core.getGalacticTime(), 0); session.write(startScene.serialize()); + ChatServerStatus chatServerStatus = new ChatServerStatus(); + client.getSession().write(chatServerStatus.serialize()); + + VoiceChatStatus voiceStatus = new VoiceChatStatus(); + client.getSession().write(voiceStatus.serialize()); + ParametersMessage parameters = new ParametersMessage(); session.write(parameters.serialize()); - creature.makeAware(core.guildService.getGuildObject()); + ChatOnConnectAvatar chatConnect = new ChatOnConnectAvatar(); + creature.getClient().getSession().write(chatConnect.serialize()); + + creature.makeAware(core.guildService.getGuildObject()); core.chatService.loadMailHeaders(client); core.simulationService.handleZoneIn(client); - creature.makeAware(creature); - - PlayerObject ghost = (PlayerObject) creature.getSlottedObject("ghost"); + creature.makeAware(creature); //ChatOnGetFriendsList friendsListMessage = new ChatOnGetFriendsList(ghost); //client.getSession().write(friendsListMessage.serialize()); if (ghost != null) { - ghost.clearFlagBitmask(PlayerFlags.LD); + //ghost.clearFlagBitmask(PlayerFlags.LD); String objectShortName = creature.getCustomName().toLowerCase(); if (creature.getCustomName().contains(" ")) { @@ -643,10 +974,20 @@ public class ObjectService implements INetworkDispatch { } } } + + for (Integer roomId : ghost.getJoinedChatChannels()) { + ChatRoom room = core.chatService.getChatRoom(roomId); + + if (room != null) { core.chatService.joinChatRoom(objectShortName, roomId); } + // work-around for any channels that may have been deleted, or only spawn on server startup, that were added to the joined channels + else { ghost.removeChannel(roomId); } + } } + if(!core.getConfig().getString("MOTD").equals("")) + creature.sendSystemMessage(core.getConfig().getString("MOTD"), (byte) 2); + core.playerService.postZoneIn(creature); - } }); @@ -664,12 +1005,19 @@ public class ObjectService implements INetworkDispatch { int counter = 0; for(SnapshotChunk chunk : visitor.getChunks()) { ++counter; - SWGObject obj = createObject(visitor.getName(chunk.nameId), chunk.id, planet, new Point3D(chunk.xPosition, chunk.yPosition, chunk.zPosition), new Quaternion(chunk.orientationW, chunk.orientationX, chunk.orientationY, chunk.orientationZ)); + // Since the ids are just ints, they append 0xFFFF86F9 to them + // This is demonstated in the packet sent to the server when you /target client-spawned buildouts + // This is done for buildouts; uncertain about snapshot objects so it's commented for now + //long objectId = Delta.createBuffer(8).putInt(chunk.id).putInt(0xF986FFFF).flip().getLong(); // Not sure what extension they add to 4-byte-only snapshot objectIds. With buildouts they add 0xFFFF86F9. This is demonstated in the packet sent to the server when you /target client-spawned objects + int objectId = chunk.id; + SWGObject obj = createObject(visitor.getName(chunk.nameId), objectId, planet, new Point3D(chunk.xPosition, chunk.yPosition, chunk.zPosition), new Quaternion(chunk.orientationW, chunk.orientationX, chunk.orientationY, chunk.orientationZ), null, false, false); if(obj != null) { + obj.setContainerPermissions(WorldPermissions.WORLD_PERMISSIONS); obj.setisInSnapshot(true); obj.setParentId(chunk.parentId); if(obj instanceof CellObject) { ((CellObject) obj).setCellNumber(chunk.cellNumber); + obj.setContainerPermissions(WorldCellPermissions.WORLD_CELL_PERMISSIONS); } } //System.out.print("\rLoading Object [" + counter + "/" + visitor.getChunks().size() + "] : " + visitor.getName(chunk.nameId)); @@ -694,7 +1042,8 @@ public class ObjectService implements INetworkDispatch { * @param position The position as an offset to the parent object. * @param orientation The orientation as an offset to the parent object. */ - public void createChildObject(SWGObject parent, String template, Point3D position, Quaternion orientation, int cellNumber) { + @SuppressWarnings("unchecked") + public SWGObject createChildObject(SWGObject parent, String template, Point3D position, Quaternion orientation, int cellNumber) { if(cellNumber == -1) { @@ -714,7 +1063,7 @@ public class ObjectService implements INetworkDispatch { } SWGObject child = createObject(template, 0, parent.getPlanet(), position, orientation); - + child.setContainerPermissions(WorldPermissions.WORLD_PERMISSIONS); if(parent.getAttachment("childObjects") == null) parent.setAttachment("childObjects", new Vector()); @@ -724,15 +1073,15 @@ public class ObjectService implements INetworkDispatch { child.setAttachment("cellNumber", cellNumber); //core.simulationService.add(child, x, z); - + return child; } - public void createChildObject(SWGObject parent, String template, float x, float y, float z, float qy, float qw) { - createChildObject(parent, template, new Point3D(x, y, z), new Quaternion(qw, 0, qy, 0), -1); + public SWGObject createChildObject(SWGObject parent, String template, float x, float y, float z, float qy, float qw) { + return createChildObject(parent, template, new Point3D(x, y, z), new Quaternion(qw, 0, qy, 0), -1); } - public void createChildObject(SWGObject parent, String template, float x, float y, float z, float qy, float qw, int cellNumber) { - createChildObject(parent, template, new Point3D(x, y, z), new Quaternion(qw, 0, qy, 0), cellNumber); + public SWGObject createChildObject(SWGObject parent, String template, float x, float y, float z, float qy, float qw, int cellNumber) { + return createChildObject(parent, template, new Point3D(x, y, z), new Quaternion(qw, 0, qy, 0), cellNumber); } public void loadBuildoutObjects(Planet planet) throws InstantiationException, IllegalAccessException { @@ -753,6 +1102,8 @@ public class ObjectService implements INetworkDispatch { public void readBuildoutDatatable(DatatableVisitor buildoutTable, Planet planet, float x1, float z1) throws InstantiationException, IllegalAccessException { CrcStringTableVisitor crcTable = ClientFileManager.loadFile("misc/object_template_crc_string_table.iff", CrcStringTableVisitor.class); + List persistentBuildings = new ArrayList(); + Map duplicate = new HashMap(); for (int i = 0; i < buildoutTable.getRowCount(); i++) { @@ -784,8 +1135,10 @@ public class ObjectService implements INetworkDispatch { } else { - objectId = (Integer) buildoutTable.getObject(i, 0); - containerId = (Integer) buildoutTable.getObject(i, 1); + // Since the ids are just ints, they append 0xFFFF86F9 to them + // This is demonstated in the packet sent to the server when you /target client-spawned objects + objectId = (((Integer) buildoutTable.getObject(i, 0) == 0) ? 0 : Delta.createBuffer(8).putInt((Integer) buildoutTable.getObject(i, 0)).putInt(0xF986FFFF).flip().getLong()); + containerId = (((Integer) buildoutTable.getObject(i, 1) == 0) ? 0 : Delta.createBuffer(8).putInt((Integer) buildoutTable.getObject(i, 1)).putInt(0xF986FFFF).flip().getLong()); type = (Integer) buildoutTable.getObject(i, 2); cellIndex = (Integer) buildoutTable.getObject(i, 4); @@ -800,59 +1153,106 @@ public class ObjectService implements INetworkDispatch { portalCRC = (Integer) buildoutTable.getObject(i, 13); } - + + // Treeku - Refactored to work around duplicate objectIds + // Required for instances/heroics which are duplicated ie. 10 times if(!template.equals("object/cell/shared_cell.iff") && objectId != 0 && getObject(objectId) != null) { - //System.out.println("Duplicate buildout object: " + template); - continue; + SWGObject object = getObject(objectId); + + // Same coordinates is a true duplicate + if ((px + ((containerId == 0) ? 0 : x1)) == object.getPosition().x && + py == object.getPosition().y && + (pz + ((containerId == 0) ? 0 : z1)) == object.getPosition().z) { + //System.out.println("Duplicate buildout object: " + template); + continue; + } } - + + if (duplicate.containsKey(containerId)) { + containerId = duplicate.get(containerId); + } + String planetName = planet.getName(); + if (objectId != 0 && getObject(objectId) != null && (planetName.contains("dungeon") || planetName.contains("adventure"))) { + SWGObject container = getObject(containerId); + int x = ((int) (px + ((container == null) ? x1 : container.getPosition().x))); + int z = ((int) (pz + ((container == null) ? z1 : container.getPosition().z))); + String key = "" + CRC.StringtoCRC(planet.getName()) + CRC.StringtoCRC(template) + type + containerId + cellIndex + x + py + z; + long newObjectId = 0; + + if (core.getDuplicateIdODB().contains(key, String.class, DuplicateId.class)) { + newObjectId = core.getDuplicateIdODB().get(key, String.class, DuplicateId.class).getObjectId(); + } else { + newObjectId = generateObjectID(); + Transaction txn = core.getDuplicateIdODB().getEnvironment().beginTransaction(null, null); + core.getDuplicateIdODB().put(new DuplicateId(key, newObjectId), String.class, DuplicateId.class, txn); + txn.commitSync(); + } + + duplicate.put(objectId, newObjectId); + objectId = newObjectId; + } + List containers = new ArrayList(); SWGObject object; if(objectId != 0 && containerId == 0) { if(portalCRC != 0) { + if (core.getBuildingODB().contains(objectId, Long.class, BuildingObject.class) && !duplicate.containsValue(objectId)) + continue; containers.add(objectId); - object = createObject(template, objectId, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz), null, true); - ((BuildingObject) object).createTransaction(core.getBuildingODB().getEnvironment()); + object = createObject(template, objectId, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz), null, true, false); + object.setAttachment("childObjects", null); + /*if (!duplicate.containsValue(objectId)) { + ((BuildingObject) object).createTransaction(core.getBuildingODB().getEnvironment()); + core.getBuildingODB().put((BuildingObject) object, Long.class, BuildingObject.class, ((BuildingObject) object).getTransaction()); + ((BuildingObject) object).getTransaction().commitSync(); + }*/ } else { - object = createObject(template, objectId, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz)); + object = createObject(template, 0, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz), null, false, false); } if(object == null) continue; + object.setContainerPermissions(WorldPermissions.WORLD_PERMISSIONS); if(radius > 256) object.setAttachment("bigSpawnRange", new Boolean(true)); - core.simulationService.add(object, object.getPosition().x, object.getPosition().z); + if (!duplicate.containsValue(objectId) && object instanceof BuildingObject && portalCRC != 0) + persistentBuildings.add((BuildingObject) object); } else if(containerId != 0) { - object = createObject(template, 0, planet, new Point3D(px, py, pz), new Quaternion(qw, qx, qy, qz)); + object = createObject(template, 0, planet, new Point3D(px, py, pz), new Quaternion(qw, qx, qy, qz), null, false, false); if(containers.contains(containerId)) { + object.setContainerPermissions(WorldPermissions.WORLD_PERMISSIONS); object.setisInSnapshot(false); containers.add(objectId); } - if(object instanceof CellObject && cellIndex != 0) + if(object instanceof CellObject && cellIndex != 0) { + object.setContainerPermissions(WorldCellPermissions.WORLD_CELL_PERMISSIONS); ((CellObject) object).setCellNumber(cellIndex); + } SWGObject parent = getObject(containerId); if(parent != null && object != null) { if(parent instanceof BuildingObject && ((BuildingObject) parent).getCellByCellNumber(cellIndex) != null) continue; parent.add(object); - /*if(parent instanceof BuildingObject) { - ((BuildingObject) parent).createTransaction(core.getBuildingODB().getEnvironment()); - core.getBuildingODB().put((BuildingObject) parent, Long.class, BuildingObject.class, ((BuildingObject) parent).getTransaction()); - ((BuildingObject) parent).getTransaction().commitSync(); - }*/ } } else { - object = createObject(template, 0, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz)); - core.simulationService.add(object, object.getPosition().x, object.getPosition().z); + object = createObject(template, 0, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz), null, false, false); + object.setContainerPermissions(WorldPermissions.WORLD_PERMISSIONS); } //System.out.println("Spawning: " + template + " at: X:" + object.getPosition().x + " Y: " + object.getPosition().y + " Z: " + object.getPosition().z); - + if(object != null) + object.setAttachment("isBuildout", new Boolean(true)); } } + for(BuildingObject building : persistentBuildings) { + building.createTransaction(core.getBuildingODB().getEnvironment()); + core.getBuildingODB().put(building, Long.class, BuildingObject.class, building.getTransaction()); + building.getTransaction().commitSync(); + destroyObject(building); + } } @@ -877,4 +1277,16 @@ public class ObjectService implements INetworkDispatch { return count.get(); } + public void persistObject(IPersistent object, Class keyClass, Class valueClass, ObjectDatabase odb) { + object.createTransaction(odb.getEnvironment()); + core.getAuctionODB().put(object, keyClass, valueClass, object.getTransaction()); + object.getTransaction().commitSync(); + } + + public void deletePersistentObject(IPersistent object, Class keyClass, Class valueClass, ObjectDatabase odb, Object key) { + object.createTransaction(odb.getEnvironment()); + core.getAuctionODB().delete(key, keyClass, valueClass, object.getTransaction()); + object.getTransaction().commitSync(); + } + } diff --git a/src/services/pet/MountService.java b/src/services/pet/MountService.java new file mode 100644 index 00000000..b8f09734 --- /dev/null +++ b/src/services/pet/MountService.java @@ -0,0 +1,773 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services.pet; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.LongAdder; + +import protocol.swg.UpdateContainmentMessage; +import main.NGECore; +import resources.common.OutOfBand; +import resources.datatables.DisplayType; +import resources.datatables.Options; +import resources.datatables.Posture; +import resources.datatables.StateStatus; +import resources.objects.building.BuildingObject; +import resources.objects.creature.CreatureObject; +import resources.objects.player.PlayerObject; +import engine.resources.container.Traverser; +import engine.resources.objects.SWGObject; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; + +public class MountService implements INetworkDispatch { + + private NGECore core; + + public MountService(NGECore core) { + this.core = core; + } + + // Creature mounts are considered pets as well + // Pet abilities and petId is in PLAY9 + + // The functions for vehicles, mounts and pets are similar, but not the same + // Hence the multiple services. + + public void generateVehicle(CreatureObject actor, SWGObject deed, String vehicleTemplate, String pcdTemplate) { + if (actor == null || vehicleTemplate == null || pcdTemplate == null) { + return; + } + + if (actor.getSlottedObject("ghost") == null) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:failed_to_call_vehicle"), DisplayType.Broadcast); + return; + } + + SWGObject datapad = actor.getSlottedObject("datapad"); + + if (datapad == null) { + return; + } + + // Unsure if these are the right attributes. It doesn't generate the vehicle if the datapad has max # of vehicles. + //if (datapad.getIntAttribute("data_size") >= datapad.getIntAttribute("datapad_slots")) { + //actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:has_max_vehicle"), DisplayType.Broadcast); + //return; + //} + + if (actor.getTefTime() > 0){ + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:prose_cant_generate_yet", actor.getTefTime()), DisplayType.Broadcast); + return; + } + + SWGObject pcd = core.objectService.createObject(pcdTemplate, actor.getPlanet()); + + if (pcd == null) { + return; + } + + if (pcd.getSlottedObject("inventory") == null) { + pcd.add(core.objectService.createObject("object/tangible/inventory/shared_character_inventory.iff", pcd.getPlanet())); + } + + CreatureObject vehicle = (CreatureObject) core.objectService.createObject(vehicleTemplate, actor.getPlanet()); + + if (vehicle == null) { + return; + } + + vehicle.setOptions(Options.MOUNT | Options.ATTACKABLE, true); + + vehicle.setOwnerId(actor.getObjectID()); + + pcd.setAttachment("companionId", vehicle.getObjectID()); + + pcd.getSlottedObject("inventory").add(vehicle); + + datapad.add(pcd); + + if (deed != null) { + core.objectService.destroyObject(deed); + } + + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:device_added"), DisplayType.Broadcast); + + call(actor, pcd); + } + + public void generateMount(CreatureObject actor, SWGObject deed, String vehicleTemplate, String pcdTemplate) { + return; // NOT IMPLEMENTED + } + + public void call(CreatureObject actor, SWGObject pcd) { + if (actor == null) { + return; + } + + if (pcd == null) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_call"), DisplayType.Broadcast); + return; + } + + if (isMounted(actor)) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cannot_call_another_rideable"), DisplayType.Broadcast); + return; + } + + if (actor.getCombatFlag() == 1) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cannot_call_in_combat"), DisplayType.Broadcast); + return; + } + + if (actor.getContainer() != null) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cannot_call_indoors"), DisplayType.Broadcast); + return; + } + + if (actor.getPosture() == Posture.Dead) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cannot_call_while_dead"), DisplayType.Broadcast); + return; + } + + if (pcd.getSlottedObject("inventory") == null) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_call"), DisplayType.Broadcast); + return; + } + + if (pcd.getStringAttribute("required_faction") != null && pcd.getStringAttribute("required_faction").length() > 0) { + if (!actor.getFaction().equals(pcd.getStringAttribute("required_faction"))) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:officer_faction"), DisplayType.Broadcast); + return; + } + } + + PlayerObject player = (PlayerObject) actor.getSlottedObject("ghost"); + + if (player == null) { + return; + } + + CreatureObject mount = (CreatureObject) core.objectService.getObject((Long) pcd.getAttachment("companionId")); + + if (mount == null) { + // Somehow the vehicle object has got lost + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_call"), DisplayType.Broadcast); + return; + } + + mount.setFaction(actor.getFaction()); + mount.setFactionStatus(actor.getFactionStatus()); + + if (pcd.getTemplate().contains("vehicle")) { + callVehicle(actor, pcd, player, mount); + } else { + callMount(actor, pcd, player, mount); + } + } + + private void callVehicle(CreatureObject actor, SWGObject pcd, PlayerObject player, CreatureObject mount) { + if ((mount.getLevel() - actor.getLevel()) > 5) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_call_level"), DisplayType.Broadcast); + return; + } + + // FIXME Movement skillmod should always be used instead of CREO4 speed vars directly. Movement skillmod should NEVER be 0 unless rooted. Currently it is, which is wrong. + //if (actor.getSkillModBase("movement") == 0) { + //actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_call_vehicle_rooted"), DisplayType.Broadcast); + //return; + //} + + if (actor.getPlanet().getName().contains("kashyyyk") && !actor.getPlanet().getName().contains("_main")) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:vehicle_restricted_scene"), DisplayType.Broadcast); + //mount_restricted_scene for creature mounts + return; + } + + if (player.isCallingCompanion()) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_call_1sec"), DisplayType.Broadcast); + return; + } + + storeAll(actor); + + player.setCallingCompanion(true); + + if (actor.getTefTime() > 0) { + actor.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:call_vehicle_delay", actor.getTefTime()), DisplayType.Broadcast); + } + + try { + while (actor.getTefTime() > 0) { + Thread.sleep(3000); + } + } catch (InterruptedException e) { + e.printStackTrace(); + } + + SWGObject datapad = actor.getSlottedObject("datapad"); + + if (datapad == null) { + return; + } + + datapad.viewChildren(actor, false, false, new Traverser() { + + public void process(SWGObject pcd) { + if (pcd.getAttachment("companionId") != null && mount.getObjectID() == ((Long) pcd.getAttachment("companionId"))) { + if (pcd.getSlottedObject("inventory") != null) { + LongAdder adder = new LongAdder(); + pcd.getSlottedObject("inventory").viewChildren(actor, false, false, (obj) -> adder.increment()); + + if (adder.intValue() == 1) { + pcd.getSlottedObject("inventory").remove(mount); + mount.setPosition(actor.getPosition().clone()); + mount.setOrientation(actor.getOrientation().clone()); + mount.setPlanet(actor.getPlanet()); + core.simulationService.add(mount, actor.getWorldPosition().x, actor.getWorldPosition().z, false); + } + } + } + } + + }); + + player.setCallingCompanion(false); + } + + private void callMount(CreatureObject actor, SWGObject pcd, PlayerObject player, CreatureObject mount) { + return; // NOT IMPLEMENTED + } + + public void damage(CreatureObject mount) { + // alter components to progressively reduce the painting. + //stfs + //customization_fading_veh + //customization_gone_veh + + if (mount == null) { + return; + } + + CreatureObject owner = (CreatureObject) core.objectService.getObject(mount.getOwnerId()); + + if (!mount.getTemplate().contains("vehicle")) { + dismount(owner, mount); + store(owner, mount); + mount.setConditionDamage(0); + return; + } + + if (mount.getConditionDamage() >= mount.getMaxDamage()) { + disable(mount); + } + } + + public void disable(CreatureObject mount) { + mount.setOptions(Options.DISABLED, true); + + mount.viewChildren(mount, false, false, new Traverser() { + + public void process(SWGObject object) { + if (object == null || !(object instanceof CreatureObject)) { + return; + } + + CreatureObject rider = (CreatureObject) object; + + dismount(rider, mount); + + rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:veh_disabled"), DisplayType.Broadcast); + } + + }); + } + + public boolean canRepair(CreatureObject actor, CreatureObject mount) { + if (actor == null || mount == null) { + return false; + } + + if (!mount.getOption(Options.MOUNT)) { + return false; + } + + if (!mount.getTemplate().contains("vehicle")) { + return false; + } + + if (mount.getOwnerId() != actor.getObjectID()) { + return false; + } + + if (mount.getOption(Options.DISABLED)) { + return false; + } + + if (mount.getConditionDamage() == 0) { + return false; + } + + List surroundings = core.simulationService.get(mount.getPlanet(), mount.getPosition().x, mount.getPosition().z, 32); + + for (SWGObject object : surroundings) { + if (object instanceof BuildingObject) { + if (object.getTemplate().contains("garage")) { + return true; + } + } + } + + return false; + } + + public void repair(CreatureObject repairer, CreatureObject mount) { + if (repairer == null || mount == null) { + return; + } + + if (!mount.getOption(Options.MOUNT)) { + return; + } + + if (core.objectService.getObject(mount.getOwnerId()) != repairer) { + return; + } + + if (mount.getOption(Options.DISABLED)) { + repairer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cannot_repair_disabled"), DisplayType.Broadcast); + return; + } + + if (mount.getConditionDamage() == 0) { + repairer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:undamaged_vehicle"), DisplayType.Broadcast); + return; + } + + // This should produce an SUI window regarding cost and cost might be determined differently. + // But at the moment it's not important. + + if (!canRepair(repairer, mount)) { + repairer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:repair_unrecognized_garages"), DisplayType.Broadcast); + return; + } + + int cost = mount.getConditionDamage(); + + if (repairer.getCashCredits() < cost) { + repairer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:repair_failed_due_to_funds"), DisplayType.Broadcast); + return; + } + + mount.setConditionDamage(0); + + mount.setOptions(Options.DISABLED, false); + + repairer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:repaired_to_max"), DisplayType.Broadcast); + } + + public void mount(CreatureObject rider, CreatureObject mount) { + if (rider == null) { + return; + } + + if (mount == null) { + return; + } + + // FIXME like above, movement skillmod should be used instead of creo4 vars and never be 0, otherwise it thinks we are always rooted + //if (rider.getSkillModBase("movement") == 0) { + //rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount_rooted"), DisplayType.Broadcast); + //return; + //} + + if (mount.getOption(Options.DISABLED)) { + rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount_veh_disabled"), DisplayType.Broadcast); + return; + } + + if (!mount.getOption(Options.MOUNT)) { + return; + } + + if (!canMount(rider, mount)) { + rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount"), DisplayType.Broadcast); + return; + } + + if (rider.isInStealth()) { + rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:no_mount_stealth"), DisplayType.Broadcast); + return; + } + + rider.setStateBitmask(rider.getStateBitmask() | 0x8000000); + rider.setPosture((mount.getTemplate().contains("vehicle")) ? Posture.DrivingVehicle : Posture.RidingCreature); + + synchronized(mount.getMutex()) { + mount._add(rider); + } + + mount.setStateBitmask(mount.getStateBitmask() | 0x10000000); + //mount.setState(State.MountedCreature, true); + mount.notifyObservers(new UpdateContainmentMessage(rider.getObjectID(), mount.getObjectID(), 4), true); + //rider.setState(State.RidingMount, true); + core.simulationService.remove(rider, rider.getWorldPosition().x, rider.getWorldPosition().z, false); + } + + public CreatureObject getMount(SWGObject pcd) { + if (pcd == null) { + return null; + } + + if (pcd.getAttachment("companionId") == null) { + return null; + } + + CreatureObject mount = (CreatureObject) core.objectService.getObject((Long) pcd.getAttachment("companionId")); + + if (mount == null) { + return null; + } + + if (mount.getContainer() != null) { + return null; + } + + return mount; + } + + public CreatureObject getCompanion(CreatureObject actor) { + if (actor == null) { + return null; + } + + if (isMounted(actor)) { + return (CreatureObject) actor.getContainer(); + } + + SWGObject datapad = actor.getSlottedObject("datapad"); + + if (datapad == null) { + return null; + } + + final List companions = new ArrayList(); + + datapad.viewChildren(actor, false, false, new Traverser() { + + public void process(SWGObject pcd) { + if (pcd.getAttachment("companionId") != null) { + if (pcd.getSlottedObject("inventory") != null) { + LongAdder adder = new LongAdder(); + pcd.getSlottedObject("inventory").viewChildren(actor, false, false, (obj) -> adder.increment()); + + if (adder.intValue() == 0) { + CreatureObject companion = (CreatureObject) core.objectService.getObject((Long) pcd.getAttachment("companionId")); + companions.add(companion); + } + } + } + } + + }); + + if (companions.size() > 0) { + return companions.get(0); + } else { + return null; + } + } + + public boolean isMounted(CreatureObject rider) { + if (rider.getContainer() == null) { + return false; + } + + if (!(rider.getContainer() instanceof CreatureObject)) { + return false; + } + + CreatureObject mount = (CreatureObject) rider.getContainer(); + + if (!mount.getOption(Options.MOUNT)) { + return false; + } + + if (mount.getSlottedObject("rider") != rider) { + return false; + } + + return true; + } + + public boolean isMounted(SWGObject actor, CreatureObject mount) { + return actor.getContainer() == mount; + } + + public boolean canMount(CreatureObject rider, CreatureObject mount) { + if (mount == null) { + return false; + } + + if (!mount.getOption(Options.MOUNT)) { + return false; + } + + if (isMounted(rider)) { + return false; + } + + if (rider.getObjectID() == mount.getOwnerId()) { + return true; + } + + // It's a potential passenger + + // See if there's driver first + if (mount.getSlottedObject("rider") == null) { + return false; + } + + int passengers = 0; + + if (mount.getAttachment("passengers") != null){ + passengers = (Integer) mount.getAttachment("passengers"); + } + + int passengerSlot = 0; + + for (int i = 1; i <= passengers; i++) { + if (mount.getSlottedObject("rider" + i) == null) { + passengerSlot = i; + break; + } + } + + if (passengerSlot == 0) { + return false; + } + + CreatureObject owner = (CreatureObject) NGECore.getInstance().objectService.getObject(mount.getOwnerId()); + + if (owner == null) { + return false; + } + + if (owner.isAttackableBy(rider)) { + return false; + } + + if (rider.getGroupId() == 0 || rider.getGroupId() != owner.getGroupId()) { + return false; + } + + return true; + } + + public void dismount(CreatureObject rider, CreatureObject mount) { + if (rider == null || mount == null) { + return; + } + + if (!isMounted(rider)) { + return; + } + + if (!mount.getOption(Options.MOUNT)) { + return; + } + + if (rider.getObjectID() == mount.getOwnerId()) { + CreatureObject owner = rider; + + mount.viewChildren(owner, false, false, new Traverser() { + + public void process(SWGObject passenger) { + if (passenger != owner) { + mount._remove(passenger); + mount.notifyObservers(new UpdateContainmentMessage(passenger.getObjectID(), 0, -1), false); + + if (passenger instanceof CreatureObject) { + ((CreatureObject) passenger).setState(StateStatus.RidingMount, false); + ((CreatureObject) passenger).setPosture(Posture.Upright); + } + + core.simulationService.add(passenger, mount.getWorldPosition().x, mount.getWorldPosition().z, false); + core.simulationService.teleport(passenger, mount.getWorldPosition(), mount.getOrientation(), 0); + } + } + + }); + } + + mount._remove(rider); + mount.notifyObservers(new UpdateContainmentMessage(rider.getObjectID(), 0, -1), false); + + if (rider.getObjectID() == mount.getOwnerId()) { + mount.setState(StateStatus.MountedCreature, false); + } + + core.simulationService.add(rider, mount.getWorldPosition().x, mount.getWorldPosition().z, false); + core.simulationService.teleport(rider, mount.getWorldPosition(), mount.getOrientation(), 0); + + if (!mount.getTemplate().contains("vehicle") && rider.getObjectID() == mount.getOwnerId()) { + store(rider, mount); + } + } + + /* + * They seem to have been stored in the inventory of the pcd object. + * Judging by the fact pcds have inventories and many other things don't. + */ + public void store(CreatureObject storer, CreatureObject mount) { + if (mount.getContainer() != null) { + return; + } + + if (mount.getOwnerId() == 0) { + return; + } + + CreatureObject owner = (CreatureObject) core.objectService.getObject(mount.getOwnerId()); + + if (owner == null || storer == null || owner != storer) { + return; + } + + PlayerObject player = (PlayerObject) owner.getSlottedObject("ghost"); + + if (player.isCallingCompanion()) { + storer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_store_1sec"), DisplayType.Broadcast); + return; + } + + if (isMounted(owner, mount)) { + storer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:must_dismount"), DisplayType.Broadcast); + return; + } + + if (owner.getTefTime() > 0) { + owner.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:prose_cant_store_yet", owner.getTefTime()), DisplayType.Broadcast); + return; + } + + SWGObject datapad = owner.getSlottedObject("datapad"); + + if (datapad == null) { + return; + } + + datapad.viewChildren(owner, false, false, new Traverser() { + + public void process(SWGObject pcd) { + if (pcd.getAttachment("companionId") != null && mount.getObjectID() == ((Long) pcd.getAttachment("companionId"))) { + if (pcd.getSlottedObject("inventory") != null) { + LongAdder adder = new LongAdder(); + pcd.getSlottedObject("inventory").viewChildren(owner, false, false, (obj) -> adder.increment()); + + if (adder.intValue() == 0) { + core.simulationService.remove(mount, mount.getWorldPosition().x, mount.getWorldPosition().z, true); + pcd.getSlottedObject("inventory").add(mount); + } + } + } + } + + }); + } + + public void storeAll(CreatureObject actor) { + if (actor == null) { + return; + } + + while (getCompanion(actor) != null) { + SWGObject mount = getCompanion(actor); + + SWGObject datapad = actor.getSlottedObject("datapad"); + + if (datapad == null) { + return; + } + + datapad.viewChildren(actor, false, false, new Traverser() { + + public void process(SWGObject pcd) { + if (pcd.getAttachment("companionId") != null && mount.getObjectID() == ((Long) pcd.getAttachment("companionId"))) { + if (pcd.getSlottedObject("inventory") != null) { + LongAdder adder = new LongAdder(); + pcd.getSlottedObject("inventory").viewChildren(actor, false, false, (obj) -> adder.increment()); + + if (adder.intValue() == 0) { + core.simulationService.remove(mount, mount.getWorldPosition().x, mount.getWorldPosition().z, true); + pcd.getSlottedObject("inventory").add(mount); + } + } + } + } + + }); + } + } + + public void destroy(CreatureObject destroyer, SWGObject pcd) { + if (destroyer == null || pcd == null || pcd.getGrandparent() == null) { + return; + } + + if (destroyer.getObjectID() != pcd.getGrandparent().getObjectID()) { + return; + } + + if (pcd.getAttachment("companionId") == null) { + return; + } + + CreatureObject mount = (CreatureObject) core.objectService.getObject((Long) pcd.getAttachment("companionId")); + + dismount(destroyer, mount); + + store(destroyer, mount); + + String type = mount.getTemplate(); + + core.objectService.destroyObject(mount); + core.objectService.destroyObject(pcd); + + if (type.contains("vehicle")) { + destroyer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:vehicle_released"), DisplayType.Broadcast); + } else { + destroyer.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:pet_released"), DisplayType.Broadcast); + } + } + + public void insertOpcodes(Map arg0, Map arg1) { + + } + + public void shutdown() { + + } + +} diff --git a/src/services/resources/HarvesterService.java b/src/services/resources/HarvesterService.java new file mode 100644 index 00000000..7dd955eb --- /dev/null +++ b/src/services/resources/HarvesterService.java @@ -0,0 +1,1195 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services.resources; + +import java.nio.ByteOrder; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.Vector; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +import org.apache.mina.core.buffer.IoBuffer; +import org.apache.mina.core.session.IoSession; + +import protocol.swg.EnterStructurePlacementModeMessage; +import protocol.swg.SceneCreateObjectByCrc; +import protocol.swg.SceneDestroyObject; +import protocol.swg.SceneEndBaselines; +import main.NGECore; +import engine.clients.Client; +import engine.resources.common.CRC; +import engine.resources.container.Traverser; +import engine.resources.objects.SWGObject; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; +import resources.common.ObjControllerOpcodes; +import resources.objects.creature.CreatureObject; +import resources.objects.deed.Harvester_Deed; +import resources.objects.harvester.HarvesterMessageBuilder; +import resources.objects.harvester.HarvesterObject; +import resources.objects.installation.InstallationObject; +import resources.objects.player.PlayerObject; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceContainerObject; +import resources.objects.resource.ResourceRoot; +import resources.objects.tangible.TangibleObject; +import resources.objects.waypoint.WaypointObject; +import services.chat.Mail; +import services.chat.WaypointAttachment; +import services.sui.SUIWindow; +import services.sui.SUIWindow.SUICallback; +import services.sui.SUIWindow.Trigger; + +/** + * @author Charon + */ + +public class HarvesterService implements INetworkDispatch { + + private NGECore core; + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); + + private Vector allHarvesters = new Vector(); + private Vector allConstructors = new Vector(); + + public HarvesterService(NGECore core) { + this.core = core; + //core.commandService.registerCommand("permissionlistmodify"); + //core.commandService.registerCommand("harvesterselectresource"); + //core.commandService.registerCommand("harvesteractivate"); + //core.commandService.registerCommand("harvesterdeactivate"); + //core.commandService.registerCommand("harvesterdiscardhopper"); + //core.commandService.registerCommand("harvestergetresourcedata"); + //core.commandService.registerCommand("resourceemptyhopper"); + //core.commandService.registerCommand("placestructure"); + //generateNoBuildData(); + scheduleHarvesterService(); + } + + @Override + public void insertOpcodes(Map swgOpcodes, Map objControllerOpcodes) { + + objControllerOpcodes.put(ObjControllerOpcodes.RESOURCE_EMPTY_HOPPER, new INetworkRemoteEvent() { + + @Override + public void handlePacket(IoSession session, IoBuffer data) throws Exception { + data.order(ByteOrder.LITTLE_ENDIAN); + Client client = core.getClient(session); + +// StringBuilder sb = new StringBuilder(); +// for (byte b : data.array()) { +// sb.append(String.format("%02X ", b)); +// } +// System.out.println(sb.toString()); + + /* + 05 00 46 5E CE 80 83 00 00 00 ED 00 00 00 3E 45 + 04 00 00 00 00 00 00 00 00 00 3E 45 04 00 00 00 + 00 00 90 52 05 00 00 00 00 00 D7 35 05 00 00 00 + 00 00 01 00 00 00 00 07 + */ + + long playerId = data.getLong(); // 3E 45 04 00 00 00 00 00 + data.getInt(); // 00 00 00 00 + data.getLong(); // 3E 45 04 00 00 00 00 00 + long harvesterId = data.getLong(); // 1E 55 05 00 00 00 00 00 + //long containerId = data.getLong(); // 1E 55 05 00 00 00 00 00 Resources ID + long resourceId = data.getLong(); // 1E 55 05 00 00 00 00 00 Resources ID + int stackCount = data.getInt(); // Stack count + byte actionMode = data.get(); // 0 for retrieving, 1 for discarding + byte updateCount = data.get(); // updateCount + + CreatureObject actor = (CreatureObject) client.getParent(); + SWGObject target = core.objectService.getObject(harvesterId); + + handleEmptyHopper(actor, target, harvesterId, resourceId, stackCount, actionMode, updateCount); + } + }); + + } + + + public void scheduleHarvesterService(){ + + final ScheduledFuture task = scheduler.scheduleAtFixedRate(new Runnable() { + + @Override + public void run() { + ServiceProcessing(); + } + + }, 10, 5000, TimeUnit.MILLISECONDS); + + ExecutionSurveillanceThread executionSurveillance = new ExecutionSurveillanceThread(task); + executionSurveillance.start(); + } + + class ExecutionSurveillanceThread extends Thread { + ScheduledFuture task; + + public ExecutionSurveillanceThread(ScheduledFuture task) { + this.task = task; + } + + public void run() { + try { + try { + task.get(); + } catch (InterruptedException e1) { + System.err.println("InterruptedException IN HARVESTERSERVICE !!! " + e1.getMessage()); + } + } catch (ExecutionException e2) { + System.err.println("EXCEPTION IN HARVESTERSERVICE !!! " + e2.getMessage()); + System.err.println("EXCEPTION CAUSE : " + e2.getCause()); + } + } + } + + public void ServiceProcessing(){ + synchronized(allHarvesters){ + for (HarvesterObject harvester : allHarvesters){ + if (harvester!=null) + updateHarvester(harvester); + } + allHarvesters.removeAll(Collections.singleton(null)); + } + synchronized(allConstructors){ + Vector removeConstructors = new Vector(); + for (InstallationObject constructor : allConstructors){ + boolean readyToBuild = checkBuildTime(constructor); + if (readyToBuild) + removeConstructors.add(constructor); + } + allConstructors.removeAll(removeConstructors); + allConstructors.removeAll(Collections.singleton(null)); + } + } + + + public void addHarvester(SWGObject harvester){ + synchronized(allHarvesters){ + if (harvester!=null) + allHarvesters.add((HarvesterObject)harvester); + } + } + + public void removeHarvester(SWGObject harvester){ + synchronized(allHarvesters){ + if (harvester!=null) + allHarvesters.remove((HarvesterObject)harvester); + } + } + + public boolean checkBuildTime(InstallationObject installation){ + boolean value = false; + long startTime = (long) installation.getAttachment("ConstructionStart"); + if (startTime+50000){ + String[] helper = ownerName.split(" "); + ownerName = helper[0]; + } + + String maintenancePool_string = ""+(int)harvester.getMaintenanceAmount(); + int hourlyMaintenance = harvester.getMaintenanceCost(); + float totalNumberOfHours = (float)harvester.getMaintenanceAmount()/hourlyMaintenance; + float minuteFraction = ((totalNumberOfHours * 100) % 100) / 100; + int nDays = (int)totalNumberOfHours / 24; + float difference = totalNumberOfHours % 24; + int nHours = (int)difference; + int nMinutes = (int)(minuteFraction *60); + maintenancePool_string += " (" + nDays + " days, " + nHours + " hours, " + nMinutes + " minutes)"; + // Power reserves calculation + String powerReserves_string = ""+(int)harvester.getPowerLevel(); + int hourlyPower = harvester.getPowerCost(); + totalNumberOfHours = (float)harvester.getPowerLevel()/hourlyPower; + minuteFraction = ((totalNumberOfHours * 100) % 100) / 100; + nDays = (int)totalNumberOfHours / 24; + difference = totalNumberOfHours % 24; + nHours = (int)difference; + nMinutes = (int)(minuteFraction *60); + powerReserves_string += " (" + nDays + " days, " + nHours + " hours, " + nMinutes + " minutes)"; + + window.addListBoxMenuItem("@player_structure:owner_prompt" + " " + ownerName, 0); + window.addListBoxMenuItem("@player_structure:structure_public", 1); + window.addListBoxMenuItem("@player_structure:condition_prompt" + " " + target.getConditionDamage(), 2); + window.addListBoxMenuItem("@player_structure:maintenance_pool_prompt " + maintenancePool_string, 3); + window.addListBoxMenuItem("@player_structure:maintenance_rate_prompt " + harvester.getMaintenanceCost() + " cr/h", 4); // @player_structure:credits_per_hour + window.addListBoxMenuItem("@player_structure:maintenance_mods_prompt", 5); + window.addListBoxMenuItem("@player_structure:power_reserve_prompt " + powerReserves_string, 6); + window.addListBoxMenuItem("@player_structure:power_consumption_prompt " + harvester.getPowerCost() + " @player_structure:units_per_hour", 7); + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void createPayMaintenanceSUIPage(SWGObject owner, TangibleObject target) { + CreatureObject creature = (CreatureObject) owner; + final HarvesterObject harvester = (HarvesterObject)target; + final SUIWindow window = core.suiService.createSUIWindow("Script.transfer", owner, target, 10); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:select_amount"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:select_maint_amount" + + "\n \n @player_structure:current_maint_pool : " + (int)harvester.getMaintenanceAmount()); + + window.setProperty("msgPayMaintenance", "transaction.txtInputFrom"); + + window.setProperty("transaction.lblFrom:Text", "@player_structure:total_funds"); + window.setProperty("transaction.lblTo:Text", "@player_structure:to_pay"); + window.setProperty("transaction.lblFrom", "@player_structure:total_funds"); + window.setProperty("transaction.lblTo", "@player_structure:to_pay"); + + window.setProperty("transaction.lblStartingFrom:Text", ""+creature.getCashCredits()); + window.setProperty("transaction.lblStartingTo:Text", "0"); + + window.setProperty("transaction:InputFrom", "555555"); + window.setProperty("transaction:InputTo", "666666"); + + window.setProperty("transaction:txtInputFrom", ""+creature.getCashCredits()); + window.setProperty("transaction:txtInputTo", "1"); + window.setProperty("transaction.txtInputFrom:Text", ""+creature.getCashCredits()); + window.setProperty("transaction.txtInputTo:Text", "" + "0"); + + window.setProperty("transaction.ConversionRatioFrom", "1"); + window.setProperty("transaction.ConversionRatioTo", "0"); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + + Vector returnList = new Vector(); + returnList.add("transaction.txtInputFrom:Text"); + returnList.add("transaction.txtInputTo:Text"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject crafter = (CreatureObject)owner; + crafter.setCashCredits(crafter.getCashCredits() - Integer.parseInt(returnList.get(1))); + harvester.setMaintenanceAmount(harvester.getMaintenanceAmount()+Float.parseFloat(returnList.get(1))); + //String displayname = "@installation_n:"+harvester.getStfName(); + String displayname = "the structure"; + if (harvester.getCustomName()!=null) + displayname = harvester.getCustomName(); + crafter.sendSystemMessage("You successfully make a payment of " + Integer.parseInt(returnList.get(1)) + " credits to " + displayname + ".", (byte) 0); + core.suiService.closeSUIWindow(owner, 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject crafter = (CreatureObject)owner; + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void createRenameSUIPage(SWGObject owner, TangibleObject target) { + //updateHarvester(owner, target); + final SUIWindow window = core.suiService.createInputBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", owner, target, 0); + Vector returnList = new Vector(); + returnList.add("txtInput:LocalText"); + final TangibleObject outerSurveyTool = target; + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.harvesterService.handleSetName((CreatureObject)owner, (TangibleObject)outerSurveyTool,returnList.get(0)); + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + + public void createDestroySUIPage(final SWGObject owner, final TangibleObject target) { + + // "\\#32CD32 @player_structure:confirm_destruction_d3b \#" + + final HarvesterObject harvester = (HarvesterObject)target; + // harvester.getStfFilename(); installation_n .getTemplate(); + String displayname = "@installation_n:"+harvester.getStfName(); + if (harvester.getCustomName()!=null) + displayname = harvester.getCustomName(); + final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", displayname); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:confirm_destruction_d1 " + + "@player_structure:confirm_destruction_d2 " + + "\n \n @player_structure:confirm_destruction_d3a " + + "\\#32CD32 @player_structure:confirm_destruction_d3b \\#FFFFFF " + + "@player_structure:confirm_destruction_d4 "); + if (harvester.getConditionDamage()<20 && harvester.getMaintenanceAmount()<3000){ + window.addListBoxMenuItem("@player_structure:redeed_confirmation \\#BB0000 @player_structure:can_redeed_no_suffix \\#FFFFFF ",1 ); + } else { + window.addListBoxMenuItem("@player_structure:redeed_confirmation \\#32CD32 @player_structure:can_redeed_yes_suffix \\#FFFFFF ",1 ); + } + if (harvester.getConditionDamage()<20){ + window.addListBoxMenuItem("@player_structure:redeed_condition \\#BB0000 " + harvester.getConditionDamage() + " \\#FFFFFF ",1 ); + } else { + window.addListBoxMenuItem("@player_structure:redeed_condition \\#32CD32 " + harvester.getConditionDamage() + " \\#FFFFFF ",1 ); + } + if (harvester.getMaintenanceAmount()<0){ + window.addListBoxMenuItem("@player_structure:redeed_maintenance \\#BB0000 " + (int)harvester.getMaintenanceAmount() + " \\#FFFFFF ",2 ); + } else { + window.addListBoxMenuItem("@player_structure:redeed_maintenance \\#32CD32 " + (int)harvester.getMaintenanceAmount() + " \\#FFFFFF ",2 ); + } + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@yes"); + window.setProperty("btnCancel:Text", "@no"); + Vector returnList = new Vector(); + returnList.add("List.lstList:SelectedRow"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + createCodeWindow(owner, target); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void createCodeWindow(SWGObject owner, TangibleObject target) { + + // "\\#32CD32 @player_structure:confirm_destruction_d3b \#" + + final HarvesterObject harvester = (HarvesterObject)target; + // harvester.getStfFilename(); installation_n .getTemplate(); + Random rnd = new Random(); + final int confirmCode = 100000 + rnd.nextInt(900000); + final SUIWindow window = core.suiService.createInputBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", owner, target, 0); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:confirm_destruction_t"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:your_structure_prefix " + + "\\#32CD32 @player_structure:will_redeed_confirm \\#FFFFFF "+ + "@player_structure:will_redeed_suffix " + + "\n \n Code: " + confirmCode); + + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@yes"); + window.setProperty("btnCancel:Text", "@no"); + Vector returnList = new Vector(); + returnList.add("txtInput:LocalText"); + + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject crafter = (CreatureObject)owner; + core.suiService.closeSUIWindow(owner, 0); + if (returnList.get(0).equals(""+confirmCode)){ + // handle creation of correct deed in player inventory + PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); + String deedTemplate = harvester.getDeedTemplate(); + Harvester_Deed deed = (Harvester_Deed)core.objectService.createObject(deedTemplate, owner.getPlanet()); + if(player.getLotsRemaining()+deed.getLotRequirement()>10){ + // Something went wrong or hacking attempt + crafter.sendSystemMessage("Structure can't be redeeded. Maximum lot count exceeded.",(byte)1); + return; + } + + deed.setStructureTemplate(harvester.getTemplate()); + deed.setOutputHopperCapacity(harvester.getOutputHopperCapacity()); + deed.setBER(harvester.getBER()); + deed.setSurplusMaintenance((int)harvester.getMaintenanceAmount()); + deed.setSurplusPower((int)harvester.getPowerLevel()); + deed.setAttributes(); + + removeHarvester(harvester); + core.objectService.destroyObject(harvester.getObjectID()); + + SWGObject crafterInventory = owner.getSlottedObject("inventory"); + crafterInventory.add(deed); + + if(player.getLotsRemaining()+deed.getLotRequirement()<=10) + player.setLotsRemaining(player.getLotsRemaining()+deed.getLotRequirement()); + + crafter.sendSystemMessage("@player_structure:processing_destruction",(byte)1); + crafter.sendSystemMessage("@player_structure:deed_reclaimed",(byte)1); + + } else { + crafter.sendSystemMessage("@player_structure:incorrect_destroy_code",(byte)1); + } + + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public void handleOperateMachinery(CreatureObject owner, TangibleObject target) { + + HarvesterObject harvester = (HarvesterObject) target; + harvester.operateMachinery(owner); + } + + public void handleDestroy(SWGObject owner, TangibleObject target) { + + HarvesterObject harvester = (HarvesterObject) target; + // Assemble resources at that spot + // For later, it might be needed to also pass the template to differentiate liquid resources + Vector planetVector = core.resourceService.getSpawnedResourcesByPlanetAndHarvesterType(target.getPlanetId(),harvester.getHarvester_type()); + HarvesterMessageBuilder messenger = new HarvesterMessageBuilder((HarvesterObject)target); + owner.getClient().getSession().write(messenger.buildHINOBaseline7((HarvesterObject)target, planetVector)); + } + + public void handleSetName(CreatureObject owner, TangibleObject target,String name) { + + ((HarvesterObject) target).setHarvesterName(name,owner); + } + + public void handleDepositPower(SWGObject owner, TangibleObject target) { + + CreatureObject creature = (CreatureObject) owner; + final HarvesterObject harvester = (HarvesterObject) target; + int playerEnergyLevel = 0; + playerEnergyLevel = calculateTotalPlayerEnergy(creature); + + final SUIWindow window = core.suiService.createSUIWindow("Script.transfer", owner, target, 10); + window.setProperty("bg.caption.lblTitle:Text", "@player_structure:add_power"); + window.setProperty("Prompt.lblPrompt:Text", "@player_structure:select_power_amount"+ + "\n \n @player_structure:current_power_value " + (int)harvester.getPowerLevel()); + window.setProperty("transaction.txtInputFrom:Text", "" + playerEnergyLevel); + window.setProperty("transaction.txtInputTo:Text", "" + "0"); + window.setProperty("transaction.lblFrom:Text", "@player_structure:total_energy"); + window.setProperty("transaction.lblTo:Text", "@player_structure:to_deposit"); + window.setProperty("transaction:InputFrom", "5555"); + window.setProperty("transaction:InputTo", "6666"); + window.setProperty("transaction.lblStartingFrom:Text", ""+playerEnergyLevel); + window.setProperty("transaction.lblStartingTo:Text", "0"); + window.setProperty("transaction.ConversionRatioFrom", "0"); + window.setProperty("transaction.ConversionRatioTo", "1"); + window.setProperty("btnOk:visible", "True"); + window.setProperty("btnCancel:visible", "True"); + window.setProperty("btnOk:Text", "@ok"); + window.setProperty("btnCancel:Text", "@cancel"); + + Vector returnList = new Vector(); + returnList.add("transaction.txtInputFrom:Text"); + returnList.add("transaction.txtInputTo:Text"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + CreatureObject crafter = (CreatureObject)owner; + harvester.setPowerLevel(harvester.getPowerLevel()+Integer.parseInt(returnList.get(1))); + updateEnergyInventoryContainers(crafter,Integer.parseInt(returnList.get(1))); + crafter.sendSystemMessage("You successfully deposit " + Integer.parseInt(returnList.get(1)) + " units of energy.", (byte) 0); + crafter.sendSystemMessage("Energy reserves now at " + (int)harvester.getPowerLevel() + " units.", (byte) 0); + core.suiService.closeSUIWindow(owner, 0); + } + }); + window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, new SUICallback() { + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + core.suiService.closeSUIWindow(owner, 0); + } + }); + core.suiService.openSUIWindow(window); + } + + public int calculateTotalPlayerEnergy(CreatureObject owner){ + // final int energy = 0; Doesn't work with generic types + int energy = 0; + final Vector energyVector = new Vector(); + TangibleObject playerInventory = (TangibleObject) owner.getSlottedObject("inventory"); + playerInventory.viewChildren(owner, false, false, new Traverser() { + @Override + public void process(SWGObject obj) { + + if (obj instanceof ResourceContainerObject){ + ResourceContainerObject container = (ResourceContainerObject) obj; + if (container.getResourceClass()==null)System.out.println("container.getResourceClass()==null " + container.getTemplate()); + if (container.getResourceClass().equals("Radioactive") || + container.getResourceClass().equals("Wind Renewable Energy") || + container.getResourceClass().equals("Solar Renewable Energy") || + container.getResourceClass().equals("Geothermal Renewable Energy") || + container.getResourceClass().equals("Tidal Renewable Energy") || + container.getResourceClass().equals("Hydron-3 Renewable Energy")) { + energyVector.add(container.getStackCount()); + } + } + } + /* + public void process(SWGObject a1) { + if(!(a1 instanceof PlayerObject) && a1 != null) { + if(a1.getClient() != null && a1 != a.this$0) { + a1.makeAware(a.this$0); + } + a.this$0.makeAware(a1); + } + } + } + */ + }); + + for (Integer value : energyVector){ + energy += value; + } + return energy; + } + + /* + * This is deducting the deposited power from the inventory + */ + public void updateEnergyInventoryContainers(SWGObject owner, int deductedEnergy){ + + final Vector containerVector = new Vector(); + TangibleObject playerInventory = (TangibleObject) owner.getSlottedObject("inventory"); + playerInventory.viewChildren(owner, false, false, new Traverser() { + @Override + public void process(SWGObject obj) { + // is energy resource? + if (obj instanceof ResourceContainerObject){ + ResourceContainerObject container = (ResourceContainerObject) obj; + if (container.getResourceClass().equals("Radioactive") || + container.getResourceClass().equals("Wind Renewable Energy") || + container.getResourceClass().equals("Solar Renewable Energy") || + container.getResourceClass().equals("Geothermal Renewable Energy") || + container.getResourceClass().equals("Tidal Renewable Energy") || + container.getResourceClass().equals("Hydron-3 Renewable Energy")) { + containerVector.add(container); + } + } + } + }); + + Comparator comp = new ResourceContainerObjectComparator(); + Collections.sort(containerVector, comp); + + for (int i=containerVector.size()-1;i >= 0; i--){ + int containerEnergy = containerVector.get(i).getStackCount(); + if (containerEnergy <= deductedEnergy){ + deductedEnergy -= containerEnergy; + playerInventory.remove(containerVector.get(i)); + } else { + containerEnergy -= deductedEnergy; + containerVector.get(i).setStackCount(containerEnergy,(CreatureObject)owner); + playerInventory._remove(containerVector.get(i)); + playerInventory._add(containerVector.get(i)); + +// ResourceMessenger messenger = new ResourceMessenger(IoBuffer.allocate(1)); +// owner.getClient().getSession().write(messenger.serialize_buildRCNO3Delta(containerVector.get(i).getObjectID(),containerEnergy)); + } + } + } + + public class ResourceContainerObjectComparator implements Comparator { + + @Override + public int compare(ResourceContainerObject b1, ResourceContainerObject b2) { + if (b1.getStackCount() == b2.getStackCount()) { + return 0; + } + if (b1.getStackCount() > b2.getStackCount()) { + return 1; + } + if (b1.getStackCount() < b2.getStackCount()) { + return -1; + } + return 0; + } + } + + public void handlePermissionAdmin(CreatureObject owner, TangibleObject target) { + + String listName = "ADMIN"; + ((HarvesterObject) target).setPermissionAdmin(listName,owner); + } + + public void handlePermissionHopper(CreatureObject owner, TangibleObject target) { + + String listName = "HOPPER"; + ((HarvesterObject) target).setPermissionHopper(listName,owner); + } + + public void handlePermissionListModify(CreatureObject crafter, SWGObject target, String commandArgs){ + + String[] commandSplit = commandArgs.split(" "); + if (commandSplit.length==3){ + if (core.characterService.playerExists(commandSplit[2])){ + if (commandSplit[2].equals("ADMIN")){ + Vector adminList = ((HarvesterObject)target).getAdminList(); + if (commandSplit[0].equals("add") && (!adminList.contains(commandSplit[2]))){ + crafter.sendSystemMessage(commandSplit[2] + " added as administrator", (byte) 0); + adminList.add(commandSplit[2]); + ((HarvesterObject)target).setAdminList(adminList); + } + if (commandSplit[0].equals("remove") && (adminList.contains(commandSplit[2]))){ + crafter.sendSystemMessage(commandSplit[2] + " removed as administrator", (byte) 0); + adminList.remove(commandSplit[2]); + ((HarvesterObject)target).setAdminList(adminList); + } + } + if (commandSplit[2].equals("HOPPER")){ + Vector hopperList = ((HarvesterObject)target).getHopperList(); + if (commandSplit[0].equals("add") && (!hopperList.contains(commandSplit[2]))){ + crafter.sendSystemMessage(commandSplit[2] + " added as administrator", (byte) 0); + hopperList.add(commandSplit[2]); + ((HarvesterObject)target).setHopperList(hopperList); + } + if (commandSplit[0].equals("remove") && (hopperList.contains(commandSplit[2]))){ + crafter.sendSystemMessage(commandSplit[2] + " removed as administrator", (byte) 0); + hopperList.remove(commandSplit[2]); + ((HarvesterObject)target).setHopperList(hopperList); + } + } + } else { + crafter.sendSystemMessage(commandSplit[2]+ " is an invalid player name", (byte) 0); + } + } + if (commandSplit.length==2){ + crafter.sendSystemMessage("No name was entered", (byte) 0); + } + + } + + public void handleHarvesterSelectResourceCommand(CreatureObject owner, SWGObject target, String commandArgs){ + + long selectedResourceId = Long.parseLong(commandArgs); + GalacticResource resource = core.resourceService.findResourceById(selectedResourceId); + ((HarvesterObject) target).setSelectedHarvestResource(resource,owner); + } + + public void handleHarvesterActivateCommand(CreatureObject owner, SWGObject target, String commandArgs){ + + + if (((HarvesterObject)target).getPowerLevel()<=0 && !((HarvesterObject)target).isGenerator()){ + ((CreatureObject)owner).sendSystemMessage("The installation is lacking power.", (byte) 0); + return; + } + if (((HarvesterObject)target).getMaintenanceAmount()<=0){ + ((CreatureObject)owner).sendSystemMessage("The installation is lacking maintenance.", (byte) 0); + return; + } + + + ((HarvesterObject)target).activateHarvester(owner); + } + + public void handleHarvesterDeactivateCommand(CreatureObject owner, SWGObject target, String commandArgs){ + + ((HarvesterObject)target).deactivateHarvester(owner); + } + + public void handleEmptyHopper(CreatureObject owner,SWGObject target,long harvesterId, long resourceId, int stackcount, byte actionMode, byte updateCount){ + + HarvesterMessageBuilder messenger = new HarvesterMessageBuilder((HarvesterObject)target); + //DiscardResourceResponse + owner.getClient().getSession().write(messenger.buildDiscardResourceResponse((HarvesterObject)target, actionMode, updateCount,owner)); + + + ResourceContainerObject foundContainer = null; + Vector hopperContent = ((HarvesterObject) target).getOutputHopperContent(); + for (ResourceContainerObject cont : hopperContent){ + if (cont.getReferenceID()==resourceId){ + foundContainer = cont; + } + } + if (foundContainer==null) + return; // something went wrong + + if (foundContainer.getStackCount()==stackcount){ + ((HarvesterObject) target).setCurrentHarvestedCountFloat(1); + foundContainer.setStackCount(0, owner); + } else { + ((HarvesterObject) target).setCurrentHarvestedCountFloat(foundContainer.getStackCount()-stackcount); + foundContainer.setStackCount(foundContainer.getStackCount()-stackcount,owner); + } + ((HarvesterObject) target).setOutputHopperContent(hopperContent); + + // <<< + Vector planetResourcesVector = core.resourceService.getSpawnedResourcesByPlanetAndHarvesterType(target.getPlanetId(),((HarvesterObject)target).getHarvester_type()); + owner.getClient().getSession().write(messenger.buildHINOBaseline7((HarvesterObject)target, planetResourcesVector)); + owner.getClient().getSession().write(messenger.buildHINO7ExperimentalDelta2((HarvesterObject)target)); + // >> + + hopperContent = ((HarvesterObject) target).getOutputHopperContent(); + for (ResourceContainerObject cont : hopperContent){ + if (cont.getReferenceID()==resourceId){ + foundContainer = cont; + } + } + + // create retrieved resource container + GalacticResource sampleResource = core.resourceService.findResourceById(resourceId); + String resourceContainerIFF = ResourceRoot.CONTAINER_TYPE_IFF_SIGNIFIER[sampleResource.getResourceRoot().getContainerType()]; + ResourceContainerObject containerObject = (ResourceContainerObject) core.objectService.createObject(resourceContainerIFF, owner.getPlanet()); + containerObject.initializeStats(sampleResource); + containerObject.setProprietor(owner); + containerObject.setStackCount(stackcount,owner); + containerObject.setIffFileName(resourceContainerIFF); + SWGObject crafterInventory = owner.getSlottedObject("inventory"); +// containerObject.sendBaselines(owner.getClient()); +// SceneEndBaselines sceneEndBaselinesMsg = new SceneEndBaselines(containerObject.getObjectID()); +// owner.getClient().getSession().write(sceneEndBaselinesMsg.serialize()); +// tools.CharonPacketUtils.printAnalysis(sceneEndBaselinesMsg.serialize()); + crafterInventory.add(containerObject); + } + + + public void handleEmptyHarvester(CreatureObject owner, SWGObject target, String commandArgs){ + + HarvesterMessageBuilder messenger = new HarvesterMessageBuilder((HarvesterObject)target); + Vector hopperContent = ((HarvesterObject) target).getOutputHopperContent(); + Vector deleteContent = new Vector(); + + for (ResourceContainerObject cont : hopperContent){ + ResourceContainerObject foundContainer = cont; + + if (foundContainer==null) + return; // something went wrong + + long resourceId = foundContainer.getReferenceID(); + int stackcount = foundContainer.getStackCount(); + + SceneDestroyObject destroyObjectMsg = new SceneDestroyObject(resourceId); + owner.getClient().getSession().write(destroyObjectMsg.serialize()); + + // create retrieved resource container + GalacticResource sampleResource = core.resourceService.findResourceById(resourceId); + String resourceContainerIFF = ResourceRoot.CONTAINER_TYPE_IFF_SIGNIFIER[sampleResource.getResourceRoot().getContainerType()]; + ResourceContainerObject containerObject = (ResourceContainerObject) core.objectService.createObject(resourceContainerIFF, owner.getPlanet()); + containerObject.initializeStats(sampleResource); + containerObject.setProprietor(owner); + containerObject.setStackCount(stackcount,owner); + int resCRC = CRC.StringtoCRC(resourceContainerIFF); + containerObject.setIffFileName(resourceContainerIFF); + + long objectId = containerObject.getObjectID(); + SWGObject crafterInventory = owner.getSlottedObject("inventory"); + +// SceneCreateObjectByCrc createObjectMsg = new SceneCreateObjectByCrc(objectId, owner.getOrientation().x, owner.getOrientation().y, owner.getOrientation().z, owner.getOrientation().w, owner.getPosition().x, owner.getPosition().y, owner.getPosition().z, resCRC, (byte) 0); +// owner.getClient().getSession().write(createObjectMsg.serialize()); +// tools.CharonPacketUtils.printAnalysis(createObjectMsg.serialize()); +// +// containerObject.sendBaselines(owner.getClient()); +// +// SceneEndBaselines sceneEndBaselinesMsg = new SceneEndBaselines(containerObject.getObjectID()); +// owner.getClient().getSession().write(sceneEndBaselinesMsg.serialize()); +// tools.CharonPacketUtils.printAnalysis(sceneEndBaselinesMsg.serialize()); + + crafterInventory.add(containerObject); + + if (cont.getReferenceID()!=((HarvesterObject) target).getSelectedHarvestResource().getId()){ + deleteContent.add(cont); + } else { + ((HarvesterObject) target).setCurrentHarvestedCountFloat(0); + foundContainer.setStackCount(0,owner); + } + } + hopperContent.removeAll(deleteContent); + + ((HarvesterObject) target).setOutputHopperContent(hopperContent); + + Vector planetResourcesVector = core.resourceService.getSpawnedResourcesByPlanetAndHarvesterType(target.getPlanetId(),((HarvesterObject)target).getHarvester_type()); + owner.getClient().getSession().write(messenger.buildHINOBaseline7((HarvesterObject)target, planetResourcesVector)); + owner.getClient().getSession().write(messenger.buildHINO7ExperimentalDelta2((HarvesterObject)target)); + } + + public void updateHarvester(HarvesterObject harvester){ + + CreatureObject owner = (CreatureObject)core.objectService.getObject(harvester.getOwner()); + + if(harvester.isActivated()) + { + // Check maintenance and power + if (harvester.getMaintenanceAmount()<=0){ + owner.sendSystemMessage("The installation is lacking maintenance.", (byte) 0); + // ToDo: Send mail + harvester.deactivateHarvester(owner); + return; + } + + if (harvester.getPowerLevel()<=0 && !harvester.isGenerator()){ + owner.sendSystemMessage("The installation is lacking power.", (byte) 0); + // ToDo: Send mail + harvester.deactivateHarvester(owner); + return; + } + + harvester.setMaintenanceAmount(harvester.getMaintenanceAmount()-(harvester.getMaintenanceCost()/3600.0F)); + harvester.setPowerLevel(harvester.getPowerLevel()-(harvester.getPowerCost()/3600.0F)); + + Vector outputHopperContent = harvester.getOutputHopperContent(); + GalacticResource currentResource = harvester.getSelectedHarvestResource(); + ResourceContainerObject hopperContainer = hopperHasContainer(currentResource, outputHopperContent); + // check if output hopper contains already a container with the selected harvest resource + if(hopperContainer==null) + { + + //ResourceContainerObject container = new ResourceContainerObject(); + String resourceContainerIFF = ResourceRoot.CONTAINER_TYPE_IFF_SIGNIFIER[currentResource.getResourceRoot().getContainerType()]; + ResourceContainerObject container = (ResourceContainerObject) core.objectService.createObject(resourceContainerIFF, harvester.getPlanet()); + container.initializeStats(harvester.getSelectedHarvestResource()); + container.setStackCount(0,false); + harvester.setCurrentHarvestedCountFloat(0.0F); + outputHopperContent.add(container); + harvester.setOutputHopperContent(outputHopperContent); + harvester.createNewHopperContainer(); + + } else { + + harvester.continueHopperContainer(); + + // add harvested amount + int BER = harvester.getBER(); + //BER = 15; + float minuteRate = harvester.getActualExtractionRate(); + float updateRate = minuteRate / 60; + harvester.setCurrentHarvestedCountFloat(harvester.getCurrentHarvestedCountFloat()+updateRate); + + int oldStackCount = hopperContainer.getStackCount(); + int newStackCount = (int) (harvester.getCurrentHarvestedCountFloat()); + if (newStackCount>oldStackCount){ + for (ResourceContainerObject iterContainer : outputHopperContent){ + if (iterContainer.getReferenceID()==hopperContainer.getReferenceID()){ + iterContainer.setStackCount(newStackCount,owner); // updates collection + } + } + harvester.setOutputHopperContent(outputHopperContent); + //((CreatureObject)harvester.getOwner()).getClient().getSession().write(messenger.buildHINO7ExperimentalDelta2(harvester)); + } + harvester.setCurrentHarvestedCountFloat(harvester.getCurrentHarvestedCountFloat()+updateRate); + } + } + } + + private ResourceContainerObject hopperHasContainer(GalacticResource resource, Vector outputHopperContent){ + ResourceContainerObject container = null; + for (ResourceContainerObject iterContainer : outputHopperContent){ + if (iterContainer.getReferenceID()==resource.getId()){ + return iterContainer; + } + } + return container; + } + + + public void constructionSite(CreatureObject actor,SWGObject target, long objectId, float posX, float posZ, float dir){ + + SWGObject usedDeed = (SWGObject)actor.getAttachment("LastUsedDeed"); + String constructorTemplate = ((Harvester_Deed)usedDeed).getConstructorTemplate(); + //String structureTemplate = "object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff"; + + float positionY = core.terrainService.getHeight(actor.getPlanetId(), posX, posZ) + 2f; + Quaternion quaternion = new Quaternion(1, 0, 0, 0); + quaternion = resources.common.MathUtilities.rotateQuaternion(quaternion, (float)((Math.PI/2) * dir), new Point3D(0, 1, 0)); + InstallationObject installation = (InstallationObject) core.objectService.createObject(constructorTemplate, 0, actor.getPlanet(), new Point3D(posX, positionY, posZ), quaternion); + + + installation.setAttachment("ConstructionStart", System.currentTimeMillis()); + installation.setAttachment("Owner", actor); + installation.setAttachment("Deed_StructureTemplate", ((Harvester_Deed)usedDeed).getStructureTemplate()); + installation.setAttachment("Deed_DeedTemplate", ((Harvester_Deed)usedDeed).getTemplate()); + installation.setAttachment("Deed_BER", ((Harvester_Deed)usedDeed).getBER()); + installation.setAttachment("Deed_Capacity", ((Harvester_Deed)usedDeed).getOutputHopperCapacity()); + installation.setAttachment("Deed_DeedLots", ((Harvester_Deed)usedDeed).getLotRequirement()); + installation.setAttachment("Deed_SurplusMaintenance", ((Harvester_Deed)usedDeed).getSurplusMaintenance()); + installation.setAttachment("Deed_SurplusPower", ((Harvester_Deed)usedDeed).getSurplusPower()); + + // destroy deed + TangibleObject playerInventory = (TangibleObject) actor.getSlottedObject("inventory"); + playerInventory.remove(usedDeed); + + core.simulationService.add(installation, posX, posZ, true); + + PlayerObject player = (PlayerObject) actor.getSlottedObject("ghost"); + player.setLotsRemaining(player.getLotsRemaining()-(int)((Harvester_Deed)usedDeed).getLotRequirement()); + synchronized(allConstructors){ + allConstructors.add(installation); + } + } + + public void placeHarvester(SWGObject object) { + CreatureObject actor = (CreatureObject) object.getAttachment("Owner"); + String structureTemplate = (String)object.getAttachment("Deed_StructureTemplate"); + HarvesterObject harvester = (HarvesterObject) NGECore.getInstance().objectService.createObject(structureTemplate, actor.getPlanet()); + long objectId = harvester.getObjectID(); + Vector adminList = harvester.getAdminList(); + //String[] fullName = ((CreatureObject)actor).getCustomName().split(" "); + adminList.add(actor.getCustomName()); + // Set BER and outputhopper capacity here, take it from deed + harvester.setBER((int)object.getAttachment("Deed_BER")); + harvester.setSpecRate((int)(1.5F*(int)object.getAttachment("Deed_BER"))); + harvester.setOutputHopperCapacity((int)object.getAttachment("Deed_Capacity")); + harvester.setDeedTemplate((String)object.getAttachment("Deed_DeedTemplate")); + if ((int)object.getAttachment("Deed_SurplusMaintenance")>0){ + harvester.setMaintenanceAmount((int)object.getAttachment("Deed_SurplusMaintenance")); + } + if ((int)object.getAttachment("Deed_SurplusPower")>0){ + harvester.setPowerLevel((int)object.getAttachment("Deed_SurplusPower")); + } + + + // build harvester + float positionY = NGECore.getInstance().terrainService.getHeight(actor.getPlanetId(), object.getPosition().x, object.getPosition().z); + harvester.setPosition(new Point3D(object.getPosition().x,positionY, object.getPosition().z)); + core.simulationService.add(harvester, harvester.getPosition().x, harvester.getPosition().z, true); + addHarvester(harvester); + + PlayerObject player = (PlayerObject) actor.getSlottedObject("ghost"); + WaypointObject constructionWaypoint = (WaypointObject)NGECore.getInstance().objectService.createObject("object/waypoint/shared_world_waypoint_blue.iff", actor.getPlanet(), harvester.getPosition().x, 0 ,harvester.getPosition().z); + String displayname = "@installation_n:"+harvester.getStfName(); + constructionWaypoint.setName(displayname); + constructionWaypoint.setPlanetCRC(engine.resources.common.CRC.StringtoCRC(actor.getPlanet().getName())); + constructionWaypoint.setPosition(new Point3D(object.getPosition().x,0, object.getPosition().z)); + player.waypointAdd(constructionWaypoint); + constructionWaypoint.setPosition(new Point3D(object.getPosition().x,0, object.getPosition().z)); + constructionWaypoint.setActive(true); + constructionWaypoint.setColor((byte)1); + constructionWaypoint.setStringAttribute("", ""); + player.waypointAdd(constructionWaypoint); + constructionWaypoint.setName(displayname); + constructionWaypoint.setPlanetCRC(engine.resources.common.CRC.StringtoCRC(actor.getPlanet().getName())); + player.setLastSurveyWaypoint(constructionWaypoint); + + List attachments = new ArrayList(); + WaypointAttachment attachment = new WaypointAttachment(); + attachment.active = true; + attachment.cellID = constructionWaypoint.getCellId(); + attachment.color = (byte)1; + attachment.name = displayname; + attachment.planetCRC = engine.resources.common.CRC.StringtoCRC(actor.getPlanet().getName()); + attachment.positionX = object.getPosition().x; + attachment.positionY = 0; + attachment.positionZ = object.getPosition().z; + attachments.add(attachment); + + // remove constructor + NGECore.getInstance().objectService.destroyObject(object); + + // ToDo: waypoint attachment fix + Date date = new Date(); + Mail constructionNotificationMail = new Mail(); + constructionNotificationMail.setSenderName("Structure Service"); + constructionNotificationMail.setSubject("Your structure"); + constructionNotificationMail.setRecieverId(actor.getObjectID()); + constructionNotificationMail.setTimeStamp((int) (date.getTime() / 1000)); + constructionNotificationMail.setMailId(NGECore.getInstance().chatService.generateMailId()); + String message = "Your construction is ready"; + constructionNotificationMail.setMessage(message); + constructionNotificationMail.setStatus(Mail.NEW); + constructionNotificationMail.setAttachments(attachments); + //NGECore.getInstance().chatService.sendPersistentMessage(actor.getClient(), constructionNotificationMail); + NGECore.getInstance().chatService.storePersistentMessage(constructionNotificationMail); + NGECore.getInstance().chatService.sendPersistentMessageHeader(actor.getClient(), constructionNotificationMail); + } + + + public void enterStructurePlacementMode(SWGObject object, CreatureObject actor){ + + if (!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor,actor.getPosition().x,actor.getPosition().z)){ + actor.sendSystemMessage("@player_structure:not_permitted", (byte) 0); + return; + } + + PlayerObject player = (PlayerObject) actor.getSlottedObject("ghost"); + if (((Harvester_Deed)object).getLotRequirement()>player.getLotsRemaining()){ + actor.sendSystemMessage("@player_structure:not_enough_lots", (byte) 0); + return; + } + + actor.setAttachment("LastUsedDeed", object); + String structureTemplate = ((Harvester_Deed)object).getStructureTemplate(); + //String temp = "object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff"; + EnterStructurePlacementModeMessage placementMsg = new EnterStructurePlacementModeMessage(actor,structureTemplate); + actor.getClient().getSession().write(placementMsg.serialize()); + } + + + public void handlePlaceStructureCommand(CreatureObject crafter, SWGObject target, String commandArgs){ + + // 511379 3516.08 -4804.08 0 + // Split Args by Delimiter + long objectId = crafter.getObjectID(); + float posX = crafter.getPosition().x; + float posZ = crafter.getPosition().z; + float dir = 0; + String[] splitter = commandArgs.split(" "); + if (splitter.length==4){ //QA + objectId = Long.parseLong(splitter[0]); + posX = Float.parseFloat(splitter[1]); + posZ = Float.parseFloat(splitter[2]); + dir = Float.parseFloat(splitter[3]); + } + + constructionSite(crafter, target, objectId, posX, posZ, dir); + } + + + // helper method to simulate a harvester deed in the player inventory + // that contains BER,cap,template info about the harvester + public void createExampleDeed(CreatureObject actor){ + + String templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_s1_deed.iff"; + Harvester_Deed deed = (Harvester_Deed)core.objectService.createObject(templateString, actor.getPlanet()); + deed.setName("Example Harvester Deed"); + deed.setStructureTemplate("object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff"); + deed.setOutputHopperCapacity(27344); + deed.setBER(15); + + TangibleObject playerInventory = (TangibleObject) actor.getSlottedObject("inventory"); + playerInventory.add(deed); + + deed.setParent(playerInventory); + + core.resourceService.spawnSpecificResourceContainer("Radioactive", actor, 50); + core.resourceService.spawnSpecificResourceContainer("Radioactive", actor, 501); + core.resourceService.spawnSpecificResourceContainer("Radioactive", actor, 3); + core.resourceService.spawnSpecificResourceContainer("Radioactive", actor, 66); +// core.resourceService.spawnSpecificResourceContainer("Steel", actor, 50); +// core.resourceService.spawnSpecificResourceContainer("Fiberplast", actor, 50); + + } + + + // Stress Test (Server) for many harvesters running in the service + // 200 are running fine, 400 also + public void moduleTestManyHarvesters(CreatureObject actor){ + // assuming an average number of 200 harvesters per planet + for (int i=0;i<400;i++){ + createSingleTestHarvester(actor,i); + } + } + + public void createSingleTestHarvester(CreatureObject actor,int counter){ + // determine random position + String structureTemplate = "object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff"; + HarvesterObject harvester = (HarvesterObject) core.objectService.createObject(structureTemplate, actor.getPlanet()); + long objectId = harvester.getObjectID(); + Vector adminList = harvester.getAdminList(); + String[] fullName = ((CreatureObject)actor).getCustomName().split(" "); + adminList.add(fullName[0]); + harvester.setAdminList(adminList); + // Set BER and outputhopper capacity here, take it from deed + harvester.setBER(8); + harvester.setOutputHopperCapacity(27344); + harvester.setMaintenanceAmount(2993); + harvester.setMaintenanceCost(30); + harvester.setPowerLevel(14714); + harvester.setPowerCost(25); + + Random generator = new Random(); + generator = new Random(); // Exclude mountains at the edge of the maps + int spawnCoordsX = generator.nextInt(15000) - 7500; + int spawnCoordsZ = generator.nextInt(15000) - 7500; + + // build harvester + int resCRC = CRC.StringtoCRC(structureTemplate); + Quaternion quaternion = new Quaternion(1, 0, 0, 0); + quaternion = resources.common.MathUtilities.rotateQuaternion(quaternion, (float)((Math.PI/2) * 1), new Point3D(0, 1, 0)); + float positionY = core.terrainService.getHeight(actor.getPlanetId(), spawnCoordsX, spawnCoordsZ)+ 2f; + SceneCreateObjectByCrc createObjectMsg = new SceneCreateObjectByCrc(objectId,quaternion.x,quaternion.y, quaternion.z, quaternion.w, spawnCoordsX, positionY, spawnCoordsZ, resCRC, (byte) 0); + actor.getClient().getSession().write(createObjectMsg.serialize()); + tools.CharonPacketUtils.printAnalysis(createObjectMsg.serialize()); + + resources.objects.installation.InstallationMessageBuilder messenger = new resources.objects.installation.InstallationMessageBuilder((InstallationObject)harvester); + actor.getClient().getSession().write(messenger.buildBaseline3((InstallationObject)harvester)); + SceneEndBaselines sceneEndBaselinesMsg = new SceneEndBaselines(harvester.getObjectID()); + actor.getClient().getSession().write(sceneEndBaselinesMsg.serialize()); + tools.CharonPacketUtils.printAnalysis(sceneEndBaselinesMsg.serialize()); + + // select resource + long selectedResourceId = core.resourceService.getAllSpawnedResources().get(51).getId(); + GalacticResource resource = core.resourceService.findResourceById(selectedResourceId); + harvester.setSelectedHarvestResource(resource,actor); + + + // activate harvester + harvester.activateHarvester(actor); + HarvesterMessageBuilder messenger2 = new HarvesterMessageBuilder(harvester); + actor.getClient().getSession().write(messenger2.buildHINO3Delta(harvester,(byte)1)); + actor.getClient().getSession().write(messenger2.buildHINO7ActivateDelta2(harvester)); + + + //create waypoint + if (counter<200){ + PlayerObject player = (PlayerObject) actor.getSlottedObject("ghost"); + WaypointObject constructionWaypoint = (WaypointObject)core.objectService.createObject("object/waypoint/shared_world_waypoint_blue.iff", actor.getPlanet(), harvester.getPosition().x, 0 ,harvester.getPosition().z); + String displayname = "@installation_n:"+harvester.getStfName() + " " + counter; + constructionWaypoint.setName(displayname); + constructionWaypoint.setPlanetCRC(engine.resources.common.CRC.StringtoCRC(actor.getPlanet().getName())); + constructionWaypoint.setPosition(new Point3D(spawnCoordsX,0, spawnCoordsZ)); + player.waypointAdd(constructionWaypoint); + constructionWaypoint.setPosition(new Point3D(spawnCoordsX,0, spawnCoordsZ)); + constructionWaypoint.setActive(true); + constructionWaypoint.setColor((byte)1); + constructionWaypoint.setStringAttribute("", ""); + player.waypointAdd(constructionWaypoint); + constructionWaypoint.setName(displayname); + constructionWaypoint.setPlanetCRC(engine.resources.common.CRC.StringtoCRC(actor.getPlanet().getName())); + player.setLastSurveyWaypoint(constructionWaypoint); + } + + allHarvesters.add(harvester); + } + + @Override + public void shutdown() { + // TODO Auto-generated method stub + + } +} \ No newline at end of file diff --git a/src/services/resources/ResourceService.java b/src/services/resources/ResourceService.java new file mode 100644 index 00000000..8b06a4a0 --- /dev/null +++ b/src/services/resources/ResourceService.java @@ -0,0 +1,11382 @@ +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package services.resources; + +import java.util.Hashtable; +import java.util.Iterator; +import java.util.Map; +import java.util.Random; +import java.util.Vector; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; + +import com.sleepycat.persist.EntityCursor; + +import main.NGECore; +import engine.resources.common.CRC; +import engine.resources.objects.SWGObject; +import engine.resources.service.INetworkDispatch; +import engine.resources.service.INetworkRemoteEvent; +import resources.objects.creature.CreatureObject; +import resources.objects.harvester.HarvesterObject; +import resources.objects.resource.GalacticResource; +import resources.objects.resource.ResourceContainerObject; +import resources.objects.resource.ResourceRoot; + +/** + * @author Charon + */ + +public class ResourceService implements INetworkDispatch { + + private NGECore core; + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); + private boolean enableResourceHistory = true; // Set this to false, to prevent persistence of resources into history Db + + private Hashtable resourceRootTable = new Hashtable(); // synchronized + private Vector ironRoots = new Vector(); + private Vector aluminumRoots = new Vector(); + private Vector steelRoots = new Vector(); + private Vector copperRoots = new Vector(); + private Vector oreExtrusiveRoots = new Vector(); + private Vector oreIntrusiveRoots = new Vector(); + private Vector oreCarbonateRoots = new Vector(); + private Vector crystallineGemstoneRoots = new Vector(); + private Vector amorphousGemstoneRoots = new Vector(); + private Vector radioactiveRoots = new Vector(); + private Vector petrochemicalSolidRoots = new Vector(); + private Vector petrochemicalLiquidRoots = new Vector(); + private Vector polymerRoots = new Vector(); + private Vector lubricatingOilRoots = new Vector(); + private Vector reactiveGasRoots = new Vector(); + + private Vector planetaryPool4Roots = new Vector(); + private Vector corelliaPool4Roots = new Vector(); + private Vector dantooinePool4Roots = new Vector(); + private Vector dathomirPool4Roots = new Vector(); + private Vector endorPool4Roots = new Vector(); + private Vector kashyyykPool4Roots = new Vector(); + private Vector lokPool4Roots = new Vector(); + private Vector mustafarPool4Roots = new Vector(); + private Vector nabooPool4Roots = new Vector(); + private Vector roriPool4Roots = new Vector(); + private Vector talusPool4Roots = new Vector(); + private Vector tattoinePool4Roots = new Vector(); + private Vector yavinPool4Roots = new Vector(); + // For new future planet's resources add: +// private Vector NEWPLANETPool4Roots = new Vector(); + private Vector JTLRoots = new Vector(); + + private Vector allSpawnedResources = new Vector(); // needs persistance + private Vector completeResourceNameHistory = new Vector(); // needs persistance + private Vector spawnedResourcesPool1 = new Vector(); + private Vector spawnedResourcesPool2 = new Vector(); + private Vector spawnedResourcesPool3 = new Vector(); + private Vector spawnedResourcesPool4 = new Vector(); + + int totalSpawnedResourcesNumber = 0; + boolean bigBangOccured = false; + + short[] minCapArray = new short[]{300,300,300,300,300,300,300,300,300,300,300}; + short[] maxCapArray = new short[]{800,800,800,800,800,800,800,800,800,800,800}; + short[] minUnCappedArray = new short[]{1,1,1,1,1,1,1,1,1,1,1}; + short[] maxUnCappedArray = new short[]{1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000}; + + public ResourceService(NGECore core) { + this.core = core; + //EntityCursor cursor = core.getResourceRootsODB().getCursor(Integer.class, ResourceRoot.class); + //Iterator it = cursor.iterator(); + //if(!it.hasNext()) { +// if(core.getResourceRootsODB()==null) { +// createCollections(); +// createCollections2(); +// createCollections3(); +// } else { + EntityCursor cursor = core.getResourceRootsODB().getCursor(Integer.class, ResourceRoot.class); + Iterator it = cursor.iterator(); + if(!it.hasNext()) { + createCollections(); + createCollections2(); + createCollections3(); + } +// } + + core.commandService.registerCommand("resourcecontainersplit"); + core.commandService.registerCommand("resourcecontainertransfer"); + core.commandService.registerCommand("factorycratesplit"); + start(); + } + + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + + + public void createCollections(){ + + // For testing purposes the Hashtable is being put together here + // After first test phase, it will be read in from the database + + ResourceRoot resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_titanium"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Titanium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Titanium Aluminum: CR 1 - 174, CD 300 - 408, DR 1 - 174, HR 200 - 330, MA 300 - 452, SR 300 - 430, UT 300 - 430 + minCapArray = new short[]{(short)1 ,(short)300,(short)1 ,(short)200,(short)300,(short)300,(short)300,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)174,(short)408,(short)174,(short)330,(short)452,(short)430,(short)430,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(0, resourceRoot); + aluminumRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_agrinium"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Agrinium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Agrinium Aluminum: CR 94 - 307, CD 358 - 492, DR 94 - 307, HR 270 - 430, MA 382 - 568, SR 370 - 530, UT 370 - 530 + minCapArray = new short[]{(short)94 ,(short)358,(short)94 ,(short)270,(short)382,(short)370,(short)370,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)307 ,(short)492,(short)307 ,(short)430,(short)568,(short)530,(short)530,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(1, resourceRoot); + aluminumRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_chromium"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Chromium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Chromium Aluminum: CR 227 - 440, CD 442 - 575, DR 227 - 440, HR 370 - 530, MA 498 - 685, SR 470 - 630, UT 470 - 630 + minCapArray = new short[]{(short)227 ,(short)442,(short)227 ,(short)370,(short)498,(short)470,(short)470,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)440 ,(short)575,(short)440 ,(short)530,(short)685,(short)630,(short)630,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(2, resourceRoot); + aluminumRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_duralumin"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Duralumin"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Duralumin Aluminum: CR 361 - 574, CD 525 - 658, DR 361 - 574, HR 470 - 630, MA 615 - 802, SR 570 - 730, UT 570 - 730 + minCapArray = new short[]{(short)361 ,(short)525,(short)361 ,(short)470,(short)615,(short)570,(short)570,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)574 ,(short)658,(short)574 ,(short)630,(short)802,(short)730,(short)730,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(3, resourceRoot); + aluminumRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_linksteel"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Link-Steel"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Link-Steel Aluminum: CR 494 - 707, CD 608 - 742, DR 494 - 707, HR 570 - 730, MA 732 - 918, SR 670 - 830, UT 670 - 830 + minCapArray = new short[]{(short)494 ,(short)608,(short)494 ,(short)570,(short)732,(short)670,(short)670,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)707 ,(short)742,(short)707 ,(short)730,(short)918,(short)830,(short)830,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(4, resourceRoot); + aluminumRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_phrik"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Phrik"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Phrik Aluminum: CR 627 - 800, CD 692 - 800, DR 627 - 800, HR 670 - 800, MA 848 - 1000, SR 770 - 900, UT 770 - 900 + minCapArray = new short[]{(short)672 ,(short)692,(short)627 ,(short)670,(short)848 ,(short)770,(short)770,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800 ,(short)800,(short)800 ,(short)800,(short)1000,(short)900,(short)900,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(5, resourceRoot); + aluminumRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_desh"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Desh"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Desh Copper: CR 1 - 116, CD 500 - 572, DR 1 - 102, HR 200 - 265, MA 500 - 572, SR 300 - 372, UT 300 - 372 + minCapArray = new short[]{(short)1 ,(short)500,(short)1 ,(short)200,(short)500 ,(short)300,(short)300,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)116 ,(short)572,(short)102 ,(short)265,(short)572 ,(short)372,(short)372,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(6, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_thallium"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Thallium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Thallium Copper: CR 63 - 205, CD 539 - 628, DR 55 - 180, HR 235 - 315, MA 539 - 628, SR 339 - 428, UT 339 - 428 + minCapArray = new short[]{(short)63 ,(short)539,(short)55 ,(short)235,(short)539 ,(short)339,(short)339,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)205 ,(short)628,(short)180 ,(short)315,(short)628 ,(short)428,(short)428,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(7, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_beyrllius"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Beyrllius"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Beyrllius Copper: CR 152 - 294, CD 594 - 683, DR 133 - 257, HR 285 - 365, MA 594 - 683, SR 394 - 483, UT 394 - 483 + minCapArray = new short[]{(short)152 ,(short)594,(short)133 ,(short)285,(short)594 ,(short)394,(short)394,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)294 ,(short)683,(short)257 ,(short)365,(short)683 ,(short)483,(short)483,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(8, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_codoan"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Codoan"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Codoan Copper: CR 241 - 383, CD 650 - 739, DR 211 - 335, HR 335 - 415, MA 650 - 739, SR 450 - 539, UT 450 - 539 + minCapArray = new short[]{(short)241 ,(short)650,(short)211 ,(short)335,(short)650 ,(short)450,(short)450,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)383 ,(short)739,(short)335 ,(short)415,(short)739 ,(short)539,(short)593,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(9, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_diatium"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Diatium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Diatium Copper: CR 329 - 472, CD 706 - 794, DR 288 - 413, HR 385 - 465, MA 706 - 794, SR 506 - 594, UT 506 - 594 + minCapArray = new short[]{(short)329 ,(short)706,(short)288 ,(short)385,(short)706 ,(short)506,(short)506,(short)0,(short)0,(short)0 ,(short)0}; + maxCapArray = new short[]{(short)472 ,(short)794,(short)413 ,(short)465,(short)794 ,(short)594,(short)594,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(10, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_kelsh"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Kelsh"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Kelsh Copper: CR 418 - 560, CD 761 - 850, DR 366 - 490, HR 435 - 515, MA 761 - 850, SR 561 - 650, UT 561 - 650 + minCapArray = new short[]{(short)418 ,(short)761,(short)366 ,(short)435,(short)761 ,(short)561,(short)561,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)560 ,(short)850,(short)490 ,(short)515,(short)850 ,(short)650,(short)650,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(11, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_mythra"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Mythra"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Mythra Copper: CR 507 - 649, CD 817 - 906, DR 444 - 568, HR 485 - 565, MA 817 - 906, SR 617 - 706, UT 617 - 706 + minCapArray = new short[]{(short)507 ,(short)817,(short)444 ,(short)485,(short)817 ,(short)617,(short)617,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)649 ,(short)906,(short)568 ,(short)565,(short)906 ,(short)706,(short)706,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(12, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_platinite"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Platinite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Platinite Copper: CR 596 - 738, CD 872 - 961, DR 521 - 646, HR 535 - 615, MA 872 - 961, SR 672 - 761, UT 672 - 761 + minCapArray = new short[]{(short)596 ,(short)872,(short)521 ,(short)535,(short)872 ,(short)672,(short)672,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)738 ,(short)961,(short)646 ,(short)615,(short)961 ,(short)761,(short)761,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(13, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_polysteel"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Polysteel"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Polysteel Copper: CR 685 - 800, CD 928 - 1000, DR 599 - 700, HR 585 - 650, MA 928 - 1000, SR 728 - 800, UT 728 - 800 + minCapArray = new short[]{(short)685 ,(short)928 ,(short)599 ,(short)585,(short)928 ,(short)728,(short)728,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800 ,(short)1000,(short)700 ,(short)650,(short)1000 ,(short)800,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(14, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_borocarbitic"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Borocarbitic"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Conductive Borcarbitic Copper: None CR CD DR HR MA OQ SR UT + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000 ,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(15, resourceRoot); + copperRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_plumbum"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Plumbum"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Plumbum Iron: CR 1 - 131, CD 1 - 82, DR 300 - 414, HR 500 - 581, MA 1 - 98, SR 400 - 498, UT 400 - 498 + minCapArray = new short[]{(short)1 ,(short)1 ,(short)300 ,(short)500,(short)1 ,(short)400,(short)400,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)131,(short)82,(short)414 ,(short)581,(short)98 ,(short)498,(short)498,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(16, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_polonium"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Polonium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Polonium Iron: CR 71 - 231, CD 45 - 144, DR 361 - 501, HR 544 - 644, MA 53 - 173, SR 453 - 573, UT 453 - 573 + minCapArray = new short[]{(short)71 ,(short)45 ,(short)361 ,(short)544,(short)53 ,(short)453,(short)453,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)231,(short)144,(short)501 ,(short)644,(short)173 ,(short)573,(short)573,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(17, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_axidite"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Axidite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Axidite Iron: CR 171 - 331, CD 107 - 207, DR 449 - 589, HR 606 - 706, MA 128 - 248, SR 528 - 648, UT 528 - 648 + minCapArray = new short[]{(short)171,(short)107,(short)559 ,(short)606,(short)128 ,(short)528,(short)528,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)331,(short)207,(short)589 ,(short)706,(short)238 ,(short)648,(short)648,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(18, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_bronzium"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Bronzium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Bronzium Iron: CR 271 - 430, CD 169 - 269, DR 536 - 676, HR 669 - 769, MA 203 - 323, SR 603 - 723, UT 603 - 723 + minCapArray = new short[]{(short)271,(short)169,(short)536 ,(short)669,(short)203 ,(short)603,(short)603,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)430,(short)269,(short)676 ,(short)769,(short)323 ,(short)723,(short)723,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(19, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_colat"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Colat"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Colat Iron: CR 371 - 530, CD 232 - 332, DR 624 - 764, HR 731 - 831, MA 278 - 398, SR 678 - 798, UT 678 - 798 + minCapArray = new short[]{(short)371,(short)232,(short)624 ,(short)731,(short)278 ,(short)678,(short)678,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)530,(short)332,(short)764 ,(short)831,(short)398 ,(short)798,(short)798,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(20, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_dolovite"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Dolovite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Dolovite Iron: CR 470 - 630, CD 294 - 394, DR 711 - 851, HR 794 - 894, MA 353 - 473, SR 753 - 873, UT 753 - 873 + minCapArray = new short[]{(short)470,(short)294,(short)711 ,(short)794,(short)353 ,(short)753,(short)753,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)630,(short)394,(short)851 ,(short)894,(short)473 ,(short)873,(short)873,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(21, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_doonium"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Doonium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Doonium Iron: CR 570 - 730, CD 357 - 456, DR 799 - 939, HR 856 - 956, MA 428 - 548, SR 828 - 948, UT 828 - 948 + minCapArray = new short[]{(short)570,(short)357,(short)799 ,(short)856,(short)428 ,(short)828,(short)828,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)730,(short)456,(short)939 ,(short)956,(short)548 ,(short)948,(short)948,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(22, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_kammris"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Kammris"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Kammris Iron: CR 670 - 800, CD 419 - 500, DR 886 - 1000, HR 919 - 1000, MA 503 - 600, SR 903 - 1000, UT 903 - 1000 + minCapArray = new short[]{(short)670,(short)419,(short)886 ,(short)919 ,(short)503 ,(short)903 ,(short)903 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)500,(short)1000,(short)1000,(short)600 ,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(23, resourceRoot); + ironRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_rhodium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Rhodium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Rhodium Steel: CR 1 - 105, CD 1 - 85, DR 500 - 565, HR 600 - 652, MA 1 - 53, SR 500 - 565, UT 400 - 478 + minCapArray = new short[]{(short)1, (short)1 ,(short)500 ,(short)600 ,(short)1 ,(short)500,(short)400,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)105,(short)85,(short)565 ,(short)652 ,(short)53 ,(short)565,(short)478,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(24, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_kiirium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Kiirium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Kiirium Steel: CR 57 - 185, CD 46 - 150, DR 535 - 615, HR 628 - 692, MA 29 - 93, SR 535 - 615, UT 442 - 538 + minCapArray = new short[]{(short)57, (short)46 ,(short)535 ,(short)628 ,(short)29 ,(short)535,(short)442,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)185,(short)150,(short)615 ,(short)692 ,(short)93 ,(short)615,(short)538,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(25, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_cubirian"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Cubirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Cubirian Steel: CR 137 - 265, CD 111 - 215, DR 585 - 665, HR 668 - 732, MA 69 - 133, SR 585 - 665, UT 502 - 598 + minCapArray = new short[]{(short)137,(short)111,(short)585 ,(short)668 ,(short)69 ,(short)585,(short)502,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)265,(short)215,(short)665 ,(short)732 ,(short)133,(short)665,(short)598,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(26, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_thoranium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Thoranium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Thoranium Steel: CR 217 - 345, CD 176 - 280, DR 635 - 715, HR 708 - 772, MA 109 - 173, SR 635 - 715, UT 562 - 658 + minCapArray = new short[]{(short)217,(short)176,(short)635 ,(short)708 ,(short)109,(short)635,(short)562,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)345,(short)280,(short)715 ,(short)772 ,(short)173,(short)715,(short)658,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(27, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_neutronium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Neutronium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Neutronium Steel: CR 297 - 424, CD 241 - 345, DR 685 - 765, HR 748 - 812, MA 149 - 212, SR 685 - 765, UT 622 - 718 + minCapArray = new short[]{(short)297,(short)241,(short)685 ,(short)748 ,(short)149,(short)685,(short)622,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)424,(short)345,(short)765 ,(short)812 ,(short)212,(short)765,(short)718,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(28, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_duranium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Duranium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Duranium Steel: CR 377 - 504, CD 306 - 410, DR 735 - 815, HR 788 - 852, MA 189 - 252, SR 735 - 815, UT 682 - 778 + minCapArray = new short[]{(short)377,(short)306,(short)735 ,(short)788 ,(short)189,(short)735,(short)682,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)504,(short)410,(short)815 ,(short)852 ,(short)252,(short)815,(short)778,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(29, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_ditanium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Ditanium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Ditanium Steel: CR 456 - 584, CD 371 - 475, DR 785 - 865, HR 828 - 892, MA 228 - 292, SR 785 - 865, UT 742 - 838 + minCapArray = new short[]{(short)456,(short)371,(short)785 ,(short)828 ,(short)228,(short)785,(short)742,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)584,(short)475,(short)865 ,(short)892 ,(short)292,(short)865,(short)838,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(30, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_quadranium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Quadranium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Quadranium Steel: CR 536 - 664, CD 436 - 540, DR 835 - 915, HR 868 - 932, MA 268 - 332, SR 835 - 915, UT 802 - 898 + minCapArray = new short[]{(short)536,(short)436,(short)835 ,(short)868 ,(short)268,(short)835,(short)802,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)664,(short)540,(short)915 ,(short)932 ,(short)332,(short)915,(short)898,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(31, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_carbonite"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Carbonite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Carbonite Steel: CR 616 - 744, CD 501 - 605, DR 885 - 965, HR 908 - 972, MA 308 - 372, SR 885 - 965, UT 862 - 958 + minCapArray = new short[]{(short)616,(short)501,(short)885 ,(short)908 ,(short)308,(short)885,(short)862,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)744,(short)605,(short)965 ,(short)972 ,(short)372,(short)965,(short)958,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(32, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_duralloy"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Duralloy"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Duralloy Steel: CR 696 - 800, CD 566 - 650, DR 935 - 1000, HR 948 - 1000, MA 348 - 400, SR 935 - 1000, UT 922 - 1000 + minCapArray = new short[]{(short)696,(short)566,(short)935 ,(short)948 ,(short)348,(short)935 ,(short)922 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)650,(short)1000,(short)1000,(short)400,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(33, resourceRoot); + steelRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_alantium"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Alantium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + ////"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + // Alantium Carbonate Ore: CR 300 - 414, DR 1 - 115, HR 400 - 498, MA 300 - 414, SR 1 - 115, UT 200 - 330 + minCapArray = new short[]{(short)300,(short)0,(short)1 ,(short)400,(short)300,(short)1 ,(short)200,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)414,(short)1,(short)115,(short)498,(short)414,(short)115,(short)330,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(34, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_barthierium"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Barthierium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Barthierium Carbonate Ore: CR 361 - 501, DR 62 - 202, HR 453 - 573, MA 361 - 501, SR 62 - 202, UT 270 - 430 + minCapArray = new short[]{(short)361,(short)0,(short)62 ,(short)453,(short)361,(short)62 ,(short)270,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)501,(short)1,(short)202 ,(short)573,(short)501,(short)202,(short)430,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(35, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_chromite"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Chromite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Chromite Carbonate Ore: CR 449 - 589, DR 150 - 289, HR 528 - 648, MA 449 - 589, SR 150 - 289, UT 370 - 530 + minCapArray = new short[]{(short)449,(short)0,(short)150,(short)528,(short)449,(short)150,(short)370,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)598,(short)1,(short)298,(short)648,(short)598,(short)289,(short)530,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(36, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_frasium"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Frasium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Frasium Carbonate Ore: CR 536 - 676, DR 237 - 377, HR 603 - 723, MA 536 - 676, SR 237 - 377, UT 470 - 630 + minCapArray = new short[]{(short)536,(short)0,(short)237,(short)603,(short)536,(short)237,(short)470,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)676,(short)1,(short)377,(short)723,(short)676,(short)377,(short)630,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(37, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_lommite"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Lommite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Lommite Carbonate Ore: CR 624 - 764, DR 324 - 464, HR 678 - 798, MA 624 - 764, SR 324 - 464, UT 570 - 730 + minCapArray = new short[]{(short)624,(short)0,(short)324,(short)678,(short)624,(short)324,(short)570,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)764,(short)1,(short)464,(short)798,(short)764,(short)464,(short)730,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(38, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_ostrine"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Ostrine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Ostrine Carbonate Ore: CR 711 - 851, DR 412 - 551, HR 753 - 873, MA 711 - 851, SR 412 - 551, UT 670 - 830 + minCapArray = new short[]{(short)711,(short)0,(short)412,(short)753,(short)711,(short)412,(short)670,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)851,(short)1,(short)551,(short)873,(short)851,(short)551,(short)830,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(39, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_varium"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Varium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Varium Carbonate Ore: CR 799 - 939, DR 499 - 639, HR 828 - 948, MA 799 - 939, SR 499 - 639, UT 770 - 930 + minCapArray = new short[]{(short)799,(short)0,(short)499,(short)828,(short)799,(short)499,(short)770,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)939,(short)1,(short)639,(short)948,(short)939,(short)639,(short)930,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(40, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_carbonate_zinsiam"); + resourceRoot.setResourceClass("Carbonate Ore"); + resourceRoot.setResourceType("Zinsiam"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Zinsiam Carbonate Ore: CR 886 - 1000, DR 586 - 700, HR 903 - 1000, MA 886 - 1000, SR 586 - 700, UT 870 - 1000 + minCapArray = new short[]{(short)886 ,(short)0,(short)586,(short)903 ,(short)886 ,(short)586,(short)870 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)700,(short)1000,(short)1000,(short)700,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(41, resourceRoot); + oreCarbonateRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_siliclastic_ardanium"); + resourceRoot.setResourceClass("Siliclastic Ore"); + resourceRoot.setResourceType("Ardanium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Ardanium Siliclastic Ore: CR 300 - 452, DR 1 - 152, HR 300 - 452, MA 300 - 452, SR 1 - 131, UT 1 - 152 + minCapArray = new short[]{(short)300,(short)0,(short)1 ,(short)300 ,(short)300,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)452,(short)1,(short)152,(short)452 ,(short)452,(short)131,(short)152,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(42, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_siliclastic_cortosis"); + resourceRoot.setResourceClass("Siliclastic Ore"); + resourceRoot.setResourceType("Cortosis"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Cortosis Siliclastic Ore: CR 382 - 568, DR 83 - 269, HR 382 - 568, MA 382 - 568, SR 71 - 231, UT 83 - 269 + minCapArray = new short[]{(short)382,(short)0,(short)83 ,(short)382 ,(short)382,(short)71 ,(short)83 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)568,(short)1,(short)269,(short)568 ,(short)568,(short)231,(short)269,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(43, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_siliclastic_crism"); + resourceRoot.setResourceClass("Siliclastic Ore"); + resourceRoot.setResourceType("Crism"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Crism Siliclastic Ore: CR 498 - 685, DR 199 - 385, HR 498 - 685, MA 498 - 685, SR 171 - 330, UT 199 - 385 + minCapArray = new short[]{(short)498,(short)0,(short)199,(short)498 ,(short)498,(short)171,(short)199,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)685,(short)1,(short)385,(short)685 ,(short)685,(short)330,(short)385,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(44, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_siliclastic_malab"); + resourceRoot.setResourceClass("Siliclastic Ore"); + resourceRoot.setResourceType("Malab"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Malab Siliclastic Ore: CR 615 - 802, DR 316 - 502, HR 615 - 802, MA 615 - 802, SR 271 - 430, UT 316 - 502 + minCapArray = new short[]{(short)615,(short)0,(short)316,(short)615 ,(short)615,(short)271,(short)316,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)802,(short)1,(short)502,(short)802 ,(short)802,(short)430,(short)502,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(45, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_siliclastic_robindun"); + resourceRoot.setResourceClass("Siliclastic Ore"); + resourceRoot.setResourceType("Robindun"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Robindun Siliclastic Ore: CR 732 - 918, DR 432 - 618, HR 732 - 918, MA 732 - 918, SR 370 - 530, UT 432 - 618 + minCapArray = new short[]{(short)732,(short)0,(short)432,(short)732 ,(short)732,(short)370,(short)432,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)918,(short)1,(short)618,(short)918 ,(short)918,(short)530,(short)618,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(46, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_siliclastic_tertian"); + resourceRoot.setResourceClass("Siliclastic Ore"); + resourceRoot.setResourceType("Tertian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Tertian Siliclastic Ore: CR 848 - 1000, DR 549 - 700, HR 848 - 1000, MA 848 - 1000, SR 470 - 600, UT 549 - 700 + minCapArray = new short[]{(short)848 ,(short)0,(short)549,(short)848 ,(short)848 ,(short)470,(short)549,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)700,(short)1000,(short)1000,(short)600,(short)700,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(47, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_bene"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Bene"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Bene Extrusive Ore: CR 200 - 304, DR 300 - 391, HR 400 - 478, MA 1 - 79, SR 400 - 478, UT 400 - 478 + minCapArray = new short[]{(short)200,(short)0,(short)300,(short)400,(short)1 ,(short)400,(short)400,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)304,(short)1,(short)391,(short)478,(short)79,(short)478,(short)478,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(48, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_chronamite"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Chronamite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Chronamite Extrusive Ore: CR 256 - 384, DR 349 - 461, HR 442 - 538, MA 43 - 139, SR 442 - 538, UT 442 - 538 + minCapArray = new short[]{(short)256,(short)0,(short)349,(short)442,(short)43 ,(short)442,(short)442,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)384,(short)1,(short)461,(short)538,(short)139,(short)538,(short)538,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(49, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_ilimium"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Ilimium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Ilimium Extrusive Ore: CR 336 - 464, DR 419 - 531, HR 502 - 598, MA 103 - 199, SR 502 - 598, UT 502 - 598 + minCapArray = new short[]{(short)336,(short)0,(short)419,(short)502,(short)103,(short)502,(short)502,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)464,(short)1,(short)531,(short)598,(short)199,(short)598,(short)598,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(50, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_kalonterium"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Kalonterium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Kalonterium Extrusive Ore: CR 416 - 544, DR 489 - 601, HR 562 - 658, MA 163 - 259, SR 562 - 658, UT 562 - 658 + minCapArray = new short[]{(short)416,(short)0,(short)489,(short)562,(short)163,(short)562,(short)562,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)544,(short)1,(short)601,(short)658,(short)259,(short)658,(short)658,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(51, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_keschel"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Keschel"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Keschel Extrusive Ore: CR 496 - 624, DR 559 - 671, HR 622 - 718, MA 223 - 318, SR 622 - 718, UT 622 - 718 + minCapArray = new short[]{(short)496,(short)0,(short)559,(short)622,(short)223,(short)622,(short)622,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)624,(short)1,(short)671,(short)718,(short)318,(short)718,(short)718,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(52, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_lidium"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Lidium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Lidium Extrusive Ore: CR 576 - 704, DR 629 - 741, HR 682 - 778, MA 283 - 378, SR 682 - 778, UT 682 - 778 + minCapArray = new short[]{(short)576,(short)0,(short)629,(short)682,(short)283,(short)682,(short)682,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)704,(short)1,(short)741,(short)778,(short)378,(short)778,(short)778,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(53, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_maranium"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Maranium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Maranium Extrusive Ore: CR 656 - 784, DR 699 - 811, HR 742 - 838, MA 342 - 438, SR 742 - 838, UT 742 - 838 + minCapArray = new short[]{(short)656,(short)0,(short)699,(short)742,(short)342,(short)742,(short)742,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)784,(short)1,(short)811,(short)838,(short)438,(short)838,(short)838,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(54, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_pholokite"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Pholokite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Pholokite Extrusive Ore: CR 736 - 864, DR 769 - 881, HR 802 - 898, MA 402 - 498, SR 802 - 898, UT 802 - 898 + minCapArray = new short[]{(short)736,(short)0,(short)769,(short)802,(short)402,(short)802,(short)802,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)864,(short)1,(short)881,(short)898,(short)498,(short)898,(short)898,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(55, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_quadrenium"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Quadrenium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Quadrenium Extrusive Ore: CR 816 - 944, DR 839 - 951, HR 862 - 958, MA 462 - 558, SR 862 - 958, UT 862 - 958 + minCapArray = new short[]{(short)816,(short)0,(short)839,(short)862,(short)462,(short)862,(short)862,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)944,(short)1,(short)951,(short)958,(short)558,(short)958,(short)958,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(56, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_vintrium"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Vintrium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Vintrium Extrusive Ore: CR 896 - 1000, DR 909 - 1000, HR 922 - 1000, MA 522 - 600, SR 922 - 1000, UT 922 - 1000 + minCapArray = new short[]{(short)896 ,(short)0,(short)909 ,(short)922 ,(short)522,(short)922 ,(short)922 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(57, resourceRoot); + oreExtrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_berubium"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Berubium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Berubium Intrusive Ore: CR 200 - 316, DR 300 - 401, HR 700 - 743, MA 1 - 88, SR 500 - 572, UT 400 - 487 + minCapArray = new short[]{(short)200,(short)0,(short)300,(short)700,(short)1 ,(short)500,(short)400,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)316,(short)1,(short)401,(short)743,(short)88,(short)572,(short)487,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(58, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_chanlon"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Chanlon"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Chanlon Intrusive Ore: CR 262 - 404, DR 354 - 479, HR 723 - 777, MA 48 - 154, SR 539 - 628, UT 447 - 553 + minCapArray = new short[]{(short)262,(short)0,(short)354,(short)723,(short)48 ,(short)539,(short)447,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)404,(short)1,(short)479,(short)777,(short)154,(short)628,(short)553,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(59, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_corintium"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Corintium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Corintium Intrusive Ore: CR 351 - 493, DR 432 - 557, HR 757 - 810, MA 114 - 221, SR 594 - 683, UT 513 - 620 + minCapArray = new short[]{(short)351,(short)0,(short)432,(short)757,(short)114,(short)594,(short)513,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)493,(short)1,(short)557,(short)810,(short)221,(short)683,(short)620,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(60, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_derillium"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Derillium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Derillium Intrusive Ore: CR 440 - 582, DR 510 - 634, HR 790 - 843, MA 181 - 287, SR 650 - 739, UT 580 - 687 + minCapArray = new short[]{(short)440,(short)0,(short)510,(short)790,(short)181,(short)650,(short)580,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)582,(short)1,(short)634,(short)843,(short)287,(short)739,(short)687,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(61, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_oridium"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Oridium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Oridium Intrusive Ore: CR 529 - 671, DR 588 - 712, HR 823 - 877, MA 247 - 354, SR 706 - 794, UT 647 - 753 + minCapArray = new short[]{(short)529,(short)0,(short)588,(short)823,(short)247,(short)706,(short)647,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)671,(short)1,(short)712,(short)877,(short)354,(short)794,(short)753,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(62, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_dylinium"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Dylinium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Dylinium Intrusive Ore: CR 618 - 760, DR 666 - 790, HR 857 - 910, MA 314 - 420, SR 761 - 850, UT 713 - 820 + minCapArray = new short[]{(short)618,(short)0,(short)666,(short)857,(short)314,(short)761,(short)713,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)760,(short)1,(short)790,(short)910,(short)420,(short)850,(short)820,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(63, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_hollinium"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Hollinium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Hollinium Intrusive Ore: CR 707 - 849, DR 743 - 868, HR 890 - 943, MA 380 - 487, SR 817 - 906, UT 780 - 887 + minCapArray = new short[]{(short)707,(short)0,(short)743,(short)890,(short)380,(short)817,(short)780,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)849,(short)1,(short)868,(short)943,(short)487,(short)906,(short)887,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(64, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_ionite"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Ionite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Ionite Intrusive Ore: CR 796 - 938, DR 821 - 946, HR 923 - 977, MA 447 - 553, SR 872 - 961, UT 847 - 953 + minCapArray = new short[]{(short)796,(short)0,(short)821,(short)923,(short)447,(short)872,(short)847,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)938,(short)1,(short)946,(short)977,(short)553,(short)961,(short)953,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(65, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_katrium"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Katrium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Katrium Intrusive Ore: CR 884 - 1000, DR 899 - 1000, HR 957 - 1000, MA 513 - 600, SR 928 - 1000, UT 913 - 1000 + minCapArray = new short[]{(short)884 ,(short)0,(short)899 ,(short)957 ,(short)513,(short)928 ,(short)913 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(66, resourceRoot); + oreIntrusiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_bospridium"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Bospridium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + //Bospridium Armophous Gemstone: ER 1 - 105, CR 1 - 131, DR 1 - 131, HR 600 - 652, MA 1 - 79, SR 1 - 131, UT 1 - 131 + minCapArray = new short[]{(short)1 ,(short)0,(short)1 ,(short)600,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)131,(short)1,(short)131,(short)652,(short)79,(short)131,(short)131,(short)105,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(67, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_baradium"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Baradium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Baradium Armophous Gemstone: ER 57 - 185, CR 71 - 231, DR 71 - 231, HR 628 - 692, MA 43 - 139, SR 71 - 231, UT 71 - 231 + minCapArray = new short[]{(short)71 ,(short)0,(short)71 ,(short)628,(short)43 ,(short)71 ,(short)71 ,(short)57 ,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)231,(short)1,(short)231,(short)692,(short)139,(short)231,(short)231,(short)185,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(68, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_regvis"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Regvis"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Regvis Armophous Gemstone: ER 137 - 265, CR 171 - 331, DR 171 - 331, HR 668 - 732, MA 103 - 199, SR 171 - 331, UT 171 - 331 + minCapArray = new short[]{(short)171,(short)0,(short)171,(short)668,(short)103,(short)171,(short)171,(short)137,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)331,(short)1,(short)331,(short)732,(short)199,(short)331,(short)331,(short)265,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(69, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_plexite"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Plexite"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Plexite Armophous Gemstone: ER 217 - 345, CR 271 - 431, DR 271 - 431, HR 708 - 772, MA 163 - 259, SR 271 - 431, UT 271 - 431 + minCapArray = new short[]{(short)271,(short)0,(short)271,(short)708,(short)163,(short)271,(short)271,(short)217,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)431,(short)1,(short)431,(short)772,(short)259,(short)431,(short)431,(short)345,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(70, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_rudic"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Rudic"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Rudic Armophous Gemstone: ER 297 - 424, CR 371 - 530, DR 371 - 530, HR 748 - 812, MA 223 - 318, SR 371 - 530, UT 371 - 530 + minCapArray = new short[]{(short)371,(short)0,(short)371,(short)748,(short)223,(short)371,(short)371,(short)297,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)530,(short)1,(short)530,(short)812,(short)318,(short)530,(short)530,(short)424,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(71, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_ryll"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Ryll"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Ryll Armophous Gemstone: ER 377 - 504, CR 471 - 630, DR 471 - 630, HR 788 - 852, MA 283 - 378, SR 471 - 630, UT 471 - 630 + minCapArray = new short[]{(short)471,(short)0,(short)471,(short)788,(short)283,(short)471,(short)471,(short)377,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)630,(short)1,(short)630,(short)852,(short)378,(short)630,(short)630,(short)504,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(72, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_sedrellium"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("sedrellium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Sedrellium Armophous Gemstone: ER 456 - 584, CR 570 - 730, DR 570 - 730, HR 828 - 892, MA 342 - 438, SR 570 - 730, UT 570 - 730 + minCapArray = new short[]{(short)570,(short)0,(short)570,(short)828,(short)342,(short)570,(short)570,(short)456,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)730,(short)1,(short)730,(short)892,(short)438,(short)730,(short)730,(short)584,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(73, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_stygium"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Stygium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Stygium Armophous Gemstone: ER 536 - 664, CR 670 - 830, DR 670 - 830, HR 868 - 932, MA 402 - 498, SR 670 - 830, UT 670 - 830 + minCapArray = new short[]{(short)670,(short)0,(short)670,(short)868,(short)402,(short)670,(short)670,(short)536,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)830,(short)1,(short)830,(short)932,(short)498,(short)830,(short)830,(short)664,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(74, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_vendusii"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Vendusii"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Vendusii Armophous Gemstone: ER 616 - 744, CR 770 - 930, DR 770 - 930, HR 908 - 972, MA 462 - 558, SR 770 - 930, UT 770 - 930 + minCapArray = new short[]{(short)770,(short)0,(short)770,(short)908,(short)462,(short)770,(short)770,(short)616,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)930,(short)1,(short)930,(short)972,(short)558,(short)930,(short)930,(short)744,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(75, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_baltaran"); + resourceRoot.setResourceClass("Amorphous Gemstone"); + resourceRoot.setResourceType("Baltaran"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Bal'ta'ran Armophous Gemstone: ER 696 - 800, CR 870 - 1000, DR 870 - 1000, HR 948 - 1000, MA 522 - 600, SR 870 - 1000, UT 870 - 1000 + minCapArray = new short[]{(short)870 ,(short)0,(short)870 ,(short)948 ,(short)522,(short)870 ,(short)870 ,(short)696,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)800,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(76, resourceRoot); + amorphousGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_byrothsis"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Byrothsis"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + //Byrothsis Crystalline Gemstone: ER 500 - 581, CR 1 - 163, DR 1 - 163, HR 700 - 749, MA 1 - 66, SR 300 - 414, UT 300 - 414 + minCapArray = new short[]{(short)1 ,(short)0,(short)1 ,(short)700 ,(short)1 ,(short)300,(short)300,(short)500,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)163,(short)1,(short)163,(short)749 ,(short)66,(short)414,(short)414,(short)581,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(77, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_gallinorian"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Gallinorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Gallinorian Rainbow Crystalline Gemstone: ER 544 - 644, CR 88 - 288, DR 88 - 288, HR 726 - 786, MA 36 - 116, SR 361 - 501, UT 361 - 501 + minCapArray = new short[]{(short)88 ,(short)0,(short)88 ,(short)726 ,(short)36 ,(short)361,(short)361,(short)544,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)288,(short)1,(short)288,(short)786 ,(short)116,(short)501,(short)501,(short)644,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(78, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_green_diamond"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Green Diamond"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Green Diamond Crystalline Gemstone: ER 606 - 706, CR 213 - 413, DR 213 - 413, HR 764 - 824, MA 86 - 166, SR 449 - 589, UT 449 - 589 + minCapArray = new short[]{(short)213,(short)0,(short)213,(short)764 ,(short)86 ,(short)449,(short)449,(short)606,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)413,(short)1,(short)413,(short)824 ,(short)166,(short)589,(short)589,(short)706,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(79, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_laboi_mineral_crystal"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Laboi Mineral Crystal"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Laboi Mineral Crystal Crystalline Gemstone: ER 856 - 956, CR 713 - 913, DR 713 - 913, HR 914 - 974, MA 285 - 365, SR 799 - 939, UT 799 - 939 + minCapArray = new short[]{(short)713,(short)0,(short)713,(short)914 ,(short)285,(short)799,(short)799,(short)856,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)913,(short)1,(short)913,(short)974 ,(short)365,(short)939,(short)939,(short)956,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(80, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_kerol_firegem"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Kerol Fire-Gem"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Kerol Fire-Gem Crystalline Gemstone: ER 669 - 769, CR 338 - 538, DR 338 - 538, HR 801 - 861, MA 136 - 215, SR 536 - 676, UT 536 - 676 + minCapArray = new short[]{(short)338,(short)0,(short)338,(short)801 ,(short)136,(short)536,(short)536,(short)669,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)538,(short)1,(short)538,(short)861 ,(short)215,(short)676,(short)676,(short)769,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(81, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_seafah_jewel"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Seafah Jewel"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Seafah Jewel Crystalline Gemstone: ER 731 - 831, CR 463 - 663, DR 463 - 663, HR 839 - 899, MA 186 - 265, SR 624 - 764, UT 624 - 764 + minCapArray = new short[]{(short)463,(short)0,(short)463,(short)839 ,(short)186,(short)624,(short)624,(short)731,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)663,(short)1,(short)663,(short)899 ,(short)265,(short)764,(short)764,(short)831,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(82, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_sormahil_firegem"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Sormahil Fire-Gem"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Sormahil Fire Gem Crystalline Gemstone: ER 794 - 894, CR 588 - 788, DR 588 - 788, HR 876 - 936, MA 235 - 315, SR 711 - 851, UT 711 - 851 + minCapArray = new short[]{(short)588,(short)0,(short)588,(short)876 ,(short)235,(short)711,(short)711,(short)794,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)788,(short)1,(short)788,(short)936 ,(short)315,(short)851,(short)851,(short)894,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(83, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_laboi_mineral"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Laboi mineral"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Laboi Mineral Crystal Crystalline Gemstone: ER 856 - 956, CR 713 - 913, DR 713 - 913, HR 914 - 974, MA 285 - 365, SR 799 - 939, UT 799 - 939 + minCapArray = new short[]{(short)713,(short)0,(short)713,(short)914 ,(short)285,(short)799,(short)799,(short)856,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)913,(short)1,(short)913,(short)974 ,(short)365,(short)939,(short)939,(short)956,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(84, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_vertex"); + resourceRoot.setResourceClass("Crystalline Gemstone"); + resourceRoot.setResourceType("Vertex"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + // Vertex Crystalline Gemstone: ER 919 - 1000, CR 838 - 1000, DR 838 - 1000, HR 951 - 1000, MA 335 - 400, SR 886 - 1000, UT 886 - 1000 + minCapArray = new short[]{(short)838 ,(short)0,(short)838 ,(short)951 ,(short)335,(short)886 ,(short)886 ,(short)919 ,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)400,(short)1000,(short)1000,(short)1000,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(85, resourceRoot); + crystallineGemstoneRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_type1"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Class 1"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + //Class 1 Radioactive: DR 400 - 474, PE 500 - 593 + minCapArray = new short[]{(short)0,(short)0,(short)400,(short)0,(short)0,(short)0,(short)0,(short)0,(short)500,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)474,(short)1,(short)1,(short)1,(short)1,(short)1,(short)593,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(86, resourceRoot); + radioactiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_type2"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Class 2"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //Class 2 Radioactive: DR 440 - 531, PE 550 - 664 + minCapArray = new short[]{(short)0,(short)0,(short)400,(short)0,(short)0,(short)0,(short)0,(short)0,(short)550,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)531,(short)1,(short)1,(short)1,(short)1,(short)1,(short)664,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(87, resourceRoot); + radioactiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_type3"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Class 3"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //Class 3 Radioactive: DR 497 - 589, PE 621 - 736 + minCapArray = new short[]{(short)0,(short)0,(short)497,(short)0,(short)0,(short)0,(short)0,(short)0,(short)621,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)589,(short)1,(short)1,(short)1,(short)1,(short)1,(short)736,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(88, resourceRoot); + radioactiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_type4"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Class 4"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //Class 4 Radioactive: DR 554 - 646, PE 693 - 807 + minCapArray = new short[]{(short)0,(short)0,(short)554,(short)0,(short)0,(short)0,(short)0,(short)0,(short)693,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)646,(short)1,(short)1,(short)1,(short)1,(short)1,(short)807,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(89, resourceRoot); + radioactiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_type5"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Class 5"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //Class 5 Radioactive: DR 611 - 703, PE 764 - 879 + minCapArray = new short[]{(short)0,(short)0,(short)611,(short)0,(short)0,(short)0,(short)0,(short)0,(short)764,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)703,(short)1,(short)1,(short)1,(short)1,(short)1,(short)879,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(90, resourceRoot); + radioactiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_type6"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Class 6"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //Class 6 Radioactive: DR 669 - 760, PE 836 - 950 + minCapArray = new short[]{(short)0,(short)0,(short)669,(short)0,(short)0,(short)0,(short)0,(short)0,(short)836,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)760,(short)1,(short)1,(short)1,(short)1,(short)1,(short)950,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(91, resourceRoot); + radioactiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_type7"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Class 7"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //Class 7 Radioactive: DR 726 - 800, PE 907 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)726,(short)0,(short)0,(short)0,(short)0,(short)0,(short)907 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(92, resourceRoot); + radioactiveRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("metal_ferrous_unknown"); + resourceRoot.setResourceClass("Ferrous Metal"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Unknown Ferrous: CR 1 - 800, CD 1 - 600, DR 300 - 1000, HR 300 - 1000, MA 1 - 600, SR 400 - 1000, UT 400 - 1000 + minCapArray = new short[]{(short)1 ,(short)1 ,(short)300 ,(short)300 ,(short)1 ,(short)400 ,(short)400 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)650,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(93, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("metal_nonferrous_unknown"); + resourceRoot.setResourceClass("Non-Ferrous"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Unknown Non-Ferrous: CR 1 - 800, CD 300 - 1000, DR 1 - 700, HR 200 - 800, MA 300 - 1000, SR 300 - 900, UT 300 - 1000 + minCapArray = new short[]{(short)1 ,(short)300 ,(short)1 ,(short)200,(short)300 ,(short)300,(short)300 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)1000,(short)700,(short)800,(short)1000,(short)900,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(94, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_sedimentary_unknown"); + resourceRoot.setResourceClass("Sedimentary Ore"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + //Unknown Sedimentary Ore: CR 300 - 1000, DR 1 - 700, HR 300 - 1000, MA 300 - 1000, SR 1 - 700 + minCapArray = new short[]{(short)300 ,(short)0,(short)1 ,(short)300 ,(short)300 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)700,(short)1000,(short)1000,(short)700,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(95, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_igneous_unknown"); + resourceRoot.setResourceClass("Igneous Ore"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Unknown Igneous Ore: CR 200 - 1000, DR 300 - 1000, HR 400 - 1000, MA 1 - 800, SR 400 - 1000, UT 400 - 1000 + minCapArray = new short[]{(short)200 ,(short)0,(short)300 ,(short)400 ,(short)1 ,(short)400 ,(short)400 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)800,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(96, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gemstone_unknown"); + resourceRoot.setResourceClass("Gemstone"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + //Unknown Gemstone: HR 600 - 1000, MA 1 - 600 + minCapArray = new short[]{(short)1 ,(short)0,(short)1 ,(short)600 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1000,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(97, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_unknown"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + // Unknown Radioactive: DR 1 - 800 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(98, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_type1"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 1 Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 1 Solid Petrochemical: DR 1 - 149, PE 300 - 430 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)149,(short)1,(short)1,(short)1,(short)1,(short)1,(short)430,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(99, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_type2"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 2 Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 2 Solid Petrochemical: DR 81 - 264, PE 370 - 530 + minCapArray = new short[]{(short)0,(short)0,(short)81 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)370,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)264,(short)1,(short)1,(short)1,(short)1,(short)1,(short)530,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(100, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_type3"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 3 Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 3 Solid Petrochemical: DR 195 - 378, PE 470 - 630 + minCapArray = new short[]{(short)0,(short)0,(short)195,(short)0,(short)0,(short)0,(short)0,(short)0,(short)470,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)378,(short)1,(short)1,(short)1,(short)1,(short)1,(short)630,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(101, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_type4"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 4 Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 4 Solid Petrochemical: DR 309 - 492, PE 570 - 730 + minCapArray = new short[]{(short)0,(short)0,(short)309,(short)0,(short)0,(short)0,(short)0,(short)0,(short)570,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)492,(short)1,(short)1,(short)1,(short)1,(short)1,(short)730,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(102, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_type5"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 5 Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 5 Solid Petrochemical: DR 423 - 606, PE 670 - 830 + minCapArray = new short[]{(short)0,(short)0,(short)423,(short)0,(short)0,(short)0,(short)0,(short)0,(short)670,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)606,(short)1,(short)1,(short)1,(short)1,(short)1,(short)830,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(103, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_type6"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 6 Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 6 Solid Petrochemical: DR 537 - 720, PE 770 - 930 + minCapArray = new short[]{(short)0,(short)0,(short)537,(short)0,(short)0,(short)0,(short)0,(short)0,(short)770,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)720,(short)1,(short)1,(short)1,(short)1,(short)1,(short)930,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(104, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_type7"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 7 Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 7 Solid Petrochemical: DR 652 - 800, PE 870 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)652,(short)0,(short)0,(short)0,(short)0,(short)0,(short)870 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(105, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_unknown"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Uknown Solid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + // DR,PE,OQ 1-1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(106, resourceRoot); + petrochemicalSolidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_type1"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 1 Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //Class 1 Liquid Petrochemical: DR 1 - 600 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(107, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_type2"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 2 Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(108, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_type3"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 3 Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(109, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_type4"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 4 Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(110, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_type5"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 5 Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(111, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_type6"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 6 Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(112, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_type7"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Class 7 Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(113, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_unknown"); + resourceRoot.setResourceClass("Petro Fuel"); + resourceRoot.setResourceType("Unknown Liquid"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(114, resourceRoot); + petrochemicalLiquidRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_inert_lubricating_oil"); + resourceRoot.setResourceClass("Oil"); + resourceRoot.setResourceType("Lubricating"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(115, resourceRoot); + lubricatingOilRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_inert_polymer"); + resourceRoot.setResourceClass("Polymer"); + resourceRoot.setResourceType("Polymer"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(116, resourceRoot); + polymerRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_hydron3"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Hydron3"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Hydron-3 Inert Gas: DR 1 - 81 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)81,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(117, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_malium"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Malium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Malium Inert Gas: DR 44 - 142 + minCapArray = new short[]{(short)0,(short)0,(short)44,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)142,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(118, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_bilal"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Bilal"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Bilal Inert Gas: DR 105 - 204 + minCapArray = new short[]{(short)0,(short)0,(short)105,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)204,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(119, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_corthel"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Corthel"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Corthel Inert Gas: DR 167 - 265 + minCapArray = new short[]{(short)0,(short)0,(short)167,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)265,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(120, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_culsion"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Culsion"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Culsion Inert Gas: DR 228 - 327 + minCapArray = new short[]{(short)0,(short)0,(short)228,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)327,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(121, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_dioxis"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Dioxis"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Dioxis Inert Gas: DR 290 - 388 + minCapArray = new short[]{(short)0,(short)0,(short)290,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)388,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(122, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_hurlothrombic"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Hurlothrombic"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Hurlothrombic Inert Gas: DR 351 - 450 + minCapArray = new short[]{(short)0,(short)0,(short)351,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)450,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(123, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_kaylon"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Kaylon"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Kaylon Inert Gas: DR 413 - 511 + minCapArray = new short[]{(short)0,(short)0,(short)413,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)511,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(124, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_korfaise"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Korfaise"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Korfaise Inert Gas: DR 474 - 573 + minCapArray = new short[]{(short)0,(short)0,(short)474,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)573,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(125, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_methanagen"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Methanagen"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Methanagen Inert Gas: DR 536 - 634 + minCapArray = new short[]{(short)0,(short)0,(short)536,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)634,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(126, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_mirth"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Mirth"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Mirth Inert Gas: DR 597 - 696 + minCapArray = new short[]{(short)0,(short)0,(short)597,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)696,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(127, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_obah"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Obah"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Obah Inert Gas: DR 659 - 757 + minCapArray = new short[]{(short)0,(short)0,(short)659,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)757,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(128, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_rethin"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Rethin"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Rethin Inert Gas: DR 720 - 800 + minCapArray = new short[]{(short)0,(short)0,(short)720,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(129, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_inert_unknown"); + resourceRoot.setResourceClass("Inert Gas"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(130, resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_eleton"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Eleton"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Eleton Reactive Gas: DR 1? - 400? + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)400,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(131, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_irolunn"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Irolunn"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Irolunn Reactive Gas: DR 100? - 600? + minCapArray = new short[]{(short)0,(short)0,(short)100,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(132, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_methane"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Methane"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Methane Reactive Gas: DR 200? - 700? + minCapArray = new short[]{(short)0,(short)0,(short)200,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(133, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_orveth"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Orveth"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Orveth Reactive Gas: DR 300? - 800? + minCapArray = new short[]{(short)0,(short)0,(short)300,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(134, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_sig"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Sig"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + //Sig Reactive Gas: DR 300? - 900? + minCapArray = new short[]{(short)0,(short)0,(short)300,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)900,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(135, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_skevon"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Skevon"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Skevon Reactive Gas: DR 400? - 900? + minCapArray = new short[]{(short)0,(short)0,(short)400,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)900,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(136, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_tolium"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Tolium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + //Tolium Reactive Gas: DR 500? - 1000? + minCapArray = new short[]{(short)0,(short)0,(short)500 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(137, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_unknown"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Unknown"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(138, resourceRoot); + reactiveGasRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_corellia"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(139, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_dantooine"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(140, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_dathomir"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Dathomir"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(141, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_endor"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(142, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_lok"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(143, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_naboo"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(144, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_rori"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(145, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_talus"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(146, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_tatooine"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(147, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_yavin4"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(148, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_corellia"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(149, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_dantooine"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(150, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_dathomir"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Dathomir"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(151, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_endor"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(152, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_lok"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(153, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_naboo"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(154, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_rori"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(155, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_talus"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(156, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_tatooine"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(157, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_yavin4"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(158, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_corellia"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(159, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_dantooine"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Dantoine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(160, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_dathomir"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(161, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_endor"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(162, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_lok"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(163, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_naboo"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(164, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_rori"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(165, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_talus"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(166, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_tatooine"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(167, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_yavin4"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(168, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_corellia"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + // not sure about these + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(169, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_dantooine"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Dantoine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(170, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_dathomir"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(171, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_endor"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(172, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_lok"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(173, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_naboo"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(174, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_rori"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(175, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_talus"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(176, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_tatooine"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(177, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_yavin4"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(178, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_corellia"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(179, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_dantooine"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Dantoine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(180, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_dathomir"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(181, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_endor"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(182, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_lok"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(183, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_naboo"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(184, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_rori"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(185, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_talus"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(186, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_tatooine"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(187, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_yavin4"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(188, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_corellia"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(189, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_dantooine"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Dantoine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(190, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_dathomir"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(191, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_endor"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(192, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_lok"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(193, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_naboo"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(194, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_rori"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(195, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_talus"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(196, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_tatooine"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(197, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_yavin4"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(198, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_corellia"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + //Conifer Wood: DR 1 - 600, MA 600 - 1000, SR 100 - 400, UT 1 - 300 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(199, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_dantooine"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(200, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_dathomir"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(201, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_endor"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(202, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_lok"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(203, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_naboo"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(204, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_rori"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(205, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_talus"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(206, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_tatooine"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(207, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_yavin4"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(208, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_corellia"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + //Evergreen Wood: DR 1 - 500, MA 800 - 1000, SR 1 - 400, UT 1 - 300 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(209, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_dantooine"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(210, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_dathomir"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(211, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_endor"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(212, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_lok"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(213, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_naboo"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(214, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_rori"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(215, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_talus"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(216, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_tatooine"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(217, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_yavin4"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(218, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_corellia"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + //Decidious Wood: DR 1 - 800, MA 400 - 800, SR 300 - 700, UT 1 - 800 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(219, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_dantooine"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(220, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_dathomir"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(221, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_endor"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(222, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_lok"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(223, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_naboo"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(224, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_rori"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(225, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_talus"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(226, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_tatooine"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(227, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_yavin4"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(228, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_corellia"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + //DR FL PE OQ + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(229, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_dantooine"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(230, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_dathomir"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(231, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_endor"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(232, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_lok"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(233, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_naboo"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(234, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_rori"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(235, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_talus"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(236, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_tatooine"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(237, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_yavin4"); + resourceRoot.setResourceClass("Fruit"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(238, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_corellia"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + //Flowers: PE 1 - 700 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(239, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_dantooine"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(240, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_dathomir"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(241, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_endor"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(242, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_lok"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(243, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_naboo"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(244, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_rori"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(245, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_talus"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(246, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_tatooine"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(247, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_yavin4"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(248, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_corellia"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + //Domesticated Corn: FL 1 - 700, PE 300 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(249, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_dantooine"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(250, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_dathomir"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(251, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_endor"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(252, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_lok"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(253, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_naboo"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(254, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_rori"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(255, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_talus"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(256, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_tatooine"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(257, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_yavin4"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(258, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_corellia"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + //Domesticated Oats: FL 1 - 700, PE 300 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(259, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_dantooine"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(260, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_dathomir"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(261, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_endor"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(262, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_lok"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(263, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_naboo"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(264, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_rori"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(265, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_talus"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(266, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_tatooine"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(267, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_yavin4"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(268, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_corellia"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(269, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_dantooine"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(270, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_dathomir"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(271, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_endor"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(272, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_lok"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(273, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_naboo"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(274, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_rori"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(275, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_talus"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(276, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_tatooine"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(277, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_yavin4"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(278, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_corellia"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(279, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_dantooine"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(280, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_dathomir"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(281, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_endor"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(282, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_lok"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(283, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_naboo"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(284, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_rori"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(285, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_talus"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(286, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_tatooine"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(287, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_yavin4"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(288, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_corellia"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + //Wild Corn: FL 300 - 1000, PE 1 - 700 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(289, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_dantooine"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(290, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_dathomir"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(291, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_endor"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(292, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_lok"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(293, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_naboo"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(294, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + } + //checked until here + public void createCollections2(){ + + ResourceRoot resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_rori"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(295, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_talus"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(296, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_tatooine"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(297, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_yavin4"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(298, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_corellia"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(299, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_dantooine"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(300, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_dathomir"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(301, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_endor"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(302, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_lok"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(303, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_naboo"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(304, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_rori"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(305, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_talus"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(306, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_tatooine"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(307, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_yavin4"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(308, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_corellia"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(309, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_dantooine"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(310, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_dathomir"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(311, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_endor"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(312, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_lok"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(313, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_naboo"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(314, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_rori"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(315, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_talus"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(316, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_tatooine"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(317, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_yavin4"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(318, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_corellia"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(319, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_dantooine"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(320, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_dathomir"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(321, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_endor"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(322, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_lok"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(323, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_naboo"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(324, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_rori"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(325, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_talus"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(326, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_tatooine"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(327, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_yavin4"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(328, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_corellia"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + // DR FL PE OQ + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(329, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_dantooine"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(330, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_dathomir"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(331, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_endor"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(332, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_lok"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(333, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_naboo"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(334, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_rori"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(335, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_talus"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(336, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_tatooine"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(337, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_yavin4"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(338, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_corellia"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(339, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_dantooine"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(340, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_dathomir"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(341, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_endor"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(342, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_lok"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(343, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_naboo"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(344, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_rori"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(345, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_talus"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(346, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_tatooine"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(347, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_yavin4"); + resourceRoot.setResourceClass("Berry Fruit"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(348, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_corellia"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(349, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_dantooine"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(350, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_dathomir"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(351, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_endor"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(352, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_lok"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(353, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_naboo"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(354, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_rori"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(355, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_talus"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(356, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_tatooine"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(357, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_yavin4"); + resourceRoot.setResourceClass("Vegetable Fungus"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(358, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_corellia"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(359, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_dantooine"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(360, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_dathomir"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(361, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_endor"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(362, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_lok"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(363, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_naboo"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(364, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_rori"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(365, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_talus"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(366, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_tatooine"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(367, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_yavin4"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(368, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_corellia"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(369, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_dantooine"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(370, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_dathomir"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(371, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_endor"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(372, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_lok"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(373, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_naboo"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(374, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_rori"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(375, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_talus"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(376, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_tatooine"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(377, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_yavin4"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(378, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_corellia"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + //Animal Bone: DR 300 - 1000, MA 1 - 500, SR 400 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(379, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_dantooine"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(380, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_dathomir"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(381, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_endor"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(382, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_lok"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(383, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_naboo"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(384, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_rori"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(385, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_talus"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(386, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_tatooine"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(387, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_yavin4"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(388, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_corellia"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + //"Cold Res","Cond","Decay Res","Heat Res","Malle","Shock Res","Unit Tough","Entangle Res","Pot E","OQ","Flavor" + // Avian Bone: DR 1 - 700, MA 1 - 600, SR 100 - 500, UT 1 - 500 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(389, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_dantooine"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(390, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_dathomir"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(391, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_endor"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(392, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_lok"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(393, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_naboo"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(394, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_rori"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(395, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_talus"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(396, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_tatooine"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(397, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_yavin4"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(398, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_corellia"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + //Horns: DR 200 - 1000, MA 1 - 500, SR 300 - 700, UT 1 - 500 + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(399, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_dantooine"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(400, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_dathomir"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(401, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_endor"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(402, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_lok"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(403, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_naboo"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(404, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_rori"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(405, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_talus"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(406, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_tatooine"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(407, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_yavin4"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(408, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_corellia"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(409, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_dantooine"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(410, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_dathomir"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(411, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_endor"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(412, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_lok"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(413, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_naboo"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(414, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_rori"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(415, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_talus"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(416, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_tatooine"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(417, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_yavin4"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(418, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_corellia"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(419, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_dantooine"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(420, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_dathomir"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(421, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_endor"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(422, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_lok"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(423, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_naboo"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(424, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_rori"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(425, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_talus"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(426, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_tatooine"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(427, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_yavin4"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(428, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_corellia"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(429, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_dantooine"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(430, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_dathomir"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(431, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_endor"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(432, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_lok"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(433, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_naboo"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(434, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_rori"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(435, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_talus"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(436, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_tatooine"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(437, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_yavin4"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(438, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_corellia"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(439, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_dantooine"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(440, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_dathomir"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(441, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_endor"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(442, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_lok"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(443, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_naboo"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(444, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_rori"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(445, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_talus"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(446, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_tatooine"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(447, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_yavin4"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(448, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_corellia"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + // Avian Meat: FL 1 - 700, PE 300 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(449, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_dantooine"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(450, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_dathomir"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(451, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_endor"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(452, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_lok"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(453, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_naboo"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(454, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_rori"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(455, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_talus"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(456, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_tatooine"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(457, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_yavin4"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(458, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_corellia"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + // Carnivore Meat: FL 300 - 1000, PE 300 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(459, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_dantooine"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(460, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_dathomir"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(461, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_endor"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(462, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_lok"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(463, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_naboo"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(464, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_rori"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(465, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_talus"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(466, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_tatooine"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(467, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_yavin4"); + resourceRoot.setResourceClass("Canivore Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(468, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_corellia"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + //Domesticated Meat: FL 300 - 1000, PE 1 - 700 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(469, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_dantooine"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(470, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_dathomir"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(471, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_endor"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(472, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_lok"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(473, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_naboo"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(474, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_rori"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(475, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_talus"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(476, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_tatooine"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(477, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_yavin4"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(478, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_corellia"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + // Herbivore Meat: FL 1 - 700, PE 1 - 700 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(479, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_dantooine"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(480, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_dathomir"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(481, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_endor"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(482, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_lok"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(483, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_naboo"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(484, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_rori"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(485, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_talus"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(486, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_tatooine"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(487, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_yavin4"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(488, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_corellia"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + //Insect Meat: PE 300 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(489, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_dantooine"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(490, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_dathomir"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(491, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_endor"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(492, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_lok"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(493, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_naboo"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(494, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_rori"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(495, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_talus"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(496, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_tatooine"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(497, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_yavin4"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(498, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_corellia"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + // Wild Meat: FL 1 - 700, PE 300 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(499, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_dantooine"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(500, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_dathomir"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(501, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_endor"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(502, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_lok"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(503, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_naboo"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(504, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_rori"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(505, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_talus"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(506, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_tatooine"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(507, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_yavin4"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(508, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_corellia"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + // Domesticated Milk: FL 1 - 700, PE 300 - 1000 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(509, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_dantooine"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(510, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_dathomir"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(511, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_endor"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(512, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_lok"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(513, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_naboo"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(514, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_rori"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(515, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_talus"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(516, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_tatooine"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(517, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_yavin4"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(518, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_corellia"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + // Wild Milk: PE 1 - 700 + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(519, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_dantooine"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(520, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_dathomir"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(521, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_endor"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(522, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_lok"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(523, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_naboo"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(524, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_rori"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(525, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_talus"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(526, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_tatooine"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(527, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_yavin4"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(528, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_corellia"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(529, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_dantooine"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(530, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_dathomir"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(531, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_endor"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(532, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_lok"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(533, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_naboo"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(534, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_rori"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(535, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_talus"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(536, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_tatooine"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(537, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_yavin4"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(538, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_corellia"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(539, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_dantooine"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(540, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_dathomir"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(541, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_endor"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(542, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_lok"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(543, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_naboo"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(544, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_rori"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(545, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_talus"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(546, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_tatooine"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(547, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_yavin4"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(548, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_corellia"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Corellia"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(549, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_dantooine"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(550, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_dathomir"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(551, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_endor"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(552, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_lok"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(553, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_naboo"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(554, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_rori"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(555, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_talus"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(556, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_tatooine"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(557, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_yavin4"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(558, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_corellia"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(559, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_dantooine"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(560, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_dathomir"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(561, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_endor"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(562, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_lok"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(563, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_naboo"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(564, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_rori"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(565, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_talus"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(566, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_tatooine"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(567, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_yavin4"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(568, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_corellia"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(569, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_dantooine"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(570, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_dathomir"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(571, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_endor"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(572, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_lok"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(573, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_naboo"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(574, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_rori"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(575, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_talus"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(576, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_tatooine"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(577, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_yavin4"); + resourceRoot.setResourceClass("Egg"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(578, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + } + // checked + public void createCollections3(){ + ResourceRoot resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_corellia"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Corellian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + // DR MA OQ SR UT + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(579, resourceRoot); + corelliaPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_dantooine"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Dantooine"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(580, resourceRoot); + dantooinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_dathomir"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Dathomirian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(581, resourceRoot); + dathomirPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_endor"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Endorian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(582, resourceRoot); + endorPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_lok"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Lokian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(583, resourceRoot); + lokPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_naboo"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Nabooian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(584, resourceRoot); + nabooPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_rori"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Rori"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(585, resourceRoot); + roriPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_talus"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Talusian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(586, resourceRoot); + talusPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_tatooine"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Tatooinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(587, resourceRoot); + tattoinePool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_yavin4"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Yavinian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(588, resourceRoot); + yavinPool4Roots.addElement(resourceRoot); + + // Kashyyyk resources + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_kashyyyk"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(589, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_kashyyyk"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(590, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_tidal_kashyyyk"); + resourceRoot.setResourceClass("Tidal Renewable Energy"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_TIDAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(591, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_kashyyyk"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(592, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_kashyyyk"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(593, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_kashyyyk"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(594, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_kashyyyk"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(595, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_kashyyyk"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(596, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_kashyyyk"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(597, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_reptilian_kashyyyk"); + resourceRoot.setResourceClass("Reptilian Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(598, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_kashyyyk"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(599, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_kashyyyk"); + resourceRoot.setResourceClass("Egg Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(600, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_kashyyyk"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(601, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_kashyyyk"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(602, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_kashyyyk"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(603, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_kashyyyk"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(604, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_kashyyyk"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(605, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_kashyyyk"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(606, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_kashyyyk"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(607, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_kashyyyk"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(608, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_kashyyyk"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(609, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_kashyyyk"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(610, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_kashyyyk"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(611, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_kashyyyk"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(612, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_kashyyyk"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(613, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_kashyyyk"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(614, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_kashyyyk"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(615, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_kashyyyk"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(616, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_kashyyyk"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(617, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_kashyyyk"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(618, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_kashyyyk"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(619, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_kashyyyk"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(620, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_kashyyyk"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(621, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_kashyyyk"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(622, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_kashyyyk"); + resourceRoot.setResourceClass("Vegetable Fungi"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(623, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_kashyyyk"); + resourceRoot.setResourceClass("Vegetable Fruits"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(624, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_kashyyyk"); + resourceRoot.setResourceClass("Vegetable Berries"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(625, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_kashyyyk"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FRUIT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(626, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_kashyyyk"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(627, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_kashyyyk"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(628, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_kashyyyk"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(629, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_wind_kashyyyk"); + resourceRoot.setResourceClass("Wind Renewable Energy"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WIND); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)400,(short)500,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(630, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_unlimited_solar_kashyyyk"); + resourceRoot.setResourceClass("Solar Renewable Energy"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_SOLAR); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200,(short)500,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)600,(short)500,(short)1}; + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(631, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_hydron3_kashyyyk"); + resourceRoot.setResourceClass("Hydron-3 Renewable Energy"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HYDRON); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(632, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("energy_renewable_site_limited_geothermal_kashyyyk"); + resourceRoot.setResourceClass("Geothermal Renewable Energy"); + resourceRoot.setResourceType("Kashyyykian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GEOTHERM); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)200 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(633, resourceRoot); + kashyyykPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_domesticated_mustafar"); + resourceRoot.setResourceClass("Domesticated Milk"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(634, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("milk_wild_mustafar"); + resourceRoot.setResourceClass("Wild Milk"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MILK); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BOTTLE_MILK); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(635, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_domesticated_mustafar"); + resourceRoot.setResourceClass("Domesticated Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(636, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_wild_mustafar"); + resourceRoot.setResourceClass("Wild Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(637, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_herbivore_mustafar"); + resourceRoot.setResourceClass("Herbivore Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(638, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_carnivore_mustafar"); + resourceRoot.setResourceClass("Carnivore Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(639, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_avian_mustafar"); + resourceRoot.setResourceClass("Avian Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(640, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_egg_mustafar"); + resourceRoot.setResourceClass("Egg Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(641, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("meat_insect_mustafar"); + resourceRoot.setResourceClass("Insect Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(642, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_fish_mustafar"); + resourceRoot.setResourceClass("Fish Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(643, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_crustacean_mustafar"); + resourceRoot.setResourceClass("Crustacean Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(644, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("seafood_mollusk_mustafar"); + resourceRoot.setResourceClass("Mollusk Meat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MEAT); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(645, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_mammal_mustafar"); + resourceRoot.setResourceClass("Animal Bones"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)300 ,(short)0,(short)1 ,(short)400 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(646, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_avian_mustafar"); + resourceRoot.setResourceClass("Avian Bones"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_BONES); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)700,(short)1,(short)600,(short)500,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(647, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("bone_horn_mustafar"); + resourceRoot.setResourceClass("Horn"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HORN); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_STRUCTURE); + minCapArray = new short[]{(short)0,(short)0,(short)200 ,(short)0,(short)1 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)500,(short)700,(short)500,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(648, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_wooly_mustafar"); + resourceRoot.setResourceClass("Wooly Hide"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WOOLY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(649, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_bristley_mustafar"); + resourceRoot.setResourceClass("Bristley Hide"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BRISTLEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(650, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_leathery_mustafar"); + resourceRoot.setResourceClass("Leathery Hide"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_LEATHERY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(651, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("hide_scaley_mustafar"); + resourceRoot.setResourceClass("Scaley Hide"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_HIDE); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_SCALEY_HIDE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(652, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_domesticated_mustafar"); + resourceRoot.setResourceClass("Domesticated Corn"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(653, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("corn_wild_mustafar"); + resourceRoot.setResourceClass("Wild Corn"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_CORN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(654, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_domesticated_mustafar"); + resourceRoot.setResourceClass("Domesticated Rice"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(655, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("rice_wild_mustafar"); + resourceRoot.setResourceClass("Wild Rice"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_RICE); + minCapArray = new short[]{(short)0,(short)0,(short)0 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(656, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_domesticated_mustafar"); + resourceRoot.setResourceClass("Domesticated Oats"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(657, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("oats_wild_mustafar"); + resourceRoot.setResourceClass("Wild Oats"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_OATS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(658, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_domesticated_mustafar"); + resourceRoot.setResourceClass("Domesticated Wheat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)300 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)700}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(659, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wheat_wild_mustafar"); + resourceRoot.setResourceClass("Wild Wheat"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_WHEAT); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)300}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(660, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_greens_mustafar"); + resourceRoot.setResourceClass("Vegetable Greens"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_GREEN_VEGETABLES); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(661, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_beans_mustafar"); + resourceRoot.setResourceClass("Vegetable Beans"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_BEAN); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(662, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_tubers_mustafar"); + resourceRoot.setResourceClass("Vegetable Tubers"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_TUBER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(663, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("vegetable_fungi_mustafar"); + resourceRoot.setResourceClass("Vegetable Fungi"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(664, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_fruits_mustafar"); + resourceRoot.setResourceClass("Vegetable Fungi"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(665, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_berries_mustafar"); + resourceRoot.setResourceClass("Vegetable Fungi"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(666, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fruit_flowers_mustafar"); + resourceRoot.setResourceClass("Flower Fruit"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FUNGI); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)1}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)700,(short)1000,(short)1000}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(667, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("wood_deciduous_mustafar"); + resourceRoot.setResourceClass("Deciduous Wood"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)400 ,(short)300,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1000,(short)400,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(668, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_conifer_mustafar"); + resourceRoot.setResourceClass("Conifer Wood"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)600 ,(short)100,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(669, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("softwood_evergreen_mustafar"); + resourceRoot.setResourceClass("Evergreen Wood"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_FLORA); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ORGANIC_FOOD); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)800 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)500,(short)1,(short)1000,(short)400,(short)300,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(670, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_liquid_mustafar"); + resourceRoot.setResourceClass("Liquid Petro Fuel"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_PETROCHEM_LIQUID); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)1 ,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)600,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(671, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("fiberplast_mustafar"); + resourceRoot.setResourceClass("Fiberplast"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(672, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("water_vapor_mustafar"); + resourceRoot.setResourceClass("Water Vapor"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_WATER); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_WATER); + minCapArray = new short[]{(short)0,(short)0,(short)1 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)600 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(673, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("petrochem_fuel_solid_mustafar"); + resourceRoot.setResourceClass("Solid Petro Fuel"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_CHEMICAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_CHEMICALS); + minCapArray = new short[]{(short)0,(short)0,(short)750,(short)0,(short)0,(short)0,(short)0,(short)0,(short)870 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)800,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(674, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_mustafar"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE); + minCapArray = new short[]{(short)0,(short)0,(short)900 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)907 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(675, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_mustafar"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)750,(short)600,(short)935 ,(short)948 ,(short)350,(short)935 ,(short)922 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)650,(short)1000,(short)1000,(short)400,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(676, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("iron_mustafar"); + resourceRoot.setResourceClass("Iron"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)750,(short)450,(short)886 ,(short)919 ,(short)550,(short)903 ,(short)903 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)500,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(677, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_mustafar"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)750,(short)750,(short)800,(short)750,(short)848 ,(short)800,(short)800,(short)0,(short)0,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)800,(short)800,(short)800,(short)1000,(short)900,(short)900,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(678, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_mustafar"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)750,(short)500 ,(short)650,(short)600,(short)500 ,(short)750,(short)750,(short)0,(short)0,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)800,(short)1000,(short)700,(short)650,(short)1000,(short)800,(short)800,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(679, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_extrusive_mustafar"); + resourceRoot.setResourceClass("Extrusive Ore"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)896 ,(short)0,(short)909 ,(short)922 ,(short)550,(short)922 ,(short)922 ,(short)0,(short)0,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(680, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_intrusive_mustafar"); + resourceRoot.setResourceClass("Intrusive Ore"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)200 ,(short)0,(short)300 ,(short)700 ,(short)1 ,(short)500 ,(short)400 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(681, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_mustafar_1"); + resourceRoot.setResourceClass("Type 1 Crystal Amorphous Gem"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)870 ,(short)0,(short)870 ,(short)948 ,(short)550,(short)870 ,(short)870 ,(short)0,(short)750,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)800,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(682, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("armophous_mustafar_2"); + resourceRoot.setResourceClass("Type 2 Crystal Amorphous Gem"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)870 ,(short)0,(short)870 ,(short)948 ,(short)550,(short)870 ,(short)870 ,(short)0,(short)750,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)600,(short)1000,(short)1000,(short)1,(short)800,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(683, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_mustafar_1"); + resourceRoot.setResourceClass("Type 1 Crystalline Gem"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)838 ,(short)0,(short)838 ,(short)951 ,(short)350,(short)886 ,(short)886 ,(short)0,(short)919 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)400,(short)1000,(short)1000,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(684, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("crystalline_mustafar_2"); + resourceRoot.setResourceClass("Type 2 Crystalline Gem"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_MINERAL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)838 ,(short)0,(short)838 ,(short)951 ,(short)350,(short)886 ,(short)886 ,(short)0,(short)919 ,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1,(short)1000,(short)1000,(short)400,(short)1000,(short)1000,(short)1,(short)1000,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(685, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_mustafar"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Mustafarian"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_GAS); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + minCapArray = new short[]{(short)0,(short)0,(short)800 ,(short)0,(short)0,(short)0,(short)0,(short)0,(short)0,(short)500 ,(short)0}; + maxCapArray = new short[]{(short)1,(short)1,(short)1000,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(686, resourceRoot); + mustafarPool4Roots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("aluminum_perovskitic"); + resourceRoot.setResourceClass("Aluminum"); + resourceRoot.setResourceType("Perovskitic"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_JTL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(687, resourceRoot); + JTLRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("copper_borcarbantium"); + resourceRoot.setResourceClass("Copper"); + resourceRoot.setResourceType("Borcarbantium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_JTL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(688, resourceRoot); + JTLRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_bicorbantium"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Bicorbantium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_JTL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(689, resourceRoot); + JTLRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("steel_arveshian"); + resourceRoot.setResourceClass("Steel"); + resourceRoot.setResourceType("Hardened Arveshium"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_JTL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(690, resourceRoot); + JTLRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("radioactive_polymetric"); + resourceRoot.setResourceClass("Radioactive"); + resourceRoot.setResourceType("High Grade Polymetric"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_JTL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(691, resourceRoot); + JTLRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("gas_reactive_organometallic"); + resourceRoot.setResourceClass("Reactive Gas"); + resourceRoot.setResourceType("Unstable Organometallic"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_JTL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_GAS); + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(692, resourceRoot); + JTLRoots.addElement(resourceRoot); + + resourceRoot = new ResourceRoot(); + resourceRoot.setResourceFileName("ore_siliclastic_fermionic"); + resourceRoot.setResourceClass("Siliclastic Ore"); + resourceRoot.setResourceType("Fermionic"); + resourceRoot.setgeneralType((byte) GalacticResource.GENERAL_JTL); + resourceRoot.setContainerType((byte) ResourceRoot.CONTAINER_TYPE_INORGANIC_MINERALS); + minCapArray = new short[]{(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)1 ,(short)0,(short)0,(short)1 ,(short)0}; + maxCapArray = new short[]{(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1000,(short)1,(short)1,(short)1000,(short)1}; + resourceRoot.setResourceMinCaps(minCapArray); + resourceRoot.setResourceMaxCaps(maxCapArray); + resourceRoot.setMinimalLifeTime(10000000L); + resourceRoot.setMaximalLifeTime(10080000L); + resourceRootTable.put(693, resourceRoot); + JTLRoots.addElement(resourceRoot); + + planetaryPool4Roots.addAll(corelliaPool4Roots); + planetaryPool4Roots.addAll(dantooinePool4Roots); + planetaryPool4Roots.addAll(dathomirPool4Roots); + planetaryPool4Roots.addAll(endorPool4Roots); + planetaryPool4Roots.addAll(kashyyykPool4Roots); + planetaryPool4Roots.addAll(lokPool4Roots); + planetaryPool4Roots.addAll(mustafarPool4Roots); + planetaryPool4Roots.addAll(nabooPool4Roots); + planetaryPool4Roots.addAll(roriPool4Roots); + planetaryPool4Roots.addAll(talusPool4Roots); + planetaryPool4Roots.addAll(tattoinePool4Roots); + planetaryPool4Roots.addAll(yavinPool4Roots); +// planetaryPool4Roots.addAll(NEWPLANETPool4Roots); + + + + //persist all ResourceRoots + int indices = resourceRootTable.size(); + for (int i=0;i swgOpcodes, Map objControllerOpcodes) { + + } + + @Override + public void shutdown() { + + } + + public Vector getAllSpawnedResources() { + return allSpawnedResources; + } + +// public void setAllSpawnedResources(Vector loadedResources) { +// allSpawnedResources = loadedResources; +// } + + public void addSpawnedResource(GalacticResource loadedResource) { + allSpawnedResources.add(loadedResource); + } + + public Vector getSpawnedResourcesByPlanet(int planetId) { + Vector planetResourceList = new Vector(); + for (GalacticResource gal : allSpawnedResources){ + if (gal.isSpawnedOn(planetId)) + planetResourceList.add(gal); + } + return planetResourceList; + } + + public Vector getSpawnedResourcesByPlanetAndType(int planetId, byte generalType) { + Vector planetResourceList = new Vector(); + for (GalacticResource gal : allSpawnedResources){ + if (gal.isSpawnedOn(planetId) && gal.getGeneralType()==generalType) + planetResourceList.add(gal); + } + return planetResourceList; + } + + public int getResourceSampleQuantity(CreatureObject crafter, GalacticResource sampleResource) { + if (crafter.getContainer()!=null) { // No indoor sampling + System.out.println("Indoor sampling attempt"); + return 0; + } + int skillMod=crafter.getSkillModBase("surveying"); + crafter.addSkillMod("surveying",100); + skillMod=(int)(Math.round(crafter.getSkillMod("surveying").getModifier())); + skillMod=35; // TEST! + float concentration=sampleResource.deliverConcentrationForSurvey(crafter.getPlanetId(), crafter.getPosition().x, crafter.getPosition().z); + float concentrationPercentage=0.01F*concentration; + int randomSample=new Random().nextInt(100); + float skillFactor=skillMod; + skillFactor=skillFactor/80.0F; + float quantity=skillFactor*concentrationPercentage*new Random().nextInt(25); + int SkillModAdapted=skillMod; + if (SkillModAdapted<=35) + SkillModAdapted=(3*skillMod)/2; + else if (SkillModAdapted<=20) + SkillModAdapted=2*skillMod; + if (randomSample<=SkillModAdapted) { + + } else if (randomSample<=(2*SkillModAdapted)) { + quantity=0.5F*quantity; + } else { + quantity=0; + } + if ((quantity>0)&&(quantity<1.0f)) { + quantity=1.0f+quantity; + quantity=Math.min(quantity,20); + } + //System.out.println("(int)amount" + (int)quantity); + return (int)quantity; + } + + public void kickOffBigBang(){ + bigBangSpawn(); + String[] PlanetTempArr = new String[] {"","Tattoine","Naboo","Corellia","Rori","Lok","Dantooine","Talus","Yavin4","Endor","Dathomir","Mustafar","Kashyyyk"}; + for (GalacticResource res : allSpawnedResources){ + System.out.println("res.getName() : " + res.getName()); + System.out.println("Resource Class : " + res.getResourceRoot().getResourceType() + " " + res.getResourceRoot().getResourceClass()); + Vector pln = res.getAllSpawnedPlanetIds(); + System.out.println("Spawned on :"); + for (Integer n : pln){ + System.out.print(PlanetTempArr[n]+", "); + } + System.out.println(""); + } + } + + + public void start(){ + + // bigBangSpawn(); + // String[] PlanetTempArr = new String[] {"","Tattoine","Naboo","Corellia","Rori","Lok","Dantooine","Talus","Yavin4","Endor","Dathomir","Mustafar","Kashyyyk"}; + // for (GalacticResource res : allSpawnedResources){ + // System.out.println("res.getName() : " + res.getName()); + // System.out.println("Resource Class : " + res.getResourceRoot().getResourceType() + " " + res.getResourceRoot().getResourceClass()); + // Vector pln = res.getAllSpawnedPlanetIds(); + // System.out.println("Spawned on :"); + // for (Integer n : pln){ + // System.out.print(PlanetTempArr[n]+", "); + // } + // System.out.println(""); + // } + + +// scheduler.scheduleAtFixedRate(new Runnable() { +// +// @Override +// public void run() { +// +// // Resource shift +// bigBangSpawn(); +// Vector removeResources = new Vector(); +// for (GalacticResource checkedResource : allSpawnedResources){ +// System.out.println("checkedResource.getName() : " + checkedResource.getName()); +// +// // Check despawn +// if (checkedResource.getVanishTime() < System.currentTimeMillis()){ +// byte pool = checkedResource.getPoolNumber(); +// ResourceRoot root = checkedResource.getResourceRoot(); +// switch (pool) { +// case 1: +// System.out.println("Pool 1 respawn"); +// spawnResourcePool1(root); +// break; +// case 2: +// System.out.println("Pool 2 respawn"); +// spawnResourcePool2(root); +// break; +// case 3: +// System.out.println("Pool 3 respawn"); +// spawnResourcePool3(root); +// break; +// case 4: +// System.out.println("Pool 4 respawn"); +// +// if (corelliaPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,3); +// } +// if (dantooinePool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,6); +// } +// if (dathomirPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,10); +// } +// if (endorPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,9); +// } +// if (lokPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,5); +// } +// if (nabooPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,2); +// } +// if (roriPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,4); +// } +// if (talusPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,7); +// } +// if (tattoinePool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,1); +// } +// if (yavinPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,8); +// } +// if (kashyyykPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,12); +// } +// if (mustafarPool4Roots.contains(checkedResource)){ +// spawnResourcePool4(root,11); +// } +//// if (NEWPLANETPool4Roots.contains(checkedResource)){ +//// spawnResourcePool4(root,NEWPLANET_ID); +//// } +// break; +// default: +// System.err.println("Error, despawning resource had no pool assigned!"); +// } +// removeResources.add(checkedResource); +// } +// +// } +// +// allSpawnedResources.removeAll(removeResources); // remove the resource from the main resource collection +// for (GalacticResource removeResource : removeResources){ +// //We simple do not explicitely dereference the resource +// //but will take care that all references will be terminated +// //removeResource=null; // dereference +// // alternatively store the despawning resources in a collection +// // and despawn then during next server restart. That way +// // nullpointer exceptions can be better prevented +// } +// } +// +// }, 0, 600, TimeUnit.SECONDS); + + } + + // Never call this except once upon first server resource datatable creation !!! + private boolean bigBangSpawn(){ + + if (bigBangOccured) + return false; + bigBangOccured = true; + + System.out.println("Persisting resources..."); + // Database table ResourceRootData + + // ID + // 1 String Name + // 2 int ID + // 3 String Class + // 4 String General Name + // 5 RootID + // 6 MaxSpawnTime + // 7 MinSpawnTime + // CAPS + // 8 Short Cold_Resistance_Cap_Min + // 9 Short Cold_Resistance_Cap_Max + // 10 Short Conductivity_Cap_Min + // 11 Short Conductivity_Cap_Max + // 12 Short Decay_Res_Cap_Min + // 13 Short Decay_Res_Cap_Max + // 14 Short Heat_Res_Cap_Min + // 15 Short Heat_Res_Cap_Max + // 16 Short Malleability_Cap_Min + // 17 Short Malleability_Cap_Max + // 18 Short Shock_Res_Cap_Min + // 19 Short Shock_Res_Cap_Max + // 20 Short Unit_Toughness_Cap_Min + // 21 Short Unit_Toughness_Cap_Max + // 22 Short Entangle_Res_Cap_Min + // 23 Short Entangle_Res_Cap_Max + // 24 Short Potential_Energy_Cap_Min + // 25 Short Potential_Energy_Cap_Max + // 26 Short Flavor_Cap_Min + // 27 Short Flavor_Cap_Max + // 28 Short Overall_Quality_Cap_Min + // 29 Short Overall_Quality_Cap_Max + + +// Publish 15: Basis for ProjectSWG + +// - Total: 61, Minimum pool: 15, Random pool: 24 (3 was removed), Fixed pool: 22. +// - Possible spawns for rare non-Iron resources: 39. +// - Indoor concentrations were fixed for creature harvesting. + + // There are some resource classes that always spawn: + + // Steel + ResourceRoot root = steelRoots.get((int) new Random().nextInt(steelRoots.size()-1)); + spawnResourcePool1(root); + // Aluminum + root = aluminumRoots.get((int) new Random().nextInt(aluminumRoots.size()-1)); + spawnResourcePool1(root); + // Copper + root = copperRoots.get((int) new Random().nextInt(copperRoots.size()-1)); + spawnResourcePool1(root); + // Iron + root = ironRoots.get((int) new Random().nextInt(ironRoots.size()-1)); + spawnResourcePool1(root); + // Amorphous Gemstone + root = amorphousGemstoneRoots.get((int) new Random().nextInt(amorphousGemstoneRoots.size()-1)); + spawnResourcePool1(root); + // Crystalline Gemstone + root = crystallineGemstoneRoots.get((int) new Random().nextInt(crystallineGemstoneRoots.size()-1)); + spawnResourcePool1(root); + // Intrusive Ore + root = oreIntrusiveRoots.get((int) new Random().nextInt(oreIntrusiveRoots.size()-1)); + spawnResourcePool1(root); + // Carbonate Ore + root = oreCarbonateRoots.get((int) new Random().nextInt(oreCarbonateRoots.size()-1)); + spawnResourcePool1(root); + // Extrusive Ore + root = oreExtrusiveRoots.get((int) new Random().nextInt(oreExtrusiveRoots.size()-1)); + spawnResourcePool1(root); + // Radioactive + root = radioactiveRoots.get((int) new Random().nextInt(radioactiveRoots.size()-1)); + spawnResourcePool1(root); + // Liquid Petrochemical + root = petrochemicalLiquidRoots.get((int) new Random().nextInt(petrochemicalLiquidRoots.size()-1)); + spawnResourcePool1(root); + // Solid Petrochemical + root = petrochemicalSolidRoots.get((int) new Random().nextInt(petrochemicalSolidRoots.size()-1)); + spawnResourcePool1(root); + // Polymer + root = polymerRoots.get(0); + spawnResourcePool1(root); + root = polymerRoots.get(0); + spawnResourcePool1(root); + //Lubricating oil + root = lubricatingOilRoots.get(0); + spawnResourcePool1(root); + root = lubricatingOilRoots.get(0); + spawnResourcePool1(root); + + // Random pool: 24 + for (int i=0;i<24;i++){ + root = resourceRootTable.get(new Random().nextInt(136)); + spawnResourcePool2(root); + } + + // Fixed pool: 22 -> 8 are JTL resources + for (int i=0;i<8;i++) { + root = JTLRoots.get((int) new Random().nextInt(JTLRoots.size()-1)); + spawnResourcePool3(root); + } + + // and 16 are irons + for (int i=0;i<16;i++) { + root = ironRoots.get((int) new Random().nextInt(ironRoots.size()-1)); + spawnResourcePool3(root); + } + + for (ResourceRoot rootElement : corelliaPool4Roots){ + spawnResourcePool4(rootElement,3); + } + for (ResourceRoot rootElement : dantooinePool4Roots){ + spawnResourcePool4(rootElement,6); + } + for (ResourceRoot rootElement : dathomirPool4Roots){ + spawnResourcePool4(rootElement,10); + } + for (ResourceRoot rootElement : endorPool4Roots){ + spawnResourcePool4(rootElement,9); + } + for (ResourceRoot rootElement : lokPool4Roots){ + spawnResourcePool4(rootElement,5); + } + for (ResourceRoot rootElement : nabooPool4Roots){ + spawnResourcePool4(rootElement,2); + } + for (ResourceRoot rootElement : roriPool4Roots){ + spawnResourcePool4(rootElement,4); + } + for (ResourceRoot rootElement : talusPool4Roots){ + spawnResourcePool4(rootElement,7); + } + for (ResourceRoot rootElement : tattoinePool4Roots){ + spawnResourcePool4(rootElement,1); + } + for (ResourceRoot rootElement : yavinPool4Roots){ + spawnResourcePool4(rootElement,8); + } + for (ResourceRoot rootElement : kashyyykPool4Roots){ + spawnResourcePool4(rootElement,12); + } + for (ResourceRoot rootElement : mustafarPool4Roots){ + spawnResourcePool4(rootElement,11); + } +// for (ResourceRoot rootElement : NEWPLANETPool4Roots){ +// spawnResourcePool4(rootElement,NEWPLANET_ID); +// } + + System.out.println(allSpawnedResources.size() + " RESOURCES SPAWNED."); + System.out.println("Finished persisting resources."); + return true; + } + + public GalacticResource spawnResourcePool1(ResourceRoot root){ + + GalacticResource resource = (GalacticResource) core.objectService.createResource(); + try { + resource.setResourceRoot(root); + resource.setPoolNumber((byte)1); + resource.initializeNewGalaxyResource(completeResourceNameHistory); + + resource.createTransaction(core.getResourcesODB().getEnvironment()); + core.getResourcesODB().put(resource, Long.class, GalacticResource.class, resource.getTransaction()); + resource.getTransaction().commitSync(); + + if (enableResourceHistory){ + GalacticResource historicResource = resource.convertToHistoricResource(); + historicResource.createTransaction(core.getResourceHistoryODB().getEnvironment()); + core.getResourceHistoryODB().put(historicResource, Long.class, GalacticResource.class, historicResource.getTransaction()); + historicResource.getTransaction().commitSync(); + } + + completeResourceNameHistory.add(resource.getName()); + spawnedResourcesPool1.add(resource); + allSpawnedResources.add(resource); + totalSpawnedResourcesNumber++; + } catch (Exception e){ + System.err.println("Exception in spawnResourcePool1 root "+ root); + } + return resource; + } + + public GalacticResource spawnResourcePool2(ResourceRoot root){ + + GalacticResource resource = (GalacticResource) core.objectService.createResource(); + try { + resource.setResourceRoot(root); + resource.setPoolNumber((byte)2); + resource.initializeNewGalaxyResource(completeResourceNameHistory); + + resource.createTransaction(core.getResourcesODB().getEnvironment()); + core.getResourcesODB().put(resource, Long.class, GalacticResource.class, resource.getTransaction()); + resource.getTransaction().commitSync(); + + if (enableResourceHistory){ + GalacticResource historicResource = resource.convertToHistoricResource(); + historicResource.createTransaction(core.getResourceHistoryODB().getEnvironment()); + core.getResourceHistoryODB().put(historicResource, Long.class, GalacticResource.class, historicResource.getTransaction()); + historicResource.getTransaction().commitSync(); + } + + completeResourceNameHistory.add(resource.getName()); + spawnedResourcesPool2.add(resource); + allSpawnedResources.add(resource); + totalSpawnedResourcesNumber++; + } catch (Exception e){ + System.err.println("Exception in spawnResourcePool2 root "+ root); + } + return resource; + } + + public GalacticResource spawnResourcePool3(ResourceRoot root){ + + GalacticResource resource = (GalacticResource) core.objectService.createResource(); + try { + resource.setResourceRoot(root); + resource.setPoolNumber((byte)3); + resource.initializeNewGalaxyResource(completeResourceNameHistory); + + resource.createTransaction(core.getResourcesODB().getEnvironment()); + core.getResourcesODB().put(resource, Long.class, GalacticResource.class, resource.getTransaction()); + resource.getTransaction().commitSync(); + + if (enableResourceHistory){ + GalacticResource historicResource = resource.convertToHistoricResource(); + historicResource.createTransaction(core.getResourceHistoryODB().getEnvironment()); + core.getResourceHistoryODB().put(historicResource, Long.class, GalacticResource.class, historicResource.getTransaction()); + historicResource.getTransaction().commitSync(); + } + + completeResourceNameHistory.add(resource.getName()); + spawnedResourcesPool3.add(resource); + allSpawnedResources.add(resource); + totalSpawnedResourcesNumber++; + } catch (Exception e){ + System.err.println("Exception in spawnResourcePool3 root "+ root); + } + return resource; + } + + public GalacticResource spawnResourcePool4(ResourceRoot root,int planetID){ + + GalacticResource resource = (GalacticResource) core.objectService.createResource(); + try { + resource.setResourceRoot(root); + resource.setPoolNumber((byte)4); + resource.setPlanetID(planetID); + resource.initializeNewGalaxyResource(completeResourceNameHistory); + + resource.createTransaction(core.getResourcesODB().getEnvironment()); + core.getResourcesODB().put(resource, Long.class, GalacticResource.class, resource.getTransaction()); + resource.getTransaction().commitSync(); + + if (enableResourceHistory){ + GalacticResource historicResource = resource.convertToHistoricResource(); + historicResource.createTransaction(core.getResourceHistoryODB().getEnvironment()); + core.getResourceHistoryODB().put(historicResource, Long.class, GalacticResource.class, historicResource.getTransaction()); + historicResource.getTransaction().commitSync(); + } + + completeResourceNameHistory.add(resource.getName()); + spawnedResourcesPool4.add(resource); + allSpawnedResources.add(resource); + totalSpawnedResourcesNumber++; + } catch (Exception e){ + System.err.println("Exception in spawnResourcePool4 root "+ root.getResourceFileName() + " e: " + e.getMessage()); + System.err.println("planetID "+ planetID); + } + return resource; + } + + public Vector pickPool4ResourceRoots(int planetId){ + Vector picked = new Vector(); + switch(planetId){ + case 0: + picked = corelliaPool4Roots; + break; + case 1: + picked = dantooinePool4Roots; + break; + case 2: + picked = dathomirPool4Roots; + break; + case 3: + picked = endorPool4Roots; + break; + case 4: + picked = kashyyykPool4Roots; + break; + case 5: + picked = lokPool4Roots; + break; + case 6: + picked = mustafarPool4Roots; + break; + case 7: + picked = nabooPool4Roots; + break; + case 8: + picked = roriPool4Roots; + break; + case 9: + picked = talusPool4Roots; + break; + case 10: + picked = tattoinePool4Roots; + break; + case 11: + picked = yavinPool4Roots; + break; +// case 12: +// picked = NEWPLANETNAMEPool4Roots; +// break; + + default: + picked = nabooPool4Roots; + } + return picked; + } + + public void add_spawnedResourcesPool1(GalacticResource resource){ + spawnedResourcesPool1.add(resource); + } + + public void add_spawnedResourcesPool2(GalacticResource resource){ + spawnedResourcesPool2.add(resource); + } + + public void add_spawnedResourcesPool3(GalacticResource resource){ + spawnedResourcesPool3.add(resource); + } + + public void add_spawnedResourcesPool4(GalacticResource resource){ + spawnedResourcesPool4.add(resource); + } + + public void add_resourceRoot(ResourceRoot resourceRoot){ + int rootId = resourceRoot.getResourceRootID(); + resourceRootTable.put(rootId, resourceRoot); + } + + public ResourceRoot retrieveResourceRootReference(int resourceRootID){ + ResourceRoot resourceRootreference = null; + resourceRootreference = resourceRootTable.get(new Integer(resourceRootID)); + return resourceRootreference; + } + + public GalacticResource grabResourceByName(String searchName){ + GalacticResource resource = null; + Vector allResources = core.resourceService.getAllSpawnedResources(); + for (GalacticResource res : allResources){ + if (res.getName().equals(searchName)){ + resource = res; + } + } + return resource; + } + + public GalacticResource grabResourceByFileName(String searchName){ + GalacticResource resource = null; + Vector allResources = core.resourceService.getAllSpawnedResources(); + for (GalacticResource res : allResources){ + if (res.getResourceRoot().getResourceFileName().equals(searchName)){ + resource = res; // resourceFileName= "meat_insect_mustafar" i.e. + } + } + return resource; + } + + public GalacticResource grabResourceByClass(String searchName,int planetId){ + GalacticResource resource = null; + Vector allResources = core.resourceService.getAllSpawnedResources(); + for (GalacticResource res : allResources){ + Vector spawnedPlanets = res.getAllSpawnedPlanetIds(); + if (spawnedPlanets.contains(planetId) && res.getResourceRoot().getResourceClass().equals(searchName)){ + resource = res; // resourceClass= "Insect Meat" i.e. + } + } + return resource; + } + + public Vector getSpawnedResourcesByPlanetAndHarvesterType(int planetId, byte harvesterType) { + Vector planetResourceList = new Vector(); + byte searchtype = harvesterType; + if (harvesterType==7) searchtype = (byte) 0; + for (GalacticResource gal : allSpawnedResources){ + if (gal.isSpawnedOn(planetId) && gal.getGeneralType()==searchtype) + if (harvesterType!=HarvesterObject.HARVESTER_TYPE_FUSION) + planetResourceList.add(gal); + else if (harvesterType==HarvesterObject.HARVESTER_TYPE_FUSION) { + System.err.println("gal.getContainerType() " + gal.getContainerType()); + if (gal.getResourceRoot().getContainerType()==ResourceRoot.CONTAINER_TYPE_ENERGY_RADIOACTIVE) + planetResourceList.add(gal); + } else if (harvesterType==HarvesterObject.HARVESTER_TYPE_GEO) { + System.err.println("gal.getContainerType() " + gal.getContainerType()); + if (gal.getGeneralType()==GalacticResource.GENERAL_GEOTHERM) + planetResourceList.add(gal); + } + } + return planetResourceList; + } + + public GalacticResource findResourceById(long id){ + GalacticResource resource = new GalacticResource(); + for (GalacticResource sampleResource : allSpawnedResources){ + if (sampleResource.getId()==id) + return sampleResource; + } + return resource; + } + + // ToDo: Improve + public GalacticResource grabMeatForCreature(CreatureObject corpse){ + GalacticResource resource = null; + int planetId = corpse.getPlanetId(); + String meatName = corpse.getStfName(); // placeholder + Vector allResources = core.resourceService.getAllSpawnedResources(); + for (GalacticResource res : allResources){ + Vector spawnedPlanets = res.getAllSpawnedPlanetIds(); + if (spawnedPlanets.contains(planetId) && res.getResourceRoot().getResourceClass().equals(meatName)){ + resource = res; + } + } + return resource; + } + + // Utility method to quickly spawn resource containers into the inventory + public ResourceContainerObject spawnSpecificResourceContainer(String spawnType, CreatureObject crafter,int stackCount){ + ResourceContainerObject containerObject = null; + for (GalacticResource sampleResource : allSpawnedResources){ + if (sampleResource.getResourceRoot().getResourceClass().contains(spawnType)){ + String resourceContainerIFF = ResourceRoot.CONTAINER_TYPE_IFF_SIGNIFIER[sampleResource.getResourceRoot().getContainerType()]; + containerObject = (ResourceContainerObject) core.objectService.createObject(resourceContainerIFF, crafter.getPlanet()); + containerObject.setProprietor(crafter); + containerObject.setStackCount(stackCount,false); + //int stackCount = core.resourceService.getResourceSampleQuantity(crafter, sampleResource); + containerObject.initializeStats(sampleResource); + int resCRC = CRC.StringtoCRC(resourceContainerIFF); + containerObject.setIffFileName(resourceContainerIFF); + long objectId = containerObject.getObjectID(); + SWGObject crafterInventory = crafter.getSlottedObject("inventory"); + crafterInventory.add(containerObject); + return containerObject; + } + } + return containerObject; + } + + public Vector getCompleteResourceNameHistory() { + return completeResourceNameHistory; + } +} diff --git a/src/services/spawn/DynamicSpawnArea.java b/src/services/spawn/DynamicSpawnArea.java index a5df57d7..e588e4cd 100644 --- a/src/services/spawn/DynamicSpawnArea.java +++ b/src/services/spawn/DynamicSpawnArea.java @@ -25,7 +25,6 @@ import net.engio.mbassy.listener.Handler; import resources.common.collidables.AbstractCollidable; import resources.common.collidables.AbstractCollidable.EnterEvent; import resources.common.collidables.AbstractCollidable.ExitEvent; -import services.SimulationService.MoveEvent; import engine.resources.scene.Planet; public class DynamicSpawnArea extends SpawnArea { diff --git a/src/services/spawn/LairSpawnArea.java b/src/services/spawn/LairSpawnArea.java index 31b26f96..026268cd 100644 --- a/src/services/spawn/LairSpawnArea.java +++ b/src/services/spawn/LairSpawnArea.java @@ -32,6 +32,7 @@ import resources.common.collidables.AbstractCollidable.ExitEvent; import resources.objects.creature.CreatureObject; import services.SimulationService.MoveEvent; import services.TerrainService; +import services.ai.LairActor; import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; @@ -40,6 +41,7 @@ public class LairSpawnArea extends SpawnArea { private LairGroupTemplate lairGroup; private long lastSpawnTime = 0; + private Vector lairs = new Vector(); public LairSpawnArea(Planet planet, AbstractCollidable area, LairGroupTemplate lairGroup) { super(planet, area); @@ -56,24 +58,31 @@ public class LairSpawnArea extends SpawnArea { public void spawnLair(CreatureObject object) { + NGECore core = NGECore.getInstance(); + Vector lairTemplates = lairGroup.getLairSpawnTemplates(); if(lairGroup == null || lairTemplates.isEmpty()) return; - if((System.currentTimeMillis() - lastSpawnTime) < 3000) + if((System.currentTimeMillis() - lastSpawnTime) < 10000) return; - - Point3D randomPosition = getRandomPosition(object.getWorldPosition(), 32.f, 256.f); + + Point3D randomPosition = getRandomPosition(object.getWorldPosition(), 32.f, 200.f); if(randomPosition == null) return; - TerrainService terrainSvc = NGECore.getInstance().terrainService; + TerrainService terrainSvc = core.terrainService; float height = terrainSvc.getHeight(getPlanet().getID(), randomPosition.x, randomPosition.z); randomPosition.y = height; + for(LairActor otherLair : lairs) { + if(otherLair.getLairObject().getWorldPosition().getDistance(randomPosition) < 10) + return; + } + if(!terrainSvc.canBuildAtPosition(object, randomPosition.x, randomPosition.z)) return; @@ -83,7 +92,10 @@ public class LairSpawnArea extends SpawnArea { int level = random.nextInt((int) (lairSpawn.getMaxLevel() - lairSpawn.getMinLevel()) + 1) + lairSpawn.getMinLevel(); - NGECore.getInstance().spawnService.spawnLair(lairSpawn.getLairTemplate(), getPlanet(), randomPosition, level); + LairActor lairActor = core.spawnService.spawnLair(lairSpawn.getLairTemplate(), getPlanet(), randomPosition, (short) level); + if(lairActor == null) + return; + lairs.add(lairActor); lastSpawnTime = System.currentTimeMillis(); } @@ -138,7 +150,7 @@ public class LairSpawnArea extends SpawnArea { if(creature.getSlottedObject("ghost") == null) return; - if(new Random().nextFloat() <= 0.10) + if(new Random().nextFloat() <= 0.05) spawnLair(creature); } diff --git a/src/services/spawn/MobileTemplate.java b/src/services/spawn/MobileTemplate.java index 7af0d515..92f19f75 100644 --- a/src/services/spawn/MobileTemplate.java +++ b/src/services/spawn/MobileTemplate.java @@ -21,6 +21,173 @@ ******************************************************************************/ package services.spawn; -public class MobileTemplate { +import java.util.Vector; +import resources.datatables.Options; +import resources.datatables.PvpStatus; + +public class MobileTemplate { + + private Vector templates; + private int optionBitmask = Options.ATTACKABLE; + private int pvpBitmask = PvpStatus.Attackable; + private short level; + private Vector attacks; + private String defaultAttack; + private int minDamage = 0; + private int maxDamage = 0; + private float attackSpeed = 0; + private int weaponType = 0; + private int difficulty = 0; + private int health, action; + private String creatureName; + private float scale = 1; + // this is a custom attack Range setting to use for large mobs like krayts + private int attackRange; + private Vector weaponTemplates = new Vector(); + private Vector weaponTemplateVector = new Vector(); + + public Vector getTemplates() { + return templates; + } + + public void setTemplates(Vector templates) { + this.templates = templates; + } + + public int getOptionBitmask() { + return optionBitmask; + } + + public void setOptionBitmask(int optionBitmask) { + this.optionBitmask = optionBitmask; + } + + public int getPvpBitmask() { + return pvpBitmask; + } + + public void setPvpBitmask(int pvpBitmask) { + this.pvpBitmask = pvpBitmask; + } + + public short getLevel() { + return level; + } + + public void setLevel(short level) { + this.level = level; + } + + public Vector getAttacks() { + return attacks; + } + + public void setAttacks(Vector attacks) { + this.attacks = attacks; + } + + public int getMinDamage() { + return minDamage; + } + + public void setMinDamage(int minDamage) { + this.minDamage = minDamage; + } + + public int getMaxDamage() { + return maxDamage; + } + + public void setMaxDamage(int maxDamage) { + this.maxDamage = maxDamage; + } + + public int getDifficulty() { + return difficulty; + } + + public void setDifficulty(int difficulty) { + this.difficulty = difficulty; + } + + public int getHealth() { + return health; + } + + public void setHealth(int health) { + this.health = health; + } + + public int getAction() { + return action; + } + + public void setAction(int action) { + this.action = action; + } + + public String getDefaultAttack() { + return defaultAttack; + } + + public void setDefaultAttack(String defaultAttack) { + this.defaultAttack = defaultAttack; + } + + public String getCreatureName() { + return creatureName; + } + + public void setCreatureName(String creatureName) { + this.creatureName = creatureName; + } + + public float getScale() { + return scale; + } + + public void setScale(float scale) { + this.scale = scale; + } + + public int getAttackRange() { + return attackRange; + } + + public void setAttackRange(int attackRange) { + this.attackRange = attackRange; + } + + public Vector getWeaponTemplates() { + return weaponTemplates; + } + + public void setWeaponTemplates(Vector weaponTemplates) { + this.weaponTemplates = weaponTemplates; + } + + public float getAttackSpeed() { + return attackSpeed; + } + + public void setAttackSpeed(float attackSpeed) { + this.attackSpeed = attackSpeed; + } + + public int getWeaponType() { + return weaponType; + } + + public void setWeaponType(int weaponType) { + this.weaponType = weaponType; + } + + public Vector getWeaponTemplateVector() { + return weaponTemplateVector; + } + + public void setWeaponTemplateVector(Vector weaponTemplateVector) { + this.weaponTemplateVector = weaponTemplateVector; + } } diff --git a/src/services/spawn/SpawnArea.java b/src/services/spawn/SpawnArea.java index aadb1746..2d64c576 100644 --- a/src/services/spawn/SpawnArea.java +++ b/src/services/spawn/SpawnArea.java @@ -28,7 +28,6 @@ import net.engio.mbassy.listener.Handler; import resources.common.collidables.AbstractCollidable; import resources.common.collidables.AbstractCollidable.EnterEvent; import resources.common.collidables.AbstractCollidable.ExitEvent; -import services.SimulationService.MoveEvent; import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; diff --git a/src/services/spawn/SpawnService.java b/src/services/spawn/SpawnService.java index 37eeca8f..dcde2707 100644 --- a/src/services/spawn/SpawnService.java +++ b/src/services/spawn/SpawnService.java @@ -32,16 +32,22 @@ import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Random; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; - -import org.python.core.Py; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; import resources.common.collidables.CollidableCircle; import resources.datatables.Options; import resources.datatables.PvpStatus; +import resources.objects.cell.CellObject; +import resources.objects.creature.CreatureObject; import resources.objects.tangible.TangibleObject; +import resources.objects.weapon.WeaponObject; +import services.ai.AIActor; import services.ai.LairActor; +import engine.resources.container.StaticContainerPermissions; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; @@ -54,7 +60,8 @@ public class SpawnService { private Map mobileTemplates = new ConcurrentHashMap(); private Map lairGroupTemplates = new ConcurrentHashMap(); private Map lairTemplates = new ConcurrentHashMap(); - + private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(4); + public SpawnService(NGECore core) { this.core = core; for(Planet planet : core.terrainService.getPlanetList()) { @@ -62,41 +69,203 @@ public class SpawnService { } } - public void spawnCreature(String template, float x, float y, float z) { - spawnCreature(template, new Point3D(x, y, z)); - } - - public void spawnCreature(String template, Point3D position) { + public CreatureObject spawnCreature(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, short level) { + Planet planet = core.terrainService.getPlanetByName(planetName); + MobileTemplate mobileTemplate = mobileTemplates.get(template); + if(planet == null || mobileTemplate == null) + return null; + + CellObject cell = null; + + if(cellId != 0) { + cell = (CellObject) core.objectService.getObject(cellId); + if(cell == null) + return null; + } + + CreatureObject creature = (CreatureObject) core.objectService.createObject(mobileTemplate.getTemplates().get(new Random().nextInt(mobileTemplate.getTemplates().size())), 0, planet, new Point3D(x, y, z), new Quaternion(qW, qX, qY, qZ)); + + if(creature == null) + return null; + + TangibleObject inventory = (TangibleObject) core.objectService.createObject("object/tangible/inventory/shared_character_inventory.iff", creature.getPlanet()); + inventory.setContainerPermissions(StaticContainerPermissions.STATIC_CONTAINER_PERMISSIONS); + + + /*if(mobileTemplate.getCustomWeapon() != null) { + creature.addObjectToEquipList(mobileTemplate.getCustomWeapon()); + creature.add(mobileTemplate.getCustomWeapon()); + creature.setWeaponId(mobileTemplate.getCustomWeapon().getObjectID()); + }*/ + + creature.setOptionsBitmask(mobileTemplate.getOptionBitmask()); + creature.setPvPBitmask(mobileTemplate.getPvpBitmask()); + creature.setStfFilename("mob/creature_names"); // TODO: set other STFs for NPCs other than creatures + creature.setStfName(mobileTemplate.getCreatureName()); + creature.setHeight(mobileTemplate.getScale()); + int difficulty = mobileTemplate.getDifficulty(); + creature.setDifficulty((byte) difficulty); + if(level != -1) + creature.setLevel(level); + else + creature.setLevel(mobileTemplate.getLevel()); + + //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()); + + WeaponObject defaultWeapon = null; + Vector weaponTemplates = mobileTemplate.getWeaponTemplateVector(); + if (weaponTemplates.size()==0){ + defaultWeapon = (WeaponObject) core.objectService.createObject("object/weapon/creature/shared_creature_default_weapon.iff", creature.getPlanet()); + defaultWeapon.setAttackSpeed(1.0F); + defaultWeapon.setWeaponType(6); + } else { + int rnd = new Random().nextInt(weaponTemplates.size()); + defaultWeapon = (WeaponObject) core.objectService.createObject(weaponTemplates.get(rnd).getTemplate(), creature.getPlanet()); + defaultWeapon.setAttackSpeed(weaponTemplates.get(rnd).getAttackSpeed()); + defaultWeapon.setWeaponType(weaponTemplates.get(rnd).getWeaponType()); + } + + + // QA + if (mobileTemplate.getAttackSpeed()==0) + System.err.println("Error in mobile spawn template for " + mobileTemplate.getCreatureName() + ". Missing attackspeed parameter"); + if (mobileTemplate.getAttackRange()==0) + System.err.println("Error in mobile spawn template for " + mobileTemplate.getCreatureName() + ". Missing attackrange parameter"); + + defaultWeapon.setAttackSpeed(mobileTemplate.getAttackSpeed()); + defaultWeapon.setWeaponType(mobileTemplate.getWeaponType()); + defaultWeapon.setDamageType("@obj_attr_n:armor_eff_kinetic"); + defaultWeapon.setStringAttribute("cat_wpn_damage.damage", "0-0"); + if(mobileTemplate.getAttackRange() > 0) + defaultWeapon.setMaxRange(mobileTemplate.getAttackRange()); + if(mobileTemplate.getMaxDamage() != 0) { + defaultWeapon.setMaxDamage(mobileTemplate.getMaxDamage()); + defaultWeapon.setMinDamage(mobileTemplate.getMinDamage()); + } else { + defaultWeapon.setMaxDamage(creature.getLevel() * 24); + defaultWeapon.setMinDamage(creature.getLevel() * 22); + } + creature.addObjectToEquipList(defaultWeapon); + creature.add(defaultWeapon); + creature.setWeaponId(defaultWeapon.getObjectID()); + creature.addObjectToEquipList(inventory); + creature.add(inventory); + + int customHealth = mobileTemplate.getHealth(); + if(difficulty > 0 && customHealth == 0) { + if(difficulty == 1) { + creature.setMaxHealth((int) (400 + level * 134 * 2.5)); + creature.setHealth((int) (400 + level * 134 * 2.5)); + creature.setMaxAction((int) (400 + level * 134 * 2.5)); + creature.setAction((int) (400 + level * 134 * 2.5)); + } else if(difficulty == 2) { + creature.setMaxHealth((int) (400 + level * 134 * 10)); + creature.setHealth((int) (400 + level * 134 * 10)); + creature.setMaxAction((int) (400 + level * 134 * 10)); + creature.setAction((int) (400 + level * 134 * 10)); + } + } else if(difficulty <= 0 && customHealth == 0) { + creature.setMaxHealth((int) (400 + level * 134)); + creature.setHealth((int) (400 + level * 134)); + creature.setMaxAction((int) (400 + level * 134)); + creature.setAction((int) (400 + level * 134)); + } else { + creature.setMaxHealth(customHealth); + creature.setHealth(customHealth); + creature.setMaxAction((int) (level * 128)); + creature.setAction((int) (level * 128)); + } + + if(creature.getLevel() > 16) { + int armor = (creature.getLevel() - 16) * 87; + if(armor > 6000) + armor = 6000; + core.skillModService.addSkillMod(creature, "expertise_innate_protection_all", armor); + } + + AIActor actor = new AIActor(creature, creature.getPosition(), scheduler); + creature.setAttachment("AI", actor); + actor.setMobileTemplate(mobileTemplate); + + + + if(cell == null) { + core.simulationService.add(creature, x, z, true); + } else { + creature.getPosition().setCell(cell); + cell.add(creature); + } + return creature; } - public void spawnLair(String lairSpawnTemplate, Planet planet, Point3D position, int level) { + public CreatureObject spawnCreature(String mobileTemplate, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, int level) { + return spawnCreature(mobileTemplate, planetName, cellId, x, y, z, 1, 0, 0, 0, (short) level); + } + + public CreatureObject spawnCreature(String mobileTemplate, String planetName, long cellId, float x, float y, float z) { + return spawnCreature(mobileTemplate, planetName, cellId, x, y, z, 1, 0, 0, 0, (short) -1); + } + + public CreatureObject spawnCreature(String mobileTemplate, String planetName, long cellId, float x, float y, float z, short level) { + return spawnCreature(mobileTemplate, planetName, cellId, x, y, z, 1, 0, 0, 0, level); + } + + public CreatureObject spawnCreature(String mobileTemplate, String planetName, long cellId, float x, float z) { + Planet planet = core.terrainService.getPlanetByName(planetName); + return spawnCreature(mobileTemplate, planetName, cellId, x, core.terrainService.getHeight(planet.getID(), x, z), z, 1, 0, 0, 0, (short) -1); + } + + public CreatureObject spawnCreature(String mobileTemplate, String planetName, long cellId, float x, float z, short level) { + Planet planet = core.terrainService.getPlanetByName(planetName); + return spawnCreature(mobileTemplate, planetName, cellId, x, core.terrainService.getHeight(planet.getID(), x, z), z, 1, 0, 0, 0, level); + } + + + public LairActor spawnLair(String lairSpawnTemplate, Planet planet, Point3D position, short level) { LairTemplate lairTemplate = lairTemplates.get(lairSpawnTemplate); if(lairTemplate == null) - return; + return null; TangibleObject lairObject = (TangibleObject) core.objectService.createObject(lairTemplate.getLairCRC(), 0, planet, position, new Quaternion(1, 0, 0, 0)); if(lairObject == null) - return; + return null; lairObject.setOptionsBitmask(Options.ATTACKABLE); lairObject.setPvPBitmask(PvpStatus.Attackable); lairObject.setMaxDamage(1000 * level); - LairActor lairActor = new LairActor(lairObject, lairTemplate.getMobileName()); + LairActor lairActor = new LairActor(lairObject, lairTemplate.getMobileName(), 10, level); lairObject.setAttachment("AI", lairActor); core.simulationService.add(lairObject, position.x, position.z, true); + lairActor.spawnNewCreatures(); + + return lairActor; } public void loadMobileTemplates() { - + Path p = Paths.get("scripts/mobiles"); + FileVisitor fv = new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + if(!file.toString().contains("lairs") && !file.toString().contains("spawnareas") && !file.toString().contains("lairgroups")) + core.scriptService.callScript(file.toString().replace(file.getFileName().toString(), ""), file.getFileName().toString().replace(".py", ""), "addTemplate", core); + return FileVisitResult.CONTINUE; + } + }; + try { + Files.walkFileTree(p, fv); + } catch (IOException e) { + e.printStackTrace(); + } + } - public void addMobileTemplate() { - + public void addMobileTemplate(String template, MobileTemplate mobileTemplate) { + mobileTemplates.put(template, mobileTemplate); } public void loadLairTemplates() { diff --git a/src/services/spawn/StaticSpawnArea.java b/src/services/spawn/StaticSpawnArea.java index 2bce6aef..64de8d63 100644 --- a/src/services/spawn/StaticSpawnArea.java +++ b/src/services/spawn/StaticSpawnArea.java @@ -25,7 +25,6 @@ import net.engio.mbassy.listener.Handler; import resources.common.collidables.AbstractCollidable; import resources.common.collidables.AbstractCollidable.EnterEvent; import resources.common.collidables.AbstractCollidable.ExitEvent; -import services.SimulationService.MoveEvent; import engine.resources.scene.Planet; public class StaticSpawnArea extends SpawnArea { diff --git a/src/services/spawn/WeaponTemplate.java b/src/services/spawn/WeaponTemplate.java new file mode 100644 index 00000000..6e35498b --- /dev/null +++ b/src/services/spawn/WeaponTemplate.java @@ -0,0 +1,42 @@ +package services.spawn; + +public class WeaponTemplate { + + private String template=""; + private float attackSpeed=0; + private int weaponType=0; + + public WeaponTemplate(){ + + } + + public WeaponTemplate(String template, int weaponType, float attackSpeed){ + this.template = template; + this.weaponType = weaponType; + this.attackSpeed = attackSpeed; + } + + public String getTemplate() { + return template; + } + + public void setTemplate(String template) { + this.template = template; + } + + public float getAttackSpeed() { + return attackSpeed; + } + + public void setAttackSpeed(float attackSpeed) { + this.attackSpeed = attackSpeed; + } + + public int getWeaponType() { + return weaponType; + } + + public void setWeaponType(int weaponType) { + this.weaponType = weaponType; + } +} diff --git a/src/services/sui/SUIService.java b/src/services/sui/SUIService.java index 95498f9b..f404adce 100644 --- a/src/services/sui/SUIService.java +++ b/src/services/sui/SUIService.java @@ -23,7 +23,6 @@ package services.sui; import java.nio.ByteOrder; import java.util.Map; -import java.util.Map.Entry; import java.util.Random; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; @@ -43,12 +42,15 @@ import protocol.swg.SUIForceClosePageMessage; import protocol.swg.SUIUpdatePageMessage; import protocol.swg.objectControllerObjects.ObjectMenuRequest; import protocol.swg.objectControllerObjects.ObjectMenuResponse; - +import resources.common.FileUtilities; import resources.common.ObjControllerOpcodes; import resources.common.Opcodes; import resources.common.RadialOptions; +import resources.objects.creature.CreatureObject; +import resources.objects.harvester.HarvesterObject; +import resources.objects.loot.LootRollSession; import services.sui.SUIWindow.SUICallback; - +import services.sui.SUIWindow.Trigger; import engine.clients.Client; import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; @@ -82,6 +84,54 @@ public class SUIService implements INetworkDispatch { if(target == null || owner == null) return; + if (target instanceof HarvesterObject){ + HarvesterObject harvester = (HarvesterObject) target; + Vector admins = harvester.getAdminList(); + Vector hoppers = harvester.getHopperList(); + CreatureObject creature = (CreatureObject) core.objectService.getObject(harvester.getOwner()); + if (creature == owner && !admins.contains(owner.getCustomName())){ + admins.add(owner.getCustomName()); + } + + if (! admins.contains(owner.getCustomName()) && ! hoppers.contains(owner.getCustomName())){ + return; // Completely unauthorized + } + + if (! admins.contains(owner.getCustomName()) && hoppers.contains(owner.getCustomName())){ + // authorized for hopper + // change radialOptions to hopper access + core.scriptService.callScript("scripts/radial/", "harvesterHopper", "createRadial", core, owner, target, request.getRadialOptions()); + sendRadial(owner, target, request.getRadialOptions(), request.getRadialCount()); + return; + } + } + + if (target instanceof CreatureObject){ + CreatureObject creature = (CreatureObject) target; + if (!creature.isPlayer() && creature.isLootLock()){ + LootRollSession lootRollSession = (LootRollSession )creature.getAttachment("LootSession"); + if (lootRollSession!=null) { + if (lootRollSession.getRequester()!=owner){ + + // ToDo: RADIALS MUST BE DISABLED HERE FOR THE CORPSE, BUT HOW? + core.scriptService.callScript("scripts/radial/", "npc/noloot", "createRadial", core, owner, target, request.getRadialOptions()); + sendRadial(owner, target, request.getRadialOptions(), request.getRadialCount()); + return; + } + } + } + } + + if(target.getGrandparent() != null && target.getGrandparent().getAttachment("structureAdmins") != null) + { + if(core.housingService.getPermissions(owner, target.getContainer()) && !getRadialFilename(target).equals("structure_management_terminal")) + { + core.scriptService.callScript("scripts/radial/", "moveable", "createRadial", core, owner, target, request.getRadialOptions()); + sendRadial(owner, target, request.getRadialOptions(), request.getRadialCount()); + return; + } + } + core.scriptService.callScript("scripts/radial/", getRadialFilename(target), "createRadial", core, owner, target, request.getRadialOptions()); if(getRadialFilename(target).equals("default")) return; @@ -169,12 +219,26 @@ public class SUIService implements INetworkDispatch { } public String getRadialFilename(SWGObject object) { + String serverTemplate = ("scripts/" + object.getTemplate().split("shared_" , 2)[0].replace("shared_", "") + object.getTemplate().split("shared_" , 2)[1] + ".py"); + String radialFilename = "default"; - if(object.getAttachment("radial_filename") != null) - return (String) object.getAttachment("radial_filename"); - else - return "default"; + if (FileUtilities.doesFileExist(serverTemplate)) { + PyObject method = core.scriptService.getMethod("scripts/" + object.getTemplate().split("shared_" , 2)[0].replace("shared_", ""), object.getTemplate().split("shared_" , 2)[1].replace(".iff", ""), "getRadialFilename"); + + if (method != null && method.isCallable()) { + radialFilename = method.__call__().asString(); + + if (radialFilename == null || radialFilename.equals("")) { + radialFilename = "default"; + } + } + } + if (radialFilename.equals("default") && object.getAttachment("radial_filename") != null) { + radialFilename = (String) object.getAttachment("radial_filename"); + } + + return radialFilename; } public void sendRadial(SWGObject owner, SWGObject target, Vector radialOptions, byte radialCount) { @@ -243,19 +307,7 @@ public class SUIService implements INetworkDispatch { window.clearDataSource("List.dataList"); - //int index = 0; - - for(Entry e : cloneData.entrySet()) { - - /*window.addDataItem("List.dataList:Name", String.valueOf(index)); - - window.setProperty("List.dataList." + index + ":Text", string); - - ++index;*/ - - window.addListBoxMenuItem(e.getValue(), e.getKey()); - - } + cloneData.entrySet().forEach(e -> window.addListBoxMenuItem(e.getValue(), e.getKey())); return window; @@ -319,6 +371,34 @@ public class SUIService implements INetworkDispatch { return window; } + /** + * Creates an Input Box SUIWindow and adds a handler that will return text inputed into text box with the callback as the specified PyObject. + * @param PyObject Definition that will be run when user clicks on "OK" + * @return SUIWindow + * @author Waverunner + */ + public SUIWindow createInputBox(int type, String title, String promptText, SWGObject owner, SWGObject rangeObject, float maxDistance, PyObject handleFunc) { + SUIWindow window = createInputBox(type, title, promptText, owner, rangeObject, maxDistance); + Vector returnParams = new Vector(); + returnParams.add("txtInput:LocalText"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnParams, handleFunc); + return window; + } + + /** + * Creates an Input Box SUIWindow and adds a handler that will return text inputed into text box with the callback as the specified PyObject. + * @param SUICallback Callback that will be ran when user clicks on "OK" + * @return SUIWindow + * @author Waverunner + */ + public SUIWindow createInputBox(int type, String title, String promptText, SWGObject owner, SWGObject rangeObject, float maxDistance, SUICallback handleFunc) { + SUIWindow window = createInputBox(type, title, promptText, owner, rangeObject, maxDistance); + Vector returnParams = new Vector(); + returnParams.add("txtInput:LocalText"); + window.addHandler(0, "", Trigger.TRIGGER_OK, returnParams, handleFunc); + return window; + } + public void closeSUIWindow(SWGObject owner, int id) { if(owner.getClient() == null || owner.getClient().getSession() == null) diff --git a/src/services/trade/TradeService.java b/src/services/trade/TradeService.java index e425d282..08201aab 100644 --- a/src/services/trade/TradeService.java +++ b/src/services/trade/TradeService.java @@ -25,6 +25,7 @@ import resources.objects.creature.CreatureObject; import engine.clients.Client; import engine.resources.container.AllPermissions; import engine.resources.container.CreatureContainerPermissions; +import engine.resources.container.CreaturePermissions; import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; @@ -98,10 +99,13 @@ public class TradeService implements INetworkDispatch{ // creates a new trade session for the user who sent the request. It's given the objectID // that the player wants to trade with. - senderClient.getSession().setAttribute("tradeSession", recieverID); - - recieverObject.sendSystemMessage(senderObject.getCustomName() + " wants to trade with you.", (byte) 0); - + if (senderObject.getCombatFlag() == 0 && recieverObject.getCombatFlag() == 0) { + senderClient.getSession().setAttribute("tradeSession", recieverID); + + recieverObject.sendSystemMessage(senderObject.getCustomName() + " wants to trade with you.", (byte) 0); + } else { + senderObject.sendSystemMessage("You can't send a trade request while you or your target is in combat.", (byte) 0); + } } } @@ -202,14 +206,13 @@ public class TradeService implements INetworkDispatch{ } else { - if(objectToTrade.getAttributes().toString().contains("no_trade")) { + if(objectToTrade.getAttributes().containsKey("no_trade") || !objectToTrade.getPermissions().canRemove(client.getParent(), objectToTrade.getContainer()) || (objectToTrade.getContainer() instanceof CreatureObject)) { return; } addItemForTrade(objectToTrade, tradingWithClient); - System.out.println("Trading item: " + objectToTrade.getCustomName() + " detail: " + objectToTrade.getDetailFilename()); - - System.out.println("tradingObjectTable: " + tradingObjectsTable.toString()); + //System.out.println("Trading item: " + objectToTrade.getCustomName() + " detail: " + objectToTrade.getDetailFilename()); + tradee.makeAware(objectToTrade); AddItemMessage tradeeResponse = new AddItemMessage(); tradeeResponse.setTradeObjectID(tradeItemID); @@ -313,20 +316,6 @@ public class TradeService implements INetworkDispatch{ tradePartner.getClient().getSession().write(undoAccept.serialize()); } - }); - // not used, but just in case.... VerifyTradeMessage is sent instead when a user - // hits the Accept button. Can use this as an additional check if need to. - swgOpcodes.put(TradeOpcodes.BeginVerificationMessage, new INetworkRemoteEvent() { - - @Override - public void handlePacket(IoSession session, IoBuffer buffer) throws Exception { - System.out.println("Got BeginVerificationMessage"); - Client client = core.getClient(session); - client.getSession().setAttribute("tradeSessionIsVerified"); - System.out.println("Verified client"); - - } - }); swgOpcodes.put(TradeOpcodes.VerifyTradeMessage, new INetworkRemoteEvent() { @@ -341,7 +330,7 @@ public class TradeService implements INetworkDispatch{ CreatureObject tradePartner = (CreatureObject) core.objectService.getObject(tradingWithClient); CreatureObject actingTrader = (CreatureObject) client.getParent(); - CreatureObject tradePartnerContainer = (CreatureObject) tradePartner.getContainer(); + SWGObject tradePartnerContainer = tradePartner.getContainer(); SWGObject tradePartnerInventory = tradePartner.getSlottedObject("inventory"); SWGObject actingTraderInventory = actingTrader.getSlottedObject("inventory"); @@ -405,12 +394,7 @@ public class TradeService implements INetworkDispatch{ actingTrader.setCashCredits(tradePartnerCredits - moneyToGive); tradePartner.setCashCredits(tradePartnerCredits + moneyToGive); } - - - System.out.println("Finished trading items/credits"); - cleanTradeSession(client, tradePartner.getClient()); - } } diff --git a/src/services/travel/TravelPoint.java b/src/services/travel/TravelPoint.java index 2d76137c..98dd1930 100644 --- a/src/services/travel/TravelPoint.java +++ b/src/services/travel/TravelPoint.java @@ -23,7 +23,6 @@ package services.travel; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; import resources.common.Console; import resources.common.SpawnPoint; @@ -150,7 +149,8 @@ public class TravelPoint { if(getShuttle() != null) { return (getShuttle().getTemplate().equals("object/creature/npc/theme_park/shared_player_transport.iff") || getShuttle().getTemplate().equals("object/creature/npc/theme_park/shared_player_transport_theed_hangar.iff")); } else { - System.out.println("null shuttle at: " + getName()); + // TODO: Null shuttles currently at: Mensix Mining Facility, Kachirho Starport, Quarantine Zone, Theed Spaceport, Restuss Shuttleport + //System.out.println("null shuttle at: " + getName()); return false; } } diff --git a/src/services/travel/TravelService.java b/src/services/travel/TravelService.java index 488ae1e7..a6929851 100644 --- a/src/services/travel/TravelService.java +++ b/src/services/travel/TravelService.java @@ -25,7 +25,6 @@ import java.nio.ByteOrder; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Random; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; @@ -50,6 +49,7 @@ import engine.resources.service.INetworkRemoteEvent; import main.NGECore; import resources.common.Console; import resources.common.Opcodes; +import resources.common.SpawnPoint; import resources.objects.creature.CreatureObject; import resources.objects.tangible.TangibleObject; import services.sui.SUIService.ListBoxType; @@ -192,7 +192,7 @@ public class TravelService implements INetworkDispatch { public void addPlanet(Planet planet) { Vector travelPointVector = new Vector(); travelMap.put(planet, travelPointVector); - core.scriptService.callScript("scripts/", "addPoints", "static_travel_points", core, planet); + core.scriptService.callScript("scripts/", "static_travel_points", "addPoints", core, planet); } public void addTravelPoint(Planet planet, String name, float x, float y, float z) { @@ -232,9 +232,7 @@ public class TravelService implements INetworkDispatch { public void loadTravelPoints() { List planetList = core.terrainService.getPlanetList(); - for (Planet planet : planetList) { - addPlanet(planet); - } + planetList.forEach(this::addPlanet); populateTravelFares(); } @@ -322,23 +320,8 @@ public class TravelService implements INetworkDispatch { public void doTransport(SWGObject actor, TravelPoint tp) { Planet planet = core.terrainService.getPlanetByName(tp.getPlanetName()); - - Random ran = new Random(); - - float oY = tp.getShuttle().getOrientation().y; - float dirDg = (float) ((Math.acos(oY) * 180 / Math.PI) * 2); - - ran.setSeed(32); - dirDg = dirDg - 18 + ran.nextFloat(); - float dirRadian = (float) (dirDg * Math.PI / 180); - ran.setSeed(3); - float distance = 13 + ran.nextFloat(); - - float x = (float) (tp.getSpawnLocation().getPosition().x + Math.sin(dirRadian) * distance); - float y = (float) (tp.getSpawnLocation().getPosition().y + Math.cos(dirRadian) * distance); - - Point3D spawnPoint = new Point3D(x, y, tp.getSpawnLocation().getPosition().z); - core.simulationService.transferToPlanet(actor, planet, spawnPoint, new Quaternion(0, 0, 0, 0), null); + Point3D spawnLocation = SpawnPoint.getRandomPosition(tp.getShuttle().getPosition(), 5, 20, actor.getPlanetId()); + core.simulationService.transferToPlanet(actor, planet, spawnLocation, new Quaternion(0, 0, 0, 0), null); } diff --git a/src/tools/CharonPacketUtils.java b/src/tools/CharonPacketUtils.java new file mode 100644 index 00000000..7c091133 --- /dev/null +++ b/src/tools/CharonPacketUtils.java @@ -0,0 +1,103 @@ +package tools; + +import java.io.UnsupportedEncodingException; + +import main.NGECore; + +import org.apache.mina.core.buffer.IoBuffer; + +/** + * @author Charon + */ + +public class CharonPacketUtils { + + private final static char[] HEX = { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' + }; + + public static String fromLong(long value) { + char[] hexs; + int i; + int c; + + hexs = new char[16]; + for (i = 0; i < 16; i++) { + c = (int)(value & 0xf); + hexs[16-i-1] = HEX[c]; + value = value >> 4; + } + return new String(hexs); + } + + final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); + public static String bytesToHex(byte[] bytes) { + char[] hexChars = new char[bytes.length * 2]; + int v; + for ( int j = 0; j < bytes.length; j++ ) { + v = bytes[j] & 0xFF; + hexChars[j * 2] = hexArray[v >>> 4]; + hexChars[j * 2 + 1] = hexArray[v & 0x0F]; + } + return new String(hexChars); + } + + public static String byteToHex(byte bytes) { + char[] hexChars = new char[2]; + int v; + + v = bytes & 0xFF; + hexChars[2] = hexArray[v >>> 4]; + hexChars[2 + 1] = hexArray[v & 0x0F]; + + return new String(hexChars); + } + + public static void printAnalysis(IoBuffer pack){ + + if (!NGECore.PACKET_DEBUG) + return; + + byte[] packArray = pack.array(); + int lineCount = packArray.length/16; + int actualIndex = 0; + String buffString = ""; + String asciiString = ""; + for (int lineIndex = 0; lineIndex <= lineCount; lineIndex++) + { + byte[] ASCIIArray = new byte[16]; + buffString = ""; + asciiString = ""; + // remaining bytes per line + int remaining = packArray.length - actualIndex; + int byteColumnSize = 0; + if (remaining < 16) byteColumnSize = remaining; + else byteColumnSize = 16; + for (int byteColumnIndex = 0; byteColumnIndex < byteColumnSize; byteColumnIndex++) + { + if (byteColumnIndex == 8) + buffString += " "; + else buffString += " "; + + buffString += ((Integer.toString( ( packArray[actualIndex] & 0xff ) + 0x100, 16).substring( 1 )).toUpperCase() + ""); + if (packArray[actualIndex] < 31 || packArray[actualIndex] == 13) + ASCIIArray[byteColumnIndex] = 32; + else + ASCIIArray[byteColumnIndex] = packArray[actualIndex]; + + actualIndex++; + } + try { + asciiString += new String(ASCIIArray, "US-ASCII"); + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + System.out.println(buffString + " " + asciiString); + + + } + System.out.println("------------------------------------------------------------------------"); + } +}