Se alguém conseguir oque ?
Por uma placa TP ? '-'
Uma placa que faz com que teleport o player, porém, somente de 1 em 1 hr ?
Se sim:
local config = {
pos = {x = 160, y = 54, z = 7}, --Pos para onde vai o indivíduo.
storage = 838939, -- Não mecha
}
function convertTime(time)
local t_table = {}
t_table.days = math.floor(time / 86400)
time = time - (t_table.days * 86400)
t_table.hours = math.floor(time / 3600)
time = time - (t_table.hours * 3600)
t_table.minutes = math.floor(time / 60)
t_table.seconds = time - (t_table.minutes * 60)
return t_table
end
function onUse(cid, item, fromPosition, toPosition)
if item.actionid == 5003 then
if getPlayerStorageValue(cid, config.storage) >= 1 then
local time_model = "%d minuto(s) e %d segundo(s)."
local timeLeft = convertTime(getPlayerStorageValue(cid, config.storage) - os.time())
local str = "Desculpe, mas você só poderá clicar neste item novamente depois de "..time_model:format(timeLeft.minutes, timeLeft.seconds).."."
doPlayerSendTextMessage(cid, 27, str)
return doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
else
setPlayerStorageValue(cid, config.storage, os.time() + 1 * 60 * 60)
doTeleportThing(cid, config.pos)
doSendMagicEffect(getThingPos(cid), 37)
return doSendAnimatedText(getThingPos(cid), "Teleport!", math.random(1,255))
end
end
return true
end





info
Grupo: Cavaleiro
Registrado: 17/06/15
Posts: 177
Reputação: +9
Char no Tibia: GOD Server
Nenhum Foi mais deixa botei 1 porta , se alguem conseguir ponhar 1 placa tp pra
teleporta porem pra clika denovo na placa 1 hora