• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

long lever

lopez65

Member
Joined
May 10, 2012
Messages
294
Solutions
1
Reaction score
16
Location
Barcelona
Hi I wonder if it is possible to time or whatever you call exausted
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
 
My first script on TFS 1.0, check it:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
local player = Player(cid)
    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.
    }
    if(player:getLevel() >= c.Level) then
        if(os.time(t) > player:getStorageValue(c.Storage)) then
            doSummonCreature(c.MonsName, c.MonsteTP)
            player:teleportTo(c.PlayerTP, false)
            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            player:setStorageValue(c.Storage, (os.time(t) + c.Time))
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'Waiting '..getGlobalStorageValue(c.Storage) - os.time(t)..' sec')
            player:getPosition():sendMagicEffect(CONST_ME_POFF)
        end
    else
        player:getPosition():sendMagicEffect(CONST_ME_POFF)
    end
    return doTransformItem(item.uid, item.itemid == 9825 and 9826 or 9825)
end
 
Last edited:
sorry bro lever with your scrip did not work.
thanx for you reply


41031f6fc72106f35439703472324e97o.jpg


http://subefotos.com/ver/?41031f6fc72106f35439703472324e97o.png <-link fhoto
 
Change this
Code:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
To this
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
    local player = Player(cid)
 
Change this
Code:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
To this
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
    local player = Player(cid)


thank you very much if I run. I am very grateful thax bro (SOLBED)
 
Back
Top