• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    Raids Ordenados

    Compartir:

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

    1default Raids Ordenados Vie Ago 20, 2021 3:07 pm

    ioke

    ioke
    Miembro
    Miembro
    Descripcion escribió:
    Descripcion escribió:hola me gustaria que este script fuera por orden no random gracias a ver si pueden ayudarme.

    Código:
    local storage = 1344
    local raids = {
     "Morgaroth",
     "Ghazbaran",
     "Undead Jester",
     "goblin",
     "Dryads",
     "Halloweenhare",
     "Hornedfox",
     "Necropharus",
     "Wolfsraid",
     "UndeadArmy",
     "UndeadDarashia",
     "The Old Widow",
     "Scarabs",
     "Rats",
     "Quara",
     "Pirates",
     "Orshabaal",
     "OrcsThais",
     "Ferumbras",
     "Elfs",
     "Demodras",
     "Barbarian"
    }
    function onTime(interval, lastExecution, thinkInterval)
     if getGlobalStorageValue(storage) == -1 or getGlobalStorageValue(storage) < os.time() then
     executeRaid(raids[math.random(1, #raids)])
     setGlobalStorageValue(storage, os.time() + 9 * 60 * 60)
     end
     return TRUE
    end
    Imagen Explicativa escribió:Imagen Explicativa: Raids Ordenados Tibiaf10
    Version del Scripts: TFs 0.4.0
    Imagen Explicativa escribió:Imagen Explicativa: Raids Ordenados Tibiaf10
    Version del Scripts: TFs 0.4.0

    2 participantes
    http://baiakciteron.sytes.net

    2default Re: Raids Ordenados Vie Ago 20, 2021 4:17 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    tiene que usar este mod que es por hora y por dias

    Código:


    <?xml version="1.0" encoding="UTF-8"?> 
    <mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="xtibia.com" enabled="yes"> 
    <config name="raids_func"><![CDATA[
      days = {
        ["Tuesday"] = {
          ["19:49"] = {nome = "Countess Sorrow", pos = {fromPosition = {x=775, y=1194, z=9},toPosition = {x=777, y=1194, z=9}},m = {"1 Countess Sorrow"}, Time = 2},
          ["21:33"] = {nome = "The Imperor", pos = {fromPosition = {x=826, y=1229, z=10},toPosition = {x=828, y=1229, z=10}},m = {"1 The Imperor"}, Time = 20},
        },

        ["Wednesday"] = {
          ["18:45"] = {nome = "Mr. punish", pos = {fromPosition = {x=884, y=1215, z=10},toPosition = {x=886, y=1215, z=10}},m = {"1 Mr. Punish"}, Time = 2},
        },

        ["Sunday"] = {
          ["10:08"] = {nome = "Dracola", pos = {fromPosition = {x=882, y=1192, z=10},toPosition = {x=884, y=1192, z=10}}, m = {"1 Dracola"}, Time = 15},
          ["10:46"] = {nome = "Massacre", pos = {fromPosition = {x=919, y=1227, z=10},toPosition = {x=921, y=1227, z=10}}, m = {"1 Massacre"}, Time = 20},
          ["10:47"] = {nome = "Son of Verminor", pos = {fromPosition = {x=735, y=1243, z=10},toPosition = {x=737, y=1243, z=10}}, m = {"1 Son of Verminor"}, Time = 20},
        }                                     
      }
    ]]></config>   
    <globalevent name="AutomaticRaids" interval="60000" event="script"><![CDATA[
    domodlib('raids_func')
    function onThink(interval, lastExecution) 
        if days[os.date("%A")] then
          local hours = tostring(os.date("%X")):sub(1, 5)     
          local tb = days[os.date("%A")][hours]
            if tb then       
                function removeCreature(tb)
                    for x = ((tb.pos.fromPosition.x)-10), ((tb.pos.toPosition.x)+10) do
                        for y = ((tb.pos.fromPosition.y)-10), ((tb.pos.toPosition.y)+10) do
                          local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid
                            if m ~= 0 and isMonster(m) then
                                doRemoveCreature(m)
                            end
                        end
                    end
                end

                doBroadcastMessage("The invasion of " .. tb.nome .. " started")
                for _,x in pairs(tb.m) do
                    for s = 1, tonumber(x:match("%d+")) do
                      local pos = {x = math.random(tb.pos.toPosition.x,tb.pos.fromPosition.x), y = math.random(tb.pos.toPosition.y, tb.pos.fromPosition.y) , z = tb.pos.fromPosition.z}
                        doCreateMonster(x:match("%s(.+)"), pos)
                    end
                end

                addEvent(removeCreature, tb.Time*60*1000, tb)
            end
        end

        return true
    end
    ]]></globalevent>
    </mod>



    Raids Ordenados YNU5B25
    2 participantes
    https://www.tibiaface.com

    3default Re: Raids Ordenados Vie Ago 20, 2021 4:18 pm

    ioke

    ioke
    Miembro
    Miembro
    ese mod yanlo tengo pero no es bueno no da los mensajes y no crea bien los monsters da fallos cuando hay oiedras o algo

    2 participantes
    http://baiakciteron.sytes.net

    4default Re: Raids Ordenados Vie Ago 20, 2021 4:24 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:ese mod yanlo tengo pero no es bueno no da los mensajes y no crea bien los monsters da fallos cuando hay oiedras o algo

    entonces hace esto

    Código:

    <globalevent name="raid" time="20:00:00" event="buffer" value="doExecuteRaid('RaidName')"/>

    ('RaidName') -----Z nombre de la raid

    y la ordenas por hora



    Raids Ordenados YNU5B25
    2 participantes
    https://www.tibiaface.com

    5default Re: Raids Ordenados Vie Ago 20, 2021 4:29 pm

    ioke

    ioke
    Miembro
    Miembro
    lo malo de hacerlo asi que no puedo separarlos por dias de la semana

    2 participantes
    http://baiakciteron.sytes.net

    6default Re: Raids Ordenados Vie Ago 20, 2021 5:55 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    aqui tienes el mod editado

    Código:



    <?xml version="1.0" encoding="UTF-8"?> 
    <mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="xtibia.com" enabled="yes"> 
    <config name="raids_func"><![CDATA[
      days = {
        ["Tuesday"] = {
          ["19:49"] = {nome = "Countess Sorrow", pos = {fromPosition = {x=775, y=1194, z=9},toPosition = {x=777, y=1194, z=9}},m = {"1 Countess Sorrow"}, Time = 2},
          ["21:33"] = {nome = "The Imperor", pos = {fromPosition = {x=826, y=1229, z=10},toPosition = {x=828, y=1229, z=10}},m = {"1 The Imperor"}, Time = 20},
        },

        ["Wednesday"] = {
          ["18:45"] = {nome = "Mr. punish", pos = {fromPosition = {x=884, y=1215, z=10},toPosition = {x=886, y=1215, z=10}},m = {"1 Mr. Punish"}, Time = 2},
        },

        ["Sunday"] = {
          ["10:08"] = {nome = "Dracola", pos = {fromPosition = {x=882, y=1192, z=10},toPosition = {x=884, y=1192, z=10}}, m = {"1 Dracola"}, Time = 15},
          ["10:46"] = {nome = "Massacre", pos = {fromPosition = {x=919, y=1227, z=10},toPosition = {x=921, y=1227, z=10}}, m = {"1 Massacre"}, Time = 20},
          ["10:47"] = {nome = "Son of Verminor", pos = {fromPosition = {x=735, y=1243, z=10},toPosition = {x=737, y=1243, z=10}}, m = {"1 Son of Verminor"}, Time = 20},
        }                                     
      }
    ]]></config>   
    <globalevent name="AutomaticRaids" interval="60000" event="script"><![CDATA[
    domodlib('raids_func')
    function onThink(interval, lastExecution) 
        if days[os.date("%A")] then
          local hours = tostring(os.date("%X")):sub(1, 5)     
          local tb = days[os.date("%A")][hours]
            if tb then       
                function removeCreature(tb)
                    for x = ((tb.pos.fromPosition.x)-10), ((tb.pos.toPosition.x)+10) do
                        for y = ((tb.pos.fromPosition.y)-10), ((tb.pos.toPosition.y)+10) do
                          local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid
                            if m ~= 0 and isMonster(m) then
                                doRemoveCreature(m)
                            end
                        end
                    end
                end

                doBroadcastMessage("The invasion of " .. tb.nome .. " started")
                for _,x in pairs(tb.m) do
                    for s = 1, tonumber(x:match("%d+")) do
                      local pos = {x = math.random(tb.pos.toPosition.x,tb.pos.fromPosition.x), y = math.random(tb.pos.toPosition.y, tb.pos.fromPosition.y) , z = tb.pos.fromPosition.z}
                        doCreateMonster(x:match("%s(.+)"), pos, true, true)
                    end
                end

                addEvent(removeCreature, tb.Time*60*1000, tb)
            end
        end

        return true
    end
    ]]></globalevent>
    </mod>




    Raids Ordenados YNU5B25
    2 participantes
    https://www.tibiaface.com

    7default Re: Raids Ordenados Vie Ago 20, 2021 6:30 pm

    ioke

    ioke
    Miembro
    Miembro
    te pongo mi mod y el error ke me da



    Código:
    <?xml version="1.0" encoding="UTF-8"?>  
    <mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="otl.com" enabled="yes">  
    <config name="raids_func"><![CDATA[
    days = {
    ["Monday"] = {
    ["01:30"] = {nome = "Barbarian", pos = {fromPosition = {x=32229, y=31090, z=5},toPosition = {x=32240, y=31122, z=5}},m = {"35 Barbarian Bloodwalker", "22 Barbarian Brutetamer", "22 Barbarian Headsplitter", "28 Barbarian Skullhunter", "15 Ice Witch"}, Time = 45},
    ["07:30"] = {nome = "Demodras", pos = {fromPosition = {x=32770, y=32285, z=10},toPosition = {x=32778, y=32293, z=10}},m = {"1 Demodras", "3 Dragon Lord"}, Time = 45},
    ["13:30"] = {nome = "Elfs", pos = {fromPosition = {x=32839, y=32124, z=7},toPosition = {x=32860, y=32128, z=7}},m = {"25 Elf", "20 Elf Scout", "15 Elf Arcanist"}, Time = 45},
    ["19:30"] = {nome = "Ferumbras", pos = {fromPosition = {x=31949, y=32692, z=4},toPosition = {x=31959, y=32696, z=4}},m = {"1 Ferumbras", "6 Demon"}, Time = 45}
    },
    ["Saturday"] = {
    ["00:17"] = {nome = "Ghazbaran", pos = {fromPosition = {x=32304, y=31204, z=15},toPosition = {x=32330, y=31215, z=15}},m = {"1 Ghazbaran", "1 Deathslicer", "3 Juggernaut", "3 Fury", "2 Demon"}, Time = 45},
    ["07:30"] = {nome = "The Horned Fox", pos = {fromPosition = {x=32467, y=31956, z=4},toPosition = {x=32468, y=31957, z=4}},m = {"1 The Horned Fox"}, Time = 45},
    ["13:30"] = {nome = "Morgaroth", pos = {fromPosition = {x=31884, y=32614, z=14},toPosition = {x=31908, y=32629, z=14}},m = {"1 Morgaroth", "10 Demon"}, Time = 45},
    ["19:30"] = {nome = "Necropharus", pos = {fromPosition = {x=33044, y=32400, z=10},toPosition = {x=33044, y=32400, z=10}},m = {"1 Necropharus"}, Time = 45}
    },
    ["mon"] = {
    ["01:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=33207, y=31719, z=7},toPosition = {x=33207, y=31719, z=7}},m = {"1 Orshabaal"}, Time = 45},
    ["00:09"] = {nome = "Grynch Clan Goblin", pos = {fromPosition = {x=567, y=630, z=7},toPosition = {x=636, y=657, z=7}},m = {"100 Grynch Clan Goblin"}, Time = 45},
    ["13:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["19:30"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"50 Dragon"}, Time = 45}
    },
    ["Thursday"] = {
    ["01:30"] = {nome = "Deadeye Devious", pos = {fromPosition = {x=32349, y=32841, z=7},toPosition = {x=32349, y=32841, z=7}},m = {"1 Deadeye Devious"}, Time = 45},
    ["07:30"] = {nome = "Ron the Ripper", pos = {fromPosition = {x=32247, y=32839, z=7},toPosition = {x=32247, y=32839, z=7}},m = {"1 Ron the Ripper"}, Time = 45},
    ["13:30"] = {nome = "Brutus Bloodbeard", pos = {fromPosition = {x=32302, y=32879, z=7},toPosition = {x=32302, y=32879, z=7}},m = {"1 Brutus Bloodbeard"}, Time = 45},
    ["19:30"] = {nome = "Lethal Lissy", pos = {fromPosition = {x=32300, y=32774, z=7},toPosition = {x=32300, y=32774, z=7}},m = {"1 Lethal Lissy"}, Time = 45}
    },
    ["monday"] = {
    ["01:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["07:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["13:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["19:30"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"50 Dragon"}, Time = 45}
    },
    ["sunday"] = {
    ["01:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["07:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["13:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["19:30"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"50 Dragon"}, Time = 45}
    },
    ["Monday"] = {
    ["07:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["13:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 45},
    ["19:30"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"50 Dragon"}, Time = 45}
    }
    }
    ]]></config>    
    <globalevent name="AutomaticRaids" interval="60000" event="script"><![CDATA[
    domodlib('raids_func')
    function onThink(interval, lastExecution)  
    if days[os.date("%A")] then
    hours = tostring(os.date("%X")):sub(1, 5)      
    tb = days[os.date("%A")][hours]
    if tb then        
    function removeCreature(tb)
    for x = ((tb.pos.fromPosition.x)-10), ((tb.pos.toPosition.x)+10) do
    for y = ((tb.pos.fromPosition.y)-10), ((tb.pos.toPosition.y)+10) do
    local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid
    if m ~= 0 and isMonster(m) then
    doRemoveCreature(m)
    end
    end
    end
    end
    doBroadcastMessage("The invasion of " .. tb.nome .. " started, end in 45 minutes.")
    for _,x in pairs(tb.m) do
    for s = 1, tonumber(x:match("%d+")) do
    pos = {x = math.random(tb.pos.fromPosition.x, tb.pos.toPosition.x), y = math.random(tb.pos.fromPosition.y, tb.pos.toPosition.y), z = tb.pos.fromPosition.z}
    doSummonCreature(x:match("%s(.+)"), pos)
    end
    end
    addEvent(removeCreature, tb.Time*60*1000, tb)
    end
    end
    return true
    end
    ]]></globalevent>
    </mod>



    Código:
    [0:28:28.797] [Error - GlobalEvent Interface]
    [0:28:28.797] domodlib('raids_func')
    [0:28:28.797] function onThink(interval, lastExecution)
    [0:28:28.813] if days[os.date("%A")] then
    [0:28:28.813] hours = tostring(os.date("%X")):sub(1, 5)
    [0:28:28.828] tb = days[os.date("%A")][hours]
    [0:28:28.828] if tb then
    [0:28:28.828] function removeCreature(tb)
    [0:28:28.844] for x = ((tb.pos.fromPosition.x)-10), ((tb.pos.toPosition.x)+10) do
    [0:28:28.844] for y = ((tb.pos.fromPosition.y)-10), ((tb.pos.toPosition.y)+10) do
    [0:28:28.860] local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid
    [0:28:28.860] if m ~= 0 and isMonster(m) then
    [0:28:28.875] doRemoveCreature(m)
    [0:28:28.875] end
    [0:28:28.875] end
    [0:28:28.875] end
    [0:28:28.891] end
    [0:28:28.891] doBroadcastMessage("The invasion of " .. tb.nome .. " started, end in 45 minutes.")
    [0:28:28.891] for _,x in pairs(tb.m) do
    [0:28:28.906] for s = 1, tonumber(x:match("%d+")) do
    [0:28:28.906] pos = {x = math.random(tb.pos.fromPosition.x, tb.pos.toPosition.x), y = math.random(tb.pos.fromPosition.y, tb.pos.toPosition.y), z = tb.pos.fromPosition.z}
    [0:28:28.922] doSummonCreature(x:match("%s(.+)"), pos, true, true)
    [0:28:28.938] end
    [0:28:28.938] end
    [0:28:28.938] addEvent(removeCreature, tb.Time*60*1000, tb)
    [0:28:28.953] end
    [0:28:28.953] end
    [0:28:28.953] return true
    [0:28:28.953] end
    [0:28:28.953] :onThink
    [0:28:28.969] Description:
    [0:28:28.969] (LuaInterface::luaDoCreateMonster) Cannot create monster: Grynch Clan Goblin

    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).