Ayuda con esta quest

Topic created · 1 Mensajes · 302 Visitas
  • hola alguien me ayudaria a que esta quest me salgan los premios para cangiar en la npc 20094 pliss

    quest example begin
    state start begin
      when kill with npc.is_pc() and pc.level >= 50 and pc.level < 100 and npc.get_empire() ~= pc.get_empire() begin
    local ciao = pc . getqf ( "DuelPoint" )
    pc . setqf ( "DuelPoint" , pc . getqf ( "DuelPoint" ) + 1  )
    chat ("que ganó el duelo y recibió una DuelPoint")
    chat ("Ahora usted tiene " .. Hola.. " DuelPoint")
    chat ("Usted debe alcanzar el 1 DuelPoint para elegir los premios ")
    chat ("o esperar a llegar a 100 DuelPoint y elegir los mejores premios")
    if pc.getqf ("DuelPoint") == 1 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" ) - 1  )
    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 al azar", "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'se utilizó por última vez al:")
    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'se utilizó por última vez al:")
    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 ("Ha recibido 15% resistenza magia x 24hs")
    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 ("Ha recibido 25% blocco attacco corporale x 24Hs")
    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'se utilizó por última vez al:")
    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 ("Ha recibido 50% forte contro zombie x 24hs")
    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
    

    es ovio q el ke me haga este gran favor se levva mi gracias.