• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Mods] War_System_Mod

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1[Mods] War_System_Mod Empty [Mods] War_System_Mod Jue Mar 04, 2021 1:34 pm

    ioke

    ioke
    Miembro
    Miembro
    Descripcion escribió:Hola veran compile en mi tfs 0.4 war system y le agregue un mod al ot lamado War_System_Mod.xml

    Código:
    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="The Forgotten WarSystem" version="1.0" author="Elf" contact="www.otland.net" enabled="yes">
      <GeneralInfo><![CDATA[
          MODScript by: Martyx and OTX Team
      ]]></GeneralInfo>
     
      <!-- ActiveEvents -->
      <globalevent name="war-system-start" type="start" event="script"><![CDATA[
          db.executeQuery("DELETE FROM `guild_wars` WHERE `status` = 0 AND `begin` < " .. (os.time() - 2 * 86400) .. ";")
          db.executeQuery("UPDATE `guild_wars` SET `status` = 5, `end` = " .. os.time() .. " WHERE `status` = 1 AND `end` > 0 AND `end` < " .. os.time() .. ";")
      ]]></globalevent>
     
      <how-use-the-system><![CDATA[
          How use commands:
          /war invite, guidname, fraglimit
            This will invite guildname to have war with a fraglimit.
            Example: /war invite, Pandemonium, 50
     
          /war cancel, guildname
            This will cancel the war invitation to the guild.
            Example: /war cance, Pandemonium
     
          /war accept, guildname
            This will accept the war invitation of the guild.
            Example: /war accept, Pandemonium
     
          /war reject, guildname
            This will reject the war invitation of the guild.
            Example: /war reject, Pandemonium
     
      Note: This mod only works with servers that have been compiled with "-D__WAR_SYSTEM__"
      ]]></how-use-the-system>
     
      <!-- Declare WarCommand -->
      <talkaction words="/war" channel="0" desc="(Guild channel command) War management." event="script"><![CDATA[
          function onSay(cid, words, param, channel)
            local guild = getPlayerGuildId(cid)
            if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then
                doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0)
                return true
            end
     
            local t = string.explode(param, ",")
            if(not t[2]) then
                doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0)
                return true
            end
     
            local enemy = getGuildId(t[2])
            if(not enemy) then
                doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0)
                return true
            end
     
            if(enemy == guild) then
                doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0)
                return true
            end
     
            local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy)
            if(tmp:getID() ~= -1) then
                enemyName = tmp:getDataString("name")
                tmp:free()
            end
     
            if(isInArray({"accept", "reject", "cancel"}, t[1])) then
                local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild
                if(t[1] == "cancel") then
                  query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy
                end
     
                tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0")
                if(tmp:getID() == -1) then
                  doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
                  return true
                end
     
                if(t[1] == "accept") then
                  local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild)
                  local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment")
     
                  _tmp:free()
                  if(state) then
                      doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0)
                      return true
                  end
     
                  db.executeQuery("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild)
                end
     
                query = "UPDATE `guild_wars` SET "
                local msg = "accepted " .. enemyName .. " invitation to war."
                if(t[1] == "reject") then
                  query = query .. "`end` = " .. os.time() .. ", `status` = 2"
                  msg = "rejected " .. enemyName .. " invitation to war."
                elseif(t[1] == "cancel") then
                  query = query .. "`end` = " .. os.time() .. ", `status` = 3"
                  msg = "canceled invitation to a war with " .. enemyName .. "."
                else
                  query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1"
                end
     
                query = query .. " WHERE `id` = " .. tmp:getDataInt("id")
                if(t[1] == "accept") then
                  doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD)
                  doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY)
                end
     
                tmp:free()
                db.executeQuery(query)
                doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE)
                return true
            end
     
            if(t[1] == "invite") then
                local str = ""
                  tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)")
                  if(tmp:getID() ~= -1) then
                  if(tmp:getDataInt("status") == 0) then
                  if(tmp:getDataInt("guild_id") == guild) then
                      str = "You have already invited " .. enemyName .. " to war."
                  else
                      str = enemyName .. " have already invited you to war."
                  end
                  else
                      str = "You are already on a war with " .. enemyName .. "."
                  end
     
                  tmp:free()
                end
     
                if(str ~= "") then
                  doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0)
                  return true
                end
     
                local frags = tonumber(t[3])
                if(frags ~= nil) then
                  frags = math.max(10, math.min(1000, frags))
                else
                  frags = 100
                end
     
                local payment = tonumber(t[4])
                if(payment ~= nil) then
                  payment = math.max(100000, math.min(1000000000, payment))
                  tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild)
     
                  local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment
                  tmp:free()
                  if(state) then
                      doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0)
                      return true
                  end
     
                  db.executeQuery("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild)
                else
                  payment = 0
                end
     
                local begining, ending = os.time(), tonumber(t[5])
                if(ending ~= nil and ending ~= 0) then
                  ending = begining + (ending * 86400)
                else
                  ending = 0
                end
     
                db.executeQuery("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");")
                doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE)
                return true
            end
     
            if(not isInArray({"end", "finish"}, t[1])) then
                return false
            end
     
            local status = (t[1] == "end" and 1 or 4)
            tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status)
            if(tmp:getID() ~= -1) then
                local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id")
                tmp:free()
                doGuildRemoveEnemy(guild, enemy)
                doGuildRemoveEnemy(enemy, guild)
     
                db.executeQuery(query)
                doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE)
                return true
            end
     
            if(status == 4) then
                doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
                return true
            end
     
            tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1")
            if(tmp:getID() ~= -1) then
                if(tmp:getDataInt("end") > 0) then
                  tmp:free()
                  doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
                  return true
                end
     
                local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id")
                tmp:free()
     
                db.executeQuery(query)
                doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE)
                return true
            end
     
            doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
            return true
          end
      ]]></talkaction>
     
      <talkaction words="/deathlist" event="script"><![CDATA[
          local config = {
            deathAssistCount = getConfigValue('deathAssistCount') + 1,
            maxDeathRecords = getConfigValue('maxDeathRecords'),
            limit = ""
          }
          if(config.deathAssistCount > 0) then
            config.limit = " LIMIT 0, " .. config.deathAssistCount
          end
     
          function onSay(cid, words, param, channel)
            local target = db.getResult("SELECT `name`, `id` FROM `players` WHERE `name` = " .. db.escapeString(param) .. ";")
            if(target:getID() == -1) then
                doPlayerSendCancel(cid, "A player with that name does not exist.")
                return true
            end
     
            local targetName, targetId = target:getDataString("name"), target:getDataInt("id")
            target:free()
     
            local str, deaths = "", db.getResult("SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = " .. targetId .." ORDER BY `date` DESC LIMIT 0, " .. config.maxDeathRecords)
            if(deaths:getID() ~= -1) then
                repeat
                  local killers = db.getResult("SELECT environment_killers.name AS monster_name, players.name AS player_name FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id WHERE killers.death_id = " .. deaths:getDataInt("id") .. " ORDER BY killers.final_hit DESC, killers.id ASC" .. config.limit)
                  if(killers:getID() ~= -1) then
                      if(str ~= "") then
                        str = str .. "\n" .. os.date("%d %B %Y %X ", deaths:getDataLong("date"))
                      else
                        str = os.date("%d %B %Y %X ", deaths:getDataLong("date"))
                      end
     
                      local count, i = killers:getRows(false), 0
                      repeat
                        local monster = killers:getDataString("monster_name")
                        if(i == 0 or i == (count - 1)) then
                            monster = string.gsub(monster:gsub("an ", ""), "a ", "")
                        end
     
                        if(killers:getDataString("player_name") ~= "") then
                            if(i == 0) then
                              str = str .. "Killed at level " .. deaths:getDataInt("level") .. " by:\n  "
                            elseif(i == count) then
                              str = str .. " and by "
                            elseif(i % 4 == 0) then
                              str = str .. ",\n  "
                            else
                              str = str .. ", "
                            end
     
                            if(monster ~= "") then
                              str = str .. monster .. " summoned by "
                            end
     
                            str = str .. killers:getDataString("player_name")
                        else
                            if(i == 0) then
                              str = str .. "Died at level " .. deaths:getDataInt("level") .. " by:\n  "
                            elseif(i == count) then
                              str = str .. " and by "
                            elseif(i % 4 == 0) then
                              str = str .. ",\n  "
                            else
                              str = str .. ", "
                            end
     
                            str = str .. monster
                        end
     
                        i = i + 1
                        if(i == count) then
                            str = str .. "."
                        end
                      until not(killers:next())
                      killers:free()
                  end
                until not(deaths:next())
                deaths:free()
            else
                str = "No deaths recorded."
            end
     
            doPlayerPopupFYI(cid, "Deathlist for player: " .. targetName .. ".\n\n" .. str)
            return true
          end
      ]]></talkaction>
     
      <!-- Balance WarCommand -->
      <talkaction words="/balance" channel="0" desc="(Guild channel command) Balance War management." event="script"><![CDATA[
          local function isValidMoney(value)
            if(value == nil) then
                return false
            end
     
            return (value > 0 and value <= 99999999999999)
          end
     
          function onSay(cid, words, param, channel)
            local guild = getPlayerGuildId(cid)
            if(guild == 0) then
                return false
            end
     
            local t = string.explode(param, ' ', 1)
            if(getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER and isInArray({ 'pick' }, t[1])) then
                if(t[1] == 'pick') then
                  local money = { tonumber(t[2]) }
                  if(not isValidMoney(money[1])) then
                      doPlayerSendChannelMessage(cid, '', 'Invalid amount of money specified.', TALKTYPE_CHANNEL_W, 0)
                      return true
                  end
     
                  local result = db.getResult('SELECT `balance` FROM `guilds` WHERE `id` = ' .. guild)
                  if(result:getID() == -1) then
                      return false
                  end
     
                  money[2] = result:getDataLong('balance')
                  result:free()
     
                  if(money[1] > money[2]) then
                      doPlayerSendChannelMessage(cid, '', 'The balance is too low for such amount.', TALKTYPE_CHANNEL_W, 0)
                      return true
                  end
     
                  if(not db.executeQuery('UPDATE `guilds` SET `balance` = `balance` - ' .. money[1] .. ' WHERE `id` = ' .. guild .. ' LIMIT 1;')) then
                      return false
                  end
     
                  doPlayerAddMoney(cid, money[1])
                  doPlayerSendChannelMessage(cid, '', 'You have just picked ' .. money[1] .. ' money from your guild balance.', TALKTYPE_CHANNEL_W, 0)
                else
                  doPlayerSendChannelMessage(cid, '', 'Invalid sub-command.', TALKTYPE_CHANNEL_W, 0)
                end
            elseif(t[1] == 'donate') then
                local money = tonumber(t[2])
                if(not isValidMoney(money)) then
                  doPlayerSendChannelMessage(cid, '', 'Invalid amount of money specified.', TALKTYPE_CHANNEL_W, 0)
                  return true
                end
     
                if(getPlayerMoney(cid) < money) then
                  doPlayerSendChannelMessage(cid, '', 'You don\'t have enough money.', TALKTYPE_CHANNEL_W, 0)
                  return true
                end
     
                if(not doPlayerRemoveMoney(cid, money)) then
                  return false
                end
     
                db.executeQuery('UPDATE `guilds` SET `balance` = `balance` + ' .. money .. ' WHERE `id` = ' .. guild .. ' LIMIT 1;')
                doPlayerSendChannelMessage(cid, '', 'You have transfered ' .. money .. ' money to your guild balance.', TALKTYPE_CHANNEL_W, 0)
            else
                local result = db.getResult('SELECT `name`, `balance` FROM `guilds` WHERE `id` = ' .. guild)
                if(result:getID() == -1) then
                  return false
                end
     
                doPlayerSendChannelMessage(cid, '', 'Current balance of guild ' .. result:getDataString('name') .. ' is: ' .. result:getDataLong('balance') .. ' bronze coins.', TALKTYPE_CHANNEL_W, 0)
                result:free()
            end
     
            return true
          end
      ]]></talkaction>
    </mod>

    el problema es que a escribir /war-invite NAMEGUILD me da el siguiente fallo en la consola:

    Código:
    [18:21:25.758] [Error - TalkAction Interface]
    [18:21:25.773] domodlib('function_config')
    [18:21:25.776] function onSay(cid, words, param, channel)
    [18:21:25.783]        if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then
    [18:21:25.787]                local myGuild = getPlayerGuildId(cid)
    [18:21:25.791]                if words == "/war-invite" then
    [18:21:25.797]                        if GuildIsInPEace(myGuild) == true then
    [18:21:25.800]                                if param ~= "" then
    [18:21:25.806]                                        if guildExist(param) ~= -1 then
    [18:21:25.822]                                                local invitedGuild = getGuildId(param)
    [18:21:25.827]                                                if invitedGuild ~= -1 then
    [18:21:25.838]                                                        if invitedGuild ~= myGuild then
    [18:21:25.842]                                                                if GuildIsInPEace(invitedGuild) == true then
    [18:21:25.848]                                    if getPlayerStorageValue(cid, 65570) <= os.time() then
    [18:21:25.857]                                                                            doInviteToWar(myGuild, invitedGuild)
    [18:21:25.864]                                                                            doBroadcastMessage(BroadCast[1][1] ..getPlayerGuildName(cid).. BroadCast[1][2] ..getGuildNameById(invitedGuild).. BroadCast[1][3], BroadCast_Type)
    [18:21:25.867]                                        setPlayerStorageValue(cid, 65570, os.time()+(20*60))
    [18:21:25.871]                                    else
    [18:21:25.889]                                        local waitTime = (getPlayerStorageValue(cid, 65570) - os.time())
    [18:21:25.891]                                        doPlayerSendCancel(cid, "You must wait " .. os.date("%M", waitTime) .. " minutes and " .. os.date("%S", waitTime) .. " seconds until declare another war.")
    [18:21:25.894]                                    end
    [18:21:25.901]                                                                else
    [18:21:25.912]                                                                        doPlayerSendCancel(cid, CancelMessagesWar[6])
    [18:21:25.915]                                                                end
    [18:21:25.918]                                                        else
    [18:21:25.928]                                                                doPlayerSendCancel(cid, CancelMessagesWar[8])
    [18:21:25.931]                                                        end
    [18:21:25.933]                                                else
    [18:21:25.947]                                                        doPlayerSendCancel(cid, CancelMessagesWar[4])
    [18:21:25.956]                                                end
    [18:21:25.958]                                        else
    [18:21:25.961]                                                doPlayerSendCancel(cid, CancelMessagesWar[4])
    [18:21:25.965]                                        end
    [18:21:25.974]                                else
    [18:21:25.977]                                        doPlayerSendCancel(cid, CancelMessagesWar[7])
    [18:21:25.980]                                end
    [18:21:25.994]                        else
    [18:21:25.997]                                doPlayerSendCancel(cid, CancelMessagesWar[5])
    [18:21:26.031]                        end
    [18:21:26.033]                elseif words == "/war-accept" then
    [18:21:26.046]                        if getGuildWarInfo(myGuild).By ~= 0 then
    [18:21:26.055]                                local enemyGuild = getGuildWarInfo(myGuild).By
    [18:21:26.058]                                doBroadcastMessage(BroadCast[2][1] ..getPlayerGuildName(cid).. BroadCast[2][2] ..getGuildNameById(enemyGuild).. BroadCast[2][3], BroadCast_Type)
    [18:21:26.061]                                WarAccept(myGuild, enemyGuild)
    [18:21:26.080]                        else
    [18:21:26.093]                                doPlayerSendCancel(cid, CancelMessagesWar[1])
    [18:21:26.105]                        end
    [18:21:26.115]                elseif words == "/war-reject" then
    [18:21:26.117]                        if getGuildWarInfo(myGuild).By ~= 0 then
    [18:21:26.122]                                doBroadcastMessage(BroadCast[3][1] ..getPlayerGuildName(cid).. BroadCast[3][2] ..getGuildNameById(getGuildWarInfo(myGuild).By).. BroadCast[3][3], BroadCast_Type)
    [18:21:26.125]                                cleanInfo(getGuildWarInfo(myGuild).By)
    [18:21:26.139]                                cleanInfo(myGuild)
    [18:21:26.143]                        else
    [18:21:26.146]                                doPlayerSendCancel(cid, CancelMessagesWar[1])
    [18:21:26.149]                        end
    [18:21:26.155]                elseif words == "/war-cancel-invite" then
    [18:21:26.167]                        if getGuildWarInfo(myGuild).To ~= 0 then
    [18:21:26.172]                                if getGuildWarInfo(myGuild).With == 0 then
    [18:21:26.180]                                        doBroadcastMessage(BroadCast[4][1] ..getPlayerGuildName(cid).. BroadCast[4][2] ..getGuildNameById(getGuildWarInfo(myGuild).To).. BroadCast[4][3], BroadCast_Type)
    [18:21:26.184]                                        cleanInfo(getGuildWarInfo(myGuild).To)
    [18:21:26.201]                                        cleanInfo(myGuild)
    [18:21:26.206]                                else
    [18:21:26.220]                                        doPlayerSendCancel(cid, CancelMessagesWar[3])
    [18:21:26.223]                                end
    [18:21:26.229]                        else
    [18:21:26.232]                                doPlayerSendCancel(cid, CancelMessagesWar[1])
    [18:21:26.242]                        end
    [18:21:26.246]                elseif words == "/war-challenge" then
    [18:21:26.256]                        local map = Maps[param]
    [18:21:26.257]                        if map then
    [18:21:26.265]                                if enemy ~= 0 then
    [18:21:26.275]                                        local enemyGuild = getGuildWarInfo(myGuild).With
    [18:21:26.283]                                        addEvent(StartWar, 15000, {myGuild = myGuild, enemyGuild = enemyGuild, map = param})
    [18:21:26.306]                                        doBroadcastMessage(BroadCast[5][1] ..getPlayerGuildName(cid).. BroadCast[5][2] ..getGuildNameById(enemyGuild).. BroadCast[5][3] .. param ..".", BroadCast_Type)
    [18:21:26.308]                                else
    [18:21:26.312]                                        doPlayerSendCancel(cid, CancelMessagesWar[10])
    [18:21:26.314]                                end
    [18:21:26.317]                        else
    [18:21:26.331]                                doPlayerSendCancel(cid, CancelMessagesWar[9])
    [18:21:26.350]                        end
    [18:21:26.355]                elseif words == "/war-cancel" then
    [18:21:26.358]                        local enemy = getGuildWarInfo(myGuild).With
    [18:21:26.373]                        if enemy ~= 0 then
    [18:21:26.375]                                if (os.time() - getGuildWarInfo(myGuild).T) >= (60 * 60 * DelayToCancel) then
    [18:21:26.381]                                        StopWar(myGuild, enemy)
    [18:21:26.388]                                        doBroadcastMessage(BroadCast[6][1] ..getGuildNameById(myGuild).. BroadCast[6][2] ..getGuildNameById(enemy).. BroadCast[6][3], BroadCast_Type)
    [18:21:26.391]                                else
    [18:21:26.405]                    local timeEnd = getGuildWarInfo(myGuild).T + (60 * 60 * DelayToCancel)
    [18:21:26.412]                    local timeLeft = timeEnd - os.time()
    [18:21:26.416]                    local hours = (os.date("%H", timeLeft) + 23)
    [18:21:26.421]                                        doPlayerSendCancel(cid, "Time remaining: "..hours.." hours, " .. os.date("%M", timeLeft) .. " minutes and " .. os.date("%S", timeLeft) .. " seconds.")
    [18:21:26.424]                                end
    [18:21:26.433]                        else
    [18:21:26.443]                                doPlayerSendCancel(cid, CancelMessagesWar[10])
    [18:21:26.446]                        end
    [18:21:26.457]                elseif words == "!disband" then
    [18:21:26.459]                        local enemy = getGuildWarInfo(myGuild).With
    [18:21:26.463]                        if enemy > 0 then
    [18:21:26.481]                if channel == CHANNEL_GUILD then
    [18:21:26.483]                    if (os.time() - getGuildWarInfo(myGuild).T) >= (60 * 60 * DelayToCancel) then
    [18:21:26.489]                                            StopWar(myGuild, enemy)
    [18:21:26.491]                                            doBroadcastMessage(BroadCast[6][1] ..getGuildNameById(myGuild).. BroadCast[6][2] ..getGuildNameById(enemy).. BroadCast[6][3], BroadCast_Type)
    [18:21:26.500]                                    else
    [18:21:26.501]                    local timeEnd = getGuildWarInfo(myGuild).T + (60 * 60 * DelayToCancel)
    [18:21:26.506]                    local timeLeft = timeEnd - os.time()
    [18:21:26.508]                    local hours = (os.date("%H", timeLeft) + 23)
    [18:21:26.512]                                        doPlayerSendCancel(cid, "Time remaining: "..hours.." hours, " .. os.date("%M", timeLeft) .. " minutes and " .. os.date("%S", timeLeft) .. " seconds.")
    [18:21:26.513]                                    end
    [18:21:26.515]                            else
    [18:21:26.516]                    doPlayerSendCancel(cid, "You have to say this command in your guild channel.")
    [18:21:26.517]                            end
    [18:21:26.523]            else
    [18:21:26.524]                                return FALSE
    [18:21:26.551]            end
    [18:21:26.556]                                return FALSE
    [18:21:26.559]                end
    [18:21:26.562]        else
    [18:21:26.564]                doPlayerSendCancel(cid, CancelMessagesWar[2])
    [18:21:26.567]        end
    [18:21:26.573]        local file = io.open("data/logs/Wars.txt", "a")
    [18:21:26.581]        file:write("".. os.date("%d %B %Y %X ", os.time()) .." -->  "..getCreatureName(cid)..": "..words.." "..param.."\n")
    [18:21:26.591]        file:close()
    [18:21:26.599]        return TRUE
    [18:21:26.611] end:onSay
    [18:21:26.616] Description:
    [18:21:26.623] [string "DelayToCancel = 24 -- HOURS <-> [max: 47 --..."]:154: attempt to call field 'executeQuery' (a nil value)
    [18:21:26.628] stack traceback:
    [18:21:26.630]  [string "DelayToCancel = 24 -- HOURS <-> [max: 47 --..."]:154: in function 'doInviteToWar'
    [18:21:26.633]  [string "LuaInterface::loadBuffer"]:14: in function <[string "LuaInterface::loadBuffer"]:2>
    > Broadcasted message: "Info Baiakciteron:

    si aguien mepuede ayudar con esto Sad , gracias
    Captura del Error escribió:Imagen del error: [Mods] War_System_Mod Empty
    El error radica en: Consola

    2 participantes
    http://baiakciteron.sytes.net

    2[Mods] War_System_Mod Empty Re: [Mods] War_System_Mod Jue Mar 04, 2021 2:31 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    como su mod lo indica su consola que compilo no esta preparada pa el sistema elf war system se necesita un serie de cambios en varios cpp y h en las fuentes para que oporte elf war system pero jamas fue liberado aquel sistema

    este es su error

    Código:
     function 'doInviteToWar'

    lo cual no contiene sus sources



    [Mods] War_System_Mod YNU5B25
    2 participantes
    http://www.tibiaface.com

    3[Mods] War_System_Mod Empty Re: [Mods] War_System_Mod Jue Mar 04, 2021 3:49 pm

    ioke

    ioke
    Miembro
    Miembro
    que mal y como puedo agregarlo al compilar? hay algun tutorial en algun lado?



    estou utilizando 3777-master

    2 participantes
    http://baiakciteron.sytes.net

    4[Mods] War_System_Mod Empty Re: [Mods] War_System_Mod Jue Mar 04, 2021 5:24 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    ioke escribió:que mal y como puedo agregarlo al compilar? hay algun tutorial en algun lado?



    estou utilizando 3777-master


    como le dije los codigos para el codigo fuente no existen jamas fueron liberados, puede usar tfs tibiaface que posee elfwarsystem

    [Tienes que estar registrado y conectado para ver este vínculo]



    [Mods] War_System_Mod YNU5B25
    2 participantes
    http://www.tibiaface.com

    5[Mods] War_System_Mod Empty Re: [Mods] War_System_Mod Vie Mar 05, 2021 11:17 am

    ioke

    ioke
    Miembro
    Miembro
    Maya descarge los soucres de Tfs Tibiaface v5 que me dijiste para compilar pero no tiene la carpeta dev solo la v10 y nunca he compilado sin el archivo .dev no se hacerlo de 0 hay alguna guia por ahi?

    2 participantes
    http://baiakciteron.sytes.net

    6[Mods] War_System_Mod Empty Re: [Mods] War_System_Mod Vie Mar 05, 2021 11:40 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    ioke escribió:Maya descarge los soucres de Tfs Tibiaface v5 que me dijiste para compilar pero no tiene la carpeta dev solo la v10 y nunca he compilado sin el archivo .dev no se hacerlo de 0 hay alguna guia por ahi?

    aqui tienes

    [Tienes que estar registrado y conectado para ver este vínculo]



    [Mods] War_System_Mod YNU5B25
    2 participantes
    http://www.tibiaface.com

    7[Mods] War_System_Mod Empty Re: [Mods] War_System_Mod Vie Mar 05, 2021 12:58 pm

    ioke

    ioke
    Miembro
    Miembro
    muchas gravias genio What a Face



    Ya puedes cerrar el post mi tfs ya tenía war sistema lo que el mod no le servía le puse los scripts war.lua y balance.lua en talkactions y modifique el lib/100-compat.lua añadiendo
    Código:
    db.executeQuery = db.query
    porque me daba error en la consola de executeQuery ahora con esto ya me fun iona el war system perfectamente y se lo añado a la web y todo va perfecto, gracias.



    Very Happy Resuelto Gracias Very Happy

    2 participantes
    http://baiakciteron.sytes.net

    Contenido patrocinado


    2 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).