Kod:
local mana = {min=950, max=1400}
local levelreq = 324
function onUse(cid, item, frompos, item2, topos)
time = 1
local time_needed = getPlayerStorageValue(cid, 9550) + time
if(os.time() >= time_needed) then
setPlayerStorageValue(cid, 9550, os.time())
if getPlayerLevel(cid) > levelreq then
local playermana = math.random(mana.min, mana.max)
doPlayerAddMana(cid, playermana)
doSendAnimatedText(frompos,"Ah.. " .. playermana .. "",146)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getPlayerPosition(cid), 12)
else
doPlayerSay(cid,'Only players of level 325 or above may drink this fluid.',16)
end
else
doPlayerSendCancel(cid, "You are exhausted.")
doSendMagicEffect(frompos, 2)
end
return 1
end
Zakładki