• 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!

Help Needed, Adding Talking Teleport to existing Global Event...

Frederus

Member
Joined
Jun 24, 2009
Messages
45
Reaction score
5
Location
UK - London
Hi All i have a Last Man Standing event that runs every 15 mins but i want the teleport to say what it is rather than having a random teleport on the floor.... but i only want it to "Talk" whilst the event portal is active..

I have had a look around Otland and couldnt seem to find what i was looking for....
Found lots of talking tp scripts but nothing specific to existing events...

Following this i tried a couple of times to add the talking tp script to my event script but it didnt seem to work and ended up bugging the event.

I have posted the event script im using below if someone could assist me, ill give ya a kiss??? :D - If kiss is unwanted i suppose ill drop you a like :p

TFS 0.3.6 Protocol 8.6
Code:
local createpos = {x=32346,y=32231,z=7} -- Every 15min where will the Teleport Appear
local topos = {x=33551,y=32102,z=7} -- Where will the Teleport take you
local msg = "Last man standing event TP has now been closed! It will open again in 15 minutes! All participants get Ready for a Fight!"
local timetoclose = 180 -- in second

local function remove()
local tp = getTileItemById(createpos,1387).uid
if tp ~= 0 then
doRemoveItem(tp)
doBroadcastMessage(msg)
end
end

function onThink(interval)
doCreateTeleport(1387, topos, createpos)
doBroadcastMessage("Last man standing event TP is now open!\nCatch the teleport within "..timetoclose.." seconds! Teleport is Located in Thais Depot.")
addEvent(remove,timetoclose*1000)
return true
end
 
Last edited:
This might work for you.
Code:
local tpPosition = {x = 32346, y = 32231, z = 7}

local text = {
    [1] = {text = "text 1", effect = 18},
    [2] = {text = "text 2", effect = 19},
    [3] = {text = "text 3", effect = 21},
    [4] = {text = "text 4", effect = 22}
}

function onThink(interval)
    if getTileItemById(tpPosition, 1387).uid ~= 0 then
        for _, area in ipairs(text) do
            doSendAnimatedText(tpPosition, area.text, math.random(01, 255))
            doSendMagicEffect(tpPosition, area.effect)
        end
    end
    return true
end
 
Last edited:
This might work for you.
Code:
local tpPosition = {x = 32346, y = 32231, z = 7}

local text = {
    [1] = {text = "text 1", effect = 18},
    [2] = {text = "text 2", effect = 19},
    [3] = {text = "text 3", effect = 21},
    [4] = {text = "text 4", effect = 22}
}

function onThink(interval)
    if getTileItemById(tpPosition, 1387).uid ~= 0 then
        for _, area in ipairs(text) do
            doSendAnimatedText(tpPosition, area.text, math.random(01, 255))
            doSendMagicEffect(tpPosition, area.effect)
        end
    end
    return true
end

Thanks but this is not merged with my script so it wont work.... i dont think.
ill have a try at merging together myself but thanks.
 
Code:
local createpos = {x=32346,y=32231,z=7} -- Every 15min where will the Teleport Appear
local topos = {x=33551,y=32102,z=7} -- Where will the Teleport take you
local timetoclose = 180 -- in second

local running = false

local function remove()
    local tp = getTileItemById(createpos,1387).uid
    if tp ~= 0 then
        doRemoveItem(tp)
        doBroadcastMessage(msg)
    end
    running = false
end

local function sendText(pos, text, color)
    if running then
        doSendAnimatedText(createpos, text, color)
        addEvent(sendEffects(pos))
    end
end

function onThink(interval)
    doCreateTeleport(1387, topos, createpos)
    doBroadcastMessage("Last man standing event TP is now open!\nCatch the teleport within "..timetoclose.." seconds! Teleport is Located in Thais Depot.")
    sendEffects(createpos, 'rapist', math.random(255)
    addEvent(remove, timetoclose * 1000)
    running = true
    return true
end
 
Back
Top