This script reflects the damage that the player attacks you in the same way that the player's attack is the damage that will be reflected against himself, it is used for both the monster and the player player attack you reflect attack on player!!!
creaturescripts/scripts
creaturescripts.xml
login.lua
creaturescripts/scripts
Lua:
local lvldodge = 48903
local percent = 0.5
function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isCreature(attacker) then
if (getPlayerStorageValue(cid, lvldodge)*3) >= math.random (0,1000) then
value = math.ceil(value*(percent))
doCreatureAddHealth(attacker, -value)
doSendAnimatedText(getCreaturePos(cid), "Reflected!", 6)
return false
end
end
return true
end
creaturescripts.xml
XML:
<event type="statschange" name="ReflectStone" event="script" value="reflectStone.lua"/>
login.lua
XML:
registerCreatureEvent(cid, "ReflectStone")
Last edited: