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

Talking Teleports (tfs 0.2.15 mystic spirit 9.8)

Alaa Adel

Basic Mapper
Joined
Mar 2, 2014
Messages
231
Reaction score
8
Hello everybody :)
Few weeks ago i found a script that makes my teleports make effects and say words ... but, i've changed my server from TFS 0.2.11 (9.1) to TFS 0.2.15 (9.8), and now the script doesn't work on this version of TFS.
So, anyone can help?
Thank you.
 
There is no errors... but there is no texts or something...
here's the script:
local config = {
positions = {
{pos = {x = 97, y = 115, z = 7}, text = "Dragons", effects = {CONST_ME_MAGIC_BLUE}},
{pos = {x = 101, y = 120, z = 7}, text = "Trainer"}
},
effects = {CONST_ME_POFF, CONST_ME_TELEPORT, CONST_ME_MAGIC_RED}
}

function onThink(interval)
local people = getOnlinePlayers()
if #people == 0 then
return true
end

for _, info in pairs(config.positions) do
doCreatureSay(getPlayerByName(people[1]), info.text, TALKTYPE_ORANGE_1, false, 0, info.pos)
if info.effects and #info.effects > 0 then
doSendMagicEffect(info.pos, info.effects[math.random(#info.effects)])
elseif config.effects and #config.effects > 0 then
doSendMagicEffect(info.pos, config.effects[math.random(#config.effects)])
end
end
return true
end
 
It's a bug in the source of TFS 0.2.15, globalevents there only load on startup or reload but they don't repeat, you can try to use the globalevents.cpp from an older 0.2 version and then recompile.
 
Back
Top