[17:50:55.346] [Error - TalkAction Interface]
[17:50:55.346] domodlib('function_config')
[17:50:55.346] function onSay(cid, words, param, channel)
[17:50:55.346] if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then
[17:50:55.346] local myGuild = getPlayerGuildId(cid)
[17:50:55.346] if words == "/war-invite" then
[17:50:55.346] if GuildIsInPEace(myGuild) == true then
[17:50:55.346] if param ~= "" then
[17:50:55.346] if guildExist(param) ~= -1 then
[17:50:55.346] local invitedGuild = getGuildId(param)
[17:50:55.346] if invitedGuild ~= -1 then
[17:50:55.346] if invitedGuild ~= myGuild then
[17:50:55.346] if GuildIsInPEace(invitedGuild) == true then
[17:50:55.346] if getPlayerStorageValue(cid, 65570) <= os.time() then
[17:50:55.346] doInviteToWar(myGuild, invitedGuild)
[17:50:55.346] doBroadcastMessage(BroadCast[1][1] ..getPlayerGuildName(cid).. BroadCast[1][2] ..getGuildNameById(invitedGuild).. BroadCast[1][3], BroadCast_Type)
[17:50:55.346] setPlayerStorageValue(cid, 65570, os.time()+(20*60))
[17:50:55.346] else
[17:50:55.346] local waitTime = (getPlayerStorageValue(cid, 65570) - os.time())
[17:50:55.346] doPlayerSendCancel(cid, "You must wait " .. os.date("%M", waitTime) .. " minutes and " .. os.date("%S", waitTime) .. " seconds until declare another war.")
[17:50:55.346] end
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[6])
[17:50:55.346] end
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[8])
[17:50:55.346] end
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[4])
[17:50:55.346] end
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[4])
[17:50:55.346] end
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[7])
[17:50:55.346] end
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[5])
[17:50:55.346] end
[17:50:55.346] elseif words == "/war-accept" then
[17:50:55.346] if getGuildWarInfo(myGuild).By ~= 0 then
[17:50:55.346] local enemyGuild = getGuildWarInfo(myGuild).By
[17:50:55.346] doBroadcastMessage(BroadCast[2][1] ..getPlayerGuildName(cid).. BroadCast[2][2] ..getGuildNameById(enemyGuild).. BroadCast[2][3], BroadCast_Type)
[17:50:55.346] WarAccept(myGuild, enemyGuild)
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[1])
[17:50:55.346] end
[17:50:55.346] elseif words == "/war-reject" then
[17:50:55.346] if getGuildWarInfo(myGuild).By ~= 0 then
[17:50:55.346] doBroadcastMessage(BroadCast[3][1] ..getPlayerGuildName(cid).. BroadCast[3][2] ..getGuildNameById(getGuildWarInfo(myGuild).By).. BroadCast[3][3], BroadCast_Type)
[17:50:55.346] cleanInfo(getGuildWarInfo(myGuild).By)
[17:50:55.346] cleanInfo(myGuild)
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[1])
[17:50:55.346] end
[17:50:55.346] elseif words == "/war-cancel-invite" then
[17:50:55.346] if getGuildWarInfo(myGuild).To ~= 0 then
[17:50:55.346] if getGuildWarInfo(myGuild).With == 0 then
[17:50:55.346] doBroadcastMessage(BroadCast[4][1] ..getPlayerGuildName(cid).. BroadCast[4][2] ..getGuildNameById(getGuildWarInfo(myGuild).To).. BroadCast[4][3], BroadCast_Type)
[17:50:55.346] cleanInfo(getGuildWarInfo(myGuild).To)
[17:50:55.346] cleanInfo(myGuild)
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[3])
[17:50:55.346] end
[17:50:55.346] else
[17:50:55.346] doPlayerSendCancel(cid, CancelMessagesWar[1])
[17:50:55.346] end
[17:50:55.346] elseif words == "/war-challenge" then
[17:50:55.347] local map = Maps[param]
[17:50:55.347] if map then
[17:50:55.347] if enemy ~= 0 then
[17:50:55.347] local enemyGuild = getGuildWarInfo(myGuild).With
[17:50:55.347] addEvent(StartWar, 15000, {myGuild = myGuild, enemyGuild = enemyGuild, map = param})
[17:50:55.347] doBroadcastMessage(BroadCast[5][1] ..getPlayerGuildName(cid).. BroadCast[5][2] ..getGuildNameById(enemyGuild).. BroadCast[5][3] .. param ..".", BroadCast_Type)
[17:50:55.347] else
[17:50:55.347] doPlayerSendCancel(cid, CancelMessagesWar[10])
[17:50:55.347] end
[17:50:55.347] else
[17:50:55.347] doPlayerSendCancel(cid, CancelMessagesWar[9])
[17:50:55.347] end
[17:50:55.347] elseif words == "/war-cancel" then
[17:50:55.347] local enemy = getGuildWarInfo(myGuild).With
[17:50:55.347] if enemy ~= 0 then
[17:50:55.347] if (os.time() - getGuildWarInfo(myGuild).T) >= (60 * 60 * DelayToCancel) then
[17:50:55.347] StopWar(myGuild, enemy)
[17:50:55.347] doBroadcastMessage(BroadCast[6][1] ..getGuildNameById(myGuild).. BroadCast[6][2] ..getGuildNameById(enemy).. BroadCast[6][3], BroadCast_Type)
[17:50:55.347] else
[17:50:55.347] local timeEnd = getGuildWarInfo(myGuild).T + (60 * 60 * DelayToCancel)
[17:50:55.347] local timeLeft = timeEnd - os.time()
[17:50:55.347] local hours = (os.date("%H", timeLeft) + 23)
[17:50:55.347] doPlayerSendCancel(cid, "Time remaining: "..hours.." hours, " .. os.date("%M", timeLeft) .. " minutes and " .. os.date("%S", timeLeft) .. " seconds.")
[17:50:55.347] end
[17:50:55.347] else
[17:50:55.347] doPlayerSendCancel(cid, CancelMessagesWar[10])
[17:50:55.347] end
[17:50:55.347] elseif words == "!disband" then
[17:50:55.347] local enemy = getGuildWarInfo(myGuild).With
[17:50:55.347] if enemy > 0 then
[17:50:55.347] if channel == CHANNEL_GUILD then
[17:50:55.347] if (os.time() - getGuildWarInfo(myGuild).T) >= (60 * 60 * DelayToCancel) then
[17:50:55.347] StopWar(myGuild, enemy)
[17:50:55.347] doBroadcastMessage(BroadCast[6][1] ..getGuildNameById(myGuild).. BroadCast[6][2] ..getGuildNameById(enemy).. BroadCast[6][3], BroadCast_Type)
[17:50:55.347] else
[17:50:55.347] local timeEnd = getGuildWarInfo(myGuild).T + (60 * 60 * DelayToCancel)
[17:50:55.347] local timeLeft = timeEnd - os.time()
[17:50:55.347] local hours = (os.date("%H", timeLeft) + 23)
[17:50:55.347] doPlayerSendCancel(cid, "Time remaining: "..hours.." hours, " .. os.date("%M", timeLeft) .. " minutes and " .. os.date("%S", timeLeft) .. " seconds.")
[17:50:55.347] end
[17:50:55.347] else
[17:50:55.347] doPlayerSendCancel(cid, "You have to say this command in your guild channel.")
[17:50:55.347] end
[17:50:55.347] else
[17:50:55.347] return FALSE
[17:50:55.347] end
[17:50:55.347] return FALSE
[17:50:55.347] end
[17:50:55.347] else
[17:50:55.347] doPlayerSendCancel(cid, CancelMessagesWar[2])
[17:50:55.347] end
[17:50:55.347] local file = io.open("data/logs/Wars.txt", "a")
[17:50:55.347] file:write("".. os.date("%d %B %Y %X ", os.time()) .." --> "..getCreatureName(cid)..": "..words.." "..param.."\n")
[17:50:55.347] file:close()
[17:50:55.347] return TRUE
[17:50:55.347] end
nSay
[17:50:55.347] Description:
[17:50:55.347] [string "DelayToCancel = 24 -- HOURS <-> [max: 47 --..."]:154: attempt to call field 'executeQuery' (a nil value)
[17:50:55.347] stack traceback:
[17:50:55.347] [string "DelayToCancel = 24 -- HOURS <-> [max: 47 --..."]:154: in function 'doInviteToWar'
[17:50:55.347] [string "LuaInterface::loadBuffer"]:14: in function <[string "LuaInterface::loadBuffer"]:2>