diff --git a/scripts/commands/combat/fs_dm_1.py b/scripts/commands/combat/fs_dm_1.py new file mode 100644 index 00000000..825798d5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_1.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_2.py b/scripts/commands/combat/fs_dm_2.py new file mode 100644 index 00000000..825798d5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_2.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_3.py b/scripts/commands/combat/fs_dm_3.py new file mode 100644 index 00000000..825798d5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_3.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_4.py b/scripts/commands/combat/fs_dm_4.py new file mode 100644 index 00000000..825798d5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_4.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_5.py b/scripts/commands/combat/fs_dm_5.py new file mode 100644 index 00000000..825798d5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_5.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_6.py b/scripts/commands/combat/fs_dm_6.py new file mode 100644 index 00000000..825798d5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_6.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_7.py b/scripts/commands/combat/fs_dm_7.py new file mode 100644 index 00000000..825798d5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_7.py @@ -0,0 +1,20 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + 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 new file mode 100644 index 00000000..1d6cd02c --- /dev/null +++ b/scripts/commands/combat/fs_flurry_1.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_2.py b/scripts/commands/combat/fs_flurry_2.py new file mode 100644 index 00000000..1d6cd02c --- /dev/null +++ b/scripts/commands/combat/fs_flurry_2.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_3.py b/scripts/commands/combat/fs_flurry_3.py new file mode 100644 index 00000000..1d6cd02c --- /dev/null +++ b/scripts/commands/combat/fs_flurry_3.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_4.py b/scripts/commands/combat/fs_flurry_4.py new file mode 100644 index 00000000..1d6cd02c --- /dev/null +++ b/scripts/commands/combat/fs_flurry_4.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_5.py b/scripts/commands/combat/fs_flurry_5.py new file mode 100644 index 00000000..1d6cd02c --- /dev/null +++ b/scripts/commands/combat/fs_flurry_5.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_6.py b/scripts/commands/combat/fs_flurry_6.py new file mode 100644 index 00000000..1d6cd02c --- /dev/null +++ b/scripts/commands/combat/fs_flurry_6.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_7.py b/scripts/commands/combat/fs_flurry_7.py new file mode 100644 index 00000000..1d6cd02c --- /dev/null +++ b/scripts/commands/combat/fs_flurry_7.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + 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): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_1.py b/scripts/commands/combat/fs_sweep_1.py new file mode 100644 index 00000000..6671e0ad --- /dev/null +++ b/scripts/commands/combat/fs_sweep_1.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) + + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) + + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_2.py b/scripts/commands/combat/fs_sweep_2.py new file mode 100644 index 00000000..6671e0ad --- /dev/null +++ b/scripts/commands/combat/fs_sweep_2.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) + + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) + + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_3.py b/scripts/commands/combat/fs_sweep_3.py new file mode 100644 index 00000000..6671e0ad --- /dev/null +++ b/scripts/commands/combat/fs_sweep_3.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) + + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) + + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_4.py b/scripts/commands/combat/fs_sweep_4.py new file mode 100644 index 00000000..6671e0ad --- /dev/null +++ b/scripts/commands/combat/fs_sweep_4.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) + + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) + + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_5.py b/scripts/commands/combat/fs_sweep_5.py new file mode 100644 index 00000000..6671e0ad --- /dev/null +++ b/scripts/commands/combat/fs_sweep_5.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) + + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) + + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_6.py b/scripts/commands/combat/fs_sweep_6.py new file mode 100644 index 00000000..6671e0ad --- /dev/null +++ b/scripts/commands/combat/fs_sweep_6.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) + + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) + + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_7.py b/scripts/commands/combat/fs_sweep_7.py new file mode 100644 index 00000000..6671e0ad --- /dev/null +++ b/scripts/commands/combat/fs_sweep_7.py @@ -0,0 +1,18 @@ +import sys + +def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) + + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) + + return + +def run(core, actor, target, commandString): + return + \ No newline at end of file diff --git a/scripts/commands/transferitemarmor.py b/scripts/commands/transferitemarmor.py index b5090996..2b890936 100644 --- a/scripts/commands/transferitemarmor.py +++ b/scripts/commands/transferitemarmor.py @@ -4,6 +4,9 @@ def setup(): return def run(core, actor, target, commandString): + if core.equipmentService.canEquip(actor, target) is False: + return + parsedMsg = commandString.split(' ', 3) objService = core.objectService containerID = long(parsedMsg[1]) diff --git a/scripts/commands/transferitemmisc.py b/scripts/commands/transferitemmisc.py index 7a3f5199..79ef9455 100644 --- a/scripts/commands/transferitemmisc.py +++ b/scripts/commands/transferitemmisc.py @@ -4,6 +4,9 @@ def setup(): return def run(core, actor, target, commandString): + if core.equipmentService.canEquip(actor, target) is False: + return + parsedMsg = commandString.split(' ', 3) objService = core.objectService containerID = long(parsedMsg[1]) diff --git a/scripts/commands/transferitemweapon.py b/scripts/commands/transferitemweapon.py index 8c54e57a..9b403eaf 100644 --- a/scripts/commands/transferitemweapon.py +++ b/scripts/commands/transferitemweapon.py @@ -4,6 +4,9 @@ def setup(): return def run(core, actor, target, commandString): + if core.equipmentService.canEquip(actor, target) is False: + return + parsedMsg = commandString.split(' ', 3) objService = core.objectService containerID = long(parsedMsg[1]) diff --git a/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py new file mode 100644 index 00000000..faf7ac17 --- /dev/null +++ b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + + object.setStfFilename('static_item_n') + object.setStfName('item_npe_fs_robe_02_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_fs_robe_02_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 21) + object.setStringAttribute('protection_level', 'Faint') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 20) + return diff --git a/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py b/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py new file mode 100644 index 00000000..38a9f07e --- /dev/null +++ b/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py @@ -0,0 +1,12 @@ +import sys + +def setup(core, object): + object.setCustomName('First Generation Lightsaber') + + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 1) + object.setStringAttribute('class_required', 'Jedi') + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '200-400') + + ## finish this ## + return \ No newline at end of file diff --git a/scripts/roadmap/roadmap_rewards.py b/scripts/roadmap/roadmap_rewards.py index 2f11d77e..b1071bbc 100644 --- a/scripts/roadmap/roadmap_rewards.py +++ b/scripts/roadmap/roadmap_rewards.py @@ -1,4 +1,9 @@ import sys def get(name): - return "" + + if name == 'item_npe_fs_robe_02_02': + return "object/tangible/wearables/robe/shared_robe_jedi_padawan.iff" + + if name == 'weapon_roadmap_lightsaber_02_02': + return "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s1.iff" \ No newline at end of file diff --git a/src/services/EquipmentService.java b/src/services/EquipmentService.java index 975125ce..f96e0e2c 100644 --- a/src/services/EquipmentService.java +++ b/src/services/EquipmentService.java @@ -33,6 +33,7 @@ import main.NGECore; import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; +import resources.objects.player.PlayerObject; public class EquipmentService implements INetworkDispatch { @@ -88,11 +89,42 @@ public class EquipmentService implements INetworkDispatch { } } + public String getFormalProfessionName(String stfName) { + String formalName = ""; + + switch (stfName) { + case "force_sensitive_1a": formalName = "Jedi"; break; + case "bounty_hunter_1a": formalName = "Bounty Hunter"; break; + case "officer_1a": formalName = "Officer"; break; + case "smuggler_1a": formalName = "Smuggler"; break; + case "entertainer_1a": formalName = "Entertainer"; break; + case "spy_1a": formalName = "Spy"; break; + case "medic_1a": formalName = "Medic"; break; + case "commando_1a": formalName = "Commando"; break; + + default: formalName = "Trader"; break; // Ziggy: Trader profession names are a bit irregular, so this is used. + + } + return formalName; + } + + public boolean canEquip(CreatureObject actor, SWGObject item) { + boolean result = true; + + if (item.getStringAttribute("class_required") != null) { + String profession = ((PlayerObject) actor.getSlottedObject("ghost")).getProfession(); + if (item.getStringAttribute("class_required").contentEquals(getFormalProfessionName(profession))) { + result = true; + } else{ + return false; + } + } + + return result; + } + public void equip(CreatureObject actor, SWGObject item) { - //if(replacedItem != null) - // unequip(actor, replacedItem); - String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff")); String serverTemplate = template.replace(".iff", ""); PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "equip"); @@ -100,14 +132,16 @@ public class EquipmentService implements INetworkDispatch { func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); // TODO: add health/action bonus from crafted weapon with augmentations (also seen with cybernetics) - // TODO: faction restrictions - // TODO: Species restrictions? - // TODO: Gender restrictions? + // TODO: faction restrictions - You had to be a Combatant as minimum in order to EQUIP an item. + // TODO: Species restrictions + // TODO: Gender restrictions // TODO: crit enhancement from crafted weapons // TODO: Jedi robes Force Protection Intensity // TODO: check for armor category in order to add resistance to certain DoT types - // TODO: if weapon, add the weapon specific crit to display_only_critical - // TODO: bio-link + // TODO: Calculate actual armor values (REMINDER: Check if the player is wearing a jedi robe/cloak (look for force protection intensity). If they are, they shouldn't receive any additional protection from other items with armour.) + // TODO: bio-link (assign it by objectID with setAttachment and then just display it as a character name). + // TODO: item level requirement. if actorLevel >= itemLevel + // TODO: refactor equipable items that grant buffs. use setAttachment("itemBuff", "buffname") if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true) weaponCriticalToDisplay(actor, item, true); @@ -115,10 +149,15 @@ public class EquipmentService implements INetworkDispatch { Map attributes = new TreeMap(item.getAttributes()); for(Entry e : attributes.entrySet()) { - if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { core.skillModService.addSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); - } + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) { + actor.setMaxHealth(actor.getMaxHealth() + Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) { + actor.setMaxAction(actor.getMaxAction() + Integer.parseInt((String) e.getValue())); + } } @@ -144,6 +183,12 @@ public class EquipmentService implements INetworkDispatch { if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { core.skillModService.deductSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) { + actor.setMaxHealth(actor.getMaxHealth() - Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) { + actor.setMaxAction(actor.getMaxAction() - Integer.parseInt((String) e.getValue())); } } diff --git a/src/services/trade/TradeService.java b/src/services/trade/TradeService.java index d1bd7b26..e425d282 100644 --- a/src/services/trade/TradeService.java +++ b/src/services/trade/TradeService.java @@ -202,8 +202,7 @@ public class TradeService implements INetworkDispatch{ } else { - - if (objectToTrade.getIntAttribute("no_trade") == 1) { + if(objectToTrade.getAttributes().toString().contains("no_trade")) { return; }