orzeleagle
Member
Informations:
Script adds stamina when:
-you're not in the support teams
-we must not be hungry
-stamina can not be the maximum.
In data/actions/actions.xml
In actions/scripts/stamina.lua
SS:
Script adds stamina when:
-you're not in the support teams
-we must not be hungry
-stamina can not be the maximum.
In data/actions/actions.xml
Code:
<action itemid="7632" event="script" value="stamina.lua"/>
In actions/scripts/stamina.lua
PHP:
function onUse(cid, item, frompos, item2, topos)
local config = {
staminafull = 42*60, effect = 53 }
player = getPlayerPosition(cid)
playerstamina = getPlayerStamina(cid)
playeracc = getPlayerAccess(cid)
playerfood = getPlayerFood(cid)
if playeracc <= 2 then
if playerfood ~= 0 then
if playerstamina ~= config.staminafull then
setPlayerStamina(cid, config.staminafull)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,22,"Stamina added by Energy shot!")
doSendMagicEffect(player, config.effect)
else
doPlayerSendTextMessage(cid,22,"You Dont need a Energy shot!")
end
else
doPlayerSendTextMessage(cid,22,"You Can NOT be hungry!")
end
else
doPlayerSendTextMessage(cid,22,"You are Member Of Suppot. You dont Need it!")
end
return true
end
SS:
YoS(Tibia.net.pl)
Last edited: