-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 0 replies
- 2405 views
-
- 0 answers
- 3575 views
-
- 1 answer
- 1675 views
-
- 0 answers
- 2734 views
-
- 2 answers
- 2740 views
-

Question
login12 0
Estou tentando adicionar exausted, em um item que recupera toda a stamina do personagem
porém ainda não está checando o exausted,
alguem poderia me ajudar ?
local time = 2000 -- Tempo de Exhaustion (1000 por segundos) function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if getPlayerStorageValue(cid, 141012) >= os.time() then return true end if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled, please relog to activate.") doRemoveItem(item.uid) setPlayerStorageValue(cid, 141012, os.time() + time / 1000) return 1 end end return 1 end endObrg
Edited by ZeRuSLink to comment
https://xtibia.com/forum/topic/219575-fun%C3%A7%C3%A3o-para-exausted/Share on other sites
6 answers to this question
Recommended Posts