LekoDS dei uma resumida no seu script, obs: não testei ele!!
STAMINA_MESSAGE = "TEXTO AQUI"
STAMINA_TIME = 3 * 1000
STAMINA_EFFECT = 12
STAMINA_ADD = 60
function event(cid, time, loop)
doPlayerSendTextMessage(cid, 27, STAMINA_MESSAGE)
doPlayerAddStamina(cid, STAMINA_TIME, STAMINA_ADD)
doSendMagicEffect(cid, getThingPos(cid), STAMINA_EFFECT)
if loop == true then
event_x = addEvent(event, STAMINA_TIME, cid, true)
end
end
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then
return false
end
event_x = addEvent(event, STAMINA_TIME, cid, true)
return true
end
function onStepOut(cid, item, position, fromPosition)
doPlayerSendTextMessage(cid, 27, "You failed to regenerate stamina.")
stopEvent(event_x)
return true
end