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

Effects

princemido

New Member
Joined
Mar 27, 2014
Messages
14
Reaction score
0
Hello Otland
I Need Help In My Effects
clear.png

it give me this
Code:
27/03/2014 22:54:35] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/effects.lua:8: '}' expected (to close '{' at line 2) near '['
[27/03/2014 22:54:35] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)

Plz I Need Help Fast
 
HERE
Code:
local config = {
newpositions = {
  ["Welcome"] = { x = 1000, y = 1000, z = 7 },
  ["Hunt Spot"] = { x = 1007, y = 1001, z = 7 },
  ["Quests"] = { x = 99, y = 996, z = 7 },
  ["Trainers"] = { x = 10, y = 995, z = 7 },
  ["low tps"] = {x = 1007, y = 997, z = 7}
  ["Shops"] ={x = 1022, y = 983, z = 7}
  ["Depot"] = {x = 1007, y = 1003, z = 7},
  ["arena"] = { x = 1007, y = 995, z = 7 },
  ["COME SEE!"] = { x = 1007, y = 993, z = 7 },
},

effects = {
  CONST_ME_MAGIC_BLUE,
  CONST_ME_MAGIC_GREEN,
},

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
for text, pos in pairs(config.newpositions) do
  doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
  doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
return TRUE
end
 
Change for this:
Code:
local config = {
["Welcome"] = { x = 1000, y = 1000, z = 7 },
["Hunt Spot"] = { x = 1007, y = 1001, z = 7 },
["Quests"] = { x = 99, y = 996, z = 7 },
["Trainers"] = { x = 10, y = 995, z = 7 },
["low tps"] = {x = 1007, y = 997, z = 7}
["Shops"] ={x = 1022, y = 983, z = 7}
["Depot"] = {x = 1007, y = 1003, z = 7},
["arena"] = { x = 1007, y = 995, z = 7 },
["COME SEE!"] = { x = 1007, y = 993, z = 7 },
},

effects = {
CONST_ME_MAGIC_BLUE,
CONST_ME_MAGIC_GREEN,
},

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
for text, pos in pairs(config.newpositions) do
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
return TRUE
end
end
 
hey effects give me error again
[28/03/2014 00:03:49] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/effects.lua:7: '}' expected (to close '{' at line 1) near '['
[28/03/2014 00:03:49] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)
[28/03/2014 00:03:49] data/globalevents/scripts/effects.lua:7: '}' expected (to close '{' at line 1) near '['
 
Code:
local config = {
["Welcome"] = { x = 1000, y = 1000, z = 7 },
["Hunt Spot"] = { x = 1007, y = 1001, z = 7 },
["Quests"] = { x = 99, y = 996, z = 7 },
["Trainers"] = { x = 10, y = 995, z = 7 },
["low tps"] = {x = 1007, y = 997, z = 7}
["Shops"] ={x = 1022, y = 983, z = 7}
["Depot"] = {x = 1007, y = 1003, z = 7},
["arena"] = { x = 1007, y = 995, z = 7 },
["COME SEE!"] = { x = 1007, y = 993, z = 7 },
},

colors = {
TEXTCOLOR_WHITE,
TEXTCOLOR_ORANGE,
TEXTCOLOR_GREEN,
TEXTCOLOR_BLUE
}
}

function onThink(cid, interval, lastExecution)
for text, pos in pairs(config.positions) do
doSendMagicEffect(pos, 61)
doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
for text, pos in pairs(config.newpositions) do
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
return TRUE
end
end

If it isnt alredy solved
 
Code:
local config = {
["Welcome"] = { x = 1000, y = 1000, z = 7 },
["Hunt Spot"] = { x = 1007, y = 1001, z = 7 },
["Quests"] = { x = 99, y = 996, z = 7 },
["Trainers"] = { x = 10, y = 995, z = 7 },
["low tps"] = {x = 1007, y = 997, z = 7}
["Shops"] ={x = 1022, y = 983, z = 7}
["Depot"] = {x = 1007, y = 1003, z = 7},
["arena"] = { x = 1007, y = 995, z = 7 },
["COME SEE!"] = { x = 1007, y = 993, z = 7 },
},

colors = {
TEXTCOLOR_WHITE,
TEXTCOLOR_ORANGE,
TEXTCOLOR_GREEN,
TEXTCOLOR_BLUE
}
}

function onThink(cid, interval, lastExecution)
for text, pos in pairs(config.positions) do
doSendMagicEffect(pos, 61)
doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
for text, pos in pairs(config.newpositions) do
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
return TRUE
end
end

If it isnt alredy solved
dont work
clear.png

it gave me this error
Code:
[29/03/2014 09:25:09] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/effects.lua:7: '}' expected (to close '{' at line 1) near '['
[29/03/2014 09:25:09] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)
[29/03/2014 09:25:09] data/globalevents/scripts/effects.lua:7: '}' expected (to close '{' at line 1) near '['
 
dont work
clear.png

it gave me this error
Code:
[29/03/2014 09:25:09] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/effects.lua:7: '}' expected (to close '{' at line 1) near '['
[29/03/2014 09:25:09] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)
[29/03/2014 09:25:09] data/globalevents/scripts/effects.lua:7: '}' expected (to close '{' at line 1) near '['

Code:
local config = {
    ["Welcome"] = { x = 1000, y = 1000, z = 7 },
    ["Hunt Spot"] = { x = 1007, y = 1001, z = 7 },
    ["Quests"] = { x = 99, y = 996, z = 7 },
    ["Trainers"] = { x = 10, y = 995, z = 7 },
    ["low tps"] = {x = 1007, y = 997, z = 7},
    ["Shops"] ={x = 1022, y = 983, z = 7},
    ["Depot"] = {x = 1007, y = 1003, z = 7},
    ["arena"] = { x = 1007, y = 995, z = 7 },
    ["COME SEE!"] = { x = 1007, y = 993, z = 7 }
}

colors = {
    TEXTCOLOR_WHITE,
    TEXTCOLOR_ORANGE,
    TEXTCOLOR_GREEN,
    TEXTCOLOR_BLUE
}


function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
        doSendMagicEffect(pos, 61)
        doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
    end
    for text, pos in pairs(config.newpositions) do
        doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
        doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
    end
    return TRUE
    end
end

Was some typos in @Himii s code

EDIT: Nvm about this code, it is totally weird, to lazy to look into it. (Not like LUA anymore :( )
 
Last edited:
Back
Top