• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

edite this mod

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
457
Reaction score
17
i found this mod here but this mod don't work fine its work only if player use health but if player use manashield don't work reflect the damge for hp not mana anyone can fix this?
Code:
<?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="4"/>
<vocation id="8"/>
<![CDATA[
function onCastSpell(cid, var)
registerCreatureEvent(cid, "Reflection/statschange001")
doCreatureSetStorage(cid, 2000, 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, 2000) > os.time() and type == STATSCHANGE_HEALTHLOSS) then
local absorb = math.ceil(value * 0.5)
doSendMagicEffect(getThingPosition(attacker), CONST_ME_HOLYDAMAGE)
doSendAnimatedText(getThingPosition(attacker), absorb, COLOR_RED)
doCreatureAddHealth(attacker, -absorb)
doCreatureAddHealth(cid, absorb)
end
return true
end
]]></event>
</mod>
 
try this
Code:
<?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="4"/>
<vocation id="8"/>
<![CDATA[
function onCastSpell(cid, var)
registerCreatureEvent(cid, "Reflection/statschange001")
doCreatureSetStorage(cid, 2000, 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, 2000) > os.time()) then
if(type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then
doTargetCombatHealth(cid, attacker, type, -value, -value, CONST_ME_NONE)
local absorb = math.ceil(value * 0.5)
local pos = getThingPosition(attacker)
doSendMagicEffect({x=pos.x, y=pos.y-1, z=pos.z}, 57)
doSendMagicEffect(getThingPosition(attacker), CONST_ME_HOLYDAMAGE)
doSendAnimatedText(getThingPosition(attacker), absorb, COLOR_RED)
doCreatureAddHealth(attacker, -absorb)
doCreatureAddHealth(cid, absorb)
end
end
return true
end
]]></event>
</mod>
 
Last edited:
Back
Top Bottom