Desolation
New Member
- Joined
- Sep 3, 2007
- Messages
- 13
- Reaction score
- 0
i need it to give health and look for level instead of magic level, but i dont know how to do it :s hopefully i get more help here :s
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (itemEx.uid == cid) then
local mag = getPlayerMagLevel(cid)
if (mag >= 2) then
if (item.type > 1) then
doChangeTypeItem(item.uid, item.type - 1)
else
doRemoveItem(item.uid)
end
doSendMagicEffect(getCreaturePosition(itemEx.uid), 1)
doCreatureAddHealth(itemEx.uid, 1000)
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
else
doPlayerSendCancel(cid,"You can only use this rune on yourself.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
return TRUE
end