Hi I wonder if it is possible to time or whatever you call exausted
used tfs 1.0, it does not work time followed
used tfs 1.0, it does not work time followed
Code:
local c = {
Level = 8, -- Nivel requerido.
Time = 200, -- Segundos de exhaustion.
Storage = 2333, -- StorageKey que gustes.
MonsName = "banshee", -- "Nombre" del monstruo.
MonsteTP = {x=31793, y=31898, z=5}, -- Coordenada donde aparecerá el monstruo.
PlayerTP = {x=31791, y=31896, z=5}, -- Coordenada donde aparecerá el jugador.
}
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= c.Level then
if os.time(t) > getGlobalStorageValue(c.Storage) then
doSummonCreature(c.MonsName, c.MonsteTP)
doTeleportThing(cid, c.PlayerTP, false)
doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
setGlobalStorageValue(cid, c.Storage, (os.time(t) + c.Time))
else
doPlayerSendCancel(cid, 'Waiting '..getGlobalStorageValue(c.Storage) - os.time(t)..' sec')
doSendMagicEffect(topos, CONST_ME_POFF)
end
else
doSendMagicEffect(topos, CONST_ME_POFF)
end
return doTransformItem(item.uid, item.itemid == 9825 and 9826 or 9825)
end