Hello i just got tfs 0.4 on my server and now my globalevents "effect" which cast texts to show for example where hunt teleport it, is bugged!!!
It works but it spams the words i have like 5 text per sec, instead of 1per sec(or 1 popup per 3 sec)
script:
globalevents.xml
help me, with whats wrong
It works but it spams the words i have like 5 text per sec, instead of 1per sec(or 1 popup per 3 sec)
script:
Code:
local config = {
positions = {
["Welcome!"] = { x = 2000, y = 2000, z = 7 },
["Training"] = { x = 1995, y = 1995, z = 7 },
["Hunts"] = { x = 1993, y = 1995, z = 7 },
["Events"] = { x = 1997, y = 1995, z = 7 },
["Depot"] = { x = 1999, y = 1995, z = 7 },
["Don Room"] = { x = 2001, y = 1995, z = 7 },
["Quests"] = { x = 2003, y = 1995, z = 7 },
["Tetris"] = { x = 3996, y = 4003, z = 7 },
["Start"] = { x = 1997, y = 1999, z = 7 },
["VIP"] = { x = 2004, y = 2001, z = 7 },
["More"] = {x = 1991, y = 1985, z = 7},
},
effects = {
CONST_ME_MAGIC_BLUE,
CONST_ME_MAGIC_GREEN,
CONST_ME_MORTAREA
},
colors = {
TEXTCOLOR_WHITE,
TEXTCOLOR_ORANGE,
TEXTCOLOR_GREEN,
TEXTCOLOR_BLUE
}
}
function onThink(cid, interval, lastExecution)
for text, pos in pairs(config.positions) do
doSendMagicEffect(pos, config.effects[math.random(1, #config.effects)])
doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
return TRUE
end
globalevents.xml
Code:
<globalevent name="effects" interval="1" event="script" value="effects.lua"/>
help me, with whats wrong