• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    informacion sobre boss event

    Compartir:

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

    1informacion sobre boss event Empty informacion sobre boss event Jue Nov 18, 2021 12:13 am

    akane

    akane
    Miembro
    Miembro
    Descripcion escribió:hola maya, tal como me pediste cree este post. Necesito un script que muestre la información en este caso de cuanto falta para que aparezca el siguiente boss ejemplo, que diga que el boss aparece en x horas (ya sea en 2 hrs 30 min, 4 hrs, etc) y que cada vez que se entre al tp para verificar, el tiempo vaya disminuyendo cosa que el jugador sepa tanto a que hora entrar al tp.

    Y lo otro en lo posible es que muestre cual será el siguiente boss que aparezca (aunque no se si se necesite hacer otro script para eso, a pezar que ya tengo uno)
    Imagen Explicativa escribió:Imagen Explicativa: informacion sobre boss event Tibiaf10
    Version del Scripts: OTx 3.10

    3 participantes

    2informacion sobre boss event Empty Re: informacion sobre boss event Jue Nov 18, 2021 7:59 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    para su teleport puede usar como base esto

    Código:


    local cooldown_storage = 88346
    local destination = Position(1043, 1021, 7)

    function onStepIn(creature, item, toPosition, fromPosition)
        local player = Player(creature)
        if not player then
            creature:teleportTo(fromPosition, true)
            return false
        end
        local time_left = player:getStorageValue(cooldown_storage)
        if time_left > os.time() then
            time_left = time_left - os.time() -- get the difference in time so it shows properly in error message
            local hours = string.format("%02.f", math.floor(time_left / 3600))
            local mins = string.format("%02.f", math.floor(time_left / 60 - (hours * 60)))
            local secs = string.format("%02.f", math.floor(time_left  - hours * 3600 - mins * 60))
            local time_string = hours ..":".. mins ..":".. secs
            player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You cannot enter this teleport yet. Time left: ".. time_string .. ".")
            player:teleportTo(fromPosition, true)
            return false
        end
        player:setStorageValue(cooldown_storage, os.time() + 3600)
        player:teleportTo(destination)
        return true
    end


    bueno para lo del boss se tendria que ver el scripts para poder adaptarle el istema que tiene de anuncio el firestorm event



    informacion sobre boss event YNU5B25
    3 participantes
    http://www.tibiaface.com

    3informacion sobre boss event Empty Re: informacion sobre boss event Jue Nov 18, 2021 2:38 pm

    akane

    akane
    Miembro
    Miembro
    el script de bosses que tengo es este:

    Código:
    local function deleteTeleport(position)
        local teleport = Tile(position):getItemById(1397)
        if teleport then
            teleport:remove()
            position:sendMagicEffect(CONST_ME_POFF)
        end
    end

    function onTime(interval)
     

        local item = Game.createItem(1397, 1, Position(1029, 1018, 5))  ------- posicion donde se creara el teleport
        if item:isTeleport() then
            item:setDestination(Position(1027, 1033, 6))  ------- posicion donde sera enviado
        end

     

    broadcastMessage("You have 60 seconds to enter the teleport!", MESSAGE_EVENT_ADVANCE)
        addEvent(deleteTeleport, 360 * 1000, Position(1029, 1018, 5))
       Game.createMonster("Demodras", Position(1030, 1033, 6))  -----monster que crearen a posicion que quieras
       return true
    end

    <globalevent name="teleport" time="03:03:00" script="teleport.lua" />

    lo otro, que linea debo colocar, ya que puse algunas pero no pasa nada, ni si quiera me tira algun error

    3 participantes

    4informacion sobre boss event Empty Re: informacion sobre boss event Jue Nov 18, 2021 5:19 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    prueba s te funciona asi


    Código:

    local function deleteTeleport(position)
        local teleport = Tile(position):getItemById(1397)
        if teleport then
            teleport:remove()
            position:sendMagicEffect(CONST_ME_POFF)
        end
    end


    local t = {
             
             t = 5
          }


    function onTime(interval)


    local function start()
        Game.createMonster("Demodras", Position(1030, 1033, 6))  -----monster que crearen a posicion que quieras
        doBroadcastMessage("El Evento Ya Inicio", MESSAGE_STATUS_WARNING)
    end
     

        local item = Game.createItem(1397, 1, Position(1029, 1018, 5))  ------- posicion donde se creara el teleport
        if item:isTeleport() then
            item:setDestination(Position(1027, 1033, 6))  ------- posicion donde sera enviado
        end

     

       
     
     
     
     
     
      doBroadcastMessage("Attention! Immediately register to Rush Event, event will start for ".. t.t .." minutes. All players can join to event , Boss Monster: Demodras", MESSAGE_EVENT_ADVANCE)
             addEvent(function()
             doBroadcastMessage("Rush event, started in 2 minutes. If you want to join, Boss Monster: Demodras", MESSAGE_STATUS_WARNING)
             end, (t.t - 2) * 1000 * 60)
             addEvent(function()
             doBroadcastMessage("Rush event, started in a minute. If you want to join, Boss Monster: Demodras", MESSAGE_STATUS_WARNING)
             end, (t.t - 1) * 1000 * 60)
             addEvent(start, t.t * 1000 * 60, cid)
                addEvent(deleteTeleport, t.t * 1000 * 60, Position(1029, 1018, 5))
     
     
      return true
    end



    informacion sobre boss event YNU5B25
    3 participantes
    http://www.tibiaface.com

    5informacion sobre boss event Empty Re: informacion sobre boss event Jue Nov 18, 2021 5:37 pm

    akane

    akane
    Miembro
    Miembro
    [Tienes que estar registrado y conectado para ver este vínculo] me sale ese error :/

    3 participantes

    6informacion sobre boss event Empty Re: informacion sobre boss event Jue Nov 18, 2021 5:48 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    aqui tienes

    Código:


    local function deleteTeleport(position)
        local teleport = Tile(position):getItemById(1397)
        if teleport then
            teleport:remove()
            position:sendMagicEffect(CONST_ME_POFF)
        end
    end


    local t = {
           
            t = 5
          }


    function onTime(interval)


    local function start()
        Game.createMonster("Demodras", Position(1030, 1033, 6))  -----monster que crearen a posicion que quieras
     
       
       Game.broadcastMessage("El Evento Ya Inicio", MESSAGE_GAME_HIGHLIGHT)
    end
     

        local item = Game.createItem(1397, 1, Position(1029, 1018, 5))  ------- posicion donde se creara el teleport
        if item:isTeleport() then
            item:setDestination(Position(1027, 1033, 6))  ------- posicion donde sera enviado
        end


     
      Game.broadcastMessage("Attention! Immediately register to Rush Event, event will start for ".. t.t .." minutes. All players can join to event , Boss Monster: Demodras", MESSAGE_GAME_HIGHLIGHT)
     
     
            addEvent(function()
              Game.broadcastMessage("Rush event, started in 2 minutes. If you want to join, Boss Monster: Demodras", MESSAGE_GAME_HIGHLIGHT)
            end, (t.t - 2) * 1000 * 60)
            addEvent(function()
            Game.broadcastMessage("Rush event, started in a minute. If you want to join, Boss Monster: Demodras", MESSAGE_GAME_HIGHLIGHT)
            end, (t.t - 1) * 1000 * 60)
            addEvent(start, t.t * 1000 * 60, cid)
                addEvent(deleteTeleport, t.t * 1000 * 60, Position(1029, 1018, 5))
     
     
      return true
    end



    informacion sobre boss event YNU5B25
    3 participantes
    http://www.tibiaface.com

    7informacion sobre boss event Empty Re: informacion sobre boss event Jue Nov 18, 2021 9:24 pm

    akane

    akane
    Miembro
    Miembro
    probé los 2 scripts que me pasaste y funcionaron bien, ahora solo tengo que hacer que calcen uno con el otro (aunque no se bien como xD) gracias maya Smile

    3 participantes

    8informacion sobre boss event Empty Re: informacion sobre boss event Vie Nov 19, 2021 3:40 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    poncex escribió:probé los 2 scripts que me pasaste y funcionaron bien, ahora solo tengo que hacer que calcen uno con el otro (aunque no se bien como xD) gracias maya Smile

    aqui tienes algo no se si sea lo que quieres lo adapte esto es un reverscripts en tu servidor encontraras data/scripts dentro de esa carpeta creas un archivo llamado como tu quieras llamarlo y dentro pegas esto:


    Código:


    local config = {
        interval = 5000,
        texts = {
            { pos = Position(3191, 1810, 7), text = "Temple!", effects = { CONST_ME_TELEPORT, CONST_ME_DRAWBLOOD } }
        }
    }



    local configs = {
         exhauststorage = 2302 ------------------ cambiar
    }

    local textOnMap = GlobalEvent("TextOnMap")

    function textOnMap.onThink(interval)
        local player = Game.getPlayers()[1]
        if not player then
            return true
        end
       
       
       
       if player:getStorageValue(configs.exhauststorage) > os.time() then
             local time = player:getStorageValue(configs.exhauststorage) - os.time()
             local hours, minutes, seconds = math.floor (time / 3600), math.floor ((time - ((math.floor (time / 3600)) * 3600))/ 60), time - ((math.floor (time/60)) * 60)
             if time >= 3600 then
                 text = hours.." "..(hours == 1 and "hour" or "hours")..", "..minutes.." "..(minutes == 1 and "minute" or "minutes").." and "..seconds.." "..(seconds == 1 and "second" or "seconds")
             elseif time >= 60 then
                 text = minutes.." "..(minutes == 1 and "minute" or "minutes").." and "..seconds.." "..(seconds == 1 and "second" or "seconds")
             else
                 text = seconds.." "..(seconds == 1 and "second" or "seconds")
             end

           player:say("You need to wait "..text.." before you can get a reward again.", TALKTYPE_MONSTER_SAY, false, nil, info.pos)
            info.pos:sendMagicEffect(info.effects[math.random(1, #info.effects)])
          
          
             return true
         end

        for k, info in pairs(config.texts) do
       
            player:say(info.text, TALKTYPE_MONSTER_SAY, false, nil, info.pos)
            info.pos:sendMagicEffect(info.effects[math.random(1, #info.effects)])
       
          
        end
        return true
    end

    textOnMap:interval(config.interval)
    textOnMap:register()




    y reinicias el servidor  o  haces /reload scripts obviamente que tienes que modificar el texto y la posicion de donde saldra el texto en el scripts



    informacion sobre boss event YNU5B25
    3 participantes
    http://www.tibiaface.com

    9informacion sobre boss event Empty Re: informacion sobre boss event Sáb Nov 20, 2021 9:38 pm

    akane

    akane
    Miembro
    Miembro
    lo probaré, muchas gracias maya

    3 participantes

    10informacion sobre boss event Empty Re: informacion sobre boss event Miér Nov 24, 2021 12:32 am

    Josens

    Josens
    Miembro
    Miembro
    Intenta con esto;

    En tu script de GlobalEvent, inserta esto:
    Código:
    local config = {
        time = 60 * 5,                          -- Tiempo el cual el teleport permanecerá abierto.
        createTeleport = {1029, 1018, 5},      -- Posición donde se creará el teleport.
        teleportDestination = {1027, 1033, 6},  -- Donde te llevará el teleport.
        bossPosition = {1030, 1033, 6},        -- Posición donde se creará el boss.
        nextBoss = 60 * 60 * 4,                -- Cuanto será el tiemp para que aparezca el proximo jefe.
        storage = 88346,
        message = "Attention! Demodras has been appeared!"
    }


    function onTime(interval)
        local start = function()
            local sp = Position(config.bossPosition[1], config.bossPosition[2], config.bossPosition[3])
            Game.createMonster("Demodras", sp)
            sp:sendMagicEffect(CONST_ME_TELEPORT)

            Game.broadcastMessage(config.message, MESSAGE_GAME_HIGHLIGHT)
            Game.setStorageValue(config.storage, os.time() + config.nextBoss - config.time)
           
            local tpPos = Position(config.createTeleport[1], config.createTeleport[2], config.createTeleport[3])
            local teleport = Tile(tpPos):getItemById(1397)
            if teleport then
                teleport:remove()
                tpPos:sendMagicEffect(CONST_ME_POFF)
            end
        end
       
        local item = Game.createItem(1397, 1, Position(config.createTeleport[1], config.createTeleport[2], config.createTeleport[3]))  ------- posicion donde se creara el teleport
        if item:isTeleport() then
            item:setDestination(Position(config.teleportDestination[1], config.teleportDestination[2], config.teleportDestination[3]))  ------- posicion donde sera enviado
        end

        local spawnTime = math.floor(config.time / 60)
        Game.broadcastMessage("Attention! The boss will appear on ".. spawnTime .." " ..(spawnTime ~= 1 and "s" or "").. ". All players stay tuned, Boss Monster: Demodras", MESSAGE_GAME_HIGHLIGHT)
        addEvent(function()
            Game.broadcastMessage("The boss will appear in 2 minutes. If you want to join, Boss Monster: Demodras", MESSAGE_GAME_HIGHLIGHT)
        end, math.ceil(config.time / 2) * config.time * 1000)
        addEvent(function()
            Game.broadcastMessage("The boss will appear in a minute. If you want to join, Boss Monster: Demodras", MESSAGE_GAME_HIGHLIGHT)
        end, (config.time - 60) * 1000)
        addEvent(start, config.time * 1000)
      return true
    end


    En tu script de Movement, pon esto:
    Código:
    local storage = 88346

    function onStepIn(creature, item, toPosition, fromPosition)
        local player = Player(creature)
        if not player then
            creature:teleportTo(fromPosition, true)
            return false
        end

        local time_left = Game.getStorageValue(storage)
        if time_left > os.time() then
            time_left = time_left - os.time() -- get the difference in time so it shows properly in error message
            local hours = string.format("%02.f", math.floor(time_left / 3600))
            local mins = string.format("%02.f", math.floor(time_left / 60 - (hours * 60)))
            local secs = string.format("%02.f", math.floor(time_left  - hours * 3600 - mins * 60))
            local time_string = hours ..":".. mins ..":".. secs
            player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You cannot enter this teleport yet. Time left: ".. time_string .. ".")
            player:teleportTo(fromPosition, true)
            return false
        end
        player:teleportTo(Position(1029, 1018, 5))
        return true
    end

    Avisame si te funcionó Smile



    Very Happy Que te sirva informacion sobre boss event 2764
    3 participantes

    11informacion sobre boss event Empty Re: informacion sobre boss event Miér Nov 24, 2021 12:41 am

    akane

    akane
    Miembro
    Miembro
    josens, funciono (y) ty

    3 participantes

    12informacion sobre boss event Empty Re: informacion sobre boss event Miér Nov 24, 2021 8:52 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Tema Solucionado



    informacion sobre boss event YNU5B25
    3 participantes
    http://www.tibiaface.com

    Contenido patrocinado


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