Click on an item and the players max health/mana will be increased.
Haven't seen this on otland before so I just made one.
Haven't seen this on otland before so I just made one.
Lua:
function onUse(cid, item, frompos, itemEx, topos)
local config = {
storage=5000,
addmana=2000,
addhealth=1000,
levelReq=80
}
if getPlayerStorageValue(cid, config.storage) == -1 then
if getPlayerLevel(cid) >= config.levelReq then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+config.addhealth)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+config.addmana)
doPlayerSendTextMessage(cid, 22, "Your max health has been increased by "..config.addhealth.." and your max mana by "..config.addmana.."!")
setPlayerStorageValue(cid, config.storage, 1)
else
doPlayerSendCancel(cid, "You need level "..config.levelReq.." to use this item.")
end
else
doPlayerSendCancel(cid, "You have already used this item.")
end
return TRUE
end