[19:12:12.799] > Loading castle.xml...
[19:12:12.800] [Error - TalkAction Interface]
[19:12:12.802] domodlib('castle_config')
[19:12:12.803] domodlib('castle_lib')
[19:12:12.805] function onSay(cid, words, param)
[19:12:12.806] if getStorage(castleCfg.storage.event) ~= 1 then
[19:12:12.808] doSetStorage(castleCfg.storage.event, 1)
[19:12:12.810] doCleanCastleFighters()
[19:12:12.811] doStartCountingCastleEvent(0)
[19:12:12.813] for _, pid in ipairs(getPlayersOnline()) do
[19:12:12.816] if getCreatureStorage(pid, castleCfg.storage.winner) > 0 then
[19:12:12.819] doCreatureSetStorage(pid, castleCfg.storage.winner, -1)
[19:12:12.823] doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
[19:12:12.826] end
[19:12:12.828] end
[19:12:12.829] else
[19:12:12.830] doPlayerSendCancel(cid, 'You can not do it if "castle war" is enabled yet.')
[19:12:12.836] end
[19:12:12.837] return true
[19:12:12.839] end
[19:12:12.841]
[19:12:12.841] Description:
[19:12:12.844] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:12.849] [Error - TalkAction Interface]
[19:12:12.850] domodlib('castle_config')
[19:12:12.853] domodlib('castle_lib')
[19:12:12.855] function onSay(cid, words, param)
[19:12:12.857] if getStorage(castleCfg.storage.event) ~= 1 then
[19:12:12.859] doSetStorage(castleCfg.storage.event, 1)
[19:12:12.863] doCleanCastleFighters()
[19:12:12.865] doStartCountingCastleEvent(0)
[19:12:12.867] for _, pid in ipairs(getPlayersOnline()) do
[19:12:12.870] if getCreatureStorage(pid, castleCfg.storage.winner) > 0 then
[19:12:12.874] doCreatureSetStorage(pid, castleCfg.storage.winner, -1)
[19:12:12.876] doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
[19:12:12.880] end
[19:12:12.881] end
[19:12:12.883] else
[19:12:12.885] doPlayerSendCancel(cid, 'You can not do it if "castle war" is enabled yet.')
[19:12:12.888] end
[19:12:12.889] return true
[19:12:12.891] end
[19:12:12.893]
[19:12:12.894] Description:
[19:12:12.895] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:12.899] [Error - TalkAction Interface]
[19:12:12.903] domodlib('castle_config')
[19:12:12.905] domodlib('castle_lib')
[19:12:12.907] function onSay(cid, words, param)
[19:12:12.909] if exhaustion.check(cid, castleCfg.storage.exhaust) ~= false then
[19:12:12.911] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You must to wait a ' .. exhaustion.get(cid, castleCfg.storage.exhaust) .. ' sec.')
[19:12:12.918] end
[19:12:12.920] if getPlayerGuildId(cid) < 1 then
[19:12:12.923] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You do not have a guild!')
[19:12:12.927] end
[19:12:12.928]
[19:12:12.930] if getTileInfo(getThingPos(cid)).protection ~= true then
[19:12:12.934] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not back to castle war if are not in protection zone.')
[19:12:12.938] end
[19:12:12.939] if getStorage(castleCfg.storage.event) == 1 then
[19:12:12.944] if isGuildInCastle(getPlayerGuildId(cid)) ~= -1 then
[19:12:12.946] local randX, randY, pos = math.random(-1,1), math.random(-1,1), castleCfg.telePositions[isGuildInCastle(getPlayerGuildId(cid))]
[19:12:12.953]
[19:12:12.954] doTeleportThing(cid, {x = pos.x + randX, y = pos.y + randY, z = pos.z})
[19:12:12.958] doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
[19:12:12.962] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, 1)
[19:12:12.965]
[19:12:12.966] exhaustion.set(cid, castleCfg.storage.exhaust, castleCfg.exhaustTime * 60)
[19:12:12.970] else
[19:12:12.973] doPlayerSendCancel(cid, 'Your guild is not in castle war!')
[19:12:12.975] end
[19:12:12.977] else
[19:12:12.978] doPlayerSendCancel(cid, 'You can not do it right now!')
[19:12:12.979] end
[19:12:12.982] return true
[19:12:12.983] end
[19:12:12.984]
[19:12:12.986] Description:
[19:12:12.987] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:12.993] [Error - TalkAction Interface]
[19:12:12.995] domodlib('castle_config')
[19:12:12.996] domodlib('castle_lib')
[19:12:12.998] function onSay(cid, words, param)
[19:12:13.002] if exhaustion.check(cid, castleCfg.storage.exhaust) ~= false then
[19:12:13.005] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You must to wait a ' .. exhaustion.get(cid, castleCfg.storage.exhaust) .. ' sec.')
[19:12:13.013] end
[19:12:13.015] if getPlayerGuildId(cid) < 1 then
[19:12:13.017] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You do not have a guild!')
[19:12:13.022] end
[19:12:13.023]
[19:12:13.024] if getTileInfo(getThingPos(cid)).protection ~= true then
[19:12:13.027] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not back to castle war if are not in protection zone.')
[19:12:13.034] end
[19:12:13.035] if getStorage(castleCfg.storage.event) == 1 then
[19:12:13.039] if isGuildInCastle(getPlayerGuildId(cid)) ~= -1 then
[19:12:13.042] local randX, randY, pos = math.random(-1,1), math.random(-1,1), castleCfg.telePositions[isGuildInCastle(getPlayerGuildId(cid))]
[19:12:13.048]
[19:12:13.049] doTeleportThing(cid, {x = pos.x + randX, y = pos.y + randY, z = pos.z})
[19:12:13.054] doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
[19:12:13.058] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, 1)
[19:12:13.061]
[19:12:13.062] exhaustion.set(cid, castleCfg.storage.exhaust, castleCfg.exhaustTime * 60)
[19:12:13.066] else
[19:12:13.067] doPlayerSendCancel(cid, 'Your guild is not in castle war!')
[19:12:13.071] end
[19:12:13.073] else
[19:12:13.074] doPlayerSendCancel(cid, 'You can not do it right now!')
[19:12:13.076] end
[19:12:13.077] return true
[19:12:13.079] end
[19:12:13.081]
[19:12:13.082] Description:
[19:12:13.084] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:13.088] [Error - TalkAction Interface]
[19:12:13.091] domodlib('castle_config')
[19:12:13.093] domodlib('castle_lib')
[19:12:13.095] function onSay(cid, words, param)
[19:12:13.097] if param == 'info' then
[19:12:13.099] if getStorage(castleCfg.storage.event) == 1 and getStorage(castleCfg.storage.joinEvent) == -1 and getStorage(castleCfg.storage.time) > 0 then
[19:12:13.105] doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '[CASTLE WAR]\n\nCastle war will end in ' .. math.floor(os.difftime(getStorage(castleCfg.storage.time), os.time()) / 60) .. ' mins.')
[19:12:13.114] else
[19:12:13.115] doPlayerSendCancel(cid, 'You can not do it right now!')
[19:12:13.117] end
[19:12:13.121] return true
[19:12:13.122] elseif param == 'back' then
[19:12:13.124] if exhaustion.check(cid, castleCfg.storage.exhaust) ~= false then
[19:12:13.127] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You must to wait a ' .. exhaustion.get(cid, castleCfg.storage.exhaust) .. ' sec.')
[19:12:13.134] end
[19:12:13.136] if getPlayerGuildId(cid) < 1 then
[19:12:13.139] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You do not have a guild!')
[19:12:13.144] end
[19:12:13.145]
[19:12:13.145] if getTileInfo(getThingPos(cid)).protection ~= true then
[19:12:13.148] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not back to castle war if are not in protection zone.')
[19:12:13.154] end
[19:12:13.156] if getStorage(castleCfg.storage.event) == 1 then
[19:12:13.161] if isGuildInCastle(getPlayerGuildId(cid)) ~= -1 then
[19:12:13.163] local randX, randY, pos = math.random(-1,1), math.random(-1,1), castleCfg.telePositions[isGuildInCastle(getPlayerGuildId(cid))]
[19:12:13.168]
[19:12:13.172] doTeleportThing(cid, {x = pos.x + randX, y = pos.y + randY, z = pos.z})
[19:12:13.175] doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
[19:12:13.178] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, 1)
[19:12:13.183]
[19:12:13.184] exhaustion.set(cid, castleCfg.storage.exhaust, castleCfg.exhaustTime * 60)
[19:12:13.187] else
[19:12:13.188] doPlayerSendCancel(cid, 'Your guild is not in castle war!')
[19:12:13.193] end
[19:12:13.194] else
[19:12:13.195] doPlayerSendCancel(cid, 'You can not do it right now!')
[19:12:13.198] end
[19:12:13.200] return true
[19:12:13.202] end
[19:12:13.204]
[19:12:13.204] if getStorage(castleCfg.storage.joinEvent) == 1 then
[19:12:13.207] if castleCfg.guildsMinMax.max > getCastleFightingGuilds() then
[19:12:13.211] if getPlayerGuildId(cid) < 1 then
[19:12:13.213] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You do not have a guild!')
[19:12:13.217] end
[19:12:13.221] if getPlayerLevel(cid) < castleCfg.minLevel then
[19:12:13.223] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not sing up your guild to castle war if you do not have a require level. [' .. castleCfg.minLevel .. ']')
[19:12:13.230] end
[19:12:13.232] if getTileInfo(getThingPos(cid)).protection ~= true then
[19:12:13.234] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not sing up your guild to castle war if are not in protection zone.')
[19:12:13.241] end
[19:12:13.243] if isGuildInCastle(getPlayerGuildId(cid)) ~= -1 then
[19:12:13.245] return doPlayerSendCancel(cid, 'You can not use this talkactions 2 times!')
[19:12:13.250] end
[19:12:13.252] if getPlayerGuildLevel(cid) >= GUILDLEVEL_LEADER then
[19:12:13.255] local guildMembers = getCastleGuildMembers(getPlayerGuildId(cid), false)
[19:12:13.260] if castleCfg.minMembers.p >= #getPlayersOnline() then
[19:12:13.262] if #guildMembers < castleCfg.minMembers.first then
[19:12:13.265] return doPlayerSendCancel(cid, 'You don\'t have a '..castleCfg.minMembers.first..' guild members online or someone isn\'t standing in protection zone!')
[19:12:13.272] end
[19:12:13.273] else
[19:12:13.274] if #guildMembers < castleCfg.minMembers.second then
[19:12:13.278] return doPlayerSendCancel(cid, 'You don\'t have a '..castleCfg.minMembers.second..' guild members online or someone isn\'t standing in protection zone!')
[19:12:13.284] end
[19:12:13.285] end
[19:12:13.287]
[19:12:13.289] doAddCastleFighter(math.max(0, getCastleFightingGuilds()) + 1, getPlayerGuildId(cid))
[19:12:13.294] doSetCastleDmg0(getPlayerGuildId(cid))
[19:12:13.296] for _, pid in ipairs(guildMembers) do
[19:12:13.300] local randX, randY, pos = math.random(-1,1), math.random(-1,1), castleCfg.telePositions[getCastleFightingGuilds()]
[19:12:13.305]
[19:12:13.306] doTeleportThing(pid, {x = pos.x + randX, y = pos.y + randY, z = pos.z})
[19:12:13.311] doCreatureSetNoMove(pid, true)
[19:12:13.312] doAddCondition(pid, createConditionObject(CONDITION_INFIGHT, -1))
[19:12:13.316] doCreatureSetStorage(pid, castleCfg.storage.playersEvent, 1)
[19:12:13.321] end
[19:12:13.323] doBroadcastMessage('[CASTLE WAR]\n\nGuild "' .. getPlayerGuildName(cid) .. '" have joined the battle for castle!\nGuilds fighting: ' .. getCastleFightingGuilds() .. '/' .. castleCfg.guildsMinMax.max .. '.', MESSAGE_INFO_DESCR)
[19:12:13.333] else
[19:12:13.334] doPlayerSendCancel(cid, 'You must be the leader of your guild!')
[19:12:13.338] end
[19:12:13.340] else
[19:12:13.341] doPlayerSendCancel(cid, 'Max guilds in war has been reached!')
[19:12:13.344] end
[19:12:13.345] else
[19:12:13.346] doPlayerSendCancel(cid, 'It is not time yet!')
[19:12:13.350] end
[19:12:13.351] return true
[19:12:13.352] end
[19:12:13.353]
[19:12:13.354] Description:
[19:12:13.355] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:13.361] [Error - TalkAction Interface]
[19:12:13.363] domodlib('castle_config')
[19:12:13.365] domodlib('castle_lib')
[19:12:13.368] function onSay(cid, words, param)
[19:12:13.371] if param == 'info' then
[19:12:13.372] if getStorage(castleCfg.storage.event) == 1 and getStorage(castleCfg.storage.joinEvent) == -1 and getStorage(castleCfg.storage.time) > 0 then
[19:12:13.379] doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '[CASTLE WAR]\n\nCastle war will end in ' .. math.floor(os.difftime(getStorage(castleCfg.storage.time), os.time()) / 60) .. ' mins.')
[19:12:13.386] else
[19:12:13.389] doPlayerSendCancel(cid, 'You can not do it right now!')
[19:12:13.392] end
[19:12:13.393] return true
[19:12:13.394] elseif param == 'back' then
[19:12:13.395] if exhaustion.check(cid, castleCfg.storage.exhaust) ~= false then
[19:12:13.399] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You must to wait a ' .. exhaustion.get(cid, castleCfg.storage.exhaust) .. ' sec.')
[19:12:13.405] end
[19:12:13.408] if getPlayerGuildId(cid) < 1 then
[19:12:13.410] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You do not have a guild!')
[19:12:13.414] end
[19:12:13.415]
[19:12:13.417] if getTileInfo(getThingPos(cid)).protection ~= true then
[19:12:13.420] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not back to castle war if are not in protection zone.')
[19:12:13.425] end
[19:12:13.428] if getStorage(castleCfg.storage.event) == 1 then
[19:12:13.431] if isGuildInCastle(getPlayerGuildId(cid)) ~= -1 then
[19:12:13.433] local randX, randY, pos = math.random(-1,1), math.random(-1,1), castleCfg.telePositions[isGuildInCastle(getPlayerGuildId(cid))]
[19:12:13.440]
[19:12:13.441] doTeleportThing(cid, {x = pos.x + randX, y = pos.y + randY, z = pos.z})
[19:12:13.444] doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
[19:12:13.449] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, 1)
[19:12:13.452]
[19:12:13.453] exhaustion.set(cid, castleCfg.storage.exhaust, castleCfg.exhaustTime * 60)
[19:12:13.458] else
[19:12:13.460] doPlayerSendCancel(cid, 'Your guild is not in castle war!')
[19:12:13.463] end
[19:12:13.464] else
[19:12:13.467] doPlayerSendCancel(cid, 'You can not do it right now!')
[19:12:13.469] end
[19:12:13.470] return true
[19:12:13.472] end
[19:12:13.473]
[19:12:13.474] if getStorage(castleCfg.storage.joinEvent) == 1 then
[19:12:13.478] if castleCfg.guildsMinMax.max > getCastleFightingGuilds() then
[19:12:13.480] if getPlayerGuildId(cid) < 1 then
[19:12:13.482] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You do not have a guild!')
[19:12:13.488] end
[19:12:13.489] if getPlayerLevel(cid) < castleCfg.minLevel then
[19:12:13.492] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not sing up your guild to castle war if you do not have a require level. [' .. castleCfg.minLevel .. ']')
[19:12:13.499] end
[19:12:13.501] if getTileInfo(getThingPos(cid)).protection ~= true then
[19:12:13.504] return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can not sing up your guild to castle war if are not in protection zone.')
[19:12:13.511] end
[19:12:13.513] if isGuildInCastle(getPlayerGuildId(cid)) ~= -1 then
[19:12:13.518] return doPlayerSendCancel(cid, 'You can not use this talkactions 2 times!')
[19:12:13.522] end
[19:12:13.524] if getPlayerGuildLevel(cid) >= GUILDLEVEL_LEADER then
[19:12:13.528] local guildMembers = getCastleGuildMembers(getPlayerGuildId(cid), false)
[19:12:13.532] if castleCfg.minMembers.p >= #getPlayersOnline() then
[19:12:13.534] if #guildMembers < castleCfg.minMembers.first then
[19:12:13.539] return doPlayerSendCancel(cid, 'You don\'t have a '..castleCfg.minMembers.first..' guild members online or someone isn\'t standing in protection zone!')
[19:12:13.546] end
[19:12:13.547] else
[19:12:13.548] if #guildMembers < castleCfg.minMembers.second then
[19:12:13.551] return doPlayerSendCancel(cid, 'You don\'t have a '..castleCfg.minMembers.second..' guild members online or someone isn\'t standing in protection zone!')
[19:12:13.559] end
[19:12:13.560] end
[19:12:13.561]
[19:12:13.562] doAddCastleFighter(math.max(0, getCastleFightingGuilds()) + 1, getPlayerGuildId(cid))
[19:12:13.567] doSetCastleDmg0(getPlayerGuildId(cid))
[19:12:13.570] for _, pid in ipairs(guildMembers) do
[19:12:13.572] local randX, randY, pos = math.random(-1,1), math.random(-1,1), castleCfg.telePositions[getCastleFightingGuilds()]
[19:12:13.578]
[19:12:13.579] doTeleportThing(pid, {x = pos.x + randX, y = pos.y + randY, z = pos.z})
[19:12:13.583] doCreatureSetNoMove(pid, true)
[19:12:13.586] doAddCondition(pid, createConditionObject(CONDITION_INFIGHT, -1))
[19:12:13.590] doCreatureSetStorage(pid, castleCfg.storage.playersEvent, 1)
[19:12:13.594] end
[19:12:13.597] doBroadcastMessage('[CASTLE WAR]\n\nGuild "' .. getPlayerGuildName(cid) .. '" have joined the battle for castle!\nGuilds fighting: ' .. getCastleFightingGuilds() .. '/' .. castleCfg.guildsMinMax.max .. '.', MESSAGE_INFO_DESCR)
[19:12:13.606] else
[19:12:13.607] doPlayerSendCancel(cid, 'You must be the leader of your guild!')
[19:12:13.610] end
[19:12:13.612] else
[19:12:13.613] doPlayerSendCancel(cid, 'Max guilds in war has been reached!')
[19:12:13.617] end
[19:12:13.618] else
[19:12:13.619] doPlayerSendCancel(cid, 'It is not time yet!')
[19:12:13.622] end
[19:12:13.623] return true
[19:12:13.624] end
[19:12:13.627]
[19:12:13.628] Description:
[19:12:13.629] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:13.633] [Error - TalkAction Interface]
[19:12:13.637] domodlib('castle_config')
[19:12:13.639] domodlib('castle_lib')
[19:12:13.641] function onSay(cid, words, param)
[19:12:13.643] if getGuildId(param) then
[19:12:13.644] db.query("UPDATE `castle` SET `owner` = 0 WHERE `owner` > 0")
[19:12:13.648] doSetCastleOwner(getGuildId(param))
[19:12:13.650] else
[19:12:13.651] doPlayerSendCancel(cid, 'Wrong name. Can not find guild.')
[19:12:13.653] end
[19:12:13.656] return true
[19:12:13.658] end
[19:12:13.659]
[19:12:13.660] Description:
[19:12:13.661] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:13.667] [Error - TalkAction Interface]
[19:12:13.669] domodlib('castle_config')
[19:12:13.671] domodlib('castle_lib')
[19:12:13.673] function onSay(cid, words, param)
[19:12:13.676] if getGuildId(param) then
[19:12:13.678] db.query("UPDATE `castle` SET `owner` = 0 WHERE `owner` > 0")
[19:12:13.681] doSetCastleOwner(getGuildId(param))
[19:12:13.683] else
[19:12:13.684] doPlayerSendCancel(cid, 'Wrong name. Can not find guild.')
[19:12:13.688] end
[19:12:13.688] return true
[19:12:13.690] end
[19:12:13.691]
[19:12:13.692] Description:
[19:12:13.693] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:13.699] [Error - GlobalEvent Interface]
[19:12:13.701] domodlib('castle_config')
[19:12:13.703] domodlib('castle_lib')
[19:12:13.707] local daysOpen = {}
[19:12:13.709] for k, v in pairs(castleCfg.days) do
[19:12:13.711] table.insert(daysOpen, k)
[19:12:13.713] end
[19:12:13.716] function onThink(interval)
[19:12:13.718] if isInArray(daysOpen, os.date('%A')) then
[19:12:13.720] if isInArray(castleCfg.days[os.date('%A')], os.date('%X', os.time())) then
[19:12:13.725] if getStorage(castleCfg.storage.event) ~= 1 then
[19:12:13.727] doSetStorage(castleCfg.storage.event, 1)
[19:12:13.729] doCleanCastleFighters()
[19:12:13.730] doStartCountingCastleEvent(0)
[19:12:13.734] for _, pid in ipairs(getPlayersOnline()) do
[19:12:13.737] if getCreatureStorage(pid, castleCfg.storage.winner) > 0 then
[19:12:13.740] doCreatureSetStorage(pid, castleCfg.storage.winner, -1)
[19:12:13.744] doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
[19:12:13.748] end
[19:12:13.749] end
[19:12:13.750] end
[19:12:13.752] end
[19:12:13.754] end
[19:12:13.756]
[19:12:13.757] if getStorage(castleCfg.storage.event) == 1 then
[19:12:13.759] if getStorage(castleCfg.storage.time) == os.time() then
[19:12:13.762] doCloseCastleWar()
[19:12:13.765] end
[19:12:13.766] end
[19:12:13.767] return true
[19:12:13.768] end
[19:12:13.770]
[19:12:13.771] Description:
[19:12:13.771] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:13.777] [Error - GlobalEvent Interface]
[19:12:13.779] domodlib('castle_config')
[19:12:13.781] domodlib('castle_lib')
[19:12:13.784] local daysOpen = {}
[19:12:13.786] for k, v in pairs(castleCfg.days) do
[19:12:13.789] table.insert(daysOpen, k)
[19:12:13.790] end
[19:12:13.794] function onThink(interval)
[19:12:13.795] if isInArray(daysOpen, os.date('%A')) then
[19:12:13.797] if isInArray(castleCfg.days[os.date('%A')], os.date('%X', os.time())) then
[19:12:13.801] if getStorage(castleCfg.storage.event) ~= 1 then
[19:12:13.805] doSetStorage(castleCfg.storage.event, 1)
[19:12:13.807] doCleanCastleFighters()
[19:12:13.809] doStartCountingCastleEvent(0)
[19:12:13.811] for _, pid in ipairs(getPlayersOnline()) do
[19:12:13.814] if getCreatureStorage(pid, castleCfg.storage.winner) > 0 then
[19:12:13.817] doCreatureSetStorage(pid, castleCfg.storage.winner, -1)
[19:12:13.820] doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
[19:12:13.826] end
[19:12:13.827] end
[19:12:13.828] end
[19:12:13.829] end
[19:12:13.831] end
[19:12:13.833]
[19:12:13.834] if getStorage(castleCfg.storage.event) == 1 then
[19:12:13.837] if getStorage(castleCfg.storage.time) == os.time() then
[19:12:13.841] doCloseCastleWar()
[19:12:13.843] end
[19:12:13.845] end
[19:12:13.846] return true
[19:12:13.847] end
[19:12:13.848]
[19:12:13.849] Description:
[19:12:13.850] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:13.856] [Error - GlobalEvent Interface]
[19:12:13.858] domodlib('castle_config')
[19:12:13.859] domodlib('castle_lib')
[19:12:13.863] local daysOpen = {}
[19:12:13.865] for k, v in pairs(castleCfg.days) do
[19:12:13.867] table.insert(daysOpen, k)
[19:12:13.868] end
[19:12:13.870] function onThink(interval)
[19:12:13.874] if isInArray(daysOpen, os.date('%A')) then
[19:12:13.876] if isInArray(castleCfg.days[os.date('%A')], os.date('%X', os.time())) then
[19:12:13.880] if getStorage(castleCfg.storage.event) ~= 1 then
[19:12:13.883] doSetStorage(castleCfg.storage.event, 1)
[19:12:13.886] doCleanCastleFighters()
[19:12:13.887] doStartCountingCastleEvent(0)
[19:12:13.890] for _, pid in ipairs(getPlayersOnline()) do
[19:12:13.894] if getCreatureStorage(pid, castleCfg.storage.winner) > 0 then
[19:12:13.896] doCreatureSetStorage(pid, castleCfg.storage.winner, -1)
[19:12:13.899] doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
[19:12:13.904] end
[19:12:13.906] end
[19:12:13.907] end
[19:12:13.908] end
[19:12:13.909] end
[19:12:13.910]
[19:12:13.913] if getStorage(castleCfg.storage.event) == 1 then
[19:12:13.915] if getStorage(castleCfg.storage.time) == os.time() then
[19:12:13.918] doCloseCastleWar()
[19:12:13.919] end
[19:12:13.920] end
[19:12:13.923] return true
[19:12:13.925] end
[19:12:13.926]
[19:12:13.927] Description:
[19:12:13.928] [string "LuaInterface::loadBuffer"]:6: attempt to index global 'castleCfg' (a nil value)
[19:12:13.933] [Warning - Event::loadScript] Cannot load script ( domodlib('castle_config')
[19:12:13.936] domodlib('castle_lib')
[19:12:13.938] local daysOpen = {}
[19:12:13.939] for k, v in pairs(castleCfg.days) do
[19:12:13.943] table.insert(daysOpen, k)
[19:12:13.945] end
[19:12:13.946] function onThink(interval)
[19:12:13.948] if isInArray(daysOpen, os.date('%A')) then
[19:12:13.951] if isInArray(castleCfg.days[os.date('%A')], os.date('%X', os.time())) then
[19:12:13.955] if getStorage(castleCfg.storage.event) ~= 1 then
[19:12:13.958] doSetStorage(castleCfg.storage.event, 1)
[19:12:13.961] doCleanCastleFighters()
[19:12:13.963] doStartCountingCastleEvent(0)
[19:12:13.965] for _, pid in ipairs(getPlayersOnline()) do
[19:12:13.968] if getCreatureStorage(pid, castleCfg.storage.winner) > 0 then
[19:12:13.972] doCreatureSetStorage(pid, castleCfg.storage.winner, -1)
[19:12:13.976] doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
[19:12:13.980] end
[19:12:13.981] end
[19:12:13.983] end
[19:12:13.984] end
[19:12:13.985] end
[19:12:13.986]
[19:12:13.987] if getStorage(castleCfg.storage.event) == 1 then
[19:12:13.991] if getStorage(castleCfg.storage.time) == os.time() then
[19:12:13.994] doCloseCastleWar()
[19:12:13.995] end
[19:12:13.996] end
[19:12:13.998] return true
[19:12:13.999] end
[19:12:14.002] )
[19:12:14.005] [Error - GlobalEvent Interface]
[19:12:14.007] domodlib('castle_config')
[19:12:14.009] function onThink(interval)
[19:12:14.013] if getStorage(castleCfg.storage.event) == 1 then
[19:12:14.016] doBroadcastMessage('If you want to back to castle type "!castleback", if you want to check time to end castle war type "!castle info".', MESSAGE_INFO_DESCR)
[19:12:14.023] end
[19:12:14.024] return true
[19:12:14.026] end
[19:12:14.027]
[19:12:14.028] Description:
[19:12:14.029] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.035] [Error - CreatureScript Interface]
[19:12:14.037] domodlib('castle_lib')
[19:12:14.040] function onDeath(cid, corpse, deathList)
[19:12:14.043] if isMonster(cid) then
[19:12:14.045] if getCreatureName(cid) == 'King' then
[19:12:14.047] doCloseCastleWar()
[19:12:14.049] end
[19:12:14.050] end
[19:12:14.052] return true
[19:12:14.054] end
[19:12:14.055]
[19:12:14.057] Description:
[19:12:14.058] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.063] [Error - CreatureScript Interface]
[19:12:14.065] domodlib('castle_config')
[19:12:14.067] function onDeath(cid, corpse, deathList)
[19:12:14.069] if getCreatureStorage(cid, castleCfg.storage.playersEvent) == 1 then
[19:12:14.074] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, -1)
[19:12:14.076] end
[19:12:14.077] return true
[19:12:14.079] end
[19:12:14.081]
[19:12:14.082] Description:
[19:12:14.083] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.088] [Error - CreatureScript Interface]
[19:12:14.090] domodlib('castle_config')
[19:12:14.093] domodlib('castle_lib')
[19:12:14.095] function onLogin(cid)
[19:12:14.097] if getStorage(castleCfg.storage.event) == 1 then
[19:12:14.099] if getCreatureStorage(cid, castleCfg.storage.winner) > 0 then
[19:12:14.103] doCreatureSetStorage(cid, castleCfg.storage.winner, -1)
[19:12:14.105] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, -1)
[19:12:14.108] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.113] end
[19:12:14.114] else
[19:12:14.115] if getCastleOwner() ~= '' then
[19:12:14.117] if getPlayerGuildName(cid) == getCastleOwner() then
[19:12:14.119] doCreatureSetStorage(cid, castleCfg.storage.winner, 1)
[19:12:14.124] doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Your guild won a Castle War.')
[19:12:14.128] end
[19:12:14.129]
[19:12:14.131] if getCreatureStorage(cid, castleCfg.storage.winner) > 0 then
[19:12:14.134] if getPlayerGuildName(cid) ~= getCastleOwner() then
[19:12:14.136] doCreatureSetStorage(cid, castleCfg.storage.winner, -1)
[19:12:14.139] end
[19:12:14.142] end
[19:12:14.144] end
[19:12:14.145]
[19:12:14.146] if getCreatureStorage(cid, castleCfg.storage.playersEvent) == 1 then
[19:12:14.148] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, -1)
[19:12:14.153] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.157] end
[19:12:14.159] end
[19:12:14.162] registerCreatureEvent(cid, 'castleDeathPlayer')
[19:12:14.164] return true
[19:12:14.166] end
[19:12:14.167]
[19:12:14.167] Description:
[19:12:14.169] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.175] [Error - CreatureScript Interface]
[19:12:14.177] domodlib('castle_config')
[19:12:14.179] domodlib('castle_lib')
[19:12:14.183] function onLogin(cid)
[19:12:14.184] if getStorage(castleCfg.storage.event) == 1 then
[19:12:14.186] if getCreatureStorage(cid, castleCfg.storage.winner) > 0 then
[19:12:14.189] doCreatureSetStorage(cid, castleCfg.storage.winner, -1)
[19:12:14.193] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, -1)
[19:12:14.196] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.199] end
[19:12:14.201] else
[19:12:14.203] if getCastleOwner() ~= '' then
[19:12:14.205] if getPlayerGuildName(cid) == getCastleOwner() then
[19:12:14.207] doCreatureSetStorage(cid, castleCfg.storage.winner, 1)
[19:12:14.211] doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Your guild won a Castle War.')
[19:12:14.215] end
[19:12:14.216]
[19:12:14.217] if getCreatureStorage(cid, castleCfg.storage.winner) > 0 then
[19:12:14.221] if getPlayerGuildName(cid) ~= getCastleOwner() then
[19:12:14.224] doCreatureSetStorage(cid, castleCfg.storage.winner, -1)
[19:12:14.227] end
[19:12:14.229] end
[19:12:14.231] end
[19:12:14.231]
[19:12:14.232] if getCreatureStorage(cid, castleCfg.storage.playersEvent) == 1 then
[19:12:14.235] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, -1)
[19:12:14.238] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.243] end
[19:12:14.245] end
[19:12:14.246] registerCreatureEvent(cid, 'castleDeathPlayer')
[19:12:14.248] return true
[19:12:14.251] end
[19:12:14.252]
[19:12:14.253] Description:
[19:12:14.254] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.259] [Error - CreatureScript Interface]
[19:12:14.262] domodlib('castle_config')
[19:12:14.264] domodlib('castle_lib')
[19:12:14.266] function onStatsChange(cid, attacker, type, combat, value)
[19:12:14.269] if isMonster(cid) and isPlayer(attacker) then
[19:12:14.272] if getCreatureName(cid) == 'King' then
[19:12:14.274] if value > 0 then
[19:12:14.275] doSetCastleDmg(value, getPlayerGuildId(attacker))
[19:12:14.278] end
[19:12:14.280] end
[19:12:14.282] end
[19:12:14.283] return true
[19:12:14.284] end
[19:12:14.285]
[19:12:14.286] Description:
[19:12:14.287] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.294] [Error - CreatureScript Interface]
[19:12:14.295] domodlib('castle_config')
[19:12:14.297] domodlib('castle_lib')
[19:12:14.299] function onStatsChange(cid, attacker, type, combat, value)
[19:12:14.303] if isMonster(cid) and isPlayer(attacker) then
[19:12:14.306] if getCreatureName(cid) == 'King' then
[19:12:14.308] if value > 0 then
[19:12:14.310] doSetCastleDmg(value, getPlayerGuildId(attacker))
[19:12:14.313] end
[19:12:14.314] end
[19:12:14.315] end
[19:12:14.316] return true
[19:12:14.317] end
[19:12:14.318]
[19:12:14.320] Description:
[19:12:14.322] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.326] [Error - Action Interface]
[19:12:14.328] domodlib('castle_config')
[19:12:14.331] domodlib('castle_lib')
[19:12:14.333] function onUse(cid, item, fromPosition, itemEx, toPosition)
[19:12:14.336] if castleCfg.castleGetReward ~= false then
[19:12:14.338] if getPlayerGuildName(cid) == getCastleOwner() then
[19:12:14.342] if getPlayerLevel(cid) >= castleCfg.levelToGetReward then
[19:12:14.345] if getCreatureStorage(cid, item.actionid) <= os.time() then
[19:12:14.348] local cash, rewardItem = math.random(castleCfg.cash.min, castleCfg.cash.max), castleCfg.itemsToGive[math.random(#castleCfg.itemsToGive)]
[19:12:14.355] doPlayerAddItem(cid, 2160, cash)
[19:12:14.356] doPlayerAddItem(cid, rewardItem, 1)
[19:12:14.360] doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You get ' .. cash .. ' crystal coins and ' .. getItemNameById(rewardItem) .. ' from your king!')
[19:12:14.365] doCreatureSetStorage(cid, item.actionid, os.time() + 60 * 60 * 24)
[19:12:14.370] else
[19:12:14.371] doPlayerSendCancel(cid, 'You have already get your gift! You can get it again in ' .. secondsToClock(math.abs(os.difftime(getCreatureStorage(cid, item.actionid), os.time()))) .. '.')
[19:12:14.380] end
[19:12:14.382] else
[19:12:14.383] doPlayerSendCancel(cid, 'Your level is to low. You should have ' .. castleCfg.levelToGetReward .. '.')
[19:12:14.387] end
[19:12:14.389] else
[19:12:14.392] doPlayerSendCancel(cid, 'You have no acces to get this reward!')
[19:12:14.395] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.398] doCreatureSetStorage(cid, castleCfg.storage.winner, -1)
[19:12:14.401] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, -1)
[19:12:14.404] end
[19:12:14.405] end
[19:12:14.406] return true
[19:12:14.409] end
[19:12:14.410]
[19:12:14.411] Description:
[19:12:14.413] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.417] [Error - Action Interface]
[19:12:14.420] domodlib('castle_config')
[19:12:14.422] domodlib('castle_lib')
[19:12:14.425] function onUse(cid, item, fromPosition, itemEx, toPosition)
[19:12:14.427] if castleCfg.castleGetReward ~= false then
[19:12:14.431] if getPlayerGuildName(cid) == getCastleOwner() then
[19:12:14.433] if getPlayerLevel(cid) >= castleCfg.levelToGetReward then
[19:12:14.436] if getCreatureStorage(cid, item.actionid) <= os.time() then
[19:12:14.440] local cash, rewardItem = math.random(castleCfg.cash.min, castleCfg.cash.max), castleCfg.itemsToGive[math.random(#castleCfg.itemsToGive)]
[19:12:14.446] doPlayerAddItem(cid, 2160, cash)
[19:12:14.449] doPlayerAddItem(cid, rewardItem, 1)
[19:12:14.452] doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You get ' .. cash .. ' crystal coins and ' .. getItemNameById(rewardItem) .. ' from your king!')
[19:12:14.460] doCreatureSetStorage(cid, item.actionid, os.time() + 60 * 60 * 24)
[19:12:14.463] else
[19:12:14.464] doPlayerSendCancel(cid, 'You have already get your gift! You can get it again in ' .. secondsToClock(math.abs(os.difftime(getCreatureStorage(cid, item.actionid), os.time()))) .. '.')
[19:12:14.473] end
[19:12:14.474] else
[19:12:14.475] doPlayerSendCancel(cid, 'Your level is to low. You should have ' .. castleCfg.levelToGetReward .. '.')
[19:12:14.481] end
[19:12:14.481] else
[19:12:14.482] doPlayerSendCancel(cid, 'You have no acces to get this reward!')
[19:12:14.485] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.490] doCreatureSetStorage(cid, castleCfg.storage.winner, -1)
[19:12:14.493] doCreatureSetStorage(cid, castleCfg.storage.playersEvent, -1)
[19:12:14.498] end
[19:12:14.499] end
[19:12:14.500] return true
[19:12:14.502] end
[19:12:14.509]
[19:12:14.509] Description:
[19:12:14.511] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.517] [Error - MoveEvents Interface]
[19:12:14.519] domodlib('castle_config')
[19:12:14.521] domodlib('castle_lib')
[19:12:14.523] function onStepIn(cid, item, position)
[19:12:14.524] if getPlayerGuildName(cid) ~= getCastleOwner() then
[19:12:14.528] doPlayerSendCancel(cid, 'You have no acces to go thereget this reward!')
[19:12:14.532] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.536] return false
[19:12:14.537] end
[19:12:14.538] return true
[19:12:14.540] end
[19:12:14.541]
[19:12:14.542] Description:
[19:12:14.543] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.550] [Error - MoveEvents Interface]
[19:12:14.551] domodlib('castle_config')
[19:12:14.553] domodlib('castle_lib')
[19:12:14.556] function onStepIn(cid, item, position)
[19:12:14.559] if getPlayerGuildName(cid) ~= getCastleOwner() then
[19:12:14.561] doPlayerSendCancel(cid, 'You have no acces to go thereget this reward!')
[19:12:14.565] doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
[19:12:14.568] return false
[19:12:14.569] end
[19:12:14.571] return true
[19:12:14.572] end
[19:12:14.573]
[19:12:14.576] Description:
[19:12:14.577] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'
[19:12:14.583] [Error - GlobalEvent Interface]
[19:12:14.586] domodlib('castle_config')
[19:12:14.589] function onStartup()
[19:12:14.590] doSetStorage(castleCfg.storage.event, -1)
[19:12:14.592] doSetStorage(castleCfg.storage.joinEvent, -1)
[19:12:14.596] doSetStorage(castleCfg.storage.time, 0)
[19:12:14.598] return true
[19:12:14.599] end
[19:12:14.600]
[19:12:14.601] Description:
[19:12:14.603] [string " castleCfg = {..."]:42: '}' expected (to close '{' at line 40) near 'gates'