local REQUIRED_REBIRTHS = 2 --Change this for the number of rebirths
if getCreatureStorage(cid, 133) < REQUIRED_REBIRTHS then
doPlayerSendCancel(cid, "You can only use this spell if you have " .. REQUIRED_REBIRTHS .. " reborns.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return false
end
<movevent type="Equip" itemid="11111" slot="left-hand" event="script" value="weaponRebirth1.lua"
<movevent type="Equip" itemid="11111" slot="right-hand" event="script" value="weaponRebirth1.lua">
function onEquip(cid, item, slot)
local REQUIRED_REBIRTHS = 1 --Change this for the number of rebirths
if getCreatureStorage(cid, 133) < REQUIRED_REBIRTHS then
doPlayerSendCancel(cid, "You can only use this spell if you have " .. REQUIRED_REBIRTHS .. " reborns.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return false
end
return true
end