• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0)

    Compartir:

    Ir a la página : 1, 2  Siguiente

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

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Hola usuarios de tibiaface


    Aqui le dejo una recopilacion de eventos

    Battlefield

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

    Castle 24h

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

    City War

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

    CTF

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

    Dota

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

    FireStorm Event

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

    Rush Event

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

    Ultimate Survivor

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

    Zombie Event

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


    Recopilacion God Maya



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    Bro me podrias explicar de que tratan los siguientes eventos por favor c: //
    CTF//Dota//FireStorm Event//Ultimate Survivor

    Ver perfil de usuario
    buen aporte ;D



    Si necesitas hospedaje para tu servidor usa este enlace y mira los buenos planes de Windows y Linux:
    Si tu cuenta de PayPal no esta verificada no importara, igual aceptan pagos con cuentas no verificadas.


    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) TRJEB8aSRYK5IulEU6ilJw
    Ver perfil de usuario
    Me sale el siguiente error en el evento FireStorm Event

    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) H7vgACy

    no me deje entrar con ningun player

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:Me sale el siguiente error en el evento FireStorm Event

    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) H7vgACy

    no me deje entrar con ningun player

    tiene que agregar storange que no este usando en su ot aqui

    Código:
    storages = {
                   main = 'fireStormEventMain', -- set free storage
                   player = 'fireStormEventPlayer', -- set free storage
                   joining = 'fireStormEventJoining', -- set free storage
                   exhaust = 'fireStormEventExhaust', -- set free storage
                   countEvent = 'fireStormEventCountEvent' -- set free storage
                },

    puede usas ejemplo

    50000
    50001
    de forma creciente



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    Ahora me sale el siguiente error

    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YcrFObd

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:Ahora me sale el siguiente error

    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YcrFObd


    Código:
    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="Fire_Storm_Event" version="3.0" author="CollocorpuseK" contact="otland.net" enabled="yes">
     
        <config name="config_fire_storm_event">
            <![CDATA[
                configFireStormEvent = {
                    storages = {
                        main = '13335', -- set free storage
                        player = '13336', -- set free storage
                        joining = '13337', -- set free storage
                        exhaust = '13338', -- set free storage
                        countEvent = '13339' -- set free storage
                    },
                 
                    position = {x=852 ,y=975,z=7}, -- position which player is teleported to
                    room = {
                        from = {x=851,y=974,z=7}, -- left top corner of event room
                        to = {x=873,y=996,z=7} -- right bottom corner of event room
                    },
     
                    rewards = {2472, 8982, 5785, 2365}, -- reward id which player can win (reward is random)
                    players = {
                        max = 50,
                        min = 2,
                        minLevel = 100
                    },
     
                    days = {
                        ['Tuesday'] = {'20:00:00'},
                        ['Thursday'] = {'18:37:00'},
                        ['Sunday'] = {'15:00:00'}
                    },
     
                    fireStormDelay = 1000, -- milisecond
                 
     
                    delayTime = 5.0, -- time in which players who joined to event are teleporting to teleport position
                    startEvent = 1, -- time from teleport to start event
                    text = 'To win and get a Rewards, stay as long as possible in the arena.'
                }
     
                fight = createConditionObject(CONDITION_INFIGHT)
                setConditionParam(fight, CONDITION_PARAM_TICKS, -1)
             
                y, x = 1, 1 -- don't change it
            ]]>
        </config>
     
        <lib name="lib_fire_storm_event">
            <![CDATA[
                function doStartFireStormEvent()
                    doSetStorage(configFireStormEvent.storages.joining, -1)
                 
                    if configFireStormEvent.players.min <= doCountPlayersFireStormEvent() then     
                        for _, cid in ipairs(getPlayersOnline()) do
                            if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                                doCreatureSetNoMove(cid, false)
                                doRemoveCondition(cid, CONDITION_INFIGHT)
                                doTeleportThing(cid, configFireStormEvent.position)
                                doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
                             
                                doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Get ready. Fire Storm starts in '..configFireStormEvent.startEvent..' seconds.')
                            end
                        end
                     
                        addEvent(doSetStorage, configFireStormEvent.startEvent * 1000, configFireStormEvent.storages.main, 1)
                        addEvent(doRepeatCheckFireStorm, configFireStormEvent.startEvent * 1000 + 2000)
                     
                        doBroadcastMessage('Fire Storm has started. LET\'S GO!')
                    else
                        for _, cid in ipairs(getPlayersOnline()) do
                            if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                                doCreatureSetNoMove(cid, false)
                                doRemoveCondition(cid, CONDITION_INFIGHT)
                            end
                        end
                     
                        doBroadcastMessage('Fire Storm hasn\'t started beacuse there were not enough players.')
                    end
                end
             
                function doRepeatCheckFireStorm()
                    if getStorage(configFireStormEvent.storages.main) > 0 then
                        local xTable, yTable, playerTable = {}, {}, {}
     
                        for x = configFireStormEvent.room.from.x, configFireStormEvent.room.to.x do
                            for y = configFireStormEvent.room.from.y, configFireStormEvent.room.to.y do
                                table.insert(xTable, x)
                                table.insert(yTable, y)
     
                                local n, i = getTileInfo({x=x, y=y, z=configFireStormEvent.room.to.z}).creatures, 1
                                if n ~= 0 then
                                    local v = getThingfromPos({x=x, y=y, z=configFireStormEvent.room.to.z, stackpos=i}).uid
                                    while v ~= 0 do
                                        if isPlayer(v) then
                                            table.insert(playerTable, v)
                                            if n == #playerTable then
                                                break
                                            end
                                        end
                                        i = i + 1
                                        v = getThingfromPos({x=x, y=y, z=configFireStormEvent.room.to.z, stackpos=i}).uid
                                    end
                                end
                            end
                        end
     
                        if #playerTable == 1 then
                            local prize = math.random(#configFireStormEvent.rewards)
                            doCreatureAddHealth(playerTable[1], getCreatureMaxHealth(playerTable[1]) - getCreatureHealth(playerTable[1]))
                            doCreatureAddMana(playerTable[1], getCreatureMaxMana(playerTable[1]) - getCreatureMana(playerTable[1]))
                            doTeleportThing(playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])), true)
                            doPlayerAddItem(playerTable[1], configFireStormEvent.rewards[prize], 1)
                            doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win! You have received ' .. getItemNameById(configFireStormEvent.rewards[prize]) .. ' as reward.')
                            doBroadcastMessage('Fire Storm has finished. The winner is ' .. getCreatureName(playerTable[1]) .. '. Congratulations.')
                            doSetStorage(configFireStormEvent.storages.main, -1)
                         
                            db.executeQuery("INSERT INTO `events` (`event_name`, `winner_name`, `won_item`, `time_win`) VALUES (\"Fire\", \"" .. getCreatureName(playerTable[1]) .. "\", \"" .. getItemNameById(configFireStormEvent.rewards[prize]) .. "\", " .. getStorage(configFireStormEvent.storages.countEvent) ..");")
                            doSetStorage(configFireStormEvent.storages.countEvent, getStorage(configFireStormEvent.storages.countEvent) + 1)
                         
                            x, y = 1, 1
                        elseif #playerTable > 1 then
                            for a = 1, y do
                                addEvent(
                                    function()
                                        local pos = {x=xTable[math.random(#xTable)], y=yTable[math.random(#yTable)], z=7}
     
                                        for _, player in ipairs(playerTable) do
                                            local pPos = getThingPos(player)
                                            if pPos.x == pos.x and pPos.y == pos.y and pPos.z == pos.z then
                                                doCreatureAddHealth(player, - getCreatureMaxHealth(player))
                                            end
                                        end
                                        doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE)
     
                                        addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE)
                                        addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA)
                                    end,
                                    math.random(100,1000)
                                )
                            end
                            if x == 5 * y then
                                y = y + 1
                            end
                         
                            x = x + 1
                        else
                            doBroadcastMessage('No one survived the Fire Storm.')
                            doSetStorage(configFireStormEvent.storages.main, -1)                     
                            doSetStorage(configFireStormEvent.storages.countEvent, getStorage(configFireStormEvent.storages.countEvent) + 1)
                            x, y = 1, 1
                        end
                     
                        addEvent(doRepeatCheckFireStorm, configFireStormEvent.fireStormDelay)
                    end
                end
             
                function doCountPlayersFireStormEvent()
                    local x = 0
                    for _, cid in ipairs(getPlayersOnline()) do
                        if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                            x = x + 1
                        end
                    end
                    return x
                end
             
                function doStartCountingFireStormEvent(x)
                    if configFireStormEvent.delayTime-x > 0 then
                        doBroadcastMessage('Fire Storm will start in '..configFireStormEvent.delayTime-x..' minutes. You can join to the event by say "!fire join".')
                        addEvent(doStartCountingFireStormEvent, 60*1000, x+1)
                    end
                end
            ]]>
        </lib>
        <talkaction words="!fire" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
     
                function onSay(cid, words, param)
                    if getStorage(configFireStormEvent.storages.joining) ~= 1 then
                        return doPlayerSendCancel(cid, 'Fire Storm hasn\'t started yet.')
                    elseif param == '' then
                        return doPlayerSendCancel(cid, 'Command param required (say: "!fire join" or "!fire leave.").')
                    elseif getPlayerLevel(cid) < configFireStormEvent.players.minLevel then
                        return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configFireStormEvent.players.minLevel..' level.')
                    elseif getTileInfo(getThingPos(cid)).protection ~= true then
                        return doPlayerSendCancel(cid, 'You can\'t join to the event if you aren\'t in protection zone.')
                    elseif exhaustion.check(cid, configFireStormEvent.storages.exhaust) ~= false then
                        return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configFireStormEvent.storages.exhaust)..' seconds to use this command again.')
                    end
     
                    if param == 'join' then
                        if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                            return doPlayerSendCancel(cid, 'You have arleady joined to event. Wait patiently for start.')
                        elseif doCountPlayersFireStormEvent() == configFireStormEvent.players.max then
                            return doPlayerSendCancel(cid, 'Max players in the event have been reached.')
                        end
                   
                        doCreatureSetNoMove(cid, true)
                        doPlayerPopupFYI(cid, configFireStormEvent.text)
                        doCreatureSetStorage(cid, configFireStormEvent.storages.player, 1)
                        doAddCondition(cid, fight)
                        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have joined to Fire Storm Event. You can\'t move until event start. Wait patiently for the event start.')
                        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have joined to Fire Storm Event.')
                    elseif param == 'leave' then
                        if getCreatureStorage(cid, configFireStormEvent.storages.player) <= 0 then
                            return doPlayerSendCancel(cid, 'You can\'t leave from the event if you don\'t join.')
                        end
                   
                        doCreatureSetNoMove(cid, false)
                        doRemoveCondition(cid, CONDITION_INFIGHT)
                        doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
                        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have left from the Fire Storm Event.')
                    end
               
                    exhaustion.set(cid, configFireStormEvent.storages.exhaust, 5)
               
                    return true
                end
            ]]>
        </talkaction>
     
        <talkaction words="!startfire" access="5" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
                domodlib("lib_fire_storm_event")
     
                function onSay(cid, words, param)
                    if getStorage(configFireStormEvent.storages.main) > 0 then
                        return doPlayerSendCancel(cid, 'Fire Storm Event is already running.')
                    end
           
                    doStartCountingFireStormEvent(0)
               
                    for _, pid in ipairs(getPlayersOnline()) do
                        if getCreatureStorage(pid, configFireStormEvent.storages.player) > 0 then
                            doCreatureSetStorage(pid, configFireStormEvent.storages.player, -1)
                            doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
                        end
                    end
               
                    doSetStorage(configFireStormEvent.storages.joining, 1)
                    addEvent(doStartFireStormEvent, configFireStormEvent.delayTime * 60 * 1000)
                    return true
                end
            ]]>
        </talkaction>
     
        <globalevent name="Fire_Storm_Event_Days" interval="1000" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
                domodlib("lib_fire_storm_event")
     
                local daysOpen = {}         
                for k, v in pairs(configFireStormEvent.days) do
                    table.insert(daysOpen, k)
                end
           
                function onThink(interval)
                    if isInArray(daysOpen, os.date('%A')) then
                        if isInArray(configFireStormEvent.days[os.date('%A')], os.date('%X', os.time())) then
                            if getStorage(configFireStormEvent.storages.joining) ~= 1 then
                                doStartCountingFireStormEvent(0)
                           
                                for _, pid in ipairs(getPlayersOnline()) do
                                    if getCreatureStorage(pid, configFireStormEvent.storages.player) > 0 then
                                        doCreatureSetStorage(pid, configFireStormEvent.storages.player, -1)
                                        doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
                                    end
                                end
                           
                                doSetStorage(configFireStormEvent.storages.joining, 1)
                                addEvent(doStartFireStormEvent, configFireStormEvent.delayTime * 60 * 1000)
                            end
                        end
                    end
                    return true
                end
            ]]>
        </globalevent>
     
        <event type="statschange" name="Fire_Storm_Event_Dead" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
     
                function onStatsChange(cid, attacker, type, combat, value)
                    if type == 1 and getCreatureHealth(cid) <= value then
                        if isInRange(getThingPos(cid), configFireStormEvent.room.from, configFireStormEvent.room.to) then
                            doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
                            doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
                            doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                            doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You loss.')
                            return false
                        end
                    end
                    return true
                end
            ]]>
        </event>
     
        <event type="login" name="Fire_Storm_Event_Login" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
       
                function onLogin(cid)
                    if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                        doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
                        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
                        doCreatureSetNoMove(cid, false)
                        doRemoveCondition(cid, CONDITION_INFIGHT)
                    end
     
                    registerCreatureEvent(cid, 'Fire_Storm_Event_Dead')
                    return true
                end
            ]]>
        </event>
     
        <globalevent name="Fire_Storm_Event_Start" type="startup" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
     
                function onStartup()
                    doSetStorage(configFireStormEvent.storages.main, -1)
                    doSetStorage(configFireStormEvent.storages.joining, -1)
                    return true
                end
            ]]>
        </globalevent>
    </mod>



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    en el de zombie event versión vodkart me aparece un error, estoy usando otxserver 8.6 2.12+

    Código:
    [14:37:44.004] [Error - GlobalEvent Interface]
    [14:37:44.004] In a timer event called from:
    [14:37:44.004] domodlib('zombie_config')
    [14:37:44.004] function onThink(interval, lastExecution)
    [14:37:44.004]  if zombie_days[os.date("%A")] then
    [14:37:44.004]          local hrs = tostring(os.date("%X")):sub(1, 5)
    [14:37:44.005]          if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
    [14:37:44.005]                  local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
    [14:37:44.005]                  doItemSetAttribute(tp, "aid", 45100)
    [14:37:44.005]                  CheckZombieEvent(zombie_config.CheckTime)
    [14:37:44.006]                  setGlobalStorageValue(zombie_config.storages[1], 0)
    [14:37:44.006]                  setGlobalStorageValue(zombie_config.storages[2], 0)
    [14:37:44.006]                  HaveCreatureZombie(zombie_config.arena, true)
    [14:37:44.006]          end
    [14:37:44.006]  end
    [14:37:44.007]  return true
    [14:37:44.007] end:onThink
    [14:37:44.007] Description:
    [14:37:44.007] (LuaInterface::luaDoCreateMonster) Monster with name '' not found

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo]

    El problema ahi que veo es que no esta reconociendo el nombre del moustro



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    lo copie exactamente igual
    Código:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="no">
    <config name="zombie_config"><![CDATA[
    zombie_config = {
       storages = {172100, 172101, 172102}, -- n edite
       players = {min = 2, max = 30}, -- min, max players no evento
       rewards = {items ={{9971,10},{8306,4},{7440,1}}, trophy = 5805},
       timeToStartEvent = 10, -- segundos para começar o evento
       CheckTime = 1, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
       teleport = {{x=985, y=992, z=7}, {x=1501, y=909, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
       arena = {{x=1486, y=888, z=7},{x=1522, y=936, z=7}}, -- area positions
       monster_name = "Zombie Event",
       timeBetweenSpawns = 20,
       min_Level = 8
    }
    zombie_days = {
       ["Monday"] = {"13:00","18:00","20:00","22:00"},
       ["Tuesday"] = {"13:00","18:00","22:50","22:00"},
       ["Wednesday"] = {"21:03","18:00","20:00","22:00"},
       ["Thursday"] = {"13:00","18:00","20:00","22:00"},
       ["Friday"] = {"13:00","18:00","21:45","22:00"},
       ["Saturday"] = {"14:36","18:00","20:00","22:00"},
       ["Sunday"] = {"13:00","18:00","20:00","22:00"}
    }
    function removeZombieTp()
       local t = getTileItemById(zombie_config.teleport[1], 1387).uid
       return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF)
    end
    function ZerarStoragesZombie()
       for _, stor in pairs(zombie_config.storages) do
          setGlobalStorageValue(stor, 0)
       end
    end
    function getPlayersInZombieEvent()
       local t = {}
       for _, pid in pairs(getPlayersOnline()) do
          if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then
             t[#t+1] = pid
          end
       end
       return t
    end
    function getZombieRewards(cid, items)
     for _, i_i in ipairs(items) do
      local item, amount = i_i[1],i_i[2]
      if isItemStackable(item) or amount == 1 then
      doPlayerAddItem(cid, item, amount)
      else
      for i = 1, amount do
        doPlayerAddItem(cid, item, 1)
      end
      end
     end
    end
    function HaveCreatureZombie(area, remove)
       for x = area[1].x - 1, area[2].x + 1 do
          for y = area[1].y - 1, area[2].y + 1 do
             local pos = {x=x, y=y, z=area[1].z}
             local m = getTopCreature(pos).uid
             if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end
          end
       end
    end
    function spawnZombie()
       if #getPlayersInZombieEvent() > 1 then
             local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z}
             local var = doCreateMonster(zombie_config.monster_name, pos, false, false, false)
          if var == false then
             spawnZombie()
             return LUA_ERROR
          else
             doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE)
             addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE)
             addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA)
             doSendMagicEffect(pos, CONST_ME_MORTAREA)
             setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1)
             doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
             addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000)
          end
       end
    end
    function CheckZombieEvent(delay)
       if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then
          if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then
             doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
          elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then
             for _, cid in pairs(getPlayersInZombieEvent()) do
                doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
             end
             removeZombieTp()
             doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING)
             setGlobalStorageValue(zombie_config.storages[1], 0)
          elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then
             removeZombieTp()
             doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.")
             for _, var in pairs(getPlayersInZombieEvent()) do
                doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeBetweenSpawns .. " seconds! Good luck!")
             end
             addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
          end
          addEvent(CheckZombieEvent, 60000, delay-1)
       end
    end]]></config>
    <event type="statschange" name="ZombieStats" event="script"><![CDATA[
    domodlib('zombie_config')
    if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
       if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
          if #getPlayersInZombieEvent() > 1 then
             doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
             local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
             doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
             doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
             doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
             doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
             if #getPlayersInZombieEvent() == 1 then
                local winner = getPlayersInZombieEvent()[1]
                doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
                local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
                doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
                getZombieRewards(winner, zombie_config.rewards.items)
                doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
                doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
                doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
                HaveCreatureZombie(zombie_config.arena, true)
             end
          else
             doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
             HaveCreatureZombie(zombie_config.arena, true)
          end
          return false
       end
    end
    return true]]></event>
    <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
    domodlib('zombie_config')
    function onThink(interval, lastExecution)
       if zombie_days[os.date("%A")] then
          local hrs = tostring(os.date("%X")):sub(1, 5)
          if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
             local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
             doItemSetAttribute(tp, "aid", 45100)
             CheckZombieEvent(zombie_config.CheckTime)
             setGlobalStorageValue(zombie_config.storages[1], 0)
             setGlobalStorageValue(zombie_config.storages[2], 0)
             HaveCreatureZombie(zombie_config.arena, true)
          end
       end
       return true
    end]]></globalevent>
    <event type="login" name="Zombie_Login" event="script"><![CDATA[
    domodlib('zombie_config')
    function onLogin(cid)
       registerCreatureEvent(cid, "ZombieBattle")
       registerCreatureEvent(cid, "ZombieStats")
       if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
          doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
       end
       return true
    end]]></event>
    <event type="combat" name="ZombieBattle" event="script"><![CDATA[
    domodlib('zombie_config')
    if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
       doPlayerSendCancel(cid, "You may not attack this player.") return false
    end
    return true
    ]]></event>
    <movevent type="StepIn" actionid ="45100" event="script"><![CDATA[
    domodlib('zombie_config')
    function onStepIn(cid, item, position, fromPosition)
       if not isPlayer(cid) then return true end
       if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end
       if getPlayerLevel(cid) < zombie_config.min_Level then
          doTeleportThing(cid, fromPosition, true)
          doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".")
          doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
          return true
       end
       if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then
          doTeleportThing(cid, zombie_config.teleport[2])
          setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
          doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
          if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then
             setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
             removeZombieTp()
             doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.")
             for _, var in pairs(getPlayersInZombieEvent()) do
                doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeBetweenSpawns .. " seconds! Good luck!")
             end
             addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
          end
       end
       return true
    end]]></movevent>
    <talkaction words="/zombiestart" access="5" event="buffer"><![CDATA[
    domodlib('zombie_config')
       if getGlobalStorageValue(zombie_config.storages[3]) > 0 then
          doPlayerSendCancel(cid, "The event is already starting.") return true
       elseif not param or not tonumber(param) then
          doPlayerSendCancel(cid, "Use only numbers.") return true
       end
       local param = tonumber(param) <= 0 and 1 or tonumber(param)
       local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
          doItemSetAttribute(tp, "aid", 45100)
          CheckZombieEvent(tonumber(param))
          ZerarStoragesZombie()
          setGlobalStorageValue(zombie_config.storages[3], 1)
          HaveCreatureZombie(zombie_config.arena, true)
    ]]></talkaction>
    <globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[
    domodlib('zombie_config')
    ZerarStoragesZombie()
    return true]]></globalevent>
    </mod>

    pero no veo donde esta el name del Monster aquí

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    monster_name = "Zombie Event",

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

    Ahi esta ese ea el nombre monster



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    admin, sigue saliendo el mismo error, ya verifique que el nombre del zombie este bien, con mayusculas y todo, pero sigue saliendo el mismo error.

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:admin, sigue saliendo el mismo error, ya verifique que el nombre del zombie este bien, con mayusculas y todo, pero sigue saliendo el mismo error.

    intenta asi

    Código:

            <?xml version="1.0" encoding="ISO-8859-1"?>
            <mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="no">
            <config name="zombie_config"><![CDATA[
            zombie_config = {
              storages = {172100, 172101, 172102}, -- n edite
              players = {min = 2, max = 30}, -- min, max players no evento
              rewards = {items ={{9971,10},{8306,4},{7440,1}}, trophy = 5805},
              timeToStartEvent = 10, -- segundos para começar o evento
              CheckTime = 1, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
              teleport = {{x=985, y=992, z=7}, {x=1501, y=909, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
              arena = {{x=1486, y=888, z=7},{x=1522, y=936, z=7}}, -- area positions
              monster_name = 'Zombie Event',
              timeBetweenSpawns = 20,
              min_Level = 8
            }
            zombie_days = {
              ["Monday"] = {"13:00","18:00","20:00","22:00"},
              ["Tuesday"] = {"13:00","18:00","22:50","22:00"},
              ["Wednesday"] = {"21:03","18:00","20:00","22:00"},
              ["Thursday"] = {"13:00","18:00","20:00","22:00"},
              ["Friday"] = {"13:00","18:00","21:45","22:00"},
              ["Saturday"] = {"14:36","18:00","20:00","22:00"},
              ["Sunday"] = {"13:00","18:00","20:00","22:00"}
            }
            function removeZombieTp()
              local t = getTileItemById(zombie_config.teleport[1], 1387).uid
              return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF)
            end
            function ZerarStoragesZombie()
              for _, stor in pairs(zombie_config.storages) do
                  setGlobalStorageValue(stor, 0)
              end
            end
            function getPlayersInZombieEvent()
              local t = {}
              for _, pid in pairs(getPlayersOnline()) do
                  if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then
                    t[#t+1] = pid
                  end
              end
              return t
            end
            function getZombieRewards(cid, items)
            for _, i_i in ipairs(items) do
              local item, amount = i_i[1],i_i[2]
              if isItemStackable(item) or amount == 1 then
              doPlayerAddItem(cid, item, amount)
              else
              for i = 1, amount do
                doPlayerAddItem(cid, item, 1)
              end
              end
            end
            end
            function HaveCreatureZombie(area, remove)
              for x = area[1].x - 1, area[2].x + 1 do
                  for y = area[1].y - 1, area[2].y + 1 do
                    local pos = {x=x, y=y, z=area[1].z}
                    local m = getTopCreature(pos).uid
                    if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end
                  end
              end
            end
            function spawnZombie()
              if #getPlayersInZombieEvent() > 1 then
                    local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z}
                    local var = doCreateMonster(zombie_config.monster_name, pos, false, false, false)
                  if var == false then
                    spawnZombie()
                    return LUA_ERROR
                  else
                    doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE)
                    addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE)
                    addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA)
                    doSendMagicEffect(pos, CONST_ME_MORTAREA)
                    setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1)
                    doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
                    addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000)
                  end
              end
            end
            function CheckZombieEvent(delay)
              if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then
                  if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then
                    doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
                  elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then
                    for _, cid in pairs(getPlayersInZombieEvent()) do
                        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
                    end
                    removeZombieTp()
                    doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING)
                    setGlobalStorageValue(zombie_config.storages[1], 0)
                  elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then
                    removeZombieTp()
                    doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.")
                    for _, var in pairs(getPlayersInZombieEvent()) do
                        doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeBetweenSpawns .. " seconds! Good luck!")
                    end
                    addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
                  end
                  addEvent(CheckZombieEvent, 60000, delay-1)
              end
            end]]></config>
            <event type="statschange" name="ZombieStats" event="script"><![CDATA[
            domodlib('zombie_config')
            if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
              if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
                  if #getPlayersInZombieEvent() > 1 then
                    doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
                    local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
                    doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
                    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
                    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
                    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
                    if #getPlayersInZombieEvent() == 1 then
                        local winner = getPlayersInZombieEvent()[1]
                        doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
                        local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
                        doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
                        getZombieRewards(winner, zombie_config.rewards.items)
                        doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
                        doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
                        doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
                        HaveCreatureZombie(zombie_config.arena, true)
                    end
                  else
                    doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
                    HaveCreatureZombie(zombie_config.arena, true)
                  end
                  return false
              end
            end
            return true]]></event>
            <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
            domodlib('zombie_config')
            function onThink(interval, lastExecution)
              if zombie_days[os.date("%A")] then
                  local hrs = tostring(os.date("%X")):sub(1, 5)
                  if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
                    local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
                    doItemSetAttribute(tp, "aid", 45100)
                    CheckZombieEvent(zombie_config.CheckTime)
                    setGlobalStorageValue(zombie_config.storages[1], 0)
                    setGlobalStorageValue(zombie_config.storages[2], 0)
                    HaveCreatureZombie(zombie_config.arena, true)
                  end
              end
              return true
            end]]></globalevent>
            <event type="login" name="Zombie_Login" event="script"><![CDATA[
            domodlib('zombie_config')
            function onLogin(cid)
              registerCreatureEvent(cid, "ZombieBattle")
              registerCreatureEvent(cid, "ZombieStats")
              if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
                  doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
              end
              return true
            end]]></event>
            <event type="combat" name="ZombieBattle" event="script"><![CDATA[
            domodlib('zombie_config')
            if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
              doPlayerSendCancel(cid, "You may not attack this player.") return false
            end
            return true
            ]]></event>
            <movevent type="StepIn" actionid ="45100" event="script"><![CDATA[
            domodlib('zombie_config')
            function onStepIn(cid, item, position, fromPosition)
              if not isPlayer(cid) then return true end
              if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end
              if getPlayerLevel(cid) < zombie_config.min_Level then
                  doTeleportThing(cid, fromPosition, true)
                  doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".")
                  doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
                  return true
              end
              if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then
                  doTeleportThing(cid, zombie_config.teleport[2])
                  setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
                  doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
                  if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then
                    setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
                    removeZombieTp()
                    doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.")
                    for _, var in pairs(getPlayersInZombieEvent()) do
                        doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeBetweenSpawns .. " seconds! Good luck!")
                    end
                    addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
                  end
              end
              return true
            end]]></movevent>
            <talkaction words="/zombiestart" access="5" event="buffer"><![CDATA[
            domodlib('zombie_config')
              if getGlobalStorageValue(zombie_config.storages[3]) > 0 then
                  doPlayerSendCancel(cid, "The event is already starting.") return true
              elseif not param or not tonumber(param) then
                  doPlayerSendCancel(cid, "Use only numbers.") return true
              end
              local param = tonumber(param) <= 0 and 1 or tonumber(param)
              local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
                  doItemSetAttribute(tp, "aid", 45100)
                  CheckZombieEvent(tonumber(param))
                  ZerarStoragesZombie()
                  setGlobalStorageValue(zombie_config.storages[3], 1)
                  HaveCreatureZombie(zombie_config.arena, true)
            ]]></talkaction>
            <globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[
            domodlib('zombie_config')
            ZerarStoragesZombie()
            return true]]></globalevent>
            </mod>



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    da este error :
    Código:
    mods/zombie.xml:1: parser error : XML declaration allowed only at the start of the document
            <?xml version="1.0" encoding="ISO-8859-1"?>
                ^
    mods/zombie.xml:8: parser error : Input is not proper UTF-8, indicate encoding !
    Bytes: 0xE7 0x61 0x72 0x20
              timeToStartEvent = 10, -- segundos para comeþar o evento
                                                          ^
    [11:51:45.918] >>> Loading zombie.xml ...[Error - ScriptManager::loadFromXml] Cannot load mod zombie.xml
    [11:51:45.919] Line: 8, Info: Input is not proper UTF-8, indicate encoding !
    [11:51:45.921] Bytes: 0xE7 0x61 0x72 0x20

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:da este error :
    Código:
    mods/zombie.xml:1: parser error : XML declaration allowed only at the start of the document
            <?xml version="1.0" encoding="ISO-8859-1"?>
                ^
    mods/zombie.xml:8: parser error : Input is not proper UTF-8, indicate encoding !
    Bytes: 0xE7 0x61 0x72 0x20
              timeToStartEvent = 10, -- segundos para comeþar o evento
                                                          ^
    [11:51:45.918] >>> Loading zombie.xml ...[Error - ScriptManager::loadFromXml] Cannot load mod zombie.xml
    [11:51:45.919] Line: 8, Info: Input is not proper UTF-8, indicate encoding !
    [11:51:45.921] Bytes: 0xE7 0x61 0x72 0x20



    rpueba con este

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


    Luego ahora nos vamos a la carpeta lib y editamos el archivo zombie_event.lua

    Code:

    ZE_blockEnterItemPosition = {x= 1000, y=1009, z=7}
    ZE_enterPosition = {x = 925, y = 1036, z = 7}
    ZE_kickPosition = {x=1000, y=1000, z=7}
    ZE_spawnFromPosition = {x = 913, y = 1024, z = 7}
    ZE_spawnToPosition = {x = 939, y = 1049, z = 7}
    -- ITEM IDS
    ZE_blockEnterItemID = 9485

    Aqui es donde estará el item que bloqueara el evento.
    Code:

    ZE_blockEnterItemPosition = {x= 1000, y=1009, z=7}

    Aqui es donde los enviará el tp al entrar
    Code:

    ZE_enterPosition = {x = 925, y = 1036, z = 7}

    Aqui es donde los enviará cuando el zombie los mate(por lo general es el templo)
    Code:

    ZE_kickPosition = {x=1000, y=1000, z=7}

    Aqui es donde se ponen las posiciones esquina a esquina donde saldrán los zombies
    Code:

    ZE_spawnFromPosition = {x = 913, y = 1024, z = 7}
    ZE_spawnToPosition = {x = 939, y = 1049, z = 7}


    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) 14jlyt4

    Para cambiar el id del item que bloquea y como pueden ver en el video tengo como unas rejas.(OJO EL APARECERÁ Y DESAPARECERÁ AUTOMÁTICAMENTE NO HAY QUE PONERLO EN EL MAPA)
    Code:

    ZE_blockEnterItemID = 9485


    Y ahora en movements, el id que instalaron actionid="5555" en eso lo tienen que poner en un tp en el map como por ejemplo

    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) 2qd4qjc

    Los comandos son

    Code:

    /zombiestart +players (ejemplo:/zombiestart 15)
    /zombiestart force

    Y eso es todo amigos, cualquier duda comenten, si falta algo tambien, puede que se me haya olvidado




    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    admin, no hay una forma donde el evento empiece automáticamente ?

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:admin, no hay una forma donde el evento empiece automáticamente ?


    que evento ?????



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com
    el zombie event, del script que solo tu lo activas, pero habrá una forma de que se active automáticamente ?

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:el zombie event, del script que solo tu lo activas, pero habrá una forma de que se active automáticamente ?

    claro solo muda el talkaction que que activa el evento a globalevents y listo cambiando la funcion principal



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com

    20default error rush event el Jue Mayo 02, 2019 12:35 pm

    paradanca

    paradanca
    Nuevo Miembro
    Nuevo Miembro
    Meu rush event bugado:
    In a timer event called from:
    domodlib('ultimatelib')
    [function onUse(cid, item)
    if getPlayerStorageValue(cid, USurvival.storage_ex) <= os.time() then
    if #getPlayersInArea(USurvival.posi, USurvival.posf) == 0 then
    doCleanArena()
    doTeleportThing(cid, USurvival.posc)
    doPlayerSendTextMessage(cid, 21, 'The Ultimate Survival will Start in 10 seconds! Be ready to face your destiny!')
    addEvent(doStartWave, 10000, 1, cid)
    setPlayerStorageValue(cid, USurvival.storage_wave, 1)
    setPlayerStorageValue(cid, USurvival.storage_ex, os.time() + USurvival.exhaust)
    if item.itemid % 2 == 1 then
    doTransformItem(item.uid, item.itemid+1)
    else
    doTransformItem(item.uid, item.itemid-1)
    end
    else
    doPlayerSendCancel(cid, 'Someone is already in the arena.')
    end
    else
    local left = getPlayerStorageValue(cid, USurvival.storage_ex) - os.time()
    left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)}
    doPlayerSendCancel(cid, 'You have to wait '.. left.hour ..'h and '..left.minutes..'min.')
    doSendMagicEffect(getThingPos(cid), 2)
    end
    return true
    end
    :onUse
    Description:
    (LuaInterface::luaDoCreateMonster) Cannot create monster: Grim Reaper

    Em todos os monsters

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:Meu rush event bugado:
    In a timer event called from:
    domodlib('ultimatelib')
    [function onUse(cid, item)
    if getPlayerStorageValue(cid, USurvival.storage_ex) <= os.time() then
    if #getPlayersInArea(USurvival.posi, USurvival.posf) == 0 then
    doCleanArena()
    doTeleportThing(cid, USurvival.posc)
    doPlayerSendTextMessage(cid, 21, 'The Ultimate Survival will Start in 10 seconds! Be ready to face your destiny!')
    addEvent(doStartWave, 10000, 1, cid)
    setPlayerStorageValue(cid, USurvival.storage_wave, 1)
    setPlayerStorageValue(cid, USurvival.storage_ex, os.time() + USurvival.exhaust)
    if item.itemid % 2 == 1 then
    doTransformItem(item.uid, item.itemid+1)
    else
    doTransformItem(item.uid, item.itemid-1)
    end
    else
    doPlayerSendCancel(cid, 'Someone is already in the arena.')
    end
    else
    local left = getPlayerStorageValue(cid, USurvival.storage_ex) - os.time()
    left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)}
    doPlayerSendCancel(cid, 'You have to wait '.. left.hour ..'h and '..left.minutes..'min.')
    doSendMagicEffect(getThingPos(cid), 2)
    end
    return true
    end
    :onUse
    Description:
    (LuaInterface::luaDoCreateMonster) Cannot create monster: Grim Reaper

    Em todos os monsters


    use en ves de DoCreateMonster

    use eto
    Código:
    local pos = {x=xxx y=xxxx, z=xxx}
    doSummonCreature(Hydra, pos)



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com

    paradanca

    paradanca
    Nuevo Miembro
    Nuevo Miembro
    Ficaria assim?

    Código:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
                   ULTIMATE SURVIVAL - Codigo feito por Omega / Pedido por vinnevinne

                         Informacoes: http://www.xtibia.com/forum/topic/221415-ultimate-survival/
    -->

    <mod name="Ultimate Survival" version="1.0" author="Omega" enabled="yes">
    <config name="ultimatelib"><![CDATA[
    USurvival = {
    posi = {x=203, y=214, z=7}, -- parte esquerda superior da arena
    posf = {x=224, y=244, z=7}, -- parte direita inferior da arena
    posc = {x=214, y=235, z=7}, -- onde o player entra na arena

    waves = {
    [1] = {monsters = {'Fury', 'Grim Reaper'}, count = 30, reward = {exp = 0, item = 2148, amount = 1, money = 100}},
    [2] = {monsters = {'Grim Dark Reaper', 'Undead Darkshadow'}, count = 6, reward = {exp = 0, item = 2152, amount = 1, money = 1000}},
    [3] = {monsters = {'Massive Earth Giant', 'Ferumbras Master'}, count = 10, reward = {exp = 0, item = 2160, amount = 1, money = 10000}},
    },
    exhaust = 1 * 24 * 60 * 60, -- Tempo em segundos ate poder entrar novamente na arena (1 * 24 * 60 * 60 = 1 dia)

    final_reward = {item = 2160, amount = 100, exp = 10000, money = 100000},

    storage_ex = 607069,
    storage_wave = 607089,
    }

    function isWalkable(pos)-- by Nord / editado por Omega
       if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then
           return false
       elseif isCreature(getTopCreature(pos).uid) then
           return false
       elseif getTileInfo(pos).protection then
           return false
       elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then
           return false
       end
    return true
    end

    function doSpawnMonsters(monsters, pos, radius, limit)
    if not pos.x or not pos.y or not pos.z or not type(monsters) == 'table' then
    return false
    end
    local radius = tonumber(radius)
    if radius > 5 then
    radius = 5
    elseif radius < 2 then
    radius = 2
    end
    if not limit or limit < 1 then
    limit = 1
    elseif limit > radius ^ 2 then
    limit = math.floor((radius*1.5) ^ 2)
    end

    local k = 0
    local tries = 0
    repeat
    for x = pos.x - radius, pos.x + radius do
    for y = pos.y - radius, pos.y + radius do
    if isWalkable({x=x, y=y, z=pos.z}) then
    local monster = monsters[math.random(1, #monsters)]
    local chance = math.random(1, 100)
    if k == limit then
    break
    elseif chance <= 8 and doSummonCreature(monster, {x=x, y=y, z=pos.z}) then
    k = k + 1
    end
    end
    end
    end
    tries = tries + 1
    until k >= limit or tries >= 500
    return k >= limit and true or false
    end

    function getPlayersInArea(pos1,pos2)
    local players = {}
    if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then
    for a = pos1.x, pos2.x do
    for b = pos1.y,pos2.y do
    local pos = {x=a,y=b,z=pos1.z}
    if isPlayer(getTopCreature(pos).uid) then
    table.insert(players,getTopCreature(pos).uid)
    end
    end
    end
    return players
    else
    return false
    end
    end

    function getMonstersInArea(pos1,pos2)
    local players = {}
    if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then
    for a = pos1.x, pos2.x do
    for b = pos1.y,pos2.y do
    local pos = {x=a,y=b,z=pos1.z}
    if isMonster(getTopCreature(pos).uid) then
    table.insert(players,getTopCreature(pos).uid)
    end
    end
    end
    return players
    else
    return false
    end
    end

    function doCleanArena()
    local monsters = getMonstersInArea(USurvival.posi, USurvival.posf)
    for _, cid in pairs(monsters) do
    doRemoveCreature(cid)
    end
    end

    function doStartWave(waveID, cid)
    if not isCreature(cid) then return false end
    if USurvival.waves[waveID] then
    wave = USurvival.waves[waveID]
    doSpawnMonsters(wave.monsters, USurvival.posc, 5, wave.count)
    doPlayerSendTextMessage(cid, 21, 'Wave '..waveID..' has started! FIGHT!')
    end
    end
    ]]></config>

    <action actionid="4599" event="script" override="yes"><![CDATA[
    domodlib('ultimatelib')
    function onUse(cid, item)
     if getPlayerStorageValue(cid, USurvival.storage_ex) <= os.time() then
     if #getPlayersInArea(USurvival.posi, USurvival.posf) == 0 then
     doCleanArena()
     doTeleportThing(cid, USurvival.posc)
     doPlayerSendTextMessage(cid, 21, 'The Ultimate Survival will Start in 10 seconds! Be ready to face your destiny!')
     addEvent(doStartWave, 10000, 1, cid)
     setPlayerStorageValue(cid, USurvival.storage_wave, 1)
     setPlayerStorageValue(cid, USurvival.storage_ex, os.time() + USurvival.exhaust)
     if item.itemid % 2 == 1 then
     doTransformItem(item.uid, item.itemid+1)
     else
     doTransformItem(item.uid, item.itemid-1)
     end
     else
     doPlayerSendCancel(cid, 'Someone is already in the arena.')
     doSendMagicEffect(getThingPos(cid), 2)
     end
     else
     local left = getPlayerStorageValue(cid, USurvival.storage_ex) - os.time()
     left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)}
     doPlayerSendCancel(cid, 'You have to wait '.. left.hour ..'h and '..left.minutes..'min.')
     doSendMagicEffect(getThingPos(cid), 2)
     end
     return true
    end
    ]]></action>

    <event type="login" name="US Login" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onLogin(cid)
     registerCreatureEvent(cid,'UltimateSurvival1')
     registerCreatureEvent(cid,'UltimateSurvival2')
     if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
     doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
     doSendMagicEffect(getThingPos(cid), 10)
     end
     return true
    end
    ]]></event>

    <event type="kill" name="UltimateSurvival1" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onKill(cid, target)
    if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
    if #getMonstersInArea(USurvival.posi, USurvival.posf) == 1 then
    local wave = getPlayerStorageValue(cid, USurvival.storage_wave)
    if USurvival.waves[wave+1] then
    setPlayerStorageValue(cid, USurvival.storage_wave, wave + 1)
    addEvent(doStartWave, 5000, wave + 1, cid)
    doPlayerSendTextMessage(cid, 22, 'Congratulations! Next wave will start in 5 seconds!')
    else
    doPlayerSendTextMessage(cid, 22, 'CONGRATULATIONS! YOU HAVE BEATEN THE ULTIMATE SURVIVAL!')
    local reward = USurvival.final_reward
    if reward.item then
    doPlayerAddItem(cid, reward.item, (reward.amount or 1), false)
    end
    if reward.exp then
    doPlayerAddExp(cid, reward.exp)
    end
    if reward.money then
    doPlayerAddMoney(cid, reward.money)
    end
    local medal = doPlayerAddItem(cid, 5785, 1, false)
    if medal then
    doItemSetAttribute(medal, 'description', 'This was awarded to '..getCreatureName(cid)..' for completing the Ultimate Survival.')
    doItemSetAttribute(medal,'name', 'Ultimate Survival Medal')
    end
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    end
    end
    end
    return true
    end

    ]]></event>

    <event type="preparedeath" name="UltimateSurvival2" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onPrepareDeath(cid, killers)
    if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
    doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
    doRemoveConditions(cid, false)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doPlayerSendTextMessage(cid, 21, 'Too bad, you couldn\'t defeat the Ultimate Survival... Better luck next time.')
    local reward = USurvival.waves[getPlayerStorageValue(cid, USurvival.storage_wave)].reward
    if reward.item then
    doPlayerAddItem(cid, reward.item, reward.amount or 1)
    end
    if reward.exp then
    doPlayerAddExp(cid, reward.exp)
    end
    if reward.money then
    doPlayerAddMoney(cid, reward.money)
    end
    return false
    end
    return true
    end
    ]]></event>

    </mod>

    Ver perfil de usuario

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:Ficaria assim?

    Código:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
                   ULTIMATE SURVIVAL - Codigo feito por Omega / Pedido por vinnevinne

                         Informacoes: http://www.xtibia.com/forum/topic/221415-ultimate-survival/
    -->

    <mod name="Ultimate Survival" version="1.0" author="Omega" enabled="yes">
    <config name="ultimatelib"><![CDATA[
    USurvival = {
    posi = {x=203, y=214, z=7}, -- parte esquerda superior da arena
    posf = {x=224, y=244, z=7}, -- parte direita inferior da arena
    posc = {x=214, y=235, z=7}, -- onde o player entra na arena

    waves = {
    [1] = {monsters = {'Fury', 'Grim Reaper'}, count = 30, reward = {exp = 0, item = 2148, amount = 1, money = 100}},
    [2] = {monsters = {'Grim Dark Reaper', 'Undead Darkshadow'}, count = 6, reward = {exp = 0, item = 2152, amount = 1, money = 1000}},
    [3] = {monsters = {'Massive Earth Giant', 'Ferumbras Master'}, count = 10, reward = {exp = 0, item = 2160, amount = 1, money = 10000}},
    },
    exhaust = 1 * 24 * 60 * 60, -- Tempo em segundos ate poder entrar novamente na arena (1 * 24 * 60 * 60 = 1 dia)

    final_reward = {item = 2160, amount = 100, exp = 10000, money = 100000},

    storage_ex = 607069,
    storage_wave = 607089,
    }

    function isWalkable(pos)-- by Nord / editado por Omega
       if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then
           return false
       elseif isCreature(getTopCreature(pos).uid) then
           return false
       elseif getTileInfo(pos).protection then
           return false
       elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then
           return false
       end
    return true
    end

    function doSpawnMonsters(monsters, pos, radius, limit)
    if not pos.x or not pos.y or not pos.z or not type(monsters) == 'table' then
    return false
    end
    local radius = tonumber(radius)
    if radius > 5 then
    radius = 5
    elseif radius < 2 then
    radius = 2
    end
    if not limit or limit < 1 then
    limit = 1
    elseif limit > radius ^ 2 then
    limit = math.floor((radius*1.5) ^ 2)
    end

    local k = 0
    local tries = 0
    repeat
    for x = pos.x - radius, pos.x + radius do
    for y = pos.y - radius, pos.y + radius do
    if isWalkable({x=x, y=y, z=pos.z}) then
    local monster = monsters[math.random(1, #monsters)]
    local chance = math.random(1, 100)
    if k == limit then
    break
    elseif chance <= 8 and doSummonCreature(monster, {x=x, y=y, z=pos.z}) then
    k = k + 1
    end
    end
    end
    end
    tries = tries + 1
    until k >= limit or tries >= 500
    return k >= limit and true or false
    end

    function getPlayersInArea(pos1,pos2)
    local players = {}
    if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then
    for a = pos1.x, pos2.x do
    for b = pos1.y,pos2.y do
    local pos = {x=a,y=b,z=pos1.z}
    if isPlayer(getTopCreature(pos).uid) then
    table.insert(players,getTopCreature(pos).uid)
    end
    end
    end
    return players
    else
    return false
    end
    end

    function getMonstersInArea(pos1,pos2)
    local players = {}
    if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then
    for a = pos1.x, pos2.x do
    for b = pos1.y,pos2.y do
    local pos = {x=a,y=b,z=pos1.z}
    if isMonster(getTopCreature(pos).uid) then
    table.insert(players,getTopCreature(pos).uid)
    end
    end
    end
    return players
    else
    return false
    end
    end

    function doCleanArena()
    local monsters = getMonstersInArea(USurvival.posi, USurvival.posf)
    for _, cid in pairs(monsters) do
    doRemoveCreature(cid)
    end
    end

    function doStartWave(waveID, cid)
    if not isCreature(cid) then return false end
    if USurvival.waves[waveID] then
    wave = USurvival.waves[waveID]
    doSpawnMonsters(wave.monsters, USurvival.posc, 5, wave.count)
    doPlayerSendTextMessage(cid, 21, 'Wave '..waveID..' has started! FIGHT!')
    end
    end
    ]]></config>

    <action actionid="4599" event="script" override="yes"><![CDATA[
    domodlib('ultimatelib')
    function onUse(cid, item)
     if getPlayerStorageValue(cid, USurvival.storage_ex) <= os.time() then
     if #getPlayersInArea(USurvival.posi, USurvival.posf) == 0 then
     doCleanArena()
     doTeleportThing(cid, USurvival.posc)
     doPlayerSendTextMessage(cid, 21, 'The Ultimate Survival will Start in 10 seconds! Be ready to face your destiny!')
     addEvent(doStartWave, 10000, 1, cid)
     setPlayerStorageValue(cid, USurvival.storage_wave, 1)
     setPlayerStorageValue(cid, USurvival.storage_ex, os.time() + USurvival.exhaust)
     if item.itemid % 2 == 1 then
     doTransformItem(item.uid, item.itemid+1)
     else
     doTransformItem(item.uid, item.itemid-1)
     end
     else
     doPlayerSendCancel(cid, 'Someone is already in the arena.')
     doSendMagicEffect(getThingPos(cid), 2)
     end
     else
     local left = getPlayerStorageValue(cid, USurvival.storage_ex) - os.time()
     left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)}
     doPlayerSendCancel(cid, 'You have to wait '.. left.hour ..'h and '..left.minutes..'min.')
     doSendMagicEffect(getThingPos(cid), 2)
     end
     return true
    end
    ]]></action>

    <event type="login" name="US Login" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onLogin(cid)
     registerCreatureEvent(cid,'UltimateSurvival1')
     registerCreatureEvent(cid,'UltimateSurvival2')
     if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
     doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
     doSendMagicEffect(getThingPos(cid), 10)
     end
     return true
    end
    ]]></event>

    <event type="kill" name="UltimateSurvival1" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onKill(cid, target)
    if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
    if #getMonstersInArea(USurvival.posi, USurvival.posf) == 1 then
    local wave = getPlayerStorageValue(cid, USurvival.storage_wave)
    if USurvival.waves[wave+1] then
    setPlayerStorageValue(cid, USurvival.storage_wave, wave + 1)
    addEvent(doStartWave, 5000, wave + 1, cid)
    doPlayerSendTextMessage(cid, 22, 'Congratulations! Next wave will start in 5 seconds!')
    else
    doPlayerSendTextMessage(cid, 22, 'CONGRATULATIONS! YOU HAVE BEATEN THE ULTIMATE SURVIVAL!')
    local reward = USurvival.final_reward
    if reward.item then
    doPlayerAddItem(cid, reward.item, (reward.amount or 1), false)
    end
    if reward.exp then
    doPlayerAddExp(cid, reward.exp)
    end
    if reward.money then
    doPlayerAddMoney(cid, reward.money)
    end
    local medal = doPlayerAddItem(cid, 5785, 1, false)
    if medal then
    doItemSetAttribute(medal, 'description', 'This was awarded to '..getCreatureName(cid)..' for completing the Ultimate Survival.')
    doItemSetAttribute(medal,'name', 'Ultimate Survival Medal')
    end
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    end
    end
    end
    return true
    end

    ]]></event>

    <event type="preparedeath" name="UltimateSurvival2" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onPrepareDeath(cid, killers)
    if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
    doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
    doRemoveConditions(cid, false)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doPlayerSendTextMessage(cid, 21, 'Too bad, you couldn\'t defeat the Ultimate Survival... Better luck next time.')
    local reward = USurvival.waves[getPlayerStorageValue(cid, USurvival.storage_wave)].reward
    if reward.item then
    doPlayerAddItem(cid, reward.item, reward.amount or 1)
    end
    if reward.exp then
    doPlayerAddExp(cid, reward.exp)
    end
    if reward.money then
    doPlayerAddMoney(cid, reward.money)
    end
    return false
    end
    return true
    end
    ]]></event>

    </mod>


    bueno revisando y tu problema este en la sintaxis del scripts dejalo como estba el scripts y solo modifica la comillas


    Código:
    monsters = {'dragon', 'dragon lord'}, count = 30


    quisas tu servidor trabaje de esta forma

    Código:
    monsters = {"dragon", "dragon lord"}, count = 30



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:Ficaria assim?

    Código:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
                   ULTIMATE SURVIVAL - Codigo feito por Omega / Pedido por vinnevinne

                         Informacoes: http://www.xtibia.com/forum/topic/221415-ultimate-survival/
    -->

    <mod name="Ultimate Survival" version="1.0" author="Omega" enabled="yes">
    <config name="ultimatelib"><![CDATA[
    USurvival = {
    posi = {x=203, y=214, z=7}, -- parte esquerda superior da arena
    posf = {x=224, y=244, z=7}, -- parte direita inferior da arena
    posc = {x=214, y=235, z=7}, -- onde o player entra na arena

    waves = {
    [1] = {monsters = {'Fury', 'Grim Reaper'}, count = 30, reward = {exp = 0, item = 2148, amount = 1, money = 100}},
    [2] = {monsters = {'Grim Dark Reaper', 'Undead Darkshadow'}, count = 6, reward = {exp = 0, item = 2152, amount = 1, money = 1000}},
    [3] = {monsters = {'Massive Earth Giant', 'Ferumbras Master'}, count = 10, reward = {exp = 0, item = 2160, amount = 1, money = 10000}},
    },
    exhaust = 1 * 24 * 60 * 60, -- Tempo em segundos ate poder entrar novamente na arena (1 * 24 * 60 * 60 = 1 dia)

    final_reward = {item = 2160, amount = 100, exp = 10000, money = 100000},

    storage_ex = 607069,
    storage_wave = 607089,
    }

    function isWalkable(pos)-- by Nord / editado por Omega
       if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then
           return false
       elseif isCreature(getTopCreature(pos).uid) then
           return false
       elseif getTileInfo(pos).protection then
           return false
       elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then
           return false
       end
    return true
    end

    function doSpawnMonsters(monsters, pos, radius, limit)
    if not pos.x or not pos.y or not pos.z or not type(monsters) == 'table' then
    return false
    end
    local radius = tonumber(radius)
    if radius > 5 then
    radius = 5
    elseif radius < 2 then
    radius = 2
    end
    if not limit or limit < 1 then
    limit = 1
    elseif limit > radius ^ 2 then
    limit = math.floor((radius*1.5) ^ 2)
    end

    local k = 0
    local tries = 0
    repeat
    for x = pos.x - radius, pos.x + radius do
    for y = pos.y - radius, pos.y + radius do
    if isWalkable({x=x, y=y, z=pos.z}) then
    local monster = monsters[math.random(1, #monsters)]
    local chance = math.random(1, 100)
    if k == limit then
    break
    elseif chance <= 8 and doSummonCreature(monster, {x=x, y=y, z=pos.z}) then
    k = k + 1
    end
    end
    end
    end
    tries = tries + 1
    until k >= limit or tries >= 500
    return k >= limit and true or false
    end

    function getPlayersInArea(pos1,pos2)
    local players = {}
    if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then
    for a = pos1.x, pos2.x do
    for b = pos1.y,pos2.y do
    local pos = {x=a,y=b,z=pos1.z}
    if isPlayer(getTopCreature(pos).uid) then
    table.insert(players,getTopCreature(pos).uid)
    end
    end
    end
    return players
    else
    return false
    end
    end

    function getMonstersInArea(pos1,pos2)
    local players = {}
    if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then
    for a = pos1.x, pos2.x do
    for b = pos1.y,pos2.y do
    local pos = {x=a,y=b,z=pos1.z}
    if isMonster(getTopCreature(pos).uid) then
    table.insert(players,getTopCreature(pos).uid)
    end
    end
    end
    return players
    else
    return false
    end
    end

    function doCleanArena()
    local monsters = getMonstersInArea(USurvival.posi, USurvival.posf)
    for _, cid in pairs(monsters) do
    doRemoveCreature(cid)
    end
    end

    function doStartWave(waveID, cid)
    if not isCreature(cid) then return false end
    if USurvival.waves[waveID] then
    wave = USurvival.waves[waveID]
    doSpawnMonsters(wave.monsters, USurvival.posc, 5, wave.count)
    doPlayerSendTextMessage(cid, 21, 'Wave '..waveID..' has started! FIGHT!')
    end
    end
    ]]></config>

    <action actionid="4599" event="script" override="yes"><![CDATA[
    domodlib('ultimatelib')
    function onUse(cid, item)
     if getPlayerStorageValue(cid, USurvival.storage_ex) <= os.time() then
     if #getPlayersInArea(USurvival.posi, USurvival.posf) == 0 then
     doCleanArena()
     doTeleportThing(cid, USurvival.posc)
     doPlayerSendTextMessage(cid, 21, 'The Ultimate Survival will Start in 10 seconds! Be ready to face your destiny!')
     addEvent(doStartWave, 10000, 1, cid)
     setPlayerStorageValue(cid, USurvival.storage_wave, 1)
     setPlayerStorageValue(cid, USurvival.storage_ex, os.time() + USurvival.exhaust)
     if item.itemid % 2 == 1 then
     doTransformItem(item.uid, item.itemid+1)
     else
     doTransformItem(item.uid, item.itemid-1)
     end
     else
     doPlayerSendCancel(cid, 'Someone is already in the arena.')
     doSendMagicEffect(getThingPos(cid), 2)
     end
     else
     local left = getPlayerStorageValue(cid, USurvival.storage_ex) - os.time()
     left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)}
     doPlayerSendCancel(cid, 'You have to wait '.. left.hour ..'h and '..left.minutes..'min.')
     doSendMagicEffect(getThingPos(cid), 2)
     end
     return true
    end
    ]]></action>

    <event type="login" name="US Login" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onLogin(cid)
     registerCreatureEvent(cid,'UltimateSurvival1')
     registerCreatureEvent(cid,'UltimateSurvival2')
     if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
     doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
     doSendMagicEffect(getThingPos(cid), 10)
     end
     return true
    end
    ]]></event>

    <event type="kill" name="UltimateSurvival1" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onKill(cid, target)
    if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
    if #getMonstersInArea(USurvival.posi, USurvival.posf) == 1 then
    local wave = getPlayerStorageValue(cid, USurvival.storage_wave)
    if USurvival.waves[wave+1] then
    setPlayerStorageValue(cid, USurvival.storage_wave, wave + 1)
    addEvent(doStartWave, 5000, wave + 1, cid)
    doPlayerSendTextMessage(cid, 22, 'Congratulations! Next wave will start in 5 seconds!')
    else
    doPlayerSendTextMessage(cid, 22, 'CONGRATULATIONS! YOU HAVE BEATEN THE ULTIMATE SURVIVAL!')
    local reward = USurvival.final_reward
    if reward.item then
    doPlayerAddItem(cid, reward.item, (reward.amount or 1), false)
    end
    if reward.exp then
    doPlayerAddExp(cid, reward.exp)
    end
    if reward.money then
    doPlayerAddMoney(cid, reward.money)
    end
    local medal = doPlayerAddItem(cid, 5785, 1, false)
    if medal then
    doItemSetAttribute(medal, 'description', 'This was awarded to '..getCreatureName(cid)..' for completing the Ultimate Survival.')
    doItemSetAttribute(medal,'name', 'Ultimate Survival Medal')
    end
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    end
    end
    end
    return true
    end

    ]]></event>

    <event type="preparedeath" name="UltimateSurvival2" event="script"><![CDATA[
    domodlib('ultimatelib')
    function onPrepareDeath(cid, killers)
    if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then
    doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
    doRemoveConditions(cid, false)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doPlayerSendTextMessage(cid, 21, 'Too bad, you couldn\'t defeat the Ultimate Survival... Better luck next time.')
    local reward = USurvival.waves[getPlayerStorageValue(cid, USurvival.storage_wave)].reward
    if reward.item then
    doPlayerAddItem(cid, reward.item, reward.amount or 1)
    end
    if reward.exp then
    doPlayerAddExp(cid, reward.exp)
    end
    if reward.money then
    doPlayerAddMoney(cid, reward.money)
    end
    return false
    end
    return true
    end
    ]]></event>

    </mod>


    te volvi a comentar el tema revisa mi respuesta aqui

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



    [Sistema] Baul De eventos (Otx 2 y tfs 0.3.7 y .0.4.0) YNU5B25
    Ver perfil de usuario https://www.tibiaface.com

    paradanca

    paradanca
    Nuevo Miembro
    Nuevo Miembro
    Código:
    [3/5/2019 14:23:32] [Error - Action Interface]
    [3/5/2019 14:23:32] In a timer event called from:
    [3/5/2019 14:23:32] domodlib('ultimatelib')
    [3/5/2019 14:23:32] function onUse(cid, item)
    [3/5/2019 14:23:32]  if getPlayerStorageValue(cid, USurvival.storage_ex) <= os.time() then
    [3/5/2019 14:23:32]  if #getPlayersInArea(USurvival.posi, USurvival.posf) == 0 then
    [3/5/2019 14:23:32]  doCleanArena()
    [3/5/2019 14:23:32]  doTeleportThing(cid, USurvival.posc)
    [3/5/2019 14:23:32]  doPlayerSendTextMessage(cid, 21, 'The Ultimate Survival will Start in 10 seconds! Be ready to face your destiny!')
    [3/5/2019 14:23:32]  addEvent(doStartWave, 10000, 1, cid)
    [3/5/2019 14:23:32]  setPlayerStorageValue(cid, USurvival.storage_wave, 1)
    [3/5/2019 14:23:32]  setPlayerStorageValue(cid, USurvival.storage_ex, os.time() + USurvival.exhaust)
    [3/5/2019 14:23:32]  if item.itemid % 2 == 1 then
    [3/5/2019 14:23:32]  doTransformItem(item.uid, item.itemid+1)
    [3/5/2019 14:23:32]  else
    [3/5/2019 14:23:32]  doTransformItem(item.uid, item.itemid-1)
    [3/5/2019 14:23:32]  end
    [3/5/2019 14:23:32]  else
    [3/5/2019 14:23:32]  doPlayerSendCancel(cid, 'Someone is already in the arena.')
    [3/5/2019 14:23:32]  doSendMagicEffect(getThingPos(cid), 2)
    [3/5/2019 14:23:33]  end
    [3/5/2019 14:23:33]  else
    [3/5/2019 14:23:33]  local left = getPlayerStorageValue(cid, USurvival.storage_ex) - os.time()
    [3/5/2019 14:23:33]  left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)}
    [3/5/2019 14:23:33]  doPlayerSendCancel(cid, 'You have to wait '.. left.hour ..'h and '..left.minutes..'min.')
    [3/5/2019 14:23:33]  doSendMagicEffect(getThingPos(cid), 2)
    [3/5/2019 14:23:33]  end
    [3/5/2019 14:23:33]  return true
    [3/5/2019 14:23:33] end
    [3/5/2019 14:23:33] :onUse
    [3/5/2019 14:23:33] Description:
    [3/5/2019 14:23:33] [string "USurvival = {..."]:58: attempt to call global 'DoCreateMonster' (a nil value)
    [3/5/2019 14:23:33] stack traceback:
    [3/5/2019 14:23:33] [string "USurvival = {..."]:58: in function 'doSpawnMonsters'
    [3/5/2019 14:23:33] [string "USurvival = {..."]:114: in function <[string "USurvival = {..."]:110>


    Erro mudou

    Ver perfil de usuario

    Contenido patrocinado


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

    Ir a la página : 1, 2  Siguiente

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

    Temas Recomendados×+

       

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