<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reflection" version="1.0" author="otland" contact="otland.net" enabled="yes">
<instant name="Reflection" words="exori reflect" lvl="50" mana="140" prem="1" aggressive="0" selftarget="1" exhaustion="7000" needlearn="0" event="script">
<vocation id="11"/>
<vocation id="12"/>
<vocation id="9"/>
<vocation id="10"/>
<![CDATA[
function onCastSpell(cid, var)
registerCreatureEvent(cid, "Reflection/statschange001")
doCreatureSetStorage(cid, 5539, os.time() + 5)
doSendMagicEffect(getThingPosition(cid), CONST_ME_HOLYDAMAGE)
return true
end
]]>
</instant>
<event type="statschange" name="Reflection/statschange001" event="script"><![CDATA[
function onStatsChange(cid, attacker, type, combat, value)
if (getCreatureStorage(cid, 5539) > os.time()) then
if(type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then
doTargetCombatHealth(cid, attacker, type, -value*.80, -value*0.88, CONST_ME_NONE)
local pos = getThingPosition(attacker)
doSendMagicEffect({x=pos.x, y=pos.y-1, z=pos.z}, 57)
doSendMagicEffect(getThingPosition(attacker), CONST_ME_HOLYDAMAGE)
doSendAnimatedText(getThingPosition(cid), "Mirror!", COLOR_GREEN)
doSendAnimatedText(getThingPosition(attacker), absorb, COLOR_RED)
end
end
return true
end
]]></event>
</mod>