Forkz
Well-Known Member
- Joined
- Jun 29, 2020
- Messages
- 380
- Solutions
- 1
- Reaction score
- 89
Hi Otlanders,
I'm using the script below to fully recover the character's stamina.
I would like to modify it to recover only 10h, someone help me?
I'm using the script below to fully recover the character's stamina.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cfg = {}
cfg.refuel = 42 * 60 * 1000
if(getPlayerStamina(cid) >= cfg.refuel) then
doPlayerSendCancel(cid, "Your stamina is already full.")
elseif(not isPremium(cid)) then
doPlayerSendCancel(cid, "You must have a premium account.")
else
doPlayerSetStamina(cid, cfg.refuel)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
doSendMagicEffect(fromPosition, 30)
doRemoveItem(item.uid)
end
return true
end
I would like to modify it to recover only 10h, someone help me?