Sistema de puntos en duelos

Topic created · 7 Mensajes · 2822 Visitas
  • [alinear-centro]PRIMERA PARTE
    Hacer funcionar la QUEST DuelPoint[/alinear-centro]
    En inforge lo han llamado "Sistema DuelPoint".
    Este nuevo sistema se asegura de que no aparezca en el inventario, lo hará la DuelPoint virtual (para aquellos que tienen el más mínimo conocimiento de lua, decir que la secuencia de comandos que se hace. getqf setqf) en un tot de DuelPoint se abrirá automáticamente una lista de premios que puede elegir.

    1º- Inicia sesión en WinSCP o Filezilla.

    2º Ve a la ruta:

    usr/game/channel/share_data/locale/hongkong/quest
    

    3º Crea una quest, por ejemplo: example.quest

    Y añade este código dentro de example.quest

    quest example begin
     state start begin
      when kill with npc.is_pc() and pc.level >= 85 and pc.level < 125 and npc.get_empire() ~= pc.get_empire() begin
    local ciao = pc . getqf ( "DuelPoint" )
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 1  )
    chat ("Hai vinto il duello e hai ricevuto 1 DuelPoint")
    chat ("Ora possiedi " .. ciao .. " DuelPoint")
    chat ("Devi arrivare a 50 DuelPoint per poter scegliere i primi premi")
    chat ("oppure aspetti di arrivare a 100 DuelPoint e scegli premi migliori")
    if pc.getqf ("DuelPoint") == 51 then 
    say_title ("DuelPoint")
    local newton = select ("Premio1", "Premio2", "Premio3", "Premio4", "Premio5", "Premio6", "Premio7", "Premio8", "Annulla")
    if newton == 1 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto un Forziere acquatico") 
    pc . give_item2 ( "30170" , 1 )
    return
    end
    elseif newton == 2 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto un Metallo Magico") 
    pc . give_item2 ( "25041" , 1 )
    return
    elseif newton == 3 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto un Forziere Drago Rosso") 
    pc . give_item2 ( "50080" , 1 )
    return
    elseif newton == 4 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto una Pietra Mistica") 
    pc . give_item2 ( "30173" , 1 )
    return
    elseif newton == 5 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto un Cristallo Mistico") 
    pc . give_item2 ( "30172" , 1 )
    return
    elseif newton == 6 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto un Diario Leggendario") 
    pc . give_item2 ( "30182" , 1 )
    return
    elseif newton == 7 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto 3 Ghiacci Neri") 
    pc . give_item2 ( "30185" , 3 )
    return
    elseif newton == 8 then
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 50  )
    say ("Hai ricevuto uno Specchio dell' Esperienza") 
    pc . give_item2 ( "70030" , 1 )
    return
    end
    if pc.getqf ("DuelPoint") == 101 then
    say_title ("DuelPoint")
    local p = select ("Premio casuale", "Bonus Resistenza magia +20%", "Bonus Blocco attacco corporale +25%", "Bonus zombie +50% per 24h", "Bonus diavolo +50% per 24h", "Bonus mezziuomini +20% per 24h", "Bonus HP +5000 per 24h", "Annulla")
    if p == 1 then
    if get_time ( ) < pc . getqf ( "next_use_time1" ) then 
    say ("Devi aspettare 24h")
    say_reward ("L'ultimo utilizzo risale a:")
    say_title ( string . format ( "    %s" , time_to_str ( pc . getqf ( "next_time1" ) ) ) ) 
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 100  )
    return
    end
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 100  )
    say ("Hai ricevuto 5000mp in più per 24h") 
    pc . setqf ( "next_use_time1" , get_time ( ) + 60*60*24 )
    affect.add_collect(apply.MAX_SP,2500,60*60*24)
    return
    elseif p == 2 then
    if get_time ( ) < pc . getqf ( "next_use_time2" ) then 
    say ("Devi aspettare 24h")
    say_reward ("L'ultimo utilizzo risale a:")
    say_title ( string . format ( "    %s" , time_to_str ( pc . getqf ( "next_time2" ) ) ) ) 
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 100  )
    return
    end
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 100  )
    say ("Hai ricevuto 15% resistenza magia in più per 24h") 
    pc . setqf ( "next_use_time2" , get_time ( ) + 60*60*24 )
    affect.add_collect(apply.RESIST_MAGIC,15,60*60*24)
    return
    elseif p == 3 then
    if get_time ( ) < pc . getqf ( "next_use_time3" ) then 
    say ("Devi aspettare 24h")
    say_reward ("L'ultimo utilizzo risale a:")
    say_title ( string . format ( "    %s" , time_to_str ( pc . getqf ( "next_time3" ) ) ) ) 
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 100  )
    return
    end
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 100  )
    say ("Hai ricevuto 25% blocco attacco corporale in più per 24h") 
    pc . setqf ( "next_use_time3" , get_time ( ) + 60*60*24 )
    affect.add_collect(apply.BLOCK,25,60*60*24)
    return
    elseif p == 4 then
    if get_time ( ) < pc . getqf ( "next_use_time4" ) then 
    say ("Devi aspettare 24h")
    say_reward ("L'ultimo utilizzo risale a:")
    say_title ( string . format ( "    %s" , time_to_str ( pc . getqf ( "next_time4" ) ) ) ) 
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 100  )
    return
    end
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 100  )
    say ("Hai ricevuto 50% forte contro zombie in più per 24h") 
    pc . setqf ( "next_use_time4" , get_time ( ) + 60*60*24 )
    affect.add_collect(apply.ATTBONUS_UNDEAD,50,60*60*24)
    return
    elseif p == 5 then
    if get_time ( ) < pc . getqf ( "next_use_time5" ) then 
    say ("Devi aspettare 24h")
    say_reward ("L'ultimo utilizzo risale a:")
    say_title ( string . format ( "    %s" , time_to_str ( pc . getqf ( "next_time5" ) ) ) ) 
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 100  )
    return
    end
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 100  )
    say ("Hai ricevuto 50% forte contro diavolo in più per 24h") 
    pc . setqf ( "next_use_time5" , get_time ( ) + 60*60*24 )
    affect.add_collect(apply.ATTBONUS_DEVIL,50,60*60*24)
    return
    elseif p == 6 then
    if get_time ( ) < pc . getqf ( "next_use_time6" ) then 
    say ("Devi aspettare 24h")
    say_reward ("L'ultimo utilizzo risale a:")
    say_title ( string . format ( "    %s" , time_to_str ( pc . getqf ( "next_time6" ) ) ) ) 
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 100  )
    return
    end
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 100  )
    say ("Hai ricevuto 20% forte contro mezziuomini in più per 24h") 
    pc . setqf ( "next_use_time6" , get_time ( ) + 60*60*24 )
    affect.add_collect(apply.ATTBONUS_HUMAN,20,60*60*24)
    return
    elseif p == 7 then
    if get_time ( ) < pc . getqf ( "next_use_time7" ) then 
    say ("Devi aspettare 24h")
    say_reward ("L'ultimo utilizzo risale a:")
    say_title ( string . format ( "    %s" , time_to_str ( pc . getqf ( "next_time7" ) ) ) )
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 100  ) 
    return
    end
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) - 100  )
    say ("Hai ricevuto 5000hp in più per 24h") 
    pc . setqf ( "next_use_time7" , get_time ( ) + 60*60*24 )
    affect.add_collect(apply.MAX_HP,5000,60*60*24)
    end
    end
     end
      end
       end 
    

    hr

    when kill with npc.is_pc()
    

    Este comando indica cuando un personaje mata a otro personaje.

    pc.level >= 85 and pc.level < 125
    

    Este comando señaliza que solo estará funcionando la quest para aquellas personas mayores de level 85 y menores de 125. Se puede editar.

    npc.get_empire() ~= pc.get_empire()
    

    Este comando especifica que la quest funciona solo cuando un PJ mata a otro PJ de otro reino, para desactivar esta función, basta con cancelar la parte de:

    and npc.get_empire() ~= pc.get_empire()
    

    4º Asegurate de darle premisos 0777 ó 777 a la quest.

    5º Logueate en la máquina virtual. y ve a:

    cd /usr/game/channel/share_data/locale/hongkong/quest  
    

    Y escribe el comando:

    ./qc example.quest  
    

    Recuerda, ahí es ./qc example.quest, porque yo puse como nombre de la quest: example.quest, si pusiste otro nombre solo tienes que cambiarlo.

    Y fin, reboot xD

    Fuente: Inforge, como cuesta traducir joder xD

  • **Osea, cuando matas a uno de otro reino, te da items a elejir? _xD_
    Y donde pongo los items que quiero que de, creo que aqui :

    local newton = select ("Premio1", "Premio2", "Premio3", "Premio4", "Premio5", "Premio6", "Premio7", "Premio8", "Annulla")
    

    pero no estoy seguro.... :l **

  • eso son las opciones, el item en si lo cambias en el if newton == 1 then 2 then 3 then etc.. en el comando pc.give_item2 :miau:

    P.D: Buen aporte :charm:

    P.D2: Anghios, ya que les dices que la llamen example.quest, en la quest quita el duelli y pon example, que es de lógica, pero para los que no sepan pues se trabarán xD

  • Excelente aporte Anghios 😛 gracias, aunque lo vi por Inforge hace ya un tiempo pero me dio una flojera traducirlo por eso no lo postie xD aun asi Gracias les servira a muchos :charm:

  • ami no me funciona... he provado con 2 PJ de distinto reino y nada...

  • U parese ser que esta quet parese ala quest del guabina de matar 500 pj de otros reinos xd pero no estoy seguro si sea esa

  • Buen aporte :icon_cheesygrin: