Jump to content

[Release]Quest Evento Navidad


WorldArd

Mensajes recomendados

Quest de Navidad basada en el oficial que realize hace unos años. Quizas a alguien le sirva.

 

5f12614ef3.jpg

 

[Quest]

Spoiler

quest evento_navidad begin
    state start begin

        function settings_event_navidad()
            local settings = {}

            settings.VNUM_CALCETIN              = 50010
            settings.CANTIDAD_CALCETIN          = 10 
            settings.VNUM_REGALO                = 71144
            settings.VNUM_VINO                  = 50216
            settings.COUNT_VINO                 = 6
            settings.TIME_GIVE_VINO             = 24
            settings.POSIBILIDAD_DROP_CALCETIN  = 5
            settings.VNUM_MOB_RENO              = 34010
            settings.TIME_GIVE_RENO             = 24
            settings.VNUM_ITEM_RENO             = 53003

            return settings
        end
        
        function text_entrada(opcion_navidad)
            local setting = evento_navidad.settings_event_navidad()

            if opcion_navidad == 1 then
                if pc.getqf("opcion_vinos") == 0 then
                    say_title(mob_name(20126))
                    say("Jo,jo,jo Seguro que sabe que es esto")
                    say("verdad,No hay mejor bebida para el invierno")
                    say("Mezclas un poco de vino ,una picza de canela,")
                    say("un par de clavos...Mmmmmm")
                    wait()
                    say_title(mob_name(20126))
                    say("Con este frio,seguro que un trago de")
                    say("Vino Caliente te vendra bien.Te dara fuerzas")
                    say("y podras moverte mas deprisa .Quieres probarlo")
                    say("Muy bien, enseguida te lo traigo")
                    wait()
                    say_title(mob_name(20126))
                    say("Parece que el Vino Caliente te gusta , jo,jo")
                    say("Sientes como te calienta por dentro")
                    say("y ese sabor,tan dulce y afrutado.")
                    say("Feliz navidad")
                    pc.setqf("opcion_vinos",1)
                    pc.give_item2(setting.VNUM_VINO,setting.COUNT_VINO)
                    pc.setqf("tiempo_evento_navidad_vino",get_time()+60*60*setting.TIME_GIVE_VINO)
                else
                    if get_time() > pc.getqf("tiempo_evento_navidad_vino") then 
                        say_title(mob_name(20126))
                        say("Parece que el Vino Caliente te gusta , jo,jo")
                        say("Sientes como te calienta por dentro")
                        say("y ese sabor,tan dulce y afrutado.")
                        say("Feliz navidad")
                        pc.give_item2(setting.VNUM_VINO,setting.COUNT_VINO)
                        pc.setqf("tiempo_evento_navidad_vino",get_time()+60*60*setting.TIME_GIVE_VINO)
                    else
                        say_title(mob_name(20126))
                        say("Lo siento.")
                        say("Pero vuelve cuando haya pasado 24hras.")
                        say("Feliz Navidad")
                        return
                    end
                end
            elseif opcion_navidad == 2 then
                if pc.getqf("opcion_renos") == 0 then
                    say_title(mob_name(20126))
                    say("Los calcetines,Casi se me olvidan.Queria")
                    say("esconder mis regalos en los calcetines que")
                    say("cuelgan sobre la chimenea.Pero criaturas")
                    say("muy poco navideñas me los ha robado")
                    say("Ayudame a recuperarlos.")
                    wait()
                    say_title(mob_name(20126))
                    say("No es sencillo encontrar calcetines.Necesitaras")
                    say("un Reno Joven para poder encontrarlos.")
                    wait()
                    say_title(mob_name(20126))
                    say("No es monisimo")
                    say("Y tiene un asombroso sentido del olfato.")
                    say("Un especialista en la busqueda de calcetines.")
                    say("Se quedara 2 horas a tu lado y te ayudara")
                    say("a buscar.Despues se cansara y solamente podra")
                    say("continuar despues de 24 horas.")
                    say("Si no quieres esperar tanto tiempo,entonces mira")
                    say("abajo a la izquierda,tras la moneda que gira.")
                    say("He oido que ahi hay otro Reno Joven .Me alegrare")
                    say("mucho si mañana me vuelves a visitar")
                    pc.setqf("opcion_renos",1)
                    pc.setqf("habilitar_opcion_calcetines",1)
                    pc.give_item2(setting.VNUM_ITEM_RENO,1)
                    pc.setqf("tiempo_evento_navidad_reno",get_time()+60*60*setting.TIME_GIVE_RENO)
                else
                    if get_time() > pc.getqf("tiempo_evento_navidad_reno") then 
                        say_title(mob_name(20126))
                        say("No es monisimo")
                        say("Y tiene un asombroso sentido del olfato.")
                        say("Un especialista en la busqueda de calcetines.")
                        say("Se quedara 2 horas a tu lado y te ayudara")
                        say("a buscar.Despues se cansara y solamente podra")
                        say("continuar despues de 24 horas.")
                        say("Si no quieres esperar tanto tiempo,entonces mira")
                        say("abajo a la izquierda,tras la moneda que gira.")
                        say("He oido que ahi hay otro Reno Joven .Me alegrare")
                        say("mucho si mañana me vuelves a visitar")
                        pc.give_item2(setting.VNUM_ITEM_RENO,1)
                        pc.setqf("tiempo_evento_navidad_reno",get_time()+60*60*setting.TIME_GIVE_RENO)
                    else
                        say_title(mob_name(20126))
                        say("Lo siento.")
                        say("Pero vuelve cuando haya pasado 24hras.")
                        say("Feliz Navidad")
                        return
                    end
                end
            elseif opcion_navidad == 3 then
                if pc.getqf("habilitar_opcion_calcetines") == 1 then
                    if pc.count_item(setting.VNUM_CALCETIN) >= setting.CANTIDAD_CALCETIN then
                        say_title(mob_name(20126))
                        say("Jo,jo,jo,has reunido suficientes calcetines.")
                        say("Dejame ver.Uff,ese olor...")
                        say("Desde luego,estos son los calcetines adecuados")
                        say("Feliz Navidad")
                        pc.remove_item(setting,VNUM_CALCETIN,setting.CANTIDAD_CALCETIN)
                        pc.give_item2(setting.VNUM_REGALO)
                    else
                        say_title(mob_name(20126))
                        say("Veo,que te faltan calcetines.")
                        say("Vulve cuando tengas suficientes")
                        say("para darte una recompensa")
                    end
                else
                    return
                end
            end
        end
        when 53003.use with game.get_event_flag("evento_navidad_status") == 1 begin
            local setting = evento_navidad.settings_event_navidad()
            if true == pet.is_summon(setting.VNUM_MOB_RENO) then
                pet.unsummon(setting.VNUM_MOB_RENO)
                pc.setqf("drop_calcetines_kill",0)
            else
                pet.summon(setting.VNUM_MOB_RENO, "", false)
                pc.setqf("drop_calcetines_kill",1)
            end
        end
        when login with pc.getqf("drop_calcetines_kill") == 1 and game.get_event_flag("evento_navidad_status") == 1 begin
            pc.setqf("drop_calcetines_kill",0)
        end
        when kill begin
            local setting = evento_navidad.settings_event_navidad()
            if pc.getqf("drop_calcetines_kill") == 1 and game.get_event_flag("evento_navidad_status") == 1 then
            local caida_calcetines = number(1,100)
                for i = 1, setting.POSIBILIDAD_DROP_CALCETIN do
                    if caida_calcetines == i then
                        game.drop_item_with_ownership(setting.VNUM_CALCETIN, 1)
                    end
                end
            end
        end
        when 11000.chat."GM:Evento Navidad" with pc.is_gm() begin
            say_title(mob_name(11000))
            say("Que deseas hacer?")
            local activar_navidad = select("Activar","Desactivar","Cancelar")
            if activar_navidad == 1 then
                if game.get_event_flag("evento_navidad_status") == 1 then
                    say_title(mob_name(11000))
                    say("El evento ya esta activado")
                else
                    notice_all("El evento de navidad se ha activado")
                    notice_all("Habla con "..mob_name(20126).." para tener mas")
                    notice_all("Informacion sobre el evento")
                    game.set_event_flag("evento_navidad_status",1)
                end
            elseif activar_navidad == 2 then
                if game.get_event_flag("evento_navidad_status") == 0 then
                    say_title(mob_name(11000))
                    say("El evento ya esta desactivado")
                else
                    notice_all("El evento de navidad ha llegado")
                    notice_all("A su fin.")
                    game.set_event_flag("evento_navidad_status",0)
                end
            end
        end
        when 20126.chat."Jo,jo,jo" with game.get_event_flag("evento_navidad_status") == 1 begin
            if pc.getqf("informacion_evento_navidad") == 0 then
                say_title(mob_name(20126))
                say("Ah,eres tu")
                say("Hace tiempo que no nos veiamos.")
                say("Ya ha pasado un año,jo,jo")
                say("Quizas te preguntes por que")
                say("Estoy de nuevo en el pueblo")
                say("Te lo voy a explicar...")
                wait()
                say_title(mob_name(20126))
                say("Son tiempos dificiles.Nadie quieres comprar")
                say("libros u otras cosas estos dias.Y a mi")
                say("avanzada edad,volar por los aires en un trineo")
                say("tirado por renos es demasiado engorroso.")
                say("Por eso he dedicido celebrar la Navidad")
                say("en el pueblo este año.")
                wait()
                say_title(mob_name(20126))
                say("Si aun tienes preguntas,puedes ir a verme en")
                say("cualquier momento.Feliz Navidad.")
                pc.setqf("informacion_evento_navidad",1)
            else
                if pc.getqf("opcion_vinos") == 0 and pc.getqf("opcion_renos") == 0 then
                    local opcion_navidad = select("Te apatece un Vino Caliente","Para que son esos calcetines", "Cerrar")
                    evento_navidad.text_entrada(opcion_navidad)
                    return
                end
                if pc.getqf("opcion_vinos") == 1 and pc.getqf("opcion_renos") == 0 then
                    local opcion_navidad = select("Mas Vino Caliente, por favor","Para que son esos calcetines", "Cerrar")
                    evento_navidad.text_entrada(opcion_navidad)
                    return
                end
                if pc.getqf("opcion_vinos") == 0 and pc.getqf("opcion_renos") == 1 then
                    local opcion_navidad = select("Te apatece un Vino Caliente","Reno Joven","Te traigo calcetines", "Cerrar")
                    evento_navidad.text_entrada(opcion_navidad)
                    return
                end
                if pc.getqf("opcion_vinos") == 1 and pc.getqf("opcion_renos") == 1 then
                    local opcion_navidad = select("Mas Vino Caliente, por favor","Reno Joven","Te traigo calcetines", "Cerrar")
                    evento_navidad.text_entrada(opcion_navidad)
                    return
                end
            end
        end
    end
end

 

 

Saludos!!

 

Enlace para comentar
Compartir en otros sitios

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...