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

The Forgotten Server 8.60 V4 version 0.3.6 V4

Arkangel Nyx

Member
Joined
Feb 23, 2012
Messages
176
Reaction score
6
Location
U.S.A.
Is there any reason this server can't read mods? Or am i just missing something. It doesnt recognize the <mod> symbol.

error: [01/08/2012 17:02:09] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/ctf.lua:1: unexpected symbol near '<'
[01/08/2012 17:02:09] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/ctf.lua)
[01/08/2012 17:02:09] data/globalevents/scripts/ctf.lua:1: unexpected symbol near '<'

script:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="ctf" enabled="yes">
<config name="ctf_config"><![CDATA[
waitingRoom = {
fromPos = {x = 16781,y = 16573,z = 5},
toPos = {x = 16791, y = 16577, z = 5}
}
redPlayers = 1200
bluePlayers = 2200

redGoal = 3200
blueGoal = 4200

redFlag = 5200
blueFlag = 5520

ctf = {
redPos = {x=16762,y=16575,z=7},
bluePos = {x=16812,y=16575,z=7}
}

temple = {x = 32345, y = 32220, z = 7}
]]></config>
<globalevent name="onstartup_ctf" type="start" event="script"><![CDATA[
domodlib("ctf_config")
setGlobalStorageValue(redGoal, 0)
setGlobalStorageValue(blueGoal, 0)
setGlobalStorageValue(redFlag, -1)
setGlobalStorageValue(blueFlag, -1)
db.executeQuery("DELETE FROM `player_storage` WHERE `key` = " .. redFlag .. ";")
db.executeQuery("DELETE FROM `player_storage` WHERE `key` = " .. blueFlag .. ";")
db.executeQuery("DELETE FROM `player_storage` WHERE `key`= " .. redPlayers .. ";")
db.executeQuery("DELETE FROM `player_storage` WHERE `key` = " .. bluePlayers .. ";")
return true
]]></globalevent>
<globalevent name="start_ctf" interval="6000000" event="script"><![CDATA[
domodlib("ctf_config")
setGlobalStorageValue(3200, 0)
setGlobalStorageValue(4200, 0)
setGlobalStorageValue(5200, -1)
setGlobalStorageValue(5520, -1)
db.executeQuery("DELETE FROM `player_storage` WHERE `key` = " .. 5200 .. ";")
db.executeQuery("DELETE FROM `player_storage` WHERE `key` = " .. 5520 .. ";")
db.executeQuery("DELETE FROM `player_storage` WHERE `key`= " .. 1200 .. ";")
db.executeQuery("DELETE FROM `player_storage` WHERE `key` = " .. 2200 .. ";")
local red, blue = {}, {}
local conditionBlue = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditionBlue, CONDITION_PARAM_TICKS, 1800 * 1000)
addOutfitCondition(conditionBlue, {lookType = 130, lookHead = 87, lookBody = 87, lookLegs = 87, lookFeet = 87})
local conditionRed = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditionRed, CONDITION_PARAM_TICKS, 1800 * 1000)
addOutfitCondition(conditionRed, {lookType = 130, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94})

local function getPlayers(from, to)
local list = {}
for x = from.x, to.x do
for y = from.y, to.y do
for z = from.z, to.z do
local creature = getTopCreature({x =x , y =y, z = z}).uid
if isPlayer(creature) then
table.insert(list, creature)
end
end
end
end
return list
end
local function finishThis()
local t = getPlayers(waitingRoom.fromPos, waitingRoom.toPos)
if #t == 1 then
doPlayerSendTextMessage(t[1], 27, "Find another player to play with.")
doTeleportThing(t[1], temple, true)
elseif #t == 2 then
table.insert(red, t[1])
table.insert(blue, t[2])
elseif #t == 3 then
table.insert(red, t[2])
table.insert(blue, t[3])
table.insert(red, t[1])
elseif #t == 4 then
table.insert(red, t[1])
table.insert(blue, t[2])
table.insert(red, t[3])
table.insert(blue, t[4])
elseif #t == 5 then
table.insert(red, t[1])
table.insert(blue, t[2])
table.insert(red, t[3])
table.insert(blue, t[4])
table.insert(red, t[5])
elseif #t == 6 then
table.insert(red, t[1])
table.insert(blue, t[2])
table.insert(red, t[3])
table.insert(blue, t[4])
table.insert(red, t[5])
table.insert(blue, t[6])
elseif #t == 7 then
table.insert(red, t[1])
table.insert(blue, t[2])
table.insert(red, t[3])
table.insert(blue, t[4])
table.insert(red, t[5])
table.insert(blue, t[6])
table.insert(red, t[7])
elseif #t == 8 then
table.insert(red, t[1])
table.insert(blue, t[2])
table.insert(red, t[3])
table.insert(blue, t[4])
table.insert(red, t[5])
table.insert(blue, t[6])
table.insert(red, t[7])
table.insert(blue, t[8])
elseif #t == 9 then
table.insert(red, t[1])
table.insert(blue, t[2])
table.insert(red, t[3])
table.insert(blue, t[4])
table.insert(red, t[5])
table.insert(blue, t[6])
table.insert(red, t[7])
table.insert(blue, t[8])
table.insert(red, t[9])
elseif #t == 10 then
table.insert(red, t[1])
table.insert(blue, t[2])
table.insert(red, t[3])
table.insert(blue, t[4])
table.insert(red, t[5])
table.insert(blue, t[6])
table.insert(red, t[7])
table.insert(blue, t[8])
table.insert(red, t[9])
table.insert(blue, t[10])
else
for _, v in ipairs(t) do
if math.random(1, 3) < 3 then
table.insert(red, v)
else
table.insert(blue, v)
end
end
end
if #red > 0 and #blue > 0 then
for _, r in ipairs(red) do
setPlayerStorageValue(r, redPlayers, 1)
doAddCondition(r, conditionRed)
doTeleportThing(r, ctf.redPos, true)
red = {}
end
for _, b in ipairs(blue) do
setPlayerStorageValue(b, bluePlayers, 1)
doAddCondition(b, conditionBlue)
doTeleportThing(b, ctf.bluePos, true)
blue = {}
end
end
return true
end
local function teleport()
addEvent(doBroadcastMessage, 1000, "Capture The Flag will begin in 5 minutes.")
addEvent(doBroadcastMessage, 60 * 1 * 1000, "Capture The Flag will begin in 4 minutes.")
addEvent(doBroadcastMessage, 60 * 2 * 1000, "Capture The Flag will begin in 3 minutes.")
addEvent(doBroadcastMessage, 60 * 3 * 1000, "Capture The Flag will begin in 2 minutes.")
addEvent(doBroadcastMessage, 60 * 4 * 1000, "Capture The Flag will begin in 1 minute.")
addEvent(doBroadcastMessage, 57 * 5 * 1000, "Capture The Flag will begin in 15 seconds.")
addEvent(finishThis, 5 * 60 * 1000)
end
function onThink(interval)
return teleport()
end
]]></globalevent>

<movevent type="StepIn" actionid="6000-6001" event="script"><![CDATA[
domodlib("ctf_config")
local function repeatFlag(cid)
local k = getThingPos(cid)
local r = {
{pos = {x = k.x + 2, y = k.y - 2, z = k.z}, delay = 300},
{pos = {x = k.x + 2, y = k.y + 2, z = k.z}, delay = 300},
{pos = {x = k.x - 2, y = k.y + 2, z = k.z}, delay = 300},
{pos = {x = k.x - 2, y = k.y, z = k.z}, delay = 300},
{pos = {x = k.x - 2, y = k.y - 2, z = k.z}, delay = 300},
{pos = {x = k.x, y = k.y - 2, z = k.z}, delay = 300}
}
local effects = {27, 28, 29, 30}
if getPlayerStorageValue(cid, redFlag) == 1 or getPlayerStorageValue(cid, blueFlag) == 1 then
for i = 1, 6 do
addEvent(doSendDistanceShoot, r.delay, r.pos, k, CONST_ME_FIREWORK_YELLOW)
end
for i = 1, 4 do
addEvent(doSendMagicEffect, 1000, getThingPos(cid), effects)
end
return addEvent(repeatFlag, 2 * 1000, cid)
end
return true
end
function onStepIn(cid, item, position, fromPosition, toPosition, lastPosition, actor)
if isPlayer(cid) then
if item.actionid == 6001 then --red team
if getPlayerStorageValue(cid, bluePlayers) == 1 then
if getPlayerStorageValue(cid, redFlag) == -1 and getGlobalStorageValue(redFlag) == -1 then
setPlayerStorageValue(cid, redFlag, 1)
setGlobalStorageValue(redFlag, 1)
doBroadcastMessage(getCreatureName(cid) .. " has stolen the Red Flag!")
repeatFlag(cid)
else
doCreatureSay(cid, "The flag is not at home!", 19)
doTeleportThing(cid, fromPosition)
end
elseif getPlayerStorageValue(cid, redPlayers) == 1 then
if getGlobalStorageValue(redFlag) == -1 then
if getPlayerStorageValue(cid, blueFlag) == 1 and getGlobalStorageValue(blueFlag) == 1 then
setPlayerStorageValue(cid, blueFlag, -1)
setGlobalStorageValue(blueFlag, -1)
doBroadcastMessage(getCreatureName(cid) .. " has scored 1 point to the Red Team!")
setGlobalStorageValue(redGoal, getGlobalStorageValue(redGoal)+1)
doBroadcastMessage("Current CTF Game Score:\nRed Team: " .. getGlobalStorageValue(redGoal) .. "\nBlue Team: " .. getGlobalStorageValue(blueGoal) .. "\nTen scores to win!", 19)
else
doCreatureSay(cid, "You dont have the flag!", 19)
doTeleportThing(cid, fromPosition)
end
else
doCreatureSay(cid, "Return your flag firstly", 19)
doTeleportThing(cid, fromPosition)
end
else
doPlayerSendTextMessage(cid, 27, "Your not in any team, try reporting this to gamemaster?")
doTeleportThing(cid, temple, true)
end
elseif item.actionid == 6000 then --blue team
if getPlayerStorageValue(cid, redPlayers) == 1 then
if getPlayerStorageValue(cid, blueFlag) == -1 and getGlobalStorageValue(blueFlag) == -1 then
setPlayerStorageValue(cid, blueFlag, 1)
setGlobalStorageValue(blueFlag, 1)
doBroadcastMessage(getCreatureName(cid) .. " has stolen the Blue Flag!")
repeatFlag(cid)
else
doCreatureSay(cid, "The flag is not at home!", 19)
doTeleportThing(cid, fromPosition)
end
elseif getPlayerStorageValue(cid, bluePlayers) == 1 then
if getGlobalStorageValue(blueFlag) == -1 then
if getPlayerStorageValue(cid, redFlag) == 1 and getGlobalStorageValue(redFlag) == 1 then
setPlayerStorageValue(cid, redFlag, -1)
setGlobalStorageValue(redFlag, -1)
doBroadcastMessage(getCreatureName(cid) .. " has scored 1 point to Blue Team!")
setGlobalStorageValue(blueGoal, getGlobalStorageValue(blueGoal)+1)
doBroadcastMessage("Current CTF Game Score:\nRed Team: " .. getGlobalStorageValue(redGoal) .. "\nBlue Team: " .. getGlobalStorageValue(blueGoal) .. "\nTen scores to win!", 19)
else
doCreatureSay(cid, "You dont have the flag!", 19)
doTeleportThing(cid, fromPosition)
end
else
doCreatureSay(cid, "Return your flag firstly", 19)
doTeleportThing(cid, fromPosition)
end
else
doPlayerSendTextMessage(cid, 27, "Your not in any team, try reporting this to gamemaster?")
doTeleportThing(cid, temple, true)
end
end
if getGlobalStorageValue(redGoal) == 10 and getGlobalStorageValue(blueGoal) < 10 then
doBroadcastMessage("Red Team has won the event!", 27)
for _, cid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, redPlayers) == 1 then
doPlayerAddItem(cid, 9971, math.random(3, 7))
doTeleportThing(cid, temple, true)
doRemoveCondition(cid, CONDITION_OUTFIT)
elseif getPlayerStorageValue(cid, bluePlayers) == 1 then
doTeleportThing(cid, temple, true)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
if getPlayerStorageValue(cid, redFlag) == 1 then
setPlayerStorageValue(cid, redFlag, -1)
end
if getPlayerStorageValue(cid, blueFlag) == 1 then
setPlayerStorageValue(cid, blueFlag, -1)
end
end
setGlobalStorageValue(blueGoal, 0)
setGlobalStorageValue(redGoal, 0)
setGlobalStorageValue(redFlag, -1)
setGlobalStorageValue(blueFlag, -1)
elseif getGlobalStorageValue(blueGoal) == 10 and getGlobalStorageValue(redGoal) < 10 then
doBroadcastMessage("Blue Team has won the event!", 27)
for _, cid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, bluePlayers) == 1 then
doPlayerAddItem(cid, 9971, math.random(3, 7))
doTeleportThing(cid, temple, true)
doRemoveCondition(cid, CONDITION_OUTFIT)
elseif getPlayerStorageValue(cid, redPlayers) == 1 then
doTeleportThing(cid, temple, true)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
if getPlayerStorageValue(cid, redFlag) == 1 then
setPlayerStorageValue(cid, redFlag, -1)
end
if getPlayerStorageValue(cid, blueFlag) == 1 then
setPlayerStorageValue(cid, blueFlag, -1)
end
end
setGlobalStorageValue(blueGoal, 0)
setGlobalStorageValue(redGoal, 0)
setGlobalStorageValue(redFlag, -1)
setGlobalStorageValue(blueFlag, -1)
end
else
doRemoveCreature(cid)
end
return true
end
]]></movevent>
</mod>
 
Mods go to mods folder and globalevents go to globalevents folder? You are trying to put mod to globalevents. Correct me if i am wrong.
 
Never give up! I have no experience with mods either but i was just guessing they should be in mods folder, anyways whats the problem now? People here might be able to solve your problem.
 
Doubt it man, people rarely answer me in support. Honestly, i hardly ever come to otland for help anymore...everything i have ever needed help with i ALWAYS end up having to just figure it out on my own :P, not a very helpful forum anymore.
 
Back
Top