Jump to content
Sign in to follow this  
Majesty

[Revscriptsys] Stamina Refill

Recommended Posts

Majesty    1,755
Majesty
Citar

Nome: [Revscriptsys] Stamina Refill

Versão: [10.98+] // Compatível com TFS 1.3 / OTServBR-Global

Tipo do script: Action

Créditos: Sarah Wesker

Em data/scripts/actions, crie um arquivo stamina_refill.lua com o código abaixo:

Spoiler

local smallstaminarefill = Action()
function smallstaminarefill.onUse(player, item, ...)
    local stamina = player:getStamina()
    if stamina >= 2520 then
        player:sendCancelMessage("You have a full stamina.")
        return true
    end
    player:setStamina(math.min(2520, stamina + 120))
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
    player:sendCancelMessage("You have regenerate 2 hours of stamina.")
    item:remove(1)
    return true
end

smallstaminarefill:id(36185)
smallstaminarefill:register()

 

 

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×