Jump to content

ahynoa

Miembro
  • Contador contenido

    14
  • Ingreso

  • Última visita

  • Días ganados

    2

Actividad de reputación

  1. Me Gusta
    ahynoa reacted to rango in Nuevas Imagenes   
    Hola Os Traigo Estas Imagenes Que Encontre Googleando XD






























     
    Creditos:
    Rango Por Ir Buscando I Postearlas xD
     
     

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.  
    PD: Se Que Algunas No Tienen Nada Que Ver Con Metin2 Pero Bueno Alla Cada Quien Que Se Apañe Cumplo Con Compartir
  2. Me Gusta
    ahynoa reacted to KeKo in Un bloqueo temporizado   
    En realidad no es muy complicado, simplemente haces tu npc que banee, y cuando meta el:
     

    mysql_query("UPDATE account.account SET status = 'BLOCK' where 'idpjbaneado' ") Entonces le metes un timer:
     

    mysql_query("UPDATE account.account SET status = 'BLOCK' where login = ' idpjbaneado ' ") server_timer("desbloqueo", tiempo) Y cuando se active el timer:
     

    when desbloqueo.server_timer begin mysql_query("UPDATE account.account SET status = 'OK' where login = ' iddelpjbaneado' ") end Y asi deberia irte sin problemas
  3. Me Gusta
    ahynoa reacted to Croqueta in Función de deslogueo   
    cuando un jugador se desconecta, abajo en el chat se ve el tiempo que nesesita para cerrar y cuando el jugador toca a desconectar, el tiempo se apara y el puede jugar normal.
    si te refieres que el jugador se desconecta del cliente/servidor nesesitas un peqeno script de python
    te busce el link,
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.  
    en la game.py
    buscas esto

    def __ServerCommand_Build(self): y editas esto como los otros
    "exit" : self.__exit, y abajo abajo pones esto
    # Start_EXIT def __exit(self): app.Exit() #END_EXIT y en la quest pones
     

    cmdchat("exit") para que se cierra el cliente(el cliente se cierra instantáneamente )
  4. Me Gusta
    ahynoa reacted to SeMa™ in Función de deslogueo   
    Si que se puede , ahynoa si me das un momento con un cmdchat lo puedes realizar , lo voy a mirar y si eso te aviso
     
     
    Ahhhh keko se me adelantó!!!!!!! xd
  5. Me Gusta
    ahynoa reacted to KeKo in Función de deslogueo   
    En inforge hay eso que buscas tu, como dice sema mezclando con un cmdchat:
     

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  6. Me Gusta
    ahynoa reacted to Akroma in sistema de rangos en guerra de reinos   
    Bueno, despues de tanta polemica, peleas, post en otros foros, intentos de robo, de estafa i demas, y ya que media españa los pide, posteare la primera version de los rangos, la primera:
     
    Aqui os los dejo
     

    quest sistema_rangos begin state start begin when 53001.use with pc.is_gm() begin say_title("Guerra Total") say("") say("Hola "..pc.get_name().." quieres activar") say("o desactivar una Guerra Total?") say("") local activar = select ("Activar" , "Desactivar" , "Paso") if activar == 1 then game.set_event_flag("totalwar", 1) notice_all("La guerra total se ha iniciado") notice_all("Ves con el Seon-Pyeong para acceder") elseif activar == 2 then game.set_event_flag("totalwar", 0) notice_all("La guerra total se ha desactivado") elseif activar == 3 then return end end when 20091.chat."Guerra total" begin if game.get_event_flag("totalwar") == 1 then say("La guerra total esta activa") say("Deseas ir?") local guerra = select ("Si", "No") if guerra == 1 then pc.warp(951600, 30000) elseif guerra == 2 then return end elseif game.get_event_flag("totalwar") == 0 then say("La guerra total no esta activa") say("Te avisare cuando se active") end end when kill with npc.is_pc() and pc.get_map_index() == 114 begin pc.give_item2("100035", 1) pc.give_item2("100039", 1) end when 1093.kill with pc.get_map_index() == 114 begin pc.give_item2("100035", 5) pc.give_item2("100039", 1) notice_all(""..pc.get_name().." ha aniquilado *|Segador de la muerte|*") end when 1094.kill with pc.get_map_index() == 114 begin pc.give_item2("100035", 3) pc.give_item2("100039", 1) notice_all(""..pc.get_name().." ha aniquilado *|Rey Demonio Vil|*") end when 2206.kill with pc.get_map_index() == 114 begin pc.give_item2("100035", 6) pc.give_item2("100039", 1) notice_all(""..pc.get_name().." ha aniquilado *|Rey Llama|*") end when 2091.kill with pc.get_map_index() == 114 begin pc.give_item2("100035", 6) pc.give_item2("100039", 1) notice_all(""..pc.get_name().." ha aniquilado *|Reina Araña|*") end when 1901.kill with pc.get_map_index() == 114 begin pc.give_item2("100035", 6) pc.give_item2("100039", 1) notice_all(""..pc.get_name().." ha aniquilado *|Nueve Colas|*") end when kill with not npc.is_pc() and pc.get_map_index() == 114 begin local number = number(1, 35) if number == 1 then game.drop_item("100039", 1) end end when 100001.use begin say("Eres rango ciudadano pobre") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100002", 1) pc.remove_item("100035", 50) pc.remove_item("100001", 1) notice_all(""..pc.get_name().." ha subido al rango Ciudadano Honrado") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100002", 1) pc.remove_item("100039", 250) pc.remove_item("100001", 1) notice_all(""..pc.get_name().." ha subido al rango Ciudadano Honrado") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 7% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 7, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1700, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 7, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 7, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 7, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 7, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100002.use begin say("Eres rango ciudadano Honrado") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 100 then say("No tienes los puntos necesarios (100)") else pc.give_item2("100003", 1) pc.remove_item("100035", 100) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Ciudadano Leal") end elseif subir_rango == 2 then if pc.count_item(100039)< 300 then say("No tienes los puntos necesarios (300)") else pc.give_item2("100003", 1) pc.remove_item("100039", 300) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Ciudadano Leal") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100003.use begin say("Eres rango ciudadano Leal") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Ciudadano Ejemplar") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Ciudadano Ejemplar") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100004.use begin say("Eres rango ciudadano Ejemplar") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100005.use begin say("Eres rango Soldado") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado de Primera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado de Primera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100006.use begin say("Eres rango Soldado de Primera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado de Segunda") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado de Segunda") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100007.use begin say("Eres rango Soldado de Segunda") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado de Tercera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Soldado de Tercera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100008.use begin say("Eres rango Soldado de Tercera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Sargento") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Sargento") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100009.use begin say("Eres rango Sargento") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Sargento de Primera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Sargento de Primera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100010.use begin say("Eres rango Sargento de Primera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Sargento de Segunda") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Sargento de Segunda") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100011.use begin say("Eres rango Sargento de Tercera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100012.use begin say("Eres rango Capitan") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan de Primera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan de Primera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100013.use begin say("Eres rango Capitan de Primera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan de Segunda") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan de Segunda") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100014.use begin say("Eres rango Capitan de Segunda") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan de Tercera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Capitan de Tercera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100015.use begin say("Eres rango Capitan de Tercera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100016.use begin say("Eres rango Comandante") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante de Primera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante de Primera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100017.use begin say("Eres rango Comandante de Primera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante de Segunda") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante de Segunda") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100018.use begin say("Eres rango Comandante de Segunda") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante de Tercera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Comandante de Tercera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100019.use begin say("Eres rango Comandante de Tercera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100020.use begin say("Eres rango General") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Defensores", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Primera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Primera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then say("Que defensor deseas invocar") local defensor_def = select("Minotauro", "Azrael", "Dragon", "Salir") if defensor_def == 1 then say("Con el minotauro podras defenderte de los enemigos") say("Deseas invocarlo?") local invocar = select("Si", "No") if invocar == 1 then if pc.count_item(100039)< 100 then say("No tienes la cantidad necesaria") else pc.give_item2("100041", 1) pc.remove_item("100039", 100) end elseif invocar == 2 then return end elseif defensor_def == 2 then say("feo") elseif defensor_def == 3 then say("feo") elseif defensor_def == 4 then return end elseif ciudadano == 5 then return end end when 100021.use begin say("Eres rango General de Primera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Segunda") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Segunda") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100022.use begin say("Eres rango General de Segunda") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Tercera") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Tercera") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100023.use begin say("Eres rango General de Tercera") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Cuarta") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Cuarta") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100024.use begin say("Eres rango General de Cuarta") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Quinta") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Quinta") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100025.use begin say("Eres rango General de Quinta") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Sexta") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Sexta") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100026.use begin say("Eres rango General de Sexta") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Septima") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Septima") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100027.use begin say("Eres rango General de Septima") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Octava") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Octava") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100028.use begin say("Eres rango General de Octava") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Novena") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Novena") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100029.use begin say("Eres rango General de Novena") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Decima") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango General de Decima") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100030.use begin say("Eres rango General de Decima") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Jinete del Apocalipsis") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango Jinete del Apocalipsis") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100031.use begin say("Eres rango Jinete del Apocalipsis") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango *|Guardia Real|*") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango *|Guardia Real|*") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100032.use begin say("Eres rango *|Guardia Real|*") say("Que deseas hacer?") local ciudadano = select("Subir Rango", "Obtener bonificaciones", "Montar monturas", "Salir") if ciudadano == 1 then say("Vaya asin que quieres subir de rango") say("Te propongo hacerlo mucho mas rapido") say("Normalmente necesitas Puntos") say("Que se dan en la guerra de reinos") say("Yo te puedo subir de rango si me traes resentimientos") say("Te costara mas cantidad, pero te los tiran los monstruos") say("En cualquier mapa") say("Como deseas subirlo?") local subir_rango = select("Con puntos", "Con resentimientos", "Salir") if subir_rango == 1 then if pc.count_item(100035)< 50 then say("No tienes los puntos necesarios (50)") else pc.give_item2("100003", 1) pc.remove_item("100035", 55) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango *|Monarca|*") end elseif subir_rango == 2 then if pc.count_item(100039)< 250 then say("No tienes los puntos necesarios (250)") else pc.give_item2("100003", 1) pc.remove_item("100039", 250) pc.remove_item("100002", 1) notice_all(""..pc.get_name().." ha subido al rango *|Monarca|*") end elseif subir_rango == 3 then return end elseif ciudadano == 2 then say("Bonificacion de 5% en todo i 1500 de hp") local bonificacion = select ("Criticos", "HP", "Mediohumanos", "DEX", "STR", "INT", "Salir") if bonificacion == 1 and pc.get_map_index()==114 then affect.add_collect(apply.CRITICAL_PCT, 5, 60*60*1) elseif bonificacion == 2 and pc.get_map_index()==114 then affect.add_collect(apply.MAX_HP, 1500, 60*60*1) elseif bonificacion == 3 and pc.get_map_index()==114 then affect.add_collect(apply.ATTBONUS_HUMAN, 5, 60*60*1) elseif bonificacion == 4 and pc.get_map_index()==114 then affect.add_collect(apply.DEX, 5, 60*60*1) elseif bonificacion == 5 and pc.get_map_index()==114 then affect.add_collect(apply.STR, 5, 60*60*1) elseif bonificacion == 6 and pc.get_map_index()==114 then affect.add_collect(apply.INT, 5, 60*60*1) elseif bonificacion == 7 then return end elseif ciudadano == 3 then say("Con tu rango no puedes montar monturas") elseif ciudadano == 4 then return end end when 100033.use begin pc.give_item2("1", 1) pc.give_item2("1", 1) pc.give_item2("1", 1) pc.give_item2("1", 1) pc.give_item2("1", 1) pc.give_item2("1", 1) pc.give_item2("1", 1) pc.give_item2("100040", 4) pc.give_item2("100042", 1) notice_all(""..pc.get_name().." es el nuevo |***||/MONARCA||***|") notice_all("el resto de jugadores volvera al rango *|Ciudadano Pobre|*") mysql_query("UPDATE item SET vnum=100001 where vnum=100002") mysql_query("UPDATE item SET vnum=100001 where vnum=100003") mysql_query("UPDATE item SET vnum=100001 where vnum=100004") mysql_query("UPDATE item SET vnum=100001 where vnum=100005") mysql_query("UPDATE item SET vnum=100001 where vnum=100006") mysql_query("UPDATE item SET vnum=100001 where vnum=100007") mysql_query("UPDATE item SET vnum=100001 where vnum=100008") mysql_query("UPDATE item SET vnum=100001 where vnum=100009") mysql_query("UPDATE item SET vnum=100001 where vnum=100010") mysql_query("UPDATE item SET vnum=100001 where vnum=100011") mysql_query("UPDATE item SET vnum=100001 where vnum=100012") mysql_query("UPDATE item SET vnum=100001 where vnum=100013") mysql_query("UPDATE item SET vnum=100001 where vnum=100014") mysql_query("UPDATE item SET vnum=100001 where vnum=100015") mysql_query("UPDATE item SET vnum=100001 where vnum=100016") mysql_query("UPDATE item SET vnum=100001 where vnum=100017") mysql_query("UPDATE item SET vnum=100001 where vnum=100018") mysql_query("UPDATE item SET vnum=100001 where vnum=100019") mysql_query("UPDATE item SET vnum=100001 where vnum=100020") mysql_query("UPDATE item SET vnum=100001 where vnum=100021") mysql_query("UPDATE item SET vnum=100001 where vnum=100022") mysql_query("UPDATE item SET vnum=100001 where vnum=100023") mysql_query("UPDATE item SET vnum=100001 where vnum=100024") mysql_query("UPDATE item SET vnum=100001 where vnum=100025") mysql_query("UPDATE item SET vnum=100001 where vnum=100026") mysql_query("UPDATE item SET vnum=100001 where vnum=100027") mysql_query("UPDATE item SET vnum=100001 where vnum=100028") mysql_query("UPDATE item SET vnum=100001 where vnum=100029") mysql_query("UPDATE item SET vnum=100001 where vnum=100030") mysql_query("UPDATE item SET vnum=100001 where vnum=100031") mysql_query("UPDATE item SET vnum=100001 where vnum=100032") chat("Obtienes tu equipo de MONARCA") chat("Como no queremos que reines solo") chat("Se te han otorgado 4 plumas sagradas") chat("Entregalas a tus amigos, para que se conviertan") chat("En tus PROTECTORES REALES") item.remove() end when 100042.use begin say_title("Beneficios de Monarca") say("") say("Vaya "..pc.get_name().." veo que eres el nuevo monarca") say("Dime de que reino eres y te dejare hacer funciones") say("Para que tu reino tenga bonificaciones que los otros 2 no tienen") say("") local reino = select ("Jinno", "Shinsoo", "Chunjo", "Salir") if reino == 1 then say("Te recuerdo que el uso de los poderes no es ilimitado") say("Usalos con cabeza") local jinno = select ("Añadir EXP", "Añadir YANG", "Añadir DROP", "Salir") if jinno == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 4, 75, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto EXP 75% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif jinno == 2 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 2, 50, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto YANG 50% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif jinno == 3 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 1, 25, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto DROP 25% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif jinno == 4 then return end elseif reino == 2 then say("Te recuerdo que el uso de los poderes no es ilimitado") say("Usalos con cabeza") local shinsoo = select ("Añadir EXP", "Añadir YANG", "Añadir DROP", "Salir") if shinsoo == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 4, 75, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto EXP 75% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif shinsoo == 2 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 2, 50, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto YANG 50% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif shinsoo == 3 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 1, 25, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto DROP 25% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif shinsoo == 4 then return end elseif reino == 3 then say("Te recuerdo que el uso de los poderes no es ilimitado") say("Usalos con cabeza") local shinsoo = select ("Añadir EXP", "Añadir YANG", "Añadir DROP", "Salir") if shinsoo == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 2 horas") return end notice_all("El monarca "..pc.get_name().." ha puesto EXP 75% 6 horas") pc.setqf("tiempo", get_time() + 60*60*2) elseif shinsoo == 2 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 2, 50, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto YANG 50% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif shinsoo == 3 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end __give_empire_priv(3, 1, 25, 60*60*6) notice_all("El monarca "..pc.get_name().." ha puesto DROP 25% 6 horas") pc.setqf("tiempo", get_time() + 60*60*24) elseif shinsoo == 4 then return end elseif reino == 4 then return end end when 100041.use begin notice_all(""..pc.get_name().." ha invocado 1 defensor") local coor_x = pc.get_local_x() local coor_y = pc.get_local_y() local cor_x = math.random(0,10) local cor_y = math.random(0,10) if pc.get_empire() == 1 then mob.spawn(2599, coor_x + cor_x , coor_y + cor_y, 1) pc.remove_item("100041", 1) elseif pc.get_empire() == 2 then mob.spawn(2599, coor_x + cor_x , coor_y + cor_y, 1) elseif pc.get_empire() == 3 then mob.spawn(2599, coor_x + cor_x , coor_y + cor_y, 1) end end when 100035.use begin if pc.count_item("100001") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Ciudadano Pobre|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100002") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Ciudadano Leal|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100003") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Ciudadano Honrado|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100004") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Sargento|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100005") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Sargento de Primera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100006") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Sargento de Segunda|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100007") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Sargento de Tercera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100008") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Comandante|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100009") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Comandante de Primera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100010") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Comandante de Segunda|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100011") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Comandante de Tercera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100012") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100013") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Primera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100014") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Segunda|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100015") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Tercera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100016") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Cuarta|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100017") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Quinta|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100018") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Sexta|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100019") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Septima|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100020") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Octava|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100021") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Novena|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100022") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|General de Decima|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100023") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Samurai|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100024") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Samurai de Primera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100025") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Samurai de Segunda|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100026") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Samurai de Tercera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100027") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Coronel|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100028") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Coronel de Segunda|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100029") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Coronel de Tercera|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100030") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Verdugo|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100031") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|Jinete del Apocalipsis|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100032") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango *|/CAZADOR|*") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100033") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango ***|/MONARCA|***") pc.setqf("tiempo", get_time() + 60*60*24) end if pc.count_item("100034") == 1 then if get_time() < pc.getqf("tiempo") then chat("Espera 24 horas") return end notice_all(""..pc.get_name().." es rango **|/PROTECTOR REAL|**") pc.setqf("tiempo", get_time() + 60*60*24) end end end end y bueno, tambien decir, que si fuera x mi no los posteaba pero para que los saqueis de uj i ni digais kien los creo prefiero ponerlos aki, cabe decir tambien que en esto me ha ayudado mucho keko, al qual le doi creditos directos de la creacion de dicha quest.
     
    PD: esta version no es la final, tiene bastantes bugs, pero podeis apañaroslas.
    Creditos de la quest: yo, keko, ElRaulxX

  7. Me Gusta
    ahynoa reacted to KeKo in Capítulo II - Estructura de una quest   
    Buenas zone!
     
    Llega el segundo capítulo del esperado curso de creacion de quests. Tras un primer episodio lleno de aventuras, romance e intriga en esta entrega os voi a explicar como se estructura una quest.
     
    Antes de nada recordaré las palabras de un sabio llamado raul sobre: qué es una quest? Y además tened esto en mente siempre durante este capítulo.
     
     
    Lo primero de todo cuando vas a hacer una quest es crear el archivo de la quest en si. Como es un archivo de una quest debe tener la extension .quest, para lo que le damos a boton derecho -> nuevo -> documento de texto y una vez creado el archivo. txt le cambiamos el nombre a .quest.
     
    Bueno, después de esta ardua tarea nos encontraremos cara a cara con un archivo en blanco en el que tendremos que vertir nuestras ideas para que se convierta en una quest hecha y derecha. Voi entonces a explicaros como se estructura una quest estándar para que sepais como enfrentaros a nuestro terrible enemigo durante todo el curso: la quest en blanco.
     
    Una quest se divide en 3 partes que podreis distinguir fácilmente:
     
    - Apertura: Son siempre las 2 primeras lineas de una quest.
     
    - Cuerpo: Es lo que podriamos llamar la quest en si, ya que es la parte de la quest que contiene todas las cosas que queremos que haga la quest.
     
    - Cierre: Son siempre ends (a los que dedicare un apartado especial en este capitulo) que hacen que nuestra quest acabe correctamente.
     
    Vamos a hablar ahora en profundidad de cada una de estas partes:
     
    1 - La apertura:
     
    La primera parte de una quest es la que llamaremos apertura a lo largo del curso (ya parezco un profesor ) y que como dije arriba son siempre las dos primeras lineas de una quest.
     
    Veamos un ejemplo de como se debe hacer una apertura:
     

    quest capidos begin state start begin Bien, ahora vamos a centrarnos en qué hace cada una de esas dos líneas:
     

    quest capidos begin La linea más básica de toda una quest, simplemente manda la orden de que comience la quest.
     
    *Desmitificando las quests v1: Se que mucha gente tiene la creencia pagana de que el nombre que va despues de quest en la primera linea de la apertura tiene que ser el mismo que el nombre del archivo .quest PERO ES MENTIRA!!
     
    El nombre que ponemos ahi puede ser el que nos apetezca, ya que simplemente es lo que el juego al cargar la quest para ver que está empezando una.
     
    Bien, ahora la segunda linea:
     

    state start begin Esta linea lo que hace es que comience el estado "start" , es decir: que podemos empezar a escribir nuestra quest.
     
    *Es muy importante que sepais que este estado va a continuar activo hasta el final de la quest, a expecion de casos en los que usemos otros estados aparte del inicial (en lo que profundizará raul en el capítulo de los estados).
    Esto es todo sobre la apertura, espero aver resuelto dudas y enseñado algo que no sepais, y si no lo habreis leido pa na
     
     
    2 - El cuerpo de una quest:
     
    Ahora que ya hemos mandado la orden de que la quest comience (primera linea de la apertura) y hemos activo el estado de start (para poder empezar a escribir quest) nos toca elaborar nuestra quest para hacer eso que queríamos hacer para dejar de ver la temible quest en blanco.
     

    quest capidos begin state start begin De momento tenemos esto, pero ahora queremos hacerlo más digo yo, no? Pues sí! Me remitiré de nuevo a la cita de mi colega raul:
     
    Como veis, cuando pensamos en lenguaje de quest nos planteamos hacer una acción y por lo tanto en el cuerpo de una quest puede suceder varias cosas:
     
    - Que una accion comience.
    - Que pongamos una condicion para que una accion se desarrolle.
    - Que una accion se desarrole.
    - Que comprobemos que una accion se esta desarrolando.
    - Que una accion termine.
     
    Es por eso que en el cuerpo de una quest vamos a usar una serie de operadores logísticos que nos permitiran desarrollar nuestra quest, y que son los siguientes:
     

    when while with and or if elseif else > < >= <= == ~= De ellos:
     
    * when y while sirven para comenzar acciones.
    * with and or if elseif y else sirven para poner condiciones.
    * > < >= <= == ~= sirven para hacer comprobaciones entre acciones.
     
    Primero veremos un ejemplo sencillo de quest que te pone un mensaje en la barra de chat cuando te logeas:
     

    quest capìdos begin state start begin when login begin chat("Bienvenido al servidor, pasalo bien") Como veis tenemos apertura, la orden de que comience una accion cuando nos logeemos y luego la accion que se desarrola cuando nos logeamos.
     
    Vamos a ver ahora mas fondo esto con un ejemplo de quest que envia un mensaje a todos cuando un nuevo pj comienza el juego:
     

    quest capidos begin --- Lineas de apertura state start begin when login with pc.get_level() == 1 begin ---- Linea con orden de comienzo, condicion y comprobacion notice_all("Hay un nuevo personaje en nuestro servidor") --- Linea con la accion Como veis empieza con la apertura.
     
    Luego tenemos una orden para comnenzar una accion: en este caso la accion comenzará cuando nos logeemos con un personaje.
     

    when login Y este comienzo además tiene una comprobación antes de que se desarrolle la accion:
     

    with pc.get_level() == 1 En este caso no solo llega con que nos logeemos con un personaje, ya que tiene que además ser nivel 1, porque tenemos una orden de login, pero con la orden with seguida de una funcion: pc.get_level() y como veis un == que sirve para comprobar que el valor del nivel del personaje es igual a 1.
     

    when login with pc.get_level() == 1 begin Y ahi ya está todo entero. Como veis una vez echa la orden de comenzar la accion cuando nos logeemos, con la condicion de que el personaje sea nivel 1 ponemos la orden begin, para que comience la accion.
     
    Por último simplemente ponemos la accion que se va a desarrollar:
     

    notice_all("Hay un nuevo personaje en nuestro servidor") Bien, creo que ahora ya vais entendiendo como va el cuerpo de una quest, quedaros con el dato de que siempre habrá una orden que haga que comience una mision, ya sea con el when, while, if.... y luego despues de especificar que tiene que pasar para que comience la accion usaremos funciones de quest para desarrolar esa acción.
     
    Bueno pues ahora ya tenemos nuestra accion desarrolandose, pero que hacemos con ella? Como las acciones no pueden ser eternas tenemos que acabarla, y para eso usaremos la palabra end, que indica que la accion termina.
     
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
    *Apartado especial, nuestros amigos los ends:
     
    Como muchos sabeis uno de los errores más comunes a la hora de hacer quests es poner o bien ends de más o bien ends de menos, lo que hará que nuestras quests no funcionen. Por lo tanto antes de nada parémonos a pensar en que es lo que es un end.
     
    Procediente del inglés la palabra end es un verbo que significa terminar, lo que no nos puede dejar más claro cual es su función en una quest: terminar una acción.
     
    Por lo tanto cada vez que tengamos una accion tendremos que ponerle un end al final para acabarla. Y de que manera vamos a hacer eso? Os lo diremos en el proximo capitulo , na en serio, asi funcionan los ends:
     
    - Por cada begin que tengamos en nuestra quest nosotros le colocaremos un end.
    - Por cada if que haya en la quest pondremos un end.
     
    Veamos algunos ejemplos:
     

    when login begin chat("Hola") end when 105.kill begin say("Has matado un lobo") end when 20095.chat."Hola" begin say("Buenas") end Por cada begin corresponde a un end
     

    if pc.count_item("50084") == 1 then say("Veo que tienes la llave") end En este caso hay un if asi que ponemos un end
     
    *Desmitificando las quest v2: Mucha gente comete el error de pensar que si ves un elseif como lleva la palabra if pues debe tener un end también, pero NO!!! Y es porque un elseif es una continuacion de una condición y no una nueva condicion
     
    Ejemplo:
     

    local s = select ("opcion1" , "opcion2" , "opcion3) if s == 1 then say("Has clickado en la opcion 1") elseif s == 2 then say("Has clickado en la opcion 2") elseif s == 3 then say("Has clickado en la opcion 3") end Como veis solo hay un end, el correspondiente al primer if.
     
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    Bien ahora que ya conocemos mejor a los ends (de los cuales os seguiremos hablando en posteriores capitulos) ya podemos acabar el cuerpo de nuestra quest, cerrando la accion que habeis comenzado.
     
     

    quest capidos begin --- Lineas de apertura state start begin when login with pc.get_level() == 1 begin ---- Linea con orden de comienzo, condicion y comprobacion notice_all("Hay un nuevo personaje en nuestro servidor") --- Linea con la accion end --- End correspondiente al begin de la linea 3  
    Pero los listos os habreis dado cuenta de que en nuestra quest quedan 2 begins (de la apertura) que no tienen su end y eso lo voi a explicar ahora en la ultima parte de la estructura de una quest.
     
    3 - Cierre de una quest:
     
    Cada vez que acabemos una quest vamos a tener que poner dos ends para cerrar la quest, y os estareis preguntando, y porque??? Pues la explicacion es esta:
     

    state start begin Os acordais de la apertura? Si lo haceis os acordareis de que para hacer una quest tenemos que hacer un estado de comienzo (state start), que logicamente acabara cuando acabe la quest. De ahi viene el primer end del cierre de una quest.
     
    *Detalle importante: algún espabilado habrá visto quests en los que se usan otros states aparte del start. En eses casos el cierre solo lleva un end (el que explico abajo) ya que acabaremos el start antes de lo normal para poner nuestro nuevo estado (para mas info sobre estado atentos al capítulo dedicado a ellos que hará raul).
     
    Y ahora el segundo end del cierre:
     

    quest capidos begin De nuevo dire si os acordais de la apertura (que espero que os acordeis ) sabreis que cada quest empieza con esa orden, y como os fijareis tiene un begin al final por lo que le corresponde un end, pero no se lo podemos poner en cualquier momento, ya que (me quoteo a mi mismo):
     
    Es decir, si acabamos la accion de que comience la quest, acabamos la quest (genial deduccion). Siguiendo este hilo de deduccion os habreis dado cuenta de que es por eso por lo que el end correspondiente al begin del quest nombre begin siempre va al final de la quest.
     
    Y ahora ya podemos ver nuestra quest completa y lista para cargar
     

    quest capidos begin --- Lineas state start begin ----- de apertura when login with pc.get_level() == 1 begin ---- Cuerpo de la quest notice_all("Hay un nuevo personaje en nuestro servidor") --- Cuerpo de la quest end --- End correspondiente al begin de la linea 3 --- Cuerpo de la quest (end correspondiente el when login begin) end --- Cierre del state end --- Cierre del quest begin Y eso es todo por el capítulo de hoy, espero que lo hayas disfrutado y pronto llegará el 3er episodio de manos de raul.
  8. Me Gusta
    ahynoa reacted to Serex in Metin2 Comic Wallpapers   
    Bueno aquí os dejo unos cuantos wallpapers de Metin2 Comics.
     

     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     
     

     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

     
     
     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
     

  9. Me Gusta
    ahynoa reacted to zaira in una recopilacion de wallpapers   
    solo subo unas cuantas imagenes no todas son muchas jejeje
     
     

     

     

    el link=
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  10. Me Gusta
    ahynoa reacted to KeKo in Armas de Monster Hunter Tri   
    Hola gente, estos dias estoi adaptando algunas armas del juegazo de wii Monster Hunter Tri, aqui teneis como quedaron:
     
     

     
     

  11. Me Gusta
    ahynoa reacted to diper in Nuevo questlib 2012 aun en test   
    Hola Amigos de Metin zone les traigo este ques lib 2012 mas complejo que aun no ee testeado muy bien pero ee tomado algunas funciones pero parese que trae nuevas funcionas para las nuevas quest que estan saliiendo en foros alemanes y italianos espero que les sirva.
     

    print('Questlib by Mijago | 22.03.2012') ql = {} col = {} zt = {} proc = {} -- Einstellungen zur Lib: mijago_include_compat = true do -- Zur Nutzung auf Windoof | MySQL funktioniert auf Windoof nicht! local old_print = print if number == nil then number = function(i,l) return math.random(i,l) end end if pc == nil then pc = {} pc.get_name = function() return '-name-' end pc.count_item = function() return 200 end pc.remove_item = function() return end pc.give_item = function(i,l) print('<GiveItem>',i,l) end pc.warp = function(i,l) print('<Warp>',i,l) end pc.warp_local = function(m,x,y) print('<Warp>',m,x,y) end pc.give_item2 = pc.give_item pc.get_map_index = function() return 1 end pc.get_local_y = function() return 200 end pc.get_local_x = function() return 400 end pc.get_empire = function() return 2 end pc.getqf = function() return 222313 end get_time = os.time end if cmdchat == nil then cmdchat = function() old_print('<cmdchat>') end end if wait == nil then wait = function () old_print('<wait>') end end if input == nil then input = function () old_print('<input>'); return 101 end end if say == nil then say = function (...) local st = '' table.foreachi(arg,function(i,l) st = st..l..'t' end) old_print('<say>',st) end end if chat == nil then chat = function (txt) old_print('<Chat>',txt) end end if notice == nil then notice = function (txt) old_print('<notice>',txt) end end if setbg == nil then setbg = function (txt) old_print('<setbg>',txt) end end if say_size == nil then say_size = function (a,b) old_print('<say_size>',a,b) end end if notice_all == nil then notice_all = function (txt) old_print('<notice_all>',txt) end end if game == nil then game = {} game.set_event_flag = function(a,b) print('<game.set_event_flag>',a,b) end end if select == nil then select = function (...) local st = '' table.foreachi(arg,function(i,l) st = st..l..'t' end) old_print('<select>',st) return math.random(0,table.getn(arg)) end end end doit = os.execute ql.mysql = { ["user"] = "root", ["pass"] = "", ["ip"] = "localhost", } ------------------------------------------------------------------------------- -- function select2(tab,...) arg.n = nil if type(tab) ~= "table" and type(tab) == 'number' then table.insert(arg,1,tab) tab = arg elseif type(tab) ~= "table" and type(tab) == 'string' then table.insert(arg,1,tab) table.insert(arg,1,8) tab = arg elseif type(tab) == "table" and type(tab[1]) == 'string' then table.insert(tab,1,8) end local max = tab[1]; table.remove(tab,1) local tablen,outputstr,outputcount,nextc,incit = table.getn(tab),"",0,0,0 table.foreach(tab, function(i,l) outputcount = outputcount + 1 if outputcount == 1 then outputstr=outputstr..'sel = select("'..l..'"' elseif outputcount == max and tablen > outputcount+incit then if tablen ~= outputcount+incit+1 then outputstr=outputstr..',"'..l..'","Nächste Seite") + '..incit..' ' if nextc > 0 then outputstr = outputstr..'end ' end outputstr=outputstr..'; if sel == '..(incit+max+1)..' then ' -- Anfangen der neuen Abfrage nextc, outputcount, incit= nextc+1,0,incit+max else outputstr=outputstr..',"'..l..'"' end else outputstr=outputstr..',"'..l..'"' end end ) outputstr = outputstr..') + '..incit if nextc > 0 then outputstr = outputstr..' end' end outputstr= outputstr.. '; return sel' print(outputstr) local sel = assert(loadstring(outputstr))() tablen,outputstr,outputcount,nextc,incit = nil,nil,nil,nil,nil -- Speicher freimachen return sel end function arraytoselect(arr,abbr) local d = 'sel = select(' local i = 0 for i=1,getn(arr),1 do d = d..'"'..arr[i]..'",' if abbr ~= nil then if i == getn(arr) then d = d..'"'..abbr..'"' end end end d = d..")nreturn sel" return assert(loadstring(d))() end function dostr(str) assert(loadstring(str))() end ------------------------------------------------------------------------------- -- Veränderte Lua-Funktionen do local old_tonumber = tonumber tonumber = function(str) if old_tonumber(str) == nil then return 0,false else return old_tonumber(str),true end end end ------------------------------------------------------------------------------- -- Datenspeicherung function writelog(text,var,file) if var == nil then var = 1 end if var == 1 then local data = io.open('syserr','a+') data:write(os.date()..'::t'..text.."n") data:close() elseif var == 2 then local data = io.open('syslog','a+') data:write(os.date()..'::t'..text.."n") data:close() elseif var == 3 then local data = io.open(file,'a+') data:write(os.date()..'::t'..text.."n") data:close() end end function watch_table(tab) local meta,myname,tabn = {},pc.get_name(),tostring(tab) local lo = function(typ,index,wert) writelog(tabn..' - '..myname..': '..typ..' ['..index..'] = '..wert,3,'tables') end meta.__newindex = function(ta,index,wert) --writelog(tabn..' - '..myname..': Newindex ['..index..'] = '..wert,3,'tables') lo('newindex',index,wert) rawset(ta,index,wert) end meta.__index = function(ta,index,wert) lo('index',index,wert) error('Fehlerhafter Zugriff bei '..index) end meta.__call = function(ta,index,wert) lo('call',index,wert) end setmetatable(tab, meta) end ------------------------------------------------------------------------------- -- account account = account or {} function account.set_pw(pw,ac) if pw == nil then error("Fehler... Passwort muss gesetzt werden!") end if ac == nil then ac = pc.get_account_id() end if type(ac) == "string" then mysql_query("UPDATE player.player,account.account SET account.password = password('"..pw.."') WHERE account.id = player.account_id and player.name = '"..ac.."' LIMIT 1") elseif type(ac) == "number" then mysql_query("UPDATE account.account SET account.password = password('"..pw.."') WHERE account.id = "..ac) end end ------------------------------------------------------------------------------- -- PCI pci = {} function pci:new(name) local out = {} if name == nil then name = pc.get_name() end local info = mysql_query("SELECT * FROM player.player WHERE name = '"..name.."' LIMIT 1",ql.mysql["user"],ql.mysql["pass"],ql.mysql["ip"]) local reich = mysql_query("select player_index.empire FROM player.player INNER JOIN player.player_index ON player.account_id = player_index.id WHERE player.name = '"..pc.get_name().."'",ql.mysql["user"],ql.mysql["pass"],ql.mysql["ip"]) out.name = name out.level = info.level[1] out.playtime = info.playtime[1] out.job = info.job[1] out.account_id = info.account_id[1] out.id = info.id[1] out.voice = info.voice[1] out.dir = info.dir[1] out.x = info.x[1] out.y = info.y[1] out.z = info.z[1] out.map_index = info.map_index[1] out.exit_y = info.exit_y[1] out.exit_x = info.exit_x[1] out.exit_map_index = info.exit_map_index[1] out.hp = info.hp[1] out.mp = info.mp[1] out.stamina = info.stamina[1] out.random_hp = info.random_hp[1] out.random_sp = info.random_sp[1] out.level_step = info.level_step[1] out.st = info.st[1] out.ht = info.ht[1] out.dx = info.dx[1] out.iq = info.iq[1] out.exp= info.exp[1] out.gold = info.gold[1] out.stat_point = info.stat_point[1] out.skill_point = info.skill_point[1] out.ip = info.ip[1] out.part_main = info.part_main[1] out.part_hair = info.part_hair[1] out.skill_group = info.skill_group[1] out.last_play = info.last_play[1] out.alignment = info.alignment[1] out.change_name = info.change_name[1] out.sub_skill_point = info.sub_skill_point[1] out.horse_skill_point = info.horse_skill_point[1] out.horse_riding = info.horse_riding[1] out.horse_hp_droptime = info.horse_hp_droptime[1] out.horse_level = info.horse_level[1] out.horse_stamina = info.horse_stamina[1] out.horse_hp = info.horse_hp[1] out.stat_reset_count = info.stat_reset_count[1] out.empire = reich.empire[1] setmetatable(out, { __index = pci }) print('Daten für '..name..' erfolgreich geladen!') return out end function pci:update() local info = mysql_query("SELECT * FROM player.player WHERE name = '"..self.name.."' LIMIT 1",ql.mysql["user"],ql.mysql["pass"],ql.mysql["ip"]) self.level = info.level[1] self.playtime = info.playtime[1] self.job = info.job[1] self.account_id = info.account_id[1] self.id = info.id[1] self.voice = info.voice[1] self.dir = info.dir[1] self.x = info.x[1] self.y = info.y[1] self.z = info.z[1] self.map_index = info.map_index[1] self.exit_y = info.exit_y[1] self.exit_x = info.exit_x[1] self.exit_map_index = info.exit_map_index[1] self.hp = info.hp[1] self.mp = info.mp[1] self.stamina = info.stamina[1] self.random_hp = info.random_hp[1] self.random_sp = info.random_sp[1] self.level_step = info.level_step[1] self.st = info.st[1] self.ht = info.ht[1] self.dx = info.dx[1] self.iq = info.iq[1] self.exp= info.exp[1] self.gold = info.gold[1] self.stat_point = info.stat_point[1] self.skill_point = info.skill_point[1] self.ip = info.ip[1] self.part_main = info.part_main[1] self.part_hair = info.part_hair[1] self.skill_group = info.skill_group[1] self.last_play = info.last_play[1] self.alignment = info.alignment[1] self.change_name = info.change_name[1] self.sub_skill_point = info.sub_skill_point[1] self.horse_skill_point = info.horse_skill_point[1] self.horse_riding = info.horse_riding[1] self.horse_hp_droptime = info.horse_hp_droptime[1] self.horse_level = info.horse_level[1] self.horse_stamina = info.horse_stamina[1] self.horse_hp = info.horse_hp[1] self.stat_reset_count = info.stat_reset_count[1] print('Daten für '..self.name..' erfolgreich geupdated!') end ------------------------------------------------------------------------------- -- Strings function rm_nlc(s) return string.gsub(s, "%A", "") end -- alles außer Buchstaben weg function rm_ndc(s) return string.gsub(s, "%D", "") end -- alles außer Zahlen weg function rm_lc(s) return string.gsub(s, "%a", "") end -- alle Buchstaben weg function rm_dc(s) return string.gsub(s, "%d", "") end -- alle Zahlen weg function rm_ucc(s) return string.gsub(s, "%u", "") end -- alle großgeschriebenen Buchstaben weg function rm_lcc(s) return string.gsub(s, "%l", "") end -- alle kleingeschriebenen Buchstaben weg function rm_nanc(s) return string.gsub(s, "%W", "") end -- alle nicht-alphanumerischen Zeichen weg function string.reverse(str) local se = '' for i=1,string.len(str) do se = string.sub(str,i,i)..se end return se end function num_format(num) if type(num) == "number" then num = tostring(num) end if string.len(num) <= 3 then return num end return string.reverse(string.gsub(string.reverse(num),'(%d%d%d)','%1.')) end function wartungsmodus(v) if v == 1 then mysql_query("UPDATE account.account SET account.status = 'SHUTDOWN' WHERE status = 'OK' and account.login NOT IN (SELECT mAccount FROM common.gmlist);") elseif v == 0 then mysql_query("UPDATE account.account SET account.status = 'OK' WHERE status = 'SHUTDOWN' and account.login NOT IN (SELECT mAccount FROM common.gmlist);") end end ------------------------------------------------------------------------------- --[[ iti iti = {} function iti:new(name) -- The constructor local out = {} local info = mysql_query_on("SELECT * FROM player.item WHERE vnum = "..name.." LIMIT 1") out.vnum = tonumber(name) setmetatable(out, { __index = iti }) -- Inheritance print('Daten für Item '..name..' erfolgreich geladen!') return out end --]] ------------------------------------------------------------------------------- -- Say CFG UNFINISHED - In Arbeit! --[[ sayer = {} function sayer:new() local out = {} out.maxlen = 50 out.maxlines = 15 out.lines=0 out.text = 'say("' self.sayopen = 1 setmetatable(out, { __index = sayer }) return out end function sayer:add(txt) if self.lines >= self.maxlines then self.lines = 0 self.text = self.text..'"); wait();' self.sayopen = 0 end if self.sayopen == 0 then self.text = self.text..' say("' self.sayopen = 1 end if self.lines ~= 0 then self.text = self.text ..'[ENTER]' end if string.len(txt) < self.maxlen then self.text = self.text ..txt end self.lines = self.lines+1 end function sayer:send() if self.sayopen == 1 then self.text = self.text..'"); ' self.sayopen = 1 end --assert(loadstring(self.text))() s.out=loadstring(self.text)() print(self.text) end function sayer:wait() if self.sayopen == 1 then self.text = self.text..'"); ' self.sayopen = 0 end self.text = self.text..' wait();' self.sayopen = 0 self.lines=0 end function sayer:input() if self.sayopen == 1 then self.text = self.text..'"); ' self.sayopen = 0 end self.text = self.text..'input();' self.sayopen = 0 self.lines=0 end function sayer:select(tab) if self.sayopen == 1 then self.text = self.text..'"); ' self.sayopen = 0 end local un = "'"..join("','",tab).."'" self.text = self.text..'select('..un..');' self.sayopen = 0 self.lines=0 end function sayer:clear() self.maxlen = 50 self.maxlines = 6 self.lines=0 self.text = 'say("' self.sayopen = 1 end --]] ------------------------------------------------------------------------------- -- MYSQL - FUNKTIONEN -- Einzelbefehle function mysql_escape(str) str = string.gsub(str,"%", "") -- str = string.gsub(str,"%0", "0") Gibt einen fehler aus | Wer rausfindet, warum.. Bitte mir Schreiben (Mijago) str = string.gsub(str,"%n", "n") str = string.gsub(str,"%r", "r") str = string.gsub(str,"%x1a", "Z") str = string.gsub(str,"%'", "'") str = string.gsub(str,'%"', '"') return str end function backup_files() -- Backuppt den Share-Ordner local now = os.date('%d-%m-%Y_%H:%M:%S') -- Aus absicht einzelne Zeilen! (Zur besseren Kommentierung und dass nicht ein Fehler alle Scripts behindert) os.execute('mkdir /backup/ && mkdir /backup/share') -- Ordner erstellen, falls nicht vorhanden os.execute('tar -cvzf ./locale/ /backup/share/'..now..'_locale.tar.gz') -- Packen os.execute('tar -cvzf ./data/ /backup/share/'..now..'_data.tar.gz') -- Packen end function backup_main() -- Backuppt die Hauptdatenbanken local now = os.date('%d-%m-%Y_%H:%M:%S') -- Aus absicht einzelne Zeilen! (Zur besseren Kommentierung und dass nicht ein Fehler alle Scripts behindert) os.execute('mkdir /backup/ && mkdir /backup/main') -- Ordner erstellen, falls nicht vorhanden os.execute('mkdir /backup/main/'..now) -- Ordner für das Backup erstellen os.execute('mkdir /backup/main/'..now..'/player/') -- Player-DB vorbereiten os.execute('mkdir /backup/main/'..now..'/account/') -- Account-DB vorbereiten os.execute('cp /var/db/mysql/player/player* /backup/main/'..now..'/player/') -- Player DBs Kopieren os.execute('cp /var/db/mysql/player/quest.* /backup/main/'..now..'/player/') -- Quest DB Kopieren os.execute('cp /var/db/mysql/player/guild* /backup/main/'..now..'/player/') -- Guild DBs Kopieren os.execute('cp /var/db/mysql/account/account.* /backup/main/'..now..'/account/') -- Guild DBs Kopieren os.execute('tar -cvzf /backup/main/'..now..'/ /backup/main/'..now..'.tar.gz') -- Packen os.execute('rm -R /backup/main/'..now..'/') -- Daten wieder löschen end function backup() -- Backuppt alle Datenbanken local now = os.date('%d-%m-%Y_%H:%M:%S') -- Aus absicht einzelne Zeilen! (Zur besseren Kommentierung und dass nicht ein Fehler alle Scripts behindert) os.execute('mkdir /backup/ && mkdir /backup/all') -- Ordner erstellen, falls nicht vorhanden os.execute('mkdir /backup/all/'..now) -- Ordner für das Backup erstellen os.execute('tar -cvzf /var/db/mysql/ /backup/all/'..now..'.tar.gz') -- Packen end function mysql_query(query,user,pass,db,ip) local pre = '' if query == '' or query == nil then error("Query muss gesetzt sein!") end user = user or ql.mysql["user"] pass = pass or ql.mysql["pass"] ip = ip or ql.mysql["ip"] if user ~= '' and user ~= nil then pre = pre..' -u'..user end if pass ~= '' and pass ~= nil then pre = pre..' -p'..pass end if db ~= '' and db ~= nil then pre = pre..' -D'..db end if ip ~= '' and ip ~= nil then pre = pre..' -h'..ip end math.randomseed(os.time()); local rand = math.random(0,10^7) -- Erstellen der Pfadvariable local path = 'data/mysql_output_'..os.time()..'_'..rand..'_'..pc.get_vid() os.execute ("mysql "..pre.." --e=""..query.."" > "..path) -- Laden und Auflisten der Dateiinhalte local fi,q = io.open(path,"r"),{["l"] = {},["out"]={}} if fi == nil then return "ERROR" end for line in fi:lines() do table.insert(q.l,(split(line,"t"))) end os.remove(path) if type(q.l[1]) ~= "table" then return "ERROR" --error("Fehler bei der MySQL Verbindung oder bei der Rückgabe! Abbruch!") end local ix = 0 table.foreachi(q.l,function(i,l) if i > 1 then table.foreach(l,function(i2,l2) if q.out[q.l[1][i2]] == nil then q.out[q.l[1][i2]] = {} end local c = tonumber(l2) if type(c) == "number" and l2 == tostring(c) then q.out[q.l[1][i2]][i-1] = c else q.out[q.l[1][i2]][i-1] = l2 end end) end end) -- ENDE der eigentlichen MySQL-Funktion -- START Zusatz: Hanashi-Kompatibilität & Fehlerbehandlung q.out.__data = q.l[1] setmetatable(q.out, { __index = function(a,b) if type(b) == "number" then return (a[a.__data[b]] or {"ERROR"}) end return "ERROR" --error("Fehler bei Indexierung: Index "..b.." ist nicht vorhanden!") end}) return q.out end -- Für mehrere CFG's mysql = {} function mysql:connect(ip,user,passwd,db) local out = {} out.ip = ip out.user = user out.pass = passwd if db == nil then db = 'player' end out.db = db out.querycount = 0 out.querylist = {} out.ql = {} setmetatable(out, { __index = mysql }) return out end function mysql:query(query) self.lastquery = mysql_query(query,self.user,self.pass,self.db,self.ip) self.lq = self.lastquery self.querycount = self.querycount +1 self.querylist[self.querycount] = self.lq self.ql = self.querylist return self.lastquery, self.querycount end function mysql:setcfg(ip,user,pass,db) if ip ~= nil then self.ip = ip end if user ~= nil then self.user = user end if pass ~= nil then self.pass = pass end self.db = db end ------------------------------------------------------------------------------- -- FARBCODES col.list= { { 'lightcoral', 240,128,128 },{ 'rosybrown', 188,143,143 }, { 'indianred', 205,92,92 },{ 'red', 255,0,0 },{ 'firebrick', 178,34,34 },{ 'brown', 165,42,42 }, { 'darkred', 139,0,0 },{ 'maroon', 128,0,0 },{ 'mistyrose', 255,228,225 },{ 'salmon', 250,128,114 }, { 'tomato', 255,99,71 },{ 'darksalmon', 233,150,122 },{ 'coral', 255,127,80 },{ 'orangered', 255,69,0 }, { 'lightsalmon', 255,160,122 },{ 'sienna', 160,82,45 },{ 'seashell', 255,245,238 },{ 'chocolate', 210,105,30 }, { 'saddlebrown', 139,69,19 },{ 'sandybrown', 244,164,96 },{ 'peachpuff', 255,218,185 },{ 'peru', 205,133,63 }, { 'linen', 250,240,230 },{ 'bisque', 255,228,196 },{ 'darkorange', 255,140,0 },{ 'burlywood', 222,184,135 }, { 'antiquewhite', 250,235,215 },{ 'tan', 210,180,140 },{ 'navajowhite', 255,222,173 },{ 'blanchedalmond', 255,235,205 }, { 'papayawhip', 255,239,213 },{ 'moccasin', 255,228,181 },{ 'orange', 255,165,0 },{ 'wheat', 245,222,179 }, { 'oldlace', 253,245,230 },{ 'floralwhite', 255,250,240 },{ 'darkgoldenrod', 184,134,11 },{ 'goldenrod', 218,165,32 }, { 'cornsilk', 255,248,220 },{ 'gold', 255,215,0 },{ 'lemonchiffon', 255,250,205 },{ 'khaki', 240,230,140 }, { 'palegoldenrod', 238,232,170 },{ 'darkkhaki', 189,183,107 },{ 'ivory', 255,255,240 },{ 'lightyellow', 255,255,224 }, { 'beige', 245,245,220 },{ 'lightgoldenrodyellow', 250,250,210 },{ 'yellow', 255,255,0 },{ 'olive', 128,128,0 }, { 'olivedrab', 107,142,35 },{ 'yellowgreen', 154,205,50 },{ 'darkolivegreen', 85,107,47 },{ 'greenyellow', 173,255,47 }, { 'chartreuse', 127,255,0 },{ 'lawngreen', 124,252,0 },{ 'darkseagreen', 143,188,139 },{ 'honeydew', 240,255,240 }, { 'palegreen', 152,251,152 },{ 'lightgreen', 144,238,144 },{ 'lime', 0,255,0 },{ 'limegreen', 50,205,50 }, { 'forestgreen', 34,139,34 },{ 'green', 0,128,0 },{ 'darkgreen', 0,100,0 },{ 'seagreen', 46,139,87 }, { 'mediumseagreen', 60,179,113 },{ 'springgreen', 0,255,127 },{ 'mintcream', 245,255,250 },{ 'mediumspringgreen', 0,250,154 }, { 'mediumaquamarine', 102,205,170 },{ 'aquamarine', 127,255,212 },{ 'turquoise', 64,224,208 },{ 'lightseagreen', 32,178,170 }, { 'mediumturquoise', 72,209,204 },{ 'azure', 240,255,255 },{ 'lightcyan', 224,255,255 },{ 'paleturquoise', 175,238,238 }, { 'aqua', 0,255,255 },{ 'cyan', 0,255,255 },{ 'darkcyan', 0,139,139 },{ 'teal', 0,128,128 }, { 'darkslategray', 47,79,79 },{ 'darkturquoise', 0,206,209 },{ 'cadetblue', 95,158,160 },{ 'powderblue', 176,224,230 }, { 'lightblue', 173,216,230 },{ 'deepskyblue', 0,191,255 },{ 'skyblue', 135,206,235 },{ 'lightskyblue', 135,206,250 }, { 'steelblue', 70,130,180 },{ 'aliceblue', 240,248,255 },{ 'dodgerblue', 30,144,255 },{ 'lightslategray', 119,136,153 }, { 'slategray', 112,128,144 },{ 'lightsteelblue', 176,196,222 },{ 'cornflowerblue', 100,149,237 },{ 'royalblue', 65,105,225 }, { 'ghostwhite', 248,248,255 },{ 'lavender', 230,230,250 },{ 'blue', 0,0,255 },{ 'mediumblue', 0,0,205 }, { 'darkblue', 0,0,139 },{ 'midnightblue', 25,25,112 },{ 'navy', 0,0,128 },{ 'slateblue', 106,90,205 }, { 'darkslateblue', 72,61,139 },{ 'mediumslateblue', 123,104,238 },{ 'mediumpurple', 147,112,219 },{ 'blueviolet', 138,43,226 }, { 'indigo', 75,0,130 },{ 'darkorchid', 153,50,204 },{ 'darkviolet', 148,0,211 },{ 'mediumorchid', 186,85,211 }, { 'thistle', 216,191,216 },{ 'plum', 221,160,221 },{ 'violet', 238,130,238 },{ 'fuchsia', 255,0,255 }, { 'magenta', 255,0,255 },{ 'darkmagenta', 139,0,139 },{ 'purple', 128,0,128 },{ 'orchid', 218,112,214 }, { 'mediumvioletred', 199,21,133 },{ 'deeppink', 255,20,147 },{ 'hotpink', 255,105,180 },{ 'lavenderblush', 255,240,245 }, { 'palevioletred', 219,112,147 },{ 'crimson', 220,20,60 },{ 'pink', 255,192,203 },{ 'lightpink', 255,182,193 }, { 'white', 255,255,255 },{ 'snow', 255,250,250 },{ 'whitesmoke', 245,245,245 },{ 'gainsboro', 220,220,220 }, { 'lightgray', 211,211,211 },{ 'silver', 192,192,192 },{ 'darkgray', 169,169,169 },{ 'gray', 128,128,128 }, { 'dimgray', 105,105,105 },{ 'black', 0,0,0 },{ 'aliceblue', 240,248,255 },{ 'antiquewhite', 250,235,215 }, { 'aqua', 0,255,255 },{ 'aquamarine', 127,255,212 },{ 'azure', 240,255,255 },{ 'beige', 245,245,220 }, { 'bisque', 255,228,196 },{ 'black', 0,0,0 },{ 'blanchedalmond', 255,235,205 },{ 'blue', 0,0,255 }, { 'blueviolet', 138,43,226 },{ 'brown', 165,42,42 },{ 'burlywood', 222,184,135 },{ 'cadetblue', 95,158,160 }, { 'chartreuse', 127,255,0 },{ 'chocolate', 210,105,30 },{ 'coral', 255,127,80 },{ 'cornflowerblue', 100,149,237 }, { 'cornsilk', 255,248,220 },{ 'crimson', 220,20,60 },{ 'cyan', 0,255,255 },{ 'darkblue', 0,0,139 }, { 'darkcyan', 0,139,139 },{ 'darkgoldenrod', 184,134,11 },{ 'darkgray', 169,169,169 },{ 'darkgreen', 0,100,0 }, { 'darkkhaki', 189,183,107 },{ 'darkmagenta', 139,0,139 },{ 'darkolivegreen', 85,107,47 },{ 'darkorange', 255,140,0 }, { 'darkorchid', 153,50,204 },{ 'darkred', 139,0,0 },{ 'darksalmon', 233,150,122 },{ 'darkseagreen', 143,188,139 }, { 'darkslateblue', 72,61,139 },{ 'darkslategray', 47,79,79 },{ 'darkturquoise', 0,206,209 },{ 'darkviolet', 148,0,211 }, { 'deeppink', 255,20,147 },{ 'deepskyblue', 0,191,255 },{ 'dimgray', 105,105,105 },{ 'dodgerblue', 30,144,255 }, { 'firebrick', 178,34,34 },{ 'floralwhite', 255,250,240 },{ 'forestgreen', 34,139,34 },{ 'fuchsia', 255,0,255 }, { 'gainsboro', 220,220,220 },{ 'ghostwhite', 248,248,255 },{ 'gold', 255,215,0 },{ 'goldenrod', 218,165,32 }, { 'gray', 128,128,128 },{ 'green', 0,128,0 },{ 'greenyellow', 173,255,47 },{ 'honeydew', 240,255,240 }, { 'hotpink', 255,105,180 },{ 'indianred', 205,92,92 },{ 'indigo', 75,0,130 },{ 'ivory', 255,255,240 }, { 'khaki', 240,230,140 },{ 'lavender', 230,230,250 },{ 'lavenderblush', 255,240,245 },{ 'lawngreen', 124,252,0 }, { 'lemonchiffon', 255,250,205 },{ 'lightblue', 173,216,230 },{ 'lightcoral', 240,128,128 },{ 'lightcyan', 224,255,255 }, { 'lightgoldenrodyellow', 250,250,210 },{ 'lightgray', 211,211,211 },{ 'lightgreen', 144,238,144 },{ 'lightpink', 255,182,193 }, { 'lightsalmon', 255,160,122 },{ 'lightseagreen', 32,178,170 },{ 'lightskyblue', 135,206,250 },{ 'lightslategray', 119,136,153 }, { 'lightsteelblue', 176,196,222 },{ 'lightyellow', 255,255,224 },{ 'lime', 0,255,0 },{ 'limegreen', 50,205,50 }, { 'linen', 250,240,230 },{ 'magenta', 255,0,255 },{ 'maroon', 128,0,0 },{ 'mediumaquamarine', 102,205,170 }, { 'mediumblue', 0,0,205 },{ 'mediumorchid', 186,85,211 },{ 'mediumpurple', 147,112,219 },{ 'mediumseagreen', 60,179,113 }, { 'mediumslateblue', 123,104,238 },{ 'mediumspringgreen', 0,250,154 },{ 'mediumturquoise', 72,209,204 },{ 'mediumvioletred', 199,21,133 }, { 'midnightblue', 25,25,112 },{ 'mintcream', 245,255,250 },{ 'mistyrose', 255,228,225 },{ 'moccasin', 255,228,181 }, { 'navajowhite', 255,222,173 },{ 'navy', 0,0,128 },{ 'oldlace', 253,245,230 },{ 'olive', 128,128,0 }, { 'olivedrab', 107,142,35 },{ 'orange', 255,165,0 },{ 'orangered', 255,69,0 },{ 'orchid', 218,112,214 }, { 'palegoldenrod', 238,232,170 },{ 'palegreen', 152,251,152 },{ 'paleturquoise', 175,238,238 },{ 'palevioletred', 219,112,147 }, { 'papayawhip', 255,239,213 },{ 'peachpuff', 255,218,185 },{ 'peru', 205,133,63 },{ 'pink', 255,192,203 }, { 'plum', 221,160,221 },{ 'powderblue', 176,224,230 },{ 'purple', 128,0,128 },{ 'red', 255,0,0 }, { 'rosybrown', 188,143,143 },{ 'royalblue', 65,105,225 },{ 'saddlebrown', 139,69,19 },{ 'salmon', 250,128,114 }, { 'sandybrown', 244,164,96 },{ 'seagreen', 46,139,87 },{ 'seashell', 255,245,238 },{ 'sienna', 160,82,45 }, { 'silver', 192,192,192 },{ 'skyblue', 135,206,235 },{ 'slateblue', 106,90,205 },{ 'slategray', 112,128,144 }, { 'snow', 255,250,250 },{ 'springgreen', 0,255,127 },{ 'steelblue', 70,130,180 },{ 'tan', 210,180,140 }, { 'teal', 0,128,128 },{ 'thistle', 216,191,216 },{ 'tomato', 255,99,71 },{ 'turquoise', 64,224,208 }, { 'violet', 238,130,238 },{ 'wheat', 245,222,179 },{ 'white', 255,255,255 },{ 'whitesmoke', 245,245,245 }, { 'yellow', 255,255,0 },{ 'yellowgreen', 154,205,50 }} table.foreachi(col.list,function(a,b) col[b[1]] = function(text) return "[COLOR r;"..(b[2]/255.0).."|g;"..(b[3]/255.0).."|b;"..(b[4]/255.0).."]"..text..'[/COLOR]' end end) ------------------------------------------------------------------------------- -- ZEIT - FUNKTIONEN --- Tage zt.d_j = function(d) return d/365 end zt.d_mo = function(d) return d/12 end zt.d_h = function(d) return d*24 end zt.d_m = function(d) return d*24*60 end zt.d_s = function(d) return d*24*60*60 end zt.d_hs = function(d) return d*24*60*60*100 end zt.d_ms = function(d) return d*24*60*60*1000 end --- Stunden zt.h_j = function(h) return h/24/365 end zt.h_mo = function(h) return h/24/12 end zt.h_d = function(h) return h/24 end zt.h_m = function(h) return h*60 end zt.h_s = function(h) return h*60*60 end zt.h_hs = function(h) return h*60*60*100 end zt.h_ms = function(h) return h*60*60*1000 end --- Minuten zt.m_j = function(m) return m/60/24/365 end zt.m_mo = function(m) return m/60/24/12 end zt.m_d = function(m) return m/60/24 end zt.m_h = function(m) return m/60 end zt.m_s = function(m) return m*60 end zt.m_hs = function(m) return m*60*100 end zt.m_ms = function(m) return m*60*1000 end --- Sekunden zt.s_j = function(s) return s/60/60/24/365 end zt.s_mo = function(s) return s/60/60/24/12 end zt.s_d = function(s) return s/60/60/24 end zt.s_h = function(s) return s/60/60 end zt.s_m = function(s) return s/60 end zt.s_hs = function(s) return s*100 end zt.s_ms = function(s) return s*1000 end ------------------------------------------------------------------------------- -- PC - Funktionen function local_pc_warp(name, x, y,mid) local target = find_pc_by_name(name) local t = pc.select(target) if mid == nil then mid = pc.get_map_index() end pc.warp_local(mid, x*100, y*100) pc.select(t) end function pc.warp_to(vid) if vid == nil then error"VID muss gesetzt sein! (pc.warp_to)" elseif type(vid) == "string" then vid = find_pc_by_name(vid) if vid == 0 then error"Spieler nicht gefunden" end end local me = pc.select(vid) local x,y = pc.get_x()*100,pc.get_y()*100 pc.select(me) pc.warp(x,y) end function pc.trans(vid) if vid == nil then error"VID muss gesetzt sein! (pc.warp_to)" elseif type(vid) == "string" then vid = find_pc_by_name(vid) if vid == 0 then error"Spieler nicht gefunden" end end local x,y = pc.get_x()*100,pc.get_y()*100 local me = pc.select(vid) pc.warp(x,y) pc.select(me) end function local_pc_setqf(name, qf,wert) -- Für die aktuelle Quest local target = find_pc_by_name(name) local t = pc.select(target) pc.setqf(qf,wert) pc.select(t) end function do_for_other(name,ding) local t = pc.select(find_pc_by_name(name)) assert(loadstring(ding))() pc.select(t) end function pc.check_inventory_place(size) if size <= 0 or size > 3 then return -1 end function check(c) for i = 0,size-1 do item.select_cell(e[c+(5*i)]) if item.get_id() ~= 0 then return false end end return true end for i = 0,89 do if check(i) then return i end end return -1 end ------------------------------------------------------------------------------- -- ALLGEMEINE FUNKTIONEN function dot(x)-- Führt alles zwischen $ $ aus. Verschachtelungen nicht in einem Aufruf möglich. return string.gsub(x, "%$(.-)%$", function (s) return loadstring(s)() end) end function download(url) os.execute("cd data && fetch "..url.." && cd ..") end ql.test = function() print('Die Lib Funktioniert!') chat('Die Lib Funktioniert!') end ql.about = function() print('Diese Lib wurde von Mijago programmiert.') chat('Diese Lib wurde von Mijago programmiert.') end function note(text) notice_all('|>~ '..text) end function split(str, delim, maxNb) -- Eliminate bad cases... if str == nil then return str end if string.find(str, delim) == nil then return { str } end if maxNb == nil or maxNb < 1 then maxNb = 0 -- No limit end local result = {} local pat = "(.-)" .. delim .. "()" local nb = 0 local lastPos for part, pos in string.gfind(str, pat) do nb = nb + 1 result[nb] = part lastPos = pos if nb == maxNb then break end end -- Handle the last field if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end return result end function getn(list) local i = 0 table.foreachi(list, function(a,b) i = i+1 end) return i end function join(delimiter, list) local len = getn(list) if len == 0 then return "" end local string = list[1] for i = 2, len do string = string .. delimiter .. list[i] end return string end function is_table(var) if (type(var) == "table") then return true else return false end end function is_number(var) if (type(var) == "number") then return true else return false end end function is_string(var) if (type(var) == "string") then return true else return false end end function in_table ( e, t ) for _,v in pairs(t) do if (v==e) then return true end end return false end function in_text(str,te) for i = 0,string.len(str) do if string.sub(str, i,i+string.len(te)-1) == te then return i end end return -1 end function machweg(str,weg) while in_text(str,weg) == true do for i = 0,string.len(str) do if string.sub(str, i,i+string.len(weg)-1) == weg then str = string.sub(str,0,i-1)..string.sub(str,i+string.len(weg),string.len(str)) end end end return str end -- string.gsub(str,weg,'') reicht auch xD function numlen(num) return string.len(tostring(num)) end function delay_s(delay) delay = delay or 1 local time_to = os.time() + delay while os.time() < time_to do end end function distance(x1,y1,x2,y2) dx=x2-x1 dy=y2-y1 dist=math.sqrt(math.pow(dx,2)+math.pow(dy,2)) return dist end function makereadonly(t) -- the metatable local mt = { __index = t, __newindex = function(t, k, v) error("trying to modify constant field " .. tostring(k), 2) end } return setmetatable({}, mt) end function allwords () local line = io.read() local pos = 1 return function() while line do local s, e = string.find(line, "%w+", pos) if s then pos = e + 1 return string.sub(line, s, e) else line = io.read() pos = 1 end end return nil end end function case(wert,...) arg.n = nil for _,b in arg do if b[1] == wert or b[1] == nil then return b[2]() end end end function is(n, f) return {n, f} end function def(f) return {nil, f} end ------------------------------------------------------------------------------- -- Iniparser & -writer do -- Funktionen: -- var = ini.new() -- var = ini.open(path) -- var:write_str(sub,name,wert) -- var:write_int(sub,name,wert) -- var:write_bool(sub,name,boolean) -- var:clear() -- var:read_str(sub,name,norm) -- Gibt einen String zurück. -| -- var:read_int(sub,name,norm) -- Gibt eine zahl zurück -| norm wird zurückgegeben, wenn sub[name] nicht existiert. -- var:read_bool(sub,name,norm) -- Gibt true / False zurück -| -- var:delete_key(sub,nm) -- var:delete_section(sub) local ini_f = {} ini = {} function ini_f:append(sub,nm,wert) if nm == '' or nm == nil then return end self:parse() if self.sub[sub] == nil then self.sub[sub] = {} end self.sub[sub][nm] = wert self:writeit() end function ini_f:write_str(sub,nm,wert) self:append(sub,nm,wert) end function ini_f:write_int(sub,nm,wert) self:append(sub,nm,wert) end function ini_f:write_bool(sub,nm,bool) if not type(bool) == "boolean" then return end local bin = 0 if bool == true then bin = 1 end self:append(sub,nm,bin) return bin end function ini_f:clear() self.sub = {} self.path = '' end function ini_f:writeit() local out = '' table.foreach(self.sub, function(i,l) out = out..'['..i..']n' table.foreach(l, function(i2,l2) out=out..i2..'='..l2..'n' end ) end ) local d = io.open(self.path,'w') d:write(out) d:close() end function ini_f:delete_key(sub,nm) if sub == '' or nm == '' or sub == nil or nm == nil then return end self:parse() self.sub[sub][nm] = nil self:writeit() end function ini_f:delete_section(sub) if sub == '' or sub == nil then return end self:parse() self.sub[sub]= nil self:writeit() end function ini_f:parse() self.sub = {} if self.path == '' or self.path == nil then return end local d,i = io.open(self.path,"r"),'non' if d == nil then d = io.open(self.path,"w") end for line in d:lines() do if string.sub(line,1,1) == "[" then i = string.sub(line,2,string.len(line)-1) self.sub[i] = {} else local inp = split(line,'=') self.sub[i][inp[1]] = inp[2] end end d:close() end function ini_f:read_str(sub,nm,norm) if sub == '' or nm == '' or sub == nil or nm == nil then return end self:parse() if self.sub[sub] == nil then return norm end if self.sub[sub][nm] == nil then return norm else return self.sub[sub][nm] end end function ini_f:read_int(sub,nm,norm) if sub == '' or nm == '' or sub == nil or nm == nil then return end self:parse() if self.sub[sub] == nil then return norm end if self.sub[sub][nm] == nil then return norm else return tonumber(self.sub[sub][nm]) end end function ini_f:read_bool(sub,nm,norm) -- Norm wird zurückgegeben, wenn der Key nm nicht existiert if sub == '' or nm == '' or sub == nil or nm == nil then return end self:parse() if self.sub[sub] == nil then return norm end if self.sub[sub][nm] == nil then return norm end if self.sub[sub][nm] == "1" then return true else return false end end function ini_f:open(path) self.path = path self:parse() end function ini.new() local out = {} out.path = '' out.sub = {} setmetatable(out, { __index = ini_f }) return out end function ini.open(path) local dat = ini.new() dat:clear() dat.path=path dat:open(path) return dat end end ------------------------------------------------------------------------------- -- Programmsteuerung proc.apache_start = function() os.execute('apachectl start') end proc.apache_stop = function() os.execute('apachectl stop') end proc.apache_restart = function() os.execute('apachectl restart') end proc.apache_graceful = function() os.execute('apachectl graceful') end proc.ts3_start = function(path) os.execute('cd '..path..' && sh ts3server_startscript.sh start') end proc.ts3_stop = function(path) os.execute('cd '..path..' && sh ts3server_startscript.sh stop') end proc.ts3_restart = function(path) os.execute('cd '..path..' && sh ts3server_startscript.sh restart') end ------------------------------------------------------------------------------- --[[ Funktionsliste download(url) -> lädt die Datei in den Data-Ordner ql.test() -> gibt einen Teststring aus. (Zum testen, ob die Lib funktionert) ql.about() -> Gibt Informationen über das Script aus col.[FARBNAME] -> Gibt Text in say() farbig aus. Englische Farbnamen! (Beinhaltet 281 Farben) [String] note(text) -> Entspricht notice_all('|>~ TEXT') local_pc_setqf(name,qf,wert) -> Setzt bei einem Anderen Spieler eine Quest-flag local_pc_warp(name, x, y,mid) -> Teleportiert den Spieler NAME an die Kooridinaten x & y auf der Map mit dem index mid. mid kann auch leer bleiben do_for_other(name,dot) -> Führt die Befehle in dot für den Spieler name aus. Mit ; trennen writelog(text,var,file) -> Füllt die Logs. 1 = syserr, 2 = syslog, 3 = "file" doit(cmd) -> Führt einen FreeBSD Befehl aus (auch Befehlsketten mit &&) --- Spezielle pci:new(name) -> erstellt auf der genutzten Variable (zb pt = pci:new('[SA]Mijago') ) eine Liste mit allen Info's über den Spieler (alle Spalten aus player.player) pci:update -> updatet die mit pci:new erstellte Variable select2(tab) -> Sortiert eine Tabelle in Selects; auf Seiten aufgeteilt. Der erste Tabelleneintrag muss eine Zahl sein; Sie gibt die maximale Anzahl der Select-Einträg / Seite an. --- MySQL mysql_query(query,user,pw,db,ip) -> wie php mysql_query (gibt es auch so aus: out.id[1] = 7754 zB) mysql_query2(query,user,pw,db,ip) -> NUR für Query's wie Update, Insert etc. mysql_escape(str) -> Equivalent mit dem aus PHP bekannten mysql_escape_real_string backup() -> Backuppt alle MySQL-Datenbanken backup_main() -> Backuppt die wichtigsten MySQL-Datenbanken backup_files() -> Backuppt den Share - Ordner --- Lua-erweiterung watch_table(tab) -> Schreibt alle änderungen an der Tabelle in eine Datei. arraytoselect(array,abbr) -> erstellt aus einem Array eine Select()-Abfrage und gibt deren Auswahl zurück. Wenn "abbr" gesetzt ist, fügt die Funktion einen eintrag mit dem Wert von "abbr" ein. is_table(var) -> Prüft, ob eine Variable eine Tabelle ist [boolean] is_string(var) -> Prüft, ob eine Variable ein String ist [boolean] is_number(var) -> Prüft, ob eine Variable eine Zahl ist [boolean] in_table(e,t) -> Prüft, ob e in dem Array t vorhanden ist. [boolean] in_table(str,te) -> Prüft, ob te in dem string str vorhanden ist. [boolean] machweg(str,weg) -> Entfernt alle 'weg' aus 'str' [string] split(str, delim, maxNb) -> Teilt den Text 'str' mit dem Delimenter 'delim' auf (in maximal 'maxNb' Teile). maxNb kann leer gelassen werden. [Array] join(delimiter, list) -> Gegenteil von Split. List ist ein Array. Bsp: s = join('|',{'a','b'}) -> s = 'a|b' getn(array) -> Gibt die Anzahl der Einträge eines Array's aus. [Integer] delay_s(delay) -> Scriptpause für -delay- Sekunden numlen(num) -> gibt die Anzahl der Ziffern in der Zahl num an [Integer] distance(x1,y1,x2,y2) -> Distanz zwischen 2 Punkten [Integer] makereadonly(t) -> Sperrt die Tabelle (ReadOnly) allwords() -> Liest alle Wörter aus einer Datei und gibt sie zurück. Vorher io.open! --- Zeitrechnungen zt.d_j(d) -> Tage zu Jahre zt.d_mo(d) -> Tage zu Monate zt.d_h(d) -> Tage zu Stunden zt.d_m(d) -> Tage zu Minuten zt.d_s(d) -> Tage zu Sekunden zt.d_hs(d) -> Tage zu Hunderstelsekunden zt.d_ms(d) -> Tage zu Millisekunden zt.h_j(h) -> Stunden zu Jahre zt.h_mo(h) -> Stunden zu Monate zt.h_d(h) -> Stunden zu Tage zt.h_m(h) -> Stunden zu Minuten zt.h_s(h) -> Stunden zu Sekunden zt.h_hs(h) -> Stunden zu Hunderstelsekundne zt.h_ms(h) -> Stunden zu Millisekunden zt.m_j(m) -> Minuten zu Jahre zt.m_mo(m) -> Minuten zu Monate zt.m_d(m) -> Minuten zu Tage zt.m_h(m) -> Minuten zu Stunden zt.m_s(m) -> Minuten zu Sekunden zt.m_hs(m) -> Minuten zu Hunderstelsekunden zt.m_ms(m) -> Minuten zu Millisekunden zt.s_j(s) -> Sekunden zu Jahre zt.s_mo(s) -> Sekunden zu Monate zt.s_d(s) -> Sekunden zu Tage zt.s_h(s) -> Sekunden zu Stunden zt.s_m(s) -> Sekunden zu Minuten zt.s_hs(s) -> Sekunden zu Hunderstelsekunden zt.s_ms(s) -> Sekunden zu Millisekunden --- Programmbasierende Befehle proc.apache_start() -> Startet Apache proc.apache_stop() -> Stoppt Apache proc.apache_restart() -> Startet Apache neu proc.apache_graceful() -> Startet Apache neu, ohne vorhandene Verbindungen zu kappen proc.ts3_start(path) -> Startet den Teamspeak3 Server im Pfad 'path' proc.ts3_stop(path) -> Startet den Teamspeak3 Server im Pfad 'path' neu proc.ts3_restart(path) -> Stopp den Teamspeak3 Server im Pfad 'path' --]] makereadonly(col) makereadonly(zt) makereadonly(proc) makereadonly(ql) -- Compat 5.1 Release 5 Einbindung if mijago_include_compat then -- -- Compat-5.1 -- Copyright Kepler Project 2004-2006 (Debes iniciar sesión para ver el contenido del enlace en esta publicación.) -- According to Lua 5.1 -- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $ -- _COMPAT51 = "Compat-5.1 R5" local LUA_DIRSEP = '/' local LUA_OFSEP = '_' local OLD_LUA_OFSEP = '' local POF = 'luaopen_' local LUA_PATH_MARK = '?' local LUA_IGMARK = ':' local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub -- -- avoid overwriting the package table if it's already there -- package = package or {} local _PACKAGE = package package.path = LUA_PATH or os.getenv("LUA_PATH") or ("./?.lua;" .. "./pack/?.lua;" .. "/usr/local/share/lua/5.0/?.lua;" .. "/usr/local/share/lua/5.0/?/?.lua;" .. "/usr/local/share/lua/5.0/?/init.lua" ) package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or "./?.so;" .. "./pack/?.so;" .. "./l?.so;" .. "/usr/local/lib/lua/5.0/?.so;" .. "/usr/local/lib/lua/5.0/l?.so" -- -- make sure require works with standard libraries -- package.loaded = package.loaded or {} package.loaded.debug = debug package.loaded.string = string package.loaded.math = math package.loaded.io = io package.loaded.os = os package.loaded.table = table package.loaded.base = _G package.loaded.coroutine = coroutine local _LOADED = package.loaded -- -- avoid overwriting the package.preload table if it's already there -- package.preload = package.preload or {} local _PRELOAD = package.preload -- -- looks for a file `name' in given path -- local function findfile (name, pname) name = gsub (name, "%.", LUA_DIRSEP) local path = _PACKAGE[pname] assert (type(path) == "string", format ("package.%s must be a string", pname)) for c in gfind (path, "[^;]+") do c = gsub (c, "%"..LUA_PATH_MARK, name) local f = io.open (c) if f then f:close () return c end end return nil -- not found end -- -- check whether library is already loaded -- local function loader_preload (name) assert (type(name) == "string", format ( "bad argument #1 to `require' (string expected, got %s)", type(name))) assert (type(_PRELOAD) == "table", "`package.preload' must be a table") return _PRELOAD[name] end -- -- Lua library loader -- local function loader_Lua (name) assert (type(name) == "string", format ( "bad argument #1 to `require' (string expected, got %s)", type(name))) local filename = findfile (name, "path") if not filename then return false end local f, err = loadfile (filename) if not f then error (format ("error loading module `%s' (%s)", name, err)) end return f end local function mkfuncname (name) name = gsub (name, "^.*%"..LUA_IGMARK, "") name = gsub (name, "%.", LUA_OFSEP) return POF..name end local function old_mkfuncname (name) --name = gsub (name, "^.*%"..LUA_IGMARK, "") name = gsub (name, "%.", OLD_LUA_OFSEP) return POF..name end -- -- C library loader -- local function loader_C (name) assert (type(name) == "string", format ( "bad argument #1 to `require' (string expected, got %s)", type(name))) local filename = findfile (name, "cpath") if not filename then return false end local funcname = mkfuncname (name) local f, err = loadlib (filename, funcname) if not f then funcname = old_mkfuncname (name) f, err = loadlib (filename, funcname) if not f then error (format ("error loading module `%s' (%s)", name, err)) end end return f end local function loader_Croot (name) local p = gsub (name, "^([^.]*).-$", "%1") if p == "" then return end local filename = findfile (p, "cpath") if not filename then return end local funcname = mkfuncname (name) local f, err, where = loadlib (filename, funcname) if f then return f elseif where ~= "init" then error (format ("error loading module `%s' (%s)", name, err)) end end -- create `loaders' table package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, } local _LOADERS = package.loaders -- -- iterate over available loaders -- local function load (name, loaders) -- iterate over available loaders assert (type (loaders) == "table", "`package.loaders' must be a table") for i, loader in ipairs (loaders) do local f = loader (name) if f then return f end end error (format ("module `%s' not found", name)) end -- sentinel local sentinel = function () end -- -- new require -- function _G.require (modname) assert (type(modname) == "string", format ( "bad argument #1 to `require' (string expected, got %s)", type(name))) local p = _LOADED[modname] if p then -- is it there? if p == sentinel then error (format ("loop or previous error loading module '%s'", modname)) end return p -- package is already loaded end local init = load (modname, _LOADERS) _LOADED[modname] = sentinel local actual_arg = _G.arg _G.arg = { modname } local res = init (modname) if res then _LOADED[modname] = res end _G.arg = actual_arg if _LOADED[modname] == sentinel then _LOADED[modname] = true end return _LOADED[modname] end -- findtable local function findtable (t, f) assert (type(f)=="string", "not a valid field name ("..tostring(f)..")") local ff = f.."." local ok, e, w = find (ff, '(.-)%.', 1) while ok do local nt = rawget (t, w) if not nt then nt = {} t[w] = nt elseif type(t) ~= "table" then return sub (f, e+1) end t = nt ok, e, w = find (ff, '(.-)%.', e+1) end return t end -- -- new package.seeall function -- function _PACKAGE.seeall (module) local t = type(module) assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")") local meta = getmetatable (module) if not meta then meta = {} setmetatable (module, meta) end meta.__index = _G end -- -- new module function -- function _G.module (modname, ...) local ns = _LOADED[modname] if type(ns) ~= "table" then ns = findtable (_G, modname) if not ns then error (string.format ("name conflict for module '%s'", modname)) end _LOADED[modname] = ns end if not ns._NAME then ns._NAME = modname ns._M = ns ns._PACKAGE = gsub (modname, "[^.]*$", "") end setmetatable(ns, {__index = _G}) setfenv (2, ns) for i, f in ipairs (arg) do f (ns) end end end
  12. Me Gusta
    ahynoa reacted to KeKo in [TIP] Meter nuevas Quests.   
    Hola a todos, para los que querais meter nuevas quests en vuestros servidores, hoy os dejare esta guia de como hacerlo.
     
    *Si durante alguno de estos dos metodos os da un error de librerías, aquí os dejo las librerias para files de 32 bits, y para files de 64 bits.
     
    Link resubido de las de 32bits:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación. Link resubido de las de 64 bits:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.  
    *Lo siento no me fijé que no iban los links
     
     
    Hay 2 metodos:
     
    1- Mediante el make.sh que viene por defecto en los files de metin2 y que para usarlo para cargar una nueva quest tendreis que hacer lo siguiente:
     
    - Encendeis vuestro servidor hasta despues de logearos.
    - Poneis el siguiente comando (o el mismo pero con la ruta en la que este la carpeta quest en vuestros files)
     

    cd /home/game/quest - Meteis vuestra nueva quest (por ejemplo logeo.quest)
    - Ahora abris el archivo locale_list , que puede tener un nombre diferente dependiendo de los files, pero sera algo acabado en (_list).
    - Al final del archivo, poneis el nombre de vuestra nueva quest, con el .quest incluido (logeo.quest por ejemplo), LE DAIS UN ENTER AL FINAL DEL ARCHIVO, guardais y cerrais.
    - Ahora solo teneis que volver al bsd, y poner:
     

    chmod 777 make.sh && sh make.sh - Una vez hecho eso ya estara cargada vuestra nueva quest.
     
    - Inconvenientes de este metodo: Cargais la lista entera de quests.
     
    *Si haceis esto con el servidor encendido, poned reload q con vuestro gm y ya estara funcionando la nueva quest.
     
     
    2- Podéis hacer el método que a mi más me gusta, que es simplemente ir a la carpeta quest (cd /home/game/quest) y una vez allí poner el siguiente comando:
     

    ./qc nombredetuquest.quest Y una vez hecho eso ya os cargará la nueva quest.
     
    - Ventajas de este metodo: Solo recargas la quest que quieras y no todas como en el make.sh
  13. Me Gusta
    ahynoa reacted to Santy!. in Quest duel points!   
    Hola primero que nada pediria que esta quest no la posteen en UJ.
     
    Bueno que funciones cumple esta quest:
     
    Cuando matas a un pj de otro reino te da 1 punto cuando llgas a ciertos puntos los canjeas por premios en la npc 20094
     

    quest sist begin state start begin when kill with npc.is_pc() and pc.level >= 1 and pc.level < 250 and npc.get_empire() ~= pc.get_empire() begin local ciao = pc . getqf ( "DuelPoint" ) pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 1 ) chat("Ha ganado un duel point!") chat("Ahora usted tiene " .. ciao.. " DuelPoint") chat("Usted debe alcanzar el 10 DuelPoint para elegir los premios ") end when 20094.chat."Canjear DuelPoints" begin say_title("Canjeador de puntos") say("") say("Hola jugador, si tienes duel points") say("aqui puedes canjearlos") say("por items.") say("") say_reward("Obten tus premios") local s = select ("Canjear" , "Ahora no") if s == 1 then if pc.getqf ("DuelPoint") >= 10 then say_title ("DuelPoint") local newton = select ("Cofre orco", "Annulla") if newton == 1 then pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 15 ) say ("Cofre orco") pc . give_item2 ( "50070" , 1 ) return end end elseif s == 2 then return end end end end  
     
    ahora explicare por si la quieren acomodar:
     

    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 1 ) esto marca que da 1 punto a matar un personaje.
     
     

    when kill with npc.is_pc() and pc.level >= 1 and pc.level < 250 and npc.get_empire() ~= pc.get_empire() esto nos dice que la quest vale solo con personajes de lvl 1 asta el 250.
     
     

    when 20094.chat."Canjear DuelPoints" begin esto nos marca que aparece en la npc 20094.
     

    local newton = select ("Cofre orco", "Annulla") if newton == 1 then pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 15 ) say ("Cofre orco") pc . give_item2 ( "50070" , 1 ) return esto nos marca el premio para agregar mas tienen que seguir como esta eso.
     
    bueno para ponerla la copiamos hacemos ./qc o make.sh y queda.
    que la disfruten!!!
     
    Creditos: keko y yo.
  14. Me Gusta
    ahynoa reacted to KeKo in [Quest+cliente] El sistema de logros   
    Buenasss zoneros y zoneras, hoy os voi a explicar como implementar en vuestro servidores el sistema de logros que meti en Metin2Extasis, hasta con mi querida quest de canjes xd (aunque en elite hay una mas completa la mia es mas sencillita).
     
    ESTA GUIA ES EXCLUSIVA DE METIN2ZONE, QUE NADIE LA COPY PASTEE A OTROS FOROS
     
    1 - Qué es el sistema de logros?
     
    Este sistema consiste en una quest y una edicion del cliente que hace que cada vez que un jugador alcance un objetivo concreto, que tu fijas en la quest, le da los puntos correspondientes al logro que haya alcanzando. Si un jugador acumula puntos luego los puede canjear por premios.
     
    Aqui teneis algunas fotos del resultado final (son antiguas del extasis xd):
     

     

     
     
     
    2 - Como meto yo esto?
     
    El sistema de logros consiste en una quest y en editar unos archivos en el cliente, así que vamos a ir paso por paso:
     
     
    2.1: Parte del cliente:
     
    *Todos los archivos que tengais que meter estan en esta descarga:
     

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.  
    2.1.1 - Que archivos vamos a editar? En el cliente editaremos los siguientes archivos:
     
    -Root: dentro de el los archivos game.py y uiachievement.py (este lo meteremos nosotros).
    -Etc: donde meteremos los archivos achievement_small.sub y achievement_small.dds
    -Uiscript: aqui meteremos el archivo achievementboard.py y warteschleife.py
     
    2.1.2 - Manos a la obra, a implementar!
     
     
    2.1.2.1: Primero empezaremos con el root. Decompilad vuestro root, abrid el archivo game.py y buscad esto:
     

    def __ServerCommand_Build(self): Una vez esteis ahi, vais hasta donde pone "CloseSafeBox" y cuando esteis en esa linea le dais a a enter y pegais esto:
     

    # Achievement System START "achievement" : self.__AchievementTest, "achievementpoints" : self.__ShowAchievementPoints, # Achievement System END Quedandoos asi:
     

     
    (Las -------------------- las pongo solo para que distingais la parte que acabamos de añadir, no hay que ponerlas)
     
    Ahora vais al final del archivo, le dais a enter para dejar algo de espacio y pegais esto:
     

    # Achievement System START def __ShowAchievementPoints(self, points): import uiAchievement import uiTaskbar self.uiAchievement = uiAchievement.AchievementDialog() uiAchievement.AchievementPoints = int(points) def __AchievementTest(self, archivement): import uiAchievement self.uiAchievement = uiAchievement.AchievementDialog() self.uiAchievement.Show(1, str(archivement)) self.uiAchievement.SetTop() # Achievement System END Quedará asi:
     

     
     
    *Siguiente paso: metemos en la carpeta root el archivo uiachievement.py y lo añadimos al xml
     

    <File archivedPath="uiachievement.py" type="2"><![CDATA[Sourceuiachievement.py]]></File> Listo el root! Sigamos con el etc.
     
    2.1.2.2: Decompilamos nuestro etc, vamos a la carpeta ymir work/ui y metemos el achievement_small.dds. Despues vamos a la carpeta ymir work/ui/public y metemos el achievement_small.sub. Por ultimo agregamos ambos al xml:
     

    <File archivedPath="d:/ymir work/ui/public/achievement_small.sub" type="0"><![CDATA[Sourceymir workuipublicachievement_small.sub]]></File> <File archivedPath="d:/ymir work/ui/achievement_small.dds" type="0"><![CDATA[Sourceymir workuiachievement_small.dds]]></File> 2.1.2.3: El ultimo paso en el cliente es decompilar nuestro uiscript y meter el archivo achievementboard.py y el warteschleife.py: en la carpeta. Los añadimos al xml y compilamos:
     

    <File archivedPath="uiscript/achievementboard.py" type="2"><![CDATA[Sourceuiscriptachievementboard.py]]></File> <File archivedPath="uiscript/warteschleife.py" type="2"><![CDATA[Sourceuiscriptwarteschleife.py]]></File> Y listo ya tenemos todo lo del cliente
     
     
    2.1: Parte del server:
     
    Bueno ahora ya solo nos queda meter nuestra quest del sistema de logros en la carpeta /home/game/quest (o la ruta en la que tengais la carpeta quest). Aqui os dejo la mia, con los nombres en español, algunos logros añadidos, canje, un item que te da logros (pa quien lo quiera xd), una opcion que te dice tus logros, etc
     

    quest logros_keko begin state start begin --LOGIN when login begin local actual_achievement_points = pc.getqf("achievement_points") if pc.getqf("firstlogin") != 1 then local Reward = 1 pc.setqf("firstlogin", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Primer_login%".. actual_achievement_points + Reward .."") else cmdchat("achievementpoints ".. pc.getqf("achievement_points")) end end --BOSSE when 691.kill begin local Reward = 2 local Achievement = "Jefe_Orco" local killcount = pc.getqf("691") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("691", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 791.kill begin local Reward = 3 local Achievement = "Lider_esoterico" local killcount = pc.getqf("791") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("791", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 2493.kill begin local Reward = 100 local Achievement = "Dragon_azul" local killcount = pc.getqf("2493") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("2493", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 2492.kill begin local Reward = 20 local Achievement = "Comandante_Setaou" local killcount = pc.getqf("2492") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("2492", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 1091.kill begin local Reward = 5 local Achievement = "Rey_demonio" local killcount = pc.getqf("1091") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("1091", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 2597.kill begin local Reward = 20 local Achievement = "Muerte" local killcount = pc.getqf("2597") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("2597", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 1192.kill begin local Reward = 12 local Achievement = "Bruja_de_hielo" local killcount = pc.getqf("1192") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("1192", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 1304.kill begin local Reward = 5 local Achievement = "Tigre_fantasma" local killcount = pc.getqf("1304") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("1304", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 1901.kill begin local Reward = 4 local Achievement = "9_colas" local killcount = pc.getqf("1901") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("1901", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 2091.kill begin local Reward = 3 local Achievement = "Reina_araña" local killcount = pc.getqf("2091") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("2091", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 2206.kill begin local Reward = 4 local Achievement = "Jefe_logros" local killcount = pc.getqf("2206") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("2206", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 2191.kill begin local Reward = 5 local Achievement = "Tortuga_del_desierto" local killcount = pc.getqf("2191") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("2191", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 692.kill begin local Reward = 3 local Achievement = "Orco_elite" local killcount = pc.getqf("692") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("692", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 693.kill begin local Reward = 5 local Achievement = "Orco_renacido" local killcount = pc.getqf("693") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("693", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end --Item shop--- when 50129.use begin say_title ( "Obten puntos logro") local actual_achievement_points = pc . getqf ( "achievement_points" ) local p = select ( "Obten 200 puntos logro" ) if p == 1 then local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points + 200 ) say ( "Enorabuena tienes 200 logros mas" ) say ( "Disfrutalos!" ) item.remove ( "50129", 1 ) end end when 50130.use begin say_title ( "Obten puntos logro") local actual_achievement_points = pc . getqf ( "achievement_points" ) local p = select ( "Obten 100 puntos logro" ) if p == 1 then local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points + 100 ) say ( "Enorabuena tienes 100 logros mas" ) say ( "Disfrutalos!" ) item.remove ( "50130", 1 ) end end when 50131.use begin say_title ( "Obten puntos logro") local actual_achievement_points = pc . getqf ( "achievement_points" ) local p = select ( "Obten 50 puntos logro" ) if p == 1 then local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points + 50 ) say ( "Enorabuena tienes 50 logros mas" ) say ( "Disfrutalos!" ) item.remove ( "50131", 1 ) end end when 50132.use begin say_title ( "Obten puntos logro") local actual_achievement_points = pc . getqf ( "achievement_points" ) local p = select ( "Obten 25 puntos logro" ) if p == 1 then local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points + 25 ) say ( "Enorabuena tienes 25 logros mas" ) say ( "Disfrutalos!" ) item.remove ( "50132", 1 ) end end --CANJES-- when 50115.use begin say_title ( "Canjea tus puntos logro" ) local actual_achievement_points = pc . getqf ( "achievement_points" ) local p = select ( "Caballo armado - 5 puntos" , "Caballo militar - 30 puntos" , "Bonus mediohumanos +20% por 30min - 50 puntos" , "Bonus HP +5000 por 30min - 60 puntos" , "Armadura divina - 400 logros" , "Mascota de ataque - 30 puntos" , "Mas" ) if p == 1 then if pc . getqf ( "achievement_points" ) <= 4 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 5 ) say ( "Has recibido un caballo armado" ) horse . set_level ( "11" ) horse . unsummon ( ) horse . summon ( ) pc . give_item2 ( "50052" , 1 ) return elseif p == 2 then if pc . getqf ( "achievement_points" ) <= 29 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 30 ) say ( "Has recibido un caballo militar" ) horse . set_level ( "21" ) horse . unsummon ( ) horse . summon ( ) pc . give_item2 ( "50053" , 1 ) return elseif p == 3 then if pc . getqf ( "achievement_points" ) <= 49 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 50 ) say ( "Has recibido 20% fuerza contra mediohumanos por 30min" ) affect . add_collect ( apply . ATTBONUS_HUMAN , 20 , 60 * 30 ) return elseif p == 4 then if pc . getqf ( "achievement_points" ) <= 59 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 60 ) say ( "Has recibido 5000hp por 30min" ) affect . add_collect ( apply . MAX_HP , 5000 , 60 * 30 ) return elseif p == 5 then if pc. getqf ( "achievement_points" ) <= 399 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 399 ) local armor = select ( "Armd. divina (G)" , "Armd. divina (N)" , "Armd. divina (S)" , "Armd. divina (C)" ) if armor == 1 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "42080" , 1 ) return elseif armor == 2 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "44080" , 1 ) return elseif armor == 3 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "46080" , 1 ) return elseif armor == 4 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "48080" , 1 ) return end elseif p == 6 then if pc . getqf ( "achievement_points" ) <= 29 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 29 ) say ( "Has recibido la mascota de ataque" ) pc . give_item2 ( "30312" , 1 ) return elseif p == 7 then local p2 = select ( "Leon Blanco - 40 puntos" , "Anillo experiencia - 5 puntos" , "Fuerza monstruo +20% 30min - 15 puntos" , "Velocidad movimiento +25% 30min - 10 puntos" , "Mascota de defensa - 25 puntos" , "Cuantos logros tengo?" , "Cerrar" ) if p2 == 1 then if pc . getqf ( "achievement_points" ) <= 39 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 40 ) say ( "Has recibido un leon blanco disfrtualo, no se acaba" ) pc . give_item2 ( "50110" , 1 ) return elseif p2 == 2 then if pc . getqf ( "achievement_points" ) <= 4 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 5 ) say ( "Disfruta de un anillo de experiencia" ) pc . give_item2 ( "71015" , 1 ) return elseif p2 == 3 then if pc . getqf ( "achievement_points" ) <= 14 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 15 ) say ( "Has recibido 20% fuerza monstruo por 30min" ) affect . add_collect ( apply . ATTBONUS_MONSTER , 20 , 60 * 30 ) return elseif p2 == 4 then if pc . getqf ( "achievement_points" ) <= 9 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 10 ) say ( "Has recibido 25% velo.movimiento por 30min" ) affect . add_collect ( apply . MOV_SPEED , 25 , 60 * 30 ) return elseif p2 == 5 then if pc . getqf ( "achievement_points" ) <= 24 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 25 ) say ( "Has recibido la mascota de defensa" ) pc . give_item2 ( "71124" , 1 ) return elseif p2 == 6 then local Reward = 0 local Achievement = "Ver_tus_logros" local killcount = pc.getqf("logros") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") elseif p2 == 7 then return end end end --METINS when 8013.kill begin local Reward = 8 local Achievement = "Metin_muerte" local killcount = pc.getqf("8013") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("8013", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_destruido#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 8016.kill begin local Reward = 5 local Achievement = "Metin_demonio" local killcount = pc.getqf("8016") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("8016", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_destruido#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 8012.kill begin local Reward = 6 local Achievement = "Metin_caida" local killcount = pc.getqf("8012") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("8012", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_destruido#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 8015.kill begin local Reward = 5 local Achievement = "Metin_dureza" local killcount = pc.getqf("8015") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("8015", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_destruido#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 8026.kill begin local Reward = 2 local Achievement = "Metin_85" local killcount = pc.getqf("8026") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("8026", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_destruido#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end when 8027.kill begin local Reward = 3 local Achievement = "Metin_90" local killcount = pc.getqf("8027") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("8027", killcount + 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_destruido#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") end --LEVELS when login or levelup with pc.get_level() >= 15 and pc.getqf("Level15") != 1 begin local Reward = 2 local Achievement = "Level_15" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level15", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 30 and pc.getqf("Level30") != 1 begin local Reward = 2 local Achievement = "Level_30" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level30", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 40 and pc.getqf("Level40") != 1 begin local Reward = 3 local Achievement = "Level_40" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level40", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 50 and pc.getqf("Level50") != 1 begin local Reward = 4 local Achievement = "Level_50" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level50", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 75 and pc.getqf("Level75") != 1 begin local Reward = 5 local Achievement = "Level_75" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level75", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 85 and pc.getqf("Level85") != 1 begin local Reward = 10 local Achievement = "Level_85" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level85", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 90 and pc.getqf("Level90") != 1 begin local Reward = 25 local Achievement = "Level_90" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level90", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 95 and pc.getqf("Level95") != 1 begin local Reward = 50 local Achievement = "Level_95" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level95", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end when login or levelup with pc.get_level() >= 99 and pc.getqf("Level99") != 1 begin local Reward = 100 local Achievement = "Level_99" local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("Level99", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_alcanzado%".. actual_achievement_points + Reward .."") end --CHECK EQUIP when login begin loop_timer("check_eq", 10) end when check_eq.timer begin local russi = pc.get_armor() local waffe = pc.get_weapon() local actual_achievement_points = pc.getqf("achievement_points") local Reward = 5 if russi==11299 and pc.getqf("achievement_ssp") != 1 then pc.setqf("achievement_ssp", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Armadura negra+9%".. actual_achievement_points + Reward .."") elseif russi==11499 and pc.getqf("achievement_swa") != 1 then pc.setqf("achievement_swa", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Armadura negra+9%".. actual_achievement_points + Reward .."") elseif russi==11699 and pc.getqf("achievement_mpp") != 1 then pc.setqf("achievement_mpp", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Armadura negra+9%".. actual_achievement_points + Reward .."") elseif russi==11899 and pc.getqf("achievement_sk") != 1 then pc.setqf("achievement_sk", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Armadura negra+9%".. actual_achievement_points + Reward .."") elseif waffe==189 and pc.getqf("achievement_gifti") != 1 then pc.setqf("achievement_gifti", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Giftschwert+9%".. actual_achievement_points + Reward .."") elseif waffe==199 and pc.getqf("achievement_lowenschw.") != 1 then pc.setqf("achievement_lowenschw.", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Löwenschwert+9%".. actual_achievement_points + Reward .."") elseif waffe==5129 and pc.getqf("achievement_orchiglocke") != 1 then pc.setqf("achievement_orchiglocke", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Orchideenglocke+9%".. actual_achievement_points + Reward .."") elseif waffe==2179 and pc.getqf("achievement_krahenstahl") != 1 then pc.setqf("achievement_krahenstahl", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Krähenstahlbogen+9%".. actual_achievement_points + Reward .."") elseif waffe==1139 and pc.getqf("achievement_teufelsflugenchak") != 1 then pc.setqf("achievement_teufelsflugenchak", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Teufelsflügel-Chakram+9%".. actual_achievement_points + Reward .."") elseif waffe==3169 and pc.getqf("achievement_Grolli") != 1 then pc.setqf("achievement_Grolli", 1) pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement Grollschwert+9%".. actual_achievement_points + Reward .."") end end end end Y para que no os quedeis simplemente metiendo la quest y ya ta os voi a explicar como funciona:
     
    1 - Lo mas importante de los logros es que cuando alcanzas uno (por ejemplo matar al jefe orco) te suma puntos mediante un pc.setqf:
     

    when 691.kill begin local Reward = 2 pc.setqf("achievement_points", actual_achievement_points + Reward) Como veis ahí al jefe orco (mob de id 691) le asigna los puntos que vale con local Reward = 2 y luego te suma 2 puntos con el pc.setqf("achievement_points", actual_achievement_points + Reward (el reward en este caso seria un +2).
     
    Por lo tanto si quereis añadir otro mob a la lista de logros solo tendreis que hacer lo siguiente:
     

    when idmob.kill begin local Reward = puntos -- Poneis cuantos puntos quereis que os de local Achievement = "Nombre del mob que saldra en el cliente" local killcount = pc.getqf("idmob") -- Se usa para que el juego lleve la cuenta de cuantas veces lo mataste local actual_achievement_points = pc.getqf("achievement_points") -- Calcula cuantos puntos tenes pc.setqf("693", killcount + 1) -- Aqui os suma 1 al numero de ese mob que llevais pc.setqf("achievement_points", actual_achievement_points + Reward) -- aqui te suma tus puntos por matarlo cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") -- Con esto te saldra la ventana en el cliente diciendo que lo mataste y cuantos puntos tenes end Ahora os enseñare como hacer los canjes. En mi caso los canjes se hacen mediante un item, pero vosotros podeis hacerlo como querais simplement cambiando el when iditem.use por un when npc.chat."Canje de Logros" o como os apetezca.
     
    Veamos como tengo yo los canjes:
     

    when 50115.use begin say_title ( "Canjea tus puntos logro" ) local actual_achievement_points = pc . getqf ( "achievement_points" ) local p = select ( "Caballo armado - 5 puntos" , "Caballo militar - 30 puntos" , "Bonus mediohumanos +20% por 30min - 50 puntos" , "Bonus HP +5000 por 30min - 60 puntos" , "Armadura divina - 400 logros" , "Mascota de ataque - 30 puntos" , "Mas" ) if p == 1 then if pc . getqf ( "achievement_points" ) <= 4 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 5 ) say ( "Has recibido un caballo armado" ) horse . set_level ( "11" ) horse . unsummon ( ) horse . summon ( ) pc . give_item2 ( "50052" , 1 ) return elseif p == 2 then if pc . getqf ( "achievement_points" ) <= 29 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 30 ) say ( "Has recibido un caballo militar" ) horse . set_level ( "21" ) horse . unsummon ( ) horse . summon ( ) pc . give_item2 ( "50053" , 1 ) return elseif p == 3 then if pc . getqf ( "achievement_points" ) <= 49 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 50 ) say ( "Has recibido 20% fuerza contra mediohumanos por 30min" ) affect . add_collect ( apply . ATTBONUS_HUMAN , 20 , 60 * 30 ) return elseif p == 4 then if pc . getqf ( "achievement_points" ) <= 59 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 60 ) say ( "Has recibido 5000hp por 30min" ) affect . add_collect ( apply . MAX_HP , 5000 , 60 * 30 ) return elseif p == 5 then if pc. getqf ( "achievement_points" ) <= 399 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 399 ) local armor = select ( "Armd. divina (G)" , "Armd. divina (N)" , "Armd. divina (S)" , "Armd. divina (C)" ) if armor == 1 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "42080" , 1 ) return elseif armor == 2 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "44080" , 1 ) return elseif armor == 3 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "46080" , 1 ) return elseif armor == 4 then say ( "Has recibido la Armadura divina" ) pc . give_item2 ( "48080" , 1 ) return end elseif p == 6 then if pc . getqf ( "achievement_points" ) <= 29 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 29 ) say ( "Has recibido la mascota de ataque" ) pc . give_item2 ( "30312" , 1 ) return elseif p == 7 then local p2 = select ( "Leon Blanco - 40 puntos" , "Anillo experiencia - 5 puntos" , "Fuerza monstruo +20% 30min - 15 puntos" , "Velocidad movimiento +25% 30min - 10 puntos" , "Mascota de defensa - 25 puntos" , "Cuantos logros tengo?" , "Cerrar" ) if p2 == 1 then if pc . getqf ( "achievement_points" ) <= 39 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 40 ) say ( "Has recibido un leon blanco disfrtualo, no se acaba" ) pc . give_item2 ( "50110" , 1 ) return elseif p2 == 2 then if pc . getqf ( "achievement_points" ) <= 4 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 5 ) say ( "Disfruta de un anillo de experiencia" ) pc . give_item2 ( "71015" , 1 ) return elseif p2 == 3 then if pc . getqf ( "achievement_points" ) <= 14 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 15 ) say ( "Has recibido 20% fuerza monstruo por 30min" ) affect . add_collect ( apply . ATTBONUS_MONSTER , 20 , 60 * 30 ) return elseif p2 == 4 then if pc . getqf ( "achievement_points" ) <= 9 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 10 ) say ( "Has recibido 25% velo.movimiento por 30min" ) affect . add_collect ( apply . MOV_SPEED , 25 , 60 * 30 ) return elseif p2 == 5 then if pc . getqf ( "achievement_points" ) <= 24 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 25 ) say ( "Has recibido la mascota de defensa" ) pc . give_item2 ( "71124" , 1 ) return elseif p2 == 6 then local Reward = 0 local Achievement = "Ver_tus_logros" local killcount = pc.getqf("logros") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") elseif p2 == 7 then return end end end *Si os fijais la ultima opcion de la tienda de canjes te permite ver tus logros, para ello le hice un logro que te sume 0 puntos pero que te enseña cuantos tienes:
     

    elseif p2 == 6 then local Reward = 0 local Achievement = "Ver_tus_logros" local killcount = pc.getqf("logros") local actual_achievement_points = pc.getqf("achievement_points") pc.setqf("achievement_points", actual_achievement_points + Reward) cmdchat("achievement ".. Achievement .."_derrotado#".. killcount + 1 .."%".. actual_achievement_points + Reward .."") Asi que si necesitais hacer vuestra opcion de ver logros ahi teneis
     
    Tal como eso son todos los canjes, si quereis hacer vuestros propios canjes os hago aqui un pequeño script de canje para explicaros como seria:
     
     

    when 20095.chat."Canjear mis logros" begin say_title("Canjear mis logros") say("") say("Hola jugador, si tienes logros") say("yo te los puedo cambiar por cositas.") say("") say("Si no tienes intenta conseguir alguno") say("porque merece la pena") say("") say_reward("Quieres canjear tus punots?") local canje = select ("Si" , "No") if canje == 1 then say_title("Canjes de logros") say("") say("Elige lo que quieras") local elegir = select ("Quinto bonus - 3 logros" , "Añadir 6-7 bonus - 4 logros" , "Cambiar 6-7 bonus - 5 logros" , "Caballo armado - 6 logros" , "Caballo militar - 8 logros" , "Cerrar") if elegir == 1 then if pc . getqf ( "achievement_points" ) <= 2 then chat( "Lo siento necesitas mas puntos" ) return end pc.give_item2("70024", 1) local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 3 ) return elseif elegir == 2 then if pc . getqf ( "achievement_points" ) <= 3 then chat( "Lo siento necesitas mas puntos" ) return end pc.give_item2("71051", 1) local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 4 ) return elseif elegir == 3 then if pc . getqf ( "achievement_points" ) <= 4 then say ( "Lo siento necesitas mas puntos" ) return end pc.give_item2("71052", 1) local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 5 ) return elseif elegir == 4 then if pc . getqf ( "achievement_points" ) <= 5 then chat( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 6 ) chat ( "Has recibido un caballo armado" ) horse . set_level ( "11" ) horse . unsummon ( ) horse . summon ( ) pc . give_item2 ( "50052" , 1 ) return elseif elegir == 5 then elseif p == 2 then if pc . getqf ( "achievement_points" ) <= 7 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 8 ) chat( "Has recibido un caballo militar" ) horse . set_level ( "21" ) horse . unsummon ( ) horse . summon ( ) pc . give_item2 ( "50053" , 1 ) return elseif elegir == 6 then return end elseif canje == 2 then return end end Este script es un pequeño regalo para vosotros, lo hice ahora para que podais usar otro si no quereis el que tenia en el extasis.
     
    *Para meterla en vuestra quest podeis quitar mi tienda de canjes y pegar esta si quereis, o hacerla como quest separada.
     
    Por ultimo os explicare como funcionan los canjes con un ejemplo:
     

    local p = select ( "Caballo armado - 5 logros") if p == 1 then if pc . getqf ( "achievement_points" ) <= 4 then say ( "Lo siento necesitas mas puntos" ) return end local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 5 ) say ( "Has recibido un caballo armado" ) horse . set_level ( "11" ) horse . unsummon ( ) horse . summon ( ) pc . give_item2 ( "50052" , 1 ) return Empieza con un local = select para que escojais vuestro premio y os aconsejo que pongais ahi cuantos logros cuesta como hice yo.
     
    Luego puse una restriccion para que si teneis menos puntos que los que pide el item no os deje comprarlo:
     

    if pc . getqf ( "achievement_points" ) <= 2 then chat( "Lo siento necesitas mas puntos" ) return end Funciona de la siguiente manera: donde pone <= 2 teneis que poner un punto menos que los que pide, ya que eso dice que si tienes esos puntos o menos no te deje comprar.
     
    Despues del return end ya solo teneis que poner el comando para que os quite los puntos que es este:
     

    local actual_achievement_points = pc . getqf ( "achievement_points" ) pc . setqf ( "achievement_points" , actual_achievement_points - 5 ) --Poneis ahi los que quereis que quite Y lo que quereis que os dea justo debajo de esas dos lineas:
     

    pc.give_item2("71052", 1) --- Ahi poned lo que quereis que dea Y eso es todo zoneros, que disfruteis del sistema de logros !!!
     
    Creditos: al creador del sistema (que no es mio xd) y a mi por la parte de la quest mia y la traduccion de la original.
×
×
  • Crear nuevo...