Index: scripts/globals/spells/curaga.lua =================================================================== --- scripts/globals/spells/curaga.lua (revision 3812) +++ scripts/globals/spells/curaga.lua (working copy) @@ -11,10 +11,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local minCure = 60; @@ -40,6 +40,22 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + local recoverMP = 0; + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); Index: scripts/globals/spells/curaga_ii.lua =================================================================== --- scripts/globals/spells/curaga_ii.lua (revision 3812) +++ scripts/globals/spells/curaga_ii.lua (working copy) @@ -11,10 +11,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local minCure = 130; @@ -40,6 +40,22 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + local recoverMP = 0; + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); Index: scripts/globals/spells/curaga_iii.lua =================================================================== --- scripts/globals/spells/curaga_iii.lua (revision 3812) +++ scripts/globals/spells/curaga_iii.lua (working copy) @@ -11,10 +11,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local minCure = 270; @@ -40,6 +40,22 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + local recoverMP = 0; + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); Index: scripts/globals/spells/curaga_iv.lua =================================================================== --- scripts/globals/spells/curaga_iv.lua (revision 3812) +++ scripts/globals/spells/curaga_iv.lua (working copy) @@ -11,10 +11,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local minCure = 450; @@ -40,6 +40,22 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + local recoverMP = 0; + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); Index: scripts/globals/spells/curaga_v.lua =================================================================== --- scripts/globals/spells/curaga_v.lua (revision 3812) +++ scripts/globals/spells/curaga_v.lua (working copy) @@ -11,10 +11,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local minCure = 600; @@ -37,6 +37,22 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + local recoverMP = 0; + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:restoreHP(final); target:wakeUp(); Index: scripts/globals/spells/cure.lua =================================================================== --- scripts/globals/spells/cure.lua (revision 3812) +++ scripts/globals/spells/cure.lua (working copy) @@ -12,10 +12,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local divisor = 0; local constant = 0; @@ -23,6 +23,7 @@ local power = 0; local basecure = 0; local final = 0; + local recoverMP = 0; local minCure = 10; if(USE_OLD_CURE_FORMULA == true) then @@ -93,6 +94,21 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); @@ -109,6 +125,20 @@ dmg = adjustForTarget(target,dmg); dmg = finalMagicAdjustments(caster,target,spell,dmg); final = dmg; + + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:delHP(final); target:updateEnmityFromDamage(caster,final); elseif(caster:getObjType() == TYPE_PC) then Index: scripts/globals/spells/cure_ii.lua =================================================================== --- scripts/globals/spells/cure_ii.lua (revision 3812) +++ scripts/globals/spells/cure_ii.lua (working copy) @@ -12,10 +12,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local divisor = 0; local constant = 0; @@ -23,6 +23,7 @@ local power = 0; local basecure = 0; local final = 0; + local recoverMP = 0; local minCure = 60; if(USE_OLD_CURE_FORMULA == true) then @@ -93,6 +94,21 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); @@ -107,6 +123,20 @@ dmg = adjustForTarget(target,dmg); dmg = finalMagicAdjustments(caster,target,spell,dmg); final = dmg; + + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:delHP(final); target:updateEnmityFromDamage(caster,final); elseif(caster:getObjType() == TYPE_PC) then Index: scripts/globals/spells/cure_iii.lua =================================================================== --- scripts/globals/spells/cure_iii.lua (revision 3812) +++ scripts/globals/spells/cure_iii.lua (working copy) @@ -12,10 +12,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local divisor = 0; local constant = 0; @@ -23,6 +23,7 @@ local power = 0; local basecure = 0; local final = 0; + local recoverMP = 0; local minCure = 130; if(USE_OLD_CURE_FORMULA == true) then @@ -89,6 +90,21 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); @@ -103,6 +119,20 @@ dmg = adjustForTarget(target,dmg); dmg = finalMagicAdjustments(caster,target,spell,dmg); final = dmg; + + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:delHP(final); target:updateEnmityFromDamage(caster,final); elseif(caster:getObjType() == TYPE_PC) then Index: scripts/globals/spells/cure_iv.lua =================================================================== --- scripts/globals/spells/cure_iv.lua (revision 3812) +++ scripts/globals/spells/cure_iv.lua (working copy) @@ -22,6 +22,7 @@ local power = 0; local basecure = 0; local final = 0; + local recoverMP = 0; local minCure = 270; if(USE_OLD_CURE_FORMULA == true) then @@ -87,6 +88,21 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); caster:updateEnmityFromCure(target,final); @@ -100,6 +116,20 @@ dmg = adjustForTarget(target,dmg); dmg = finalMagicAdjustments(caster,target,spell,dmg); final = dmg; + + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:delHP(final); target:updateEnmityFromDamage(caster,final); elseif(caster:getObjType() == TYPE_PC) then Index: scripts/globals/spells/cure_v.lua =================================================================== --- scripts/globals/spells/cure_v.lua (revision 3812) +++ scripts/globals/spells/cure_v.lua (working copy) @@ -12,10 +12,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local divisor = 0; local constant = 0; @@ -23,6 +23,7 @@ local power = 0; local basecure = 0; local final = 0; + local recoverMP = 0; local minCure = 450; if(USE_OLD_CURE_FORMULA == true) then @@ -97,6 +98,21 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:addHP(final); target:wakeUp(); @@ -111,6 +127,20 @@ dmg = adjustForTarget(target,dmg); dmg = finalMagicAdjustments(caster,target,spell,dmg); final = dmg; + + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:delHP(final); target:updateEnmityFromDamage(caster,final); elseif(caster:getObjType() == TYPE_PC) then Index: scripts/globals/spells/cure_vi.lua =================================================================== --- scripts/globals/spells/cure_vi.lua (revision 3812) +++ scripts/globals/spells/cure_vi.lua (working copy) @@ -12,10 +12,10 @@ -- OnSpellCast ----------------------------------------- -function OnMagicCastingCheck(caster,target,spell) - return 0; -end; - +function OnMagicCastingCheck(caster,target,spell) + return 0; +end; + function onSpellCast(caster,target,spell) local divisor = 0; local constant = 0; @@ -23,6 +23,7 @@ local power = 0; local basecure = 0; local final = 0; + local recoverMP = 0; local minCure = 600; power = getCurePower(caster); @@ -76,6 +77,21 @@ if(final > diff) then final = diff; end + + local legs = caster:getEquipID(SLOT_LEGS); + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:restoreHP(final); target:wakeUp(); @@ -90,6 +106,20 @@ dmg = adjustForTarget(target,dmg); dmg = finalMagicAdjustments(caster,target,spell,dmg); final = dmg; + + if(legs == 11226) then -- Orison's Pantaloon's +1 + recoverMP = final * .02; + caster:addMP(recoverMP); + end + if(legs == 11126) then -- Orison's Pantaloon's +2 + recoverMP = final * .05; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + target:delHP(final); target:updateEnmityFromDamage(caster,final); elseif(caster:getObjType() == TYPE_PC) then