• 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!

Lua Action problem

Skoczi

New Member
Joined
Jun 6, 2012
Messages
115
Reaction score
0
Hi i have script , when i use x item i get mana and hp but i want - item give full mana and full hp plx fix

Code:
local exhausted_seconds = 0
local exhausted_storagevalue = 10
function onUse(cid, item, frompos, item2, topos)
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
doPlayerAddMana(cid, getPlayerMaxMana(cid) * 0.99)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) * 0.99)
doPlayerSay(cid,"Power is back!", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid, "You are exhausted.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
 
Back
Top