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

My Globalevents repeat only once, please help!!

fexark

New Member
Joined
May 3, 2009
Messages
89
Reaction score
0
Guys i have setted up a globalevent of talking tps and it works but it does only once and then stops doing, i have my interval on each 3 second and nothing, only once!! please help
Im using tfs 0.2.1
+repp
 
Interval 3 but it doesnt work with any, i have tried both :p I say reloadglobalevens it does once and then stops :S
 
local text = {
--X pos,Y pos, Z pos, text
[1] = {pos = {283,2047,6}, text = {"text 1"}},
[2] = {pos = {1096,1217,7}, text = {"text 2"}},
[3] = {pos = {1097,1217,7}, text = {"text 3"}},
[4] = {pos = {1098,1217,7}, text = {"text 4"}}
}

local effects = {
--X pos,Y pos, Z pos, text
[1] = {pos = {1095,1217,7}, effect = {18}},
[2] = {pos = {1096,1217,7}, effect = {19}},
[3] = {pos = {1097,1217,7}, effect = {21}},
[4] = {pos = {1098,1217,7}, effect = {22}}
}

function onThink(interval, lastExecution)
for _, area in pairs(text) do
doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
addEvent(animated, 5000)
end
for _, area in pairs(effects) do
doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
end
return TRUE
end

function animated ()
for _, area in pairs(text) do
doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
addEvent(animated, 5000)
end
for _, area in pairs(effects) do
doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
end
return TRUE
end

<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
<globalevent type="record" name="PlayerRecord" script="record.lua"/>
<globalevent name="reclame" interval="900" script="reclame.lua"/>
</globalevents>
 
Lua:
<globalevent name="reclame" interval="900" script="reclame.lua"/>
It works, just starts the event every 900 sec (15 minutes)
 
dude, idk why but it only does once :p, then it stops works, if u help me fix this, i donate you some euros pls help!!
I have it like that to say every 15 min but only does once then stops and does anymore :S
 
dude, idk why but it only does once :p, then it stops works, if u help me fix this, i donate you some euros pls help!!
I have it like that to say every 15 min but only does once then stops and does anymore :S

Actually it should start only once, because there's an open event there.
 
Back
Top