• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

new food

andree

New Member
Joined
Feb 19, 2014
Messages
70
Reaction score
4
item that regenerates life and mana about 25%. It has to be food, like cherry, you can eat this much
 
Something like that? (this script goes to actions):
Code:
local exhausted_seconds = 3   --exhaust for item in seconds
local exhausted_storagevalue = 50002   --any free storage

function onUse(cid, item, frompos, item2, topos)
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
hppercent = 15  --health healed in percents of max health
mppercent = 15 --mana regained in percents of max mana
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)/100*hppercent)
doCreatureAddMana(cid, getCreatureMaxMana(cid)/100*mppercent)
doSendMagicEffect(getPlayerPosition(cid), 12)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)

else
doPlayerSendCancel(cid, "You are exhausted.")
doSendMagicEffect(getPlayerPosition(cid), 2)

end

end
 
Back
Top