Index: scripts/globals/abilities/animated_flourish.lua =================================================================== --- scripts/globals/abilities/animated_flourish.lua (revision 0) +++ scripts/globals/abilities/animated_flourish.lua (working copy) @@ -0,0 +1,44 @@ +----------------------------------- +-- Ability: Animated Flourish +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnAbilityCheck(player,target,ability) + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_1,1,0,7200); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_5); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + return 0,0; + + else + return MSGBASIC_NO_FINISHINGMOVES,0; + end; +end; + +function OnUseAbility(player, target, ability) + --Zero point in filling this as its hardcored (Am guessing anyway...); +end; \ No newline at end of file Index: scripts/globals/abilities/aspir_samba.lua =================================================================== --- scripts/globals/abilities/aspir_samba.lua (revision 3357) +++ scripts/globals/abilities/aspir_samba.lua (working copy) @@ -2,17 +2,18 @@ require("scripts/globals/status"); require("scripts/globals/magic"); -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 10) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 10) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(10); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) - player:delStatusEffect(EFFECT_HASTE_SAMBA); player:delStatusEffect(EFFECT_DRAIN_SAMBA); player:addStatusEffect(EFFECT_ASPIR_SAMBA,1,0,120); Index: scripts/globals/abilities/aspir_samba_ii.lua =================================================================== --- scripts/globals/abilities/aspir_samba_ii.lua (revision 3357) +++ scripts/globals/abilities/aspir_samba_ii.lua (working copy) @@ -2,15 +2,17 @@ require("scripts/globals/status"); require("scripts/globals/magic"); -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 25) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 25) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(25); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) player:delStatusEffect(EFFECT_HASTE_SAMBA); Index: scripts/globals/abilities/box_step.lua =================================================================== --- scripts/globals/abilities/box_step.lua (revision 3357) +++ scripts/globals/abilities/box_step.lua (working copy) @@ -10,15 +10,88 @@ ----------------------------------- --Uncomment these when implemented -function OnAbilityCheck(player,target,ability) - --if (player:getTP() < 10) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; - --else - -- player:delTP(10); - -- return 0,0; - --end -end; - +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 10) then + return MSGBASIC_NOT_ENOUGH_TP,0; + else + player:delTP(10); + return 0,0; + end; +end; + function OnUseAbility(player, target, ability) + + local mjob = player:getMainJob(); + if (mjob == 19) then + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:addStatusEffect(EFFECT_FINISHING_MOVE_4,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + else + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + end; + + else + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_4,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + else + player:addStatusEffect(EFFECT_FINISHING_MOVE_1,1,0,7200); + end; + + + end; + + if (target:hasStatusEffect(EFFECT_SLUGGISH_DAZE_1)) then + target:delStatusEffect(EFFECT_SLUGGISH_DAZE_1); + target:addStatusEffect(EFFECT_SLUGGISH_DAZE_2,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_SLUGGISH_DAZE_2)) then + target:delStatusEffect(EFFECT_SLUGGISH_DAZE_2); + target:addStatusEffect(EFFECT_SLUGGISH_DAZE_3,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_SLUGGISH_DAZE_3)) then + target:delStatusEffect(EFFECT_SLUGGISH_DAZE_3); + target:addStatusEffect(EFFECT_SLUGGISH_DAZE_4,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_SLUGGISH_DAZE_4)) then + target:delStatusEffect(EFFECT_SLUGGISH_DAZE_4); + target:addStatusEffect(EFFECT_SLUGGISH_DAZE_5,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_SLUGGISH_DAZE_5)) then + else + target:addStatusEffect(EFFECT_SLUGGISH_DAZE_1,1,0,30); + end; end; \ No newline at end of file Index: scripts/globals/abilities/building_flourish.lua =================================================================== --- scripts/globals/abilities/building_flourish.lua (revision 0) +++ scripts/globals/abilities/building_flourish.lua (working copy) @@ -0,0 +1,57 @@ +----------------------------------- +-- Ability: Animated Flourish +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnAbilityCheck(player,target,ability) + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + return 0,0; + + else + return MSGBASIC_NO_FINISHINGMOVES,0; + end; +end; + +function OnUseAbility(player, target, ability) + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_1,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_5); + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + end; + + player:addStatusEffect(EFFECT_BUILDING_FLOURISH,1,0,60); + + +end; \ No newline at end of file Index: scripts/globals/abilities/curing_waltz.lua =================================================================== --- scripts/globals/abilities/curing_waltz.lua (revision 3357) +++ scripts/globals/abilities/curing_waltz.lua (working copy) @@ -9,15 +9,17 @@ -- OnUseAbility ----------------------------------- -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 20) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 20) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(20); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) --Grabbing variables. Index: scripts/globals/abilities/curing_waltz_ii.lua =================================================================== --- scripts/globals/abilities/curing_waltz_ii.lua (revision 3357) +++ scripts/globals/abilities/curing_waltz_ii.lua (working copy) @@ -9,15 +9,17 @@ -- OnUseAbility ----------------------------------- -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 35) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 35) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(35); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) --Grabbing variables. Index: scripts/globals/abilities/curing_waltz_iii.lua =================================================================== --- scripts/globals/abilities/curing_waltz_iii.lua (revision 3357) +++ scripts/globals/abilities/curing_waltz_iii.lua (working copy) @@ -9,15 +9,17 @@ -- OnUseAbility ----------------------------------- -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 50) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 50) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(50); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) --Grabbing variables. Index: scripts/globals/abilities/curing_waltz_iv.lua =================================================================== --- scripts/globals/abilities/curing_waltz_iv.lua (revision 3357) +++ scripts/globals/abilities/curing_waltz_iv.lua (working copy) @@ -9,15 +9,17 @@ -- OnUseAbility ----------------------------------- -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 65) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 65) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(65); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) --Grabbing variables. Index: scripts/globals/abilities/divine_waltz.lua =================================================================== --- scripts/globals/abilities/divine_waltz.lua (revision 3357) +++ scripts/globals/abilities/divine_waltz.lua (working copy) @@ -9,15 +9,17 @@ -- OnUseAbility ----------------------------------- -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 40) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseIf (player:getTP() < 40) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(40); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) --Grabbing variables. @@ -44,9 +46,9 @@ --Applying server mods.... cure = cure * CURE_POWER; - player:addHP(cure); + target:addHP(cure); player:updateEnmityFromCure(target,cure); return cure; -end; \ No newline at end of file +end; Index: scripts/globals/abilities/drain_samba.lua =================================================================== --- scripts/globals/abilities/drain_samba.lua (revision 3357) +++ scripts/globals/abilities/drain_samba.lua (working copy) @@ -3,14 +3,16 @@ require("scripts/globals/magic"); function OnAbilityCheck(player,target,ability) - if (player:getTP() < 10) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 10) then + return MSGBASIC_NOT_ENOUGH_TP,0; else - player:delTP(10); + player:delTP(10); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) player:delStatusEffect(EFFECT_HASTE_SAMBA); player:delStatusEffect(EFFECT_ASPIR_SAMBA); Index: scripts/globals/abilities/drain_samba_ii.lua =================================================================== --- scripts/globals/abilities/drain_samba_ii.lua (revision 3357) +++ scripts/globals/abilities/drain_samba_ii.lua (working copy) @@ -2,15 +2,17 @@ require("scripts/globals/status"); require("scripts/globals/magic"); -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 25) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 25) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(25); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) player:delStatusEffect(EFFECT_HASTE_SAMBA); player:delStatusEffect(EFFECT_ASPIR_SAMBA); Index: scripts/globals/abilities/drain_samba_iii.lua =================================================================== --- scripts/globals/abilities/drain_samba_iii.lua (revision 3357) +++ scripts/globals/abilities/drain_samba_iii.lua (working copy) @@ -2,15 +2,17 @@ require("scripts/globals/status"); require("scripts/globals/magic"); -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 40) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 40) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(40); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) player:delStatusEffect(EFFECT_HASTE_SAMBA); player:delStatusEffect(EFFECT_ASPIR_SAMBA); Index: scripts/globals/abilities/haste_samba.lua =================================================================== --- scripts/globals/abilities/haste_samba.lua (revision 3357) +++ scripts/globals/abilities/haste_samba.lua (working copy) @@ -8,15 +8,17 @@ -- OnUseAbility ----------------------------------- -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 35) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) +if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 35) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(35); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) player:delStatusEffect(EFFECT_DRAIN_SAMBA); Index: scripts/globals/abilities/healing_waltz.lua =================================================================== --- scripts/globals/abilities/healing_waltz.lua (revision 3357) +++ scripts/globals/abilities/healing_waltz.lua (working copy) @@ -9,15 +9,17 @@ -- OnUseAbility ----------------------------------- -function OnAbilityCheck(player,target,ability) - if (player:getTP() < 20) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; +function OnAbilityCheck(player,target,ability) + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 20) then + return MSGBASIC_NOT_ENOUGH_TP,0; else player:delTP(20); return 0,0; - end -end; - + end; +end; + function OnUseAbility(player, target, ability) target:eraseStatusEffect(); end; \ No newline at end of file Index: scripts/globals/abilities/quickstep.lua =================================================================== --- scripts/globals/abilities/quickstep.lua (revision 3357) +++ scripts/globals/abilities/quickstep.lua (working copy) @@ -5,20 +5,94 @@ require("scripts/globals/settings"); require("scripts/globals/status"); + ----------------------------------- -- OnUseAbility ----------------------------------- --Uncomment these when implemented function OnAbilityCheck(player,target,ability) - --if (player:getTP() < 10) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; - --else - -- player:delTP(10); - -- return 0,0; - --end -end; - + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 10) then + return MSGBASIC_NOT_ENOUGH_TP,0; + else + player:delTP(10); + return 0,0; + end; +end; + function OnUseAbility(player, target, ability) + + local mjob = player:getMainJob(); + if (mjob == 19) then + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:addStatusEffect(EFFECT_FINISHING_MOVE_4,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + else + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + end; + + else + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_4,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + else + player:addStatusEffect(EFFECT_FINISHING_MOVE_1,1,0,7200); + end; + + + end; + + if (target:hasStatusEffect(EFFECT_LETHARGIC_DAZE_1)) then + target:delStatusEffect(EFFECT_LETHARGIC_DAZE_1); + target:addStatusEffect(EFFECT_LETHARGIC_DAZE_2,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_LETHARGIC_DAZE_2)) then + target:delStatusEffect(EFFECT_LETHARGIC_DAZE_2); + target:addStatusEffect(EFFECT_LETHARGIC_DAZE_3,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_LETHARGIC_DAZE_3)) then + target:delStatusEffect(EFFECT_LETHARGIC_DAZE_3); + target:addStatusEffect(EFFECT_LETHARGIC_DAZE_4,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_LETHARGIC_DAZE_4)) then + target:delStatusEffect(EFFECT_LETHARGIC_DAZE_4); + target:addStatusEffect(EFFECT_LETHARGIC_DAZE_5,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_LETHARGIC_DAZE_5)) then + else + target:addStatusEffect(EFFECT_LETHARGIC_DAZE_1,1,0,30); + end; end; \ No newline at end of file Index: scripts/globals/abilities/reverse_flourish.lua =================================================================== --- scripts/globals/abilities/reverse_flourish.lua (revision 0) +++ scripts/globals/abilities/reverse_flourish.lua (working copy) @@ -0,0 +1,64 @@ +----------------------------------- +-- Ability: Animated Flourish +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnAbilityCheck(player,target,ability) + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + return 0,0; + + else + return MSGBASIC_NO_FINISHINGMOVES,0; + end; +end; + +function OnUseAbility(player, target, ability) + + local TPGain = 0; + local STM = 0.5; --Variable for Charis Bangles (dunno how to check if player has equipped); + local Merits = player:getMerit(MERIT_REVERSE_FLOURISH_EFFECT); + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + TPGain = 9.5 * 1 + STM * 1 ^ 2 + 3* Merits; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + TPGain = 9.5 * 2 + STM * 2 ^ 2 + 3* Merits; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + TPGain = 9.5 * 3 + STM * 3 ^ 2 + 3* Merits; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + TPGain = 9.5 * 4 + STM * 4 ^ 2 + 3* Merits; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + TPGain = 9.5 * 5 + STM * 5 ^ 2 + 3* Merits; + end; + + player:addTP(TPGain); + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:delStatusEffect(EFFECT_FINISHING_MOVE_5); + + +end; \ No newline at end of file Index: scripts/globals/abilities/stutter_step.lua =================================================================== --- scripts/globals/abilities/stutter_step.lua (revision 3357) +++ scripts/globals/abilities/stutter_step.lua (working copy) @@ -5,20 +5,94 @@ require("scripts/globals/settings"); require("scripts/globals/status"); + ----------------------------------- -- OnUseAbility ----------------------------------- --Uncomment these when implemented function OnAbilityCheck(player,target,ability) - --if (player:getTP() < 20) then - return MSGBASIC_UNABLE_TO_USE_JA2,0; - --else - -- player:delTP(20); - -- return 0,0; - --end -end; - + if (player:hasStatusEffect(EFFECT_TRANCE)) then + return 0,0; + elseif (player:getTP() < 10) then + return MSGBASIC_NOT_ENOUGH_TP,0; + else + player:delTP(10); + return 0,0; + end; +end; + function OnUseAbility(player, target, ability) + + local mjob = player:getMainJob(); + if (mjob == 19) then + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:addStatusEffect(EFFECT_FINISHING_MOVE_4,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + else + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + end; + + else + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_4,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_5,1,0,7200); + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + else + player:addStatusEffect(EFFECT_FINISHING_MOVE_1,1,0,7200); + end; + + + end; + + if (target:hasStatusEffect(EFFECT_WEAKENED_DAZE_1)) then + target:delStatusEffect(EFFECT_WEAKENED_DAZE_1); + target:addStatusEffect(EFFECT_WEAKENED_DAZE_2,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_WEAKENED_DAZE_2)) then + target:delStatusEffect(EFFECT_WEAKENED_DAZE_2); + target:addStatusEffect(EFFECT_WEAKENED_DAZE_3,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_WEAKENED_DAZE_3)) then + target:delStatusEffect(EFFECT_WEAKENED_DAZE_3); + target:addStatusEffect(EFFECT_WEAKENED_DAZE_4,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_WEAKENED_DAZE_4)) then + target:delStatusEffect(EFFECT_WEAKENED_DAZE_4); + target:addStatusEffect(EFFECT_WEAKENED_DAZE_5,1,0,30); + + elseif (target:hasStatusEffect(EFFECT_WEAKENED_DAZE_5)) then + else + target:addStatusEffect(EFFECT_WEAKENED_DAZE_1,1,0,30); + end; end; \ No newline at end of file Index: scripts/globals/abilities/trance.lua =================================================================== --- scripts/globals/abilities/trance.lua (revision 0) +++ scripts/globals/abilities/trance.lua (working copy) @@ -0,0 +1,18 @@ +----------------------------------- +-- Ability: Hundred Fists +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnAbilityCheck(player,target,ability) + return 0,0; +end; + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_TRANCE,1,0,60); +end; \ No newline at end of file Index: scripts/globals/abilities/violent_flourish.lua =================================================================== --- scripts/globals/abilities/violent_flourish.lua (revision 0) +++ scripts/globals/abilities/violent_flourish.lua (working copy) @@ -0,0 +1,48 @@ +----------------------------------- +-- Ability: Violent Flourish +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnAbilityCheck(player,target,ability) + + if (player:hasStatusEffect(EFFECT_FINISHING_MOVE_1)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_1); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_2)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_2); + player:addStatusEffect(EFFECT_FINISHING_MOVE_1,1,0,7200); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_3)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_3); + player:addStatusEffect(EFFECT_FINISHING_MOVE_2,1,0,7200); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_4)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_4); + player:addStatusEffect(EFFECT_FINISHING_MOVE_3,1,0,7200); + return 0,0; + + elseif (player:hasStatusEffect(EFFECT_FINISHING_MOVE_5)) then + player:delStatusEffect(EFFECT_FINISHING_MOVE_5); + player:addStatusEffect(EFFECT_FINISHING_MOVE_4,1,0,7200); + return 0,0; + + else + return MSGBASIC_NO_FINISHINGMOVES,0; + end; +end; + +function OnUseAbility(player, target, ability) + local chance = math.random(100); + if (chance < 10) then + target:addStatusEffect(EFFECT_STUN,1,0,60); + end; +end; \ No newline at end of file Index: scripts/globals/abilities/wild_flourish.lua =================================================================== --- scripts/globals/abilities/wild_flourish.lua (revision 0) +++ scripts/globals/abilities/wild_flourish.lua (working copy) @@ -0,0 +1,17 @@ +----------------------------------- +-- Ability: Wild Flourish +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnAbilityCheck(player,target,ability) + return MSGBASIC_UNABLE_TO_USE_JA2,0; +end; + +function OnUseAbility(player, target, ability) +end; \ No newline at end of file Index: src/map/packets/message_basic.h =================================================================== --- src/map/packets/message_basic.h (revision 3357) +++ src/map/packets/message_basic.h (working copy) @@ -108,8 +108,9 @@ MSGBASIC_COUNTER_ABS_BY_SHADOW = 14, /* The 's attack is countered by the . .. of 's shadows absorbs the damage and disappears. */ /* THF */ MSGBASIC_TREASURE_HUNTER_UP = 603, /* Additional effect: Treasure Hunter effectiveness against increases to .. */ + /* DNC */ + MSGBASIC_NO_FINISHINGMOVES = 524, - /* DEBUG MESSAGES */ MSGBASIC_DEBUG_RESISTED_SPELL = 66, /* Debug: Resisted spell! */ MSGBASIC_DEBUG_RECEIVED_STATUS = 73, /* Debug: 's status is now .. */