• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved How to add words above teleports

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
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
 
oh yeah lol i get this
[19/10/2014 23:13:50] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/effects.lua:13: '}' expected (to close '{' at line 9) near 'CONST_ME_STONES'
[19/10/2014 23:13:50] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)
[19/10/2014 23:13:50] data/globalevents/scripts/effects.lua:13: '}' expected (to close '{' at line 9) near 'CONST_ME_STONES'
 
you need to add a "," at the end of the variables
like this
Code:
effects = {
CONST_ME_MAGIC_RED,
CONST_ME_MAGIC_GREEN,
CONST_ME_MORTEREA,
CONST_ME_STONES,
CONST_ME_ICEATTACK
},
 
Back
Top