diff --git a/scripts/buffs/of_buff_def_1.py b/scripts/buffs/of_buff_def_1.py index 68455f5b..01f17ada 100644 --- a/scripts/buffs/of_buff_def_1.py +++ b/scripts/buffs/of_buff_def_1.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_2.py b/scripts/buffs/of_buff_def_2.py index c1cb56b4..7536841f 100644 --- a/scripts/buffs/of_buff_def_2.py +++ b/scripts/buffs/of_buff_def_2.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_3.py b/scripts/buffs/of_buff_def_3.py index 952b1963..dd577237 100644 --- a/scripts/buffs/of_buff_def_3.py +++ b/scripts/buffs/of_buff_def_3.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_4.py b/scripts/buffs/of_buff_def_4.py index 3360e4e4..6a650b41 100644 --- a/scripts/buffs/of_buff_def_4.py +++ b/scripts/buffs/of_buff_def_4.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_5.py b/scripts/buffs/of_buff_def_5.py index 5e0f8e8d..0dfd361a 100644 --- a/scripts/buffs/of_buff_def_5.py +++ b/scripts/buffs/of_buff_def_5.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_6.py b/scripts/buffs/of_buff_def_6.py index 46293f6b..06dac062 100644 --- a/scripts/buffs/of_buff_def_6.py +++ b/scripts/buffs/of_buff_def_6.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_7.py b/scripts/buffs/of_buff_def_7.py index a063f2fd..b18cd574 100644 --- a/scripts/buffs/of_buff_def_7.py +++ b/scripts/buffs/of_buff_def_7.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_8.py b/scripts/buffs/of_buff_def_8.py index 4136a39d..1b16cad6 100644 --- a/scripts/buffs/of_buff_def_8.py +++ b/scripts/buffs/of_buff_def_8.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_9.py b/scripts/buffs/of_buff_def_9.py index 2651fc29..ac342f70 100644 --- a/scripts/buffs/of_buff_def_9.py +++ b/scripts/buffs/of_buff_def_9.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_charge_1.py b/scripts/buffs/of_charge_1.py index db0d0aa7..104612e7 100644 --- a/scripts/buffs/of_charge_1.py +++ b/scripts/buffs/of_charge_1.py @@ -1,6 +1,8 @@ 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): diff --git a/scripts/buffs/of_deb_def_1.py b/scripts/buffs/of_deb_def_1.py index 793bdf94..13cdab58 100644 --- a/scripts/buffs/of_deb_def_1.py +++ b/scripts/buffs/of_deb_def_1.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_deb_def_2.py b/scripts/buffs/of_deb_def_2.py index b8489de2..097ffe2b 100644 --- a/scripts/buffs/of_deb_def_2.py +++ b/scripts/buffs/of_deb_def_2.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_deb_def_3.py b/scripts/buffs/of_deb_def_3.py index 9ca704a3..c3b28b0b 100644 --- a/scripts/buffs/of_deb_def_3.py +++ b/scripts/buffs/of_deb_def_3.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_deb_def_4.py b/scripts/buffs/of_deb_def_4.py index 62a832dd..e93dde70 100644 --- a/scripts/buffs/of_deb_def_4.py +++ b/scripts/buffs/of_deb_def_4.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_deb_def_5.py b/scripts/buffs/of_deb_def_5.py index 4c8e28fa..233ec4dd 100644 --- a/scripts/buffs/of_deb_def_5.py +++ b/scripts/buffs/of_deb_def_5.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_deb_def_6.py b/scripts/buffs/of_deb_def_6.py index eb41e77b..cdb29995 100644 --- a/scripts/buffs/of_deb_def_6.py +++ b/scripts/buffs/of_deb_def_6.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_deb_def_7.py b/scripts/buffs/of_deb_def_7.py index c1e5dd6e..9e9fedf5 100644 --- a/scripts/buffs/of_deb_def_7.py +++ b/scripts/buffs/of_deb_def_7.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_deb_def_8.py b/scripts/buffs/of_deb_def_8.py index 1ad5b201..6016ba0d 100644 --- a/scripts/buffs/of_deb_def_8.py +++ b/scripts/buffs/of_deb_def_8.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_drillmaster_1.py b/scripts/buffs/of_drillmaster_1.py index dcb74846..233744a6 100644 --- a/scripts/buffs/of_drillmaster_1.py +++ b/scripts/buffs/of_drillmaster_1.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_focus_fire_1.py b/scripts/buffs/of_focus_fire_1.py index e2afcef8..4e191992 100644 --- a/scripts/buffs/of_focus_fire_1.py +++ b/scripts/buffs/of_focus_fire_1.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_focus_fire_2.py b/scripts/buffs/of_focus_fire_2.py index 0db33d9d..60404f53 100644 --- a/scripts/buffs/of_focus_fire_2.py +++ b/scripts/buffs/of_focus_fire_2.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_focus_fire_3.py b/scripts/buffs/of_focus_fire_3.py index b78066de..3420c94c 100644 --- a/scripts/buffs/of_focus_fire_3.py +++ b/scripts/buffs/of_focus_fire_3.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_focus_fire_4.py b/scripts/buffs/of_focus_fire_4.py index d028d699..a95fb77f 100644 --- a/scripts/buffs/of_focus_fire_4.py +++ b/scripts/buffs/of_focus_fire_4.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_focus_fire_5.py b/scripts/buffs/of_focus_fire_5.py index 0b5c3e3f..4d084789 100644 --- a/scripts/buffs/of_focus_fire_5.py +++ b/scripts/buffs/of_focus_fire_5.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_focus_fire_6.py b/scripts/buffs/of_focus_fire_6.py index 4cbaafe1..e091b13f 100644 --- a/scripts/buffs/of_focus_fire_6.py +++ b/scripts/buffs/of_focus_fire_6.py @@ -1,6 +1,9 @@ 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): diff --git a/scripts/buffs/of_scatter_1.py b/scripts/buffs/of_scatter_1.py index 7d7e729d..8309302a 100644 --- a/scripts/buffs/of_scatter_1.py +++ b/scripts/buffs/of_scatter_1.py @@ -1,6 +1,8 @@ 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): 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..aec51439 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..aec51439 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..aec51439 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..aec51439 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..aec51439 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..aec51439 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..aec51439 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..aec51439 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/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/me_buff_health_1.py b/scripts/commands/me_buff_health_1.py index 1bbefb27..1e41c9ae 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_health') + else: + core.buffService.addBuffToCreature(target, 'me_buff_health') + else: + core.buffService.addGroupBuff(actor, 'me_buff_health') + + 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..117444bb 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_health_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_health_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_health_2') + + 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..29a22740 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_health_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_health_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_health_3') + + 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..0b065ab5 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_action_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_1') + 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..a076dfdd 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_action_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_2') + 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..1108c400 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_action_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_3') + 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..24e2c05b 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_agility_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_1') + 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..63474e3f 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_agility_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_2') + 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..4d665fc3 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_agility_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_3') + + 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..d4ef98b6 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_melee_gb_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_melee_gb_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_melee_gb_1') + + 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..537d2875 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_ranged_gb_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_ranged_gb_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_ranged_gb_1') + + 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..d20c423a 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_precision_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_1') + + 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..a7b808ed 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_precision_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_2') + + 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..76594fce 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_precision_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_3') + + 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..1ab00983 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_strength_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_1') + + 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..e8b21cd0 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_strength_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_2') + + 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..e51c7bbc 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: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_strength_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_3') + + 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..90af7887 100644 --- a/scripts/commands/of_buff_def_1.py +++ b/scripts/commands/of_buff_def_1.py @@ -4,9 +4,6 @@ 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') 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..1627ed3c 100644 --- a/scripts/commands/of_buff_def_2.py +++ b/scripts/commands/of_buff_def_2.py @@ -4,9 +4,6 @@ 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') 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..1936f539 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') 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..0d047c07 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') 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..2e21de66 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') 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..80517962 100644 --- a/scripts/commands/of_buff_def_6.py +++ b/scripts/commands/of_buff_def_6.py @@ -4,9 +4,6 @@ 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') 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..4d0fe8ba 100644 --- a/scripts/commands/of_buff_def_7.py +++ b/scripts/commands/of_buff_def_7.py @@ -4,9 +4,6 @@ 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') 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..b5d13337 100644 --- a/scripts/commands/of_buff_def_8.py +++ b/scripts/commands/of_buff_def_8.py @@ -4,9 +4,6 @@ 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') 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..1b09914e 100644 --- a/scripts/commands/of_buff_def_9.py +++ b/scripts/commands/of_buff_def_9.py @@ -4,9 +4,6 @@ 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') 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..b2a3524e 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.addGroupBuff(actor, 'of_charge_1') 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..00c17c70 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') 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..dbd564ec 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') 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..406fb584 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') 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..ea194a77 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') 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..d4645925 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') + 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..1ff3a903 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') + 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..834a0d25 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') + 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_scatter_1.py b/scripts/commands/of_scatter_1.py index 8ee17071..e4f86354 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.addGroupBuff(actor, 'of_scatter_1') 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/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/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..c8e1804c --- /dev/null +++ b/scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py @@ -0,0 +1,15 @@ +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.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 1) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Kinetic') + object.setStringAttribute('cat_wpn_damage.damage', '43-75') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-5m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Polearm') + 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..21afc76b --- /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.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '17-43') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + 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_spy_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py new file mode 100644 index 00000000..53149824 --- /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.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '17-43') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + 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_commando_carbine_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py new file mode 100644 index 00000000..681e8699 --- /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.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '20-40') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + 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/pistol/item_npe_officer_sidearm.py b/scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py new file mode 100644 index 00000000..3600d8b4 --- /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.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '15-25') + 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/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..4f615807 --- /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.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '13-27') + 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/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..4a68c9af --- /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.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '13-27') + 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/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/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..67cdb14b 100644 --- a/scripts/roadmap/commando_1a.py +++ b/scripts/roadmap/commando_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/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 a764248f..00000000 --- a/scripts/roadmap/roadmap_rewards.py +++ /dev/null @@ -1,122 +0,0 @@ -import sys - -def get(name): - # Jedi # - 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" - - # Bounty Hunter # - - 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/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/src/resources/common/Stf.java b/src/resources/common/Stf.java index 1ebfc72a..468960f6 100644 --- a/src/resources/common/Stf.java +++ b/src/resources/common/Stf.java @@ -80,6 +80,20 @@ public class Stf extends Delta { } } + public String getString() { + synchronized(objectMutex) { + return ("@" + stfFilename + ":" + stfName); + } + } + + public void setString(String stf) { + synchronized(objectMutex) { + 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; diff --git a/src/services/BuffService.java b/src/services/BuffService.java index 21c31fa9..aa822001 100644 --- a/src/services/BuffService.java +++ b/src/services/BuffService.java @@ -60,32 +60,52 @@ public class BuffService implements INetworkDispatch { } - public boolean addBuffToCreature(final CreatureObject creature, String buffName) { + 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; }*/ - final Buff buff = new Buff(buffName, creature.getObjectID()); + final Buff buff = new Buff(buffName, buffer.getObjectID()); if(buff.isGroupBuff()) { - addGroupBuff(creature, buffName); + addGroupBuff(buffer, buffName, buffer); return true; } else { - doAddBuff(creature, buffName, null); + doAddBuff(target, buffName, buffer); return true; } } - public Buff doAddBuff(final CreatureObject creature, String buffName, CreatureObject buffer) { + public Buff doAddBuff(final CreatureObject target, String buffName, CreatureObject buffer) { - final Buff buff = new Buff(buffName, creature.getObjectID()); - buff.setTotalPlayTime(((PlayerObject) creature.getSlottedObject("ghost")).getTotalPlayTime()); + if (target.getPosition().getDistance(buffer.getPosition()) > 20) { + return null; + } + + if (!core.simulationService.checkLineOfSight(buffer, target)) { + return null; + } + + final Buff buff = new Buff(buffName, target.getObjectID()); + buff.setTotalPlayTime(((PlayerObject) target.getSlottedObject("ghost")).getTotalPlayTime()); if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) - core.scriptService.callScript("scripts/buffs/", buffName, "setup", core, ((buffer == null) ? creature : buffer), buff); + core.scriptService.callScript("scripts/buffs/", buffName, "setup", core, buffer, buff); - for (final Buff otherBuff : creature.getBuffList()) { + for (final Buff otherBuff : target.getBuffList()) { if (buff.getGroup1().equals(otherBuff.getGroup1())) if (buff.getPriority() >= otherBuff.getPriority()) { if (buff.getBuffName().equals(otherBuff.getBuffName())) { @@ -93,19 +113,18 @@ public class BuffService implements INetworkDispatch { 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()); + if(target.getDotByBuff(otherBuff) != null) // reset duration when theres a dot stack + target.getDotByBuff(otherBuff).setStartTime(buff.getStartTime()); } else { buff.setStacks(buff.getMaxStacks()); } - - if (otherBuff.getRemainingDuration() > buff.getDuration() && otherBuff.getStacks() >= otherBuff.getMaxStacks()) { - return null; - } + if (buff.getDuration() != -1.0) + if (otherBuff.getRemainingDuration() > buff.getDuration() && otherBuff.getStacks() >= otherBuff.getMaxStacks()) + return null; } - removeBuffFromCreature(creature, otherBuff); + removeBuffFromCreature(target, otherBuff); break; } else { System.out.println("buff not added:" + buffName); @@ -114,9 +133,9 @@ public class BuffService implements INetworkDispatch { } if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) - core.scriptService.callScript("scripts/buffs/", buffName, "add", core, creature, buff); + core.scriptService.callScript("scripts/buffs/", buffName, "add", core, target, buff); - creature.addBuff(buff); + target.addBuff(buff); if(buff.getDuration() > 0) { @@ -125,7 +144,7 @@ public class BuffService implements INetworkDispatch { @Override public void run() { - removeBuffFromCreature(creature, buff); + removeBuffFromCreature(target, buff); } @@ -137,7 +156,7 @@ public class BuffService implements INetworkDispatch { } for (String effect : buff.getParticleEffect().split(",")) { - creature.playEffectObject(effect, buff.getBuffName()); + target.playEffectObject(effect, buff.getBuffName()); } if (!buff.getCallback().equals("")) { @@ -149,7 +168,7 @@ public class BuffService implements INetworkDispatch { 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)); + method.__call__(Py.java2py(core), Py.java2py(target), Py.java2py(buff)); } } @@ -157,7 +176,7 @@ public class BuffService implements INetworkDispatch { } } - if (buffer != null && creature.getGroupId() != 0 && creature.getGroupId() == buffer.getGroupId()) { + if (buffer != null && target.getGroupId() != 0 && target.getGroupId() == buffer.getGroupId()) { buff.setGroupBufferId(buffer.getObjectID()); } @@ -220,22 +239,34 @@ public class BuffService implements INetworkDispatch { } - public void addGroupBuff(final CreatureObject buffer, String buffName) { + 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(buffer, buffName, null); + doAddBuff(target, buffName, buffer); return; } GroupObject group = (GroupObject) core.objectService.getObject(buffer.getGroupId()); if(group == null) { - doAddBuff(buffer, buffName, null); + doAddBuff(target, buffName, buffer); return; } for(SWGObject member : group.getMemberList()) { - Buff buff = doAddBuff((CreatureObject) member, buffName, buffer); + doAddBuff((CreatureObject) member, buffName, buffer); } } diff --git a/src/services/PlayerService.java b/src/services/PlayerService.java index 71541bdb..195726a1 100644 --- a/src/services/PlayerService.java +++ b/src/services/PlayerService.java @@ -716,6 +716,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)) { @@ -740,11 +742,12 @@ public class PlayerService implements INetworkDispatch { 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); } @@ -756,6 +759,11 @@ public class PlayerService implements INetworkDispatch { } } } + + if (rewards != null && !rewards.isEmpty()) { + giveItems(creature, (SWGObject[]) rewards.toArray()); + } + } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); } diff --git a/src/services/SkillService.java b/src/services/SkillService.java index de024d6d..c3926f7b 100644 --- a/src/services/SkillService.java +++ b/src/services/SkillService.java @@ -271,16 +271,33 @@ public class SkillService implements INetworkDispatch { return; for(String expertiseName : expertise.getExpertiseSkills()) { - addSkill(creature, expertiseName); - if(!FileUtilities.doesFileExist("scripts/expertise/" + expertiseName + ".py")) - continue; - core.scriptService.callScript("scripts/expertise/", expertiseName, "addAbilities", core, creature, player); - } - + if(expertiseName.startsWith("expertise_") && ((caluclateExpertisePoints(creature) - 1) > 0)) // Prevent possible glitches/exploits + { + addSkill(creature, expertiseName); + if(!FileUtilities.doesFileExist("scripts/expertise/" + expertiseName + ".py")) + continue; + core.scriptService.callScript("scripts/expertise/", expertiseName, "addAbilities", core, creature, player); + } + } } }); } + + 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); + } + catch (Exception e) { e.printStackTrace(); } + + System.out.println("Player should have " + expertisePoints + " expertise points."); + return expertisePoints; + } @Override public void shutdown() { diff --git a/src/services/collections/CollectionService.java b/src/services/collections/CollectionService.java index ae13cef3..582b4aab 100644 --- a/src/services/collections/CollectionService.java +++ b/src/services/collections/CollectionService.java @@ -222,13 +222,10 @@ 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(); - }*/ + } } } else { bits = 1; @@ -293,14 +290,20 @@ public class CollectionService implements INetworkDispatch { } } - 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); } @@ -439,7 +442,6 @@ public class CollectionService implements INetworkDispatch { String bookName = ""; String pageName = ""; String collectionName = ""; - boolean collectionComplete = false; collections = BitSet.valueOf(player.getCollections()); @@ -595,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 {