Toda vez que o player pisa no Tile o evento de cura é chamado, e toda vez que tu sai ele para, se ficar pisando toda hora vai healar rapido mesmo porque sempre chama o evento quando pisa, tenta assim :
local config = { storageum = 11155, _soul = 3, seg = 2, effect = 0, evento = nil } function Soul(cid) if isPlayer(cid) then doSendMagicEffect(getThingPos(cid), config.effect) doPlayerAddSoul(cid, config._soul) config.evento = addEvent(Soul, 1000*config.seg, cid) doSendAnimatedText(getCreaturePosition(cid), "HEALTH", 170) end end function onStepIn(cid, item, pos, topos) if isPlayer(cid) and getPlayerStorageValue(cid, config.storageum) < os.time() then setPlayerStorageValue(cid, config.storageum, os.time() + config.seg*10) Soul(cid) else doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 22, "Voce nao pode retornar agora, espere por 20 segundos!") doTeleportThing(cid, topos) end return true end function onStepOut(cid, item, pos) stopEvent(config.evento) doSendAnimatedText(getCreaturePosition(cid), "STOP", 180) end
Tem que adicionar as tag StepIn e StepOut no movements.xml
<movevent type="StepIn" actionid="action_id_tile" event="script" value="arquivolua.lua"/> <movevent type="StepOut" actionid="action_id_tile" event="script" value="arquivolua.lua"/>




info
Grupo: Campones
Registrado: 21/06/13
Posts: 11
Reputação: 0
Char no Tibia: Shadow Chrome
Editado Novembro 14 por ivonebruno01