Hello Guys
I have a problem in my Script Teleport Effect does not work?
How i can fix it. After Close Get bordcast, With the adjustment of every minute broadcast the castle is online
Like That photo
I have a problem in my Script Teleport Effect does not work?
How i can fix it. After Close Get bordcast, With the adjustment of every minute broadcast the castle is online
Like That photo
Lua:
function onTime(interval)
local config = {
pos = {x=1675, y=1483, z=5}, -- Posiçمo aonde sera criado o teleport
topos = {x=1675, y=1480, z=4}, -- Posiçمo pra onde o teleport ira levar o player
tpid = 1387, -- id do teleport
time = 60 -- tempo que o teleport ira sumir em minutos
}
function DelTp()
local t = getTileItemById(config.pos, config.tpid)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(config.pos, CONST_ME_POFF)
end
end
function countPos(pos,tempo)
if tempo > 0 then
doSendAnimatedText(pos,tempo,TEXTCOLOR_YELLOW)
addEvent(countPos,1000,pos,tempo-1)
else
doSendMagicEffect(pos,2)
end
end
doItemSetAttribute(doCreateTeleport(1387, config.topos, config.pos), "aid", 1749)
doBroadcastMessage("Event Castle24 open 60 minutos")
setGlobalStorageValue(16505, 1)
addEvent(DelTp, config.time*60*1000)
addEvent(setGlobalStorageValue, config.time*60*1000, 16505, -1)
countPos(var.pos,20)
return true
end
Last edited: