Cjerzey3
New Member
- Joined
- Jul 22, 2014
- Messages
- 5
- Reaction score
- 0
ive been trying to add those like flashing words above tps like for example: trainers, spawns
i have this script in effects.lua
<globalevent name="effects" interval="0.7" event="script" value="effects.lua"/>
and that in globalevents.xml but they still arent there
Code:
local config = {
positions = {
["Quests"] = { x = 1004, y = 996, z = 7 },
["Trainers"] = { x = 1005, y = 996, z = 7 },
["Spawns"] = { x = 1006, y = 996, z = 7 },
["Exp Event"] = { x = 1007, y = 996, z = 7 },
},
effects = {
CONST_ME_MAGIC_RED,
CONST_ME_MAGIC_GREEN,
CONST_ME_MORTEREA
CONST_ME_STONES
CONST_ME_ICEATTACK
},
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
i have this script in effects.lua
<globalevent name="effects" interval="0.7" event="script" value="effects.lua"/>
and that in globalevents.xml but they still arent there