antiblock
Elveron
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
RedM

[Maxmi4.1 - Quest Biologo] Como Remover Duração?

Question

----------------------------------------------------
--COLLECT QUEST_lv30
--METIN2 Collecting Quest
----------------------------------------------------
quest collect_quest_lv30  begin
        state start begin
                when login or levelup with pc.level >= 30 and pc.level <= 90 begin
                        set_state(information)
                end
        end
        state information begin
                when letter begin
                        local v = find_npc_by_vnum(20084)
                        if v != 0 then
                                target.vid("__TARGET__", v, "O Biólogo Chaegirab")
                        end
                        send_letter("Estudo do Biólogo")
                end
                when button or info begin
                        say_title("Estudo do Biólogo")
                        say("")
                        say("O Biólogo Chaegirab, aprendiz do Uriel,")
                        say("necessita da tua ajuda urgentemente.")
                        say("Corre e vai ajudá-lo.")
                        say("")
                end
                when __TARGET__.target.click or
                        20084.chat."Eu preciso de ti." begin
                        target.delete("__TARGET__")
                        say_title("O Biólogo Chaegirab:")
                        ---                                                   l
                        say("")
                        say("Oh! Por favor, ajuda-me...")
                        say("Eu coleciono informações sobre os monstros do nosso")
say("reino, mas não posso lidar com isto sozinho..")
                        say("Na verdade, eu próprio deveria recolher a")
                        say("informação para as pesquisas.")
                        say("Acho que tu podes imaginar, eu tenho problemas em")
say("conseguir os materiais, portanto ajuda-me por favor.")
say("Claro que receberás uma boa recompensa por me ajudares.")
                        say("")
                        wait()
                        say_title("O Biólogo Chaegirab:")
                        say("")
                        say("Eu estou a fazer pesquisas sobre dentes de orc do")
say("Vale Suryong, esses dentes são capazes de derreter ferro.")
                        say("Por isso eles são muito interessantes para mim.")
                        say("Provavelmente, estão relacionados com o futuro.")
                        say("Os dentes de orc devem ser uma chave para a evolução.")
                        say("")
                        wait()
                        say_title("O Biólogo Chaegirab:")
                        say("")
                        say("Podes-me trazer alguns dentes de orc?")
                        say("Eu preciso de um dente forte, mas")
                        say("apenas um de cada vez, para que eu possa examiná-los.")
                        say("Boa Sorte.")
                        say("")
                        say("")
                        set_state(go_to_disciple)
                        pc.setqf("duration",0)
                        pc.setqf("collect_count",0)
                        pc.setqf("drink_drug",0)
                end
        end
        state go_to_disciple begin
                when letter begin
                        send_letter("Estudo do Biólogo")
                end
                when button or info begin
                        say_title("Estudo do Biólogo")
                        ---                                                   l
                        say("")
                        say("O Biólogo precisa de dentes de orc do")
say("Vale Suryong para examinar.")
                        say("Trás um de cada vez, para que ele")
                        say("tenha tempo de examiná-los.")
                        say("")
                        say("")
                        say_item_vnum(30006)
                        say_reward("Tu já entregaste ".." "..pc.getqf("collect_count").." dentes de orc.")
                        say("")
                end
                when 71035.use begin
                        if get_time() < pc.getqf("duration") then
                                say("")
                                say("Tu não podes usar o Soro da Persuasão ainda.")
                                say("")
                                return
                        end
                        if pc.getqf("drink_drug")==1 then
                                say("")
                                say("Tu já usaste o Soro da Persuasão.")
                                say("")
                                return
                        end
                        if pc.count_item(30006)==0 then
                                say_title("O Biólogo Chaegirab:")
                                say("")
                                say("Quando entregares os dentes, ")
                                say("poderás usar o Soro da Persuasão.")
                                say("")
                                return
                        end
                        item.remove()
                        pc.setqf("drink_drug",1)
                end
 
when 20084.chat."GM: collect_quest_lv30.skip_delay" with pc.count_item(30006) >0 and pc.is_gm() and get_time() <= pc.getqf("duration") begin
say(mob_name(20084))
say("Tu és GM, OK")
pc.setqf("duration", get_time()-1)
return
end
            when 20084.chat."Entregar Dente de Orc" with pc.count_item(30006) >0   begin
                        if get_time() > pc.getqf("duration") then
if  pc.count_item(30006) >0 then
                                say_title("O Biólogo Chaegirab:")
                                ---                                                   l
                                say("")
                                say("Oh! Tu trouxeste-me um dente de orc")
                                say("Eu tenho que examiná-lo primeiro...")
                                say("Demora algum tempo..")
                                say("")
pc.remove_item("30006",1)
if  is_test_server()  then 
pc.setqf("duration",get_time()+2) 
else
pc.setqf("duration",get_time()+1*1*1) -----------------------------------22½Ã°£
end
                                wait()
                                local pass_percent
                                if pc.getqf("drink_drug")==0 then
                                        pass_percent=60
                                else
                                        pass_percent=90
                                end
                                local s= number(1,100)
                                if s<= pass_percent  then
                                   if pc.getqf("collect_count")< 9 then
                                                local index =pc.getqf("collect_count")+1
                                                pc.setqf("collect_count",index)
                                                say_title("O Biólogo Chaegirab:")
                                                say("")
                                                say("Oh! Parabéns..")
                                                say("Trás-me".." mais"..10-pc.getqf("collect_count").. " dentes de orc.")
                                                say("Preciso de mais para analisar.")
                                                say("Boa Sorte.")
                                                say("")
                                                say("")
                                                pc.setqf("drink_drug",0)
                                                return
                                        end
                                        say_title("O Biólogo Chaegirab:")
                                        say("")
                                        say("Tu entregaste todos os dentes!")
                                        say("Mas agora eu preciso de uma pedra especial.")
                                        say("A Pedra-Espírita Jinunggyi, consegues")
                                        say("encontrar e trazer-me também?")
                                        say("Você pode obtê-la nos Orcs.")
                                        say("")
                                        pc.setqf("collect_count",0)
                                        pc.setqf("drink_drug",0)
                                        pc.setqf("duration",0)
                                        set_state(key_item)
                                        return
                                else
                                say_title("O Biólogo Chaegirab:")
                                say("Hum... Infelizmente está partido..")
                                say("Peço desculpa. Mas eu não posso usá-lo.")
                                say("Por favor, trás-me outro.")
                                say("")
                                pc.setqf("drink_drug",0)
                                return
                                end
else
                    say_title("O Biólogo Chaegirab:")
say("Tu não possuis o seguinte item: "..item_name(30006).."!")
return
end
            else
                  say_title("O Biólogo Chaegirab:")
 ---                                                   l
 say("")
 say("Peço desculpa, mas...")
 say("Ainda estou a analisar o dente que trouxeste")
 say("Podes trazer-me outro dente mais tarde?")
 say("")
 say("")
                  say("")
                  say("")
                  return
                end
        end
end
        state key_item begin
                when letter begin
                        send_letter("Estudo do Biólogo")
                        if pc.count_item(30220)>0 then
                                local v = find_npc_by_vnum(20084)
                                if v != 0 then
                                        target.vid("__TARGET__", v, "")
                                end
                        end
                end
                when button or info begin
                        if pc.count_item(30220) >0 then
                                say_title("Pedra-Espírita Jinunggyi")
                                say("")
                                ---                                                   l
                                say_reward("Tu entregaste Pedra-Espírita Jinunggyi")
                                say_reward("Leva-a Biólogo.")
                                say_reward("Ele espera por você.")
                                say("")
                                return
                        end
                        say_title("Pedra-Espírita Jinunggyi")
                        say("")
                        ---                                                   l
                        say("Para terminar os exames")
                        say("precisarei da Pedra-Espírita Jinunggyi.")
                        say("Tu já entregaste os 10 dentes.")
                        say_item_vnum(30220)
                        say("Trás-me a pedra.")
say("Tu podes obtê-la nos seguintes moobs: "..mob_name(635)..";")
say(""..mob_name(636)..";"..mob_name(637)..".")
                        say("")
                end
                when 635.kill or
                         636.kill or
                         637.kill  begin
                        local s = number(1, 500)
                        if s == 1 and pc.count_item(30220)==0 then
                                pc.give_item2(30220, 1)
                                send_letter("Tu encontraste a Pedra-Espírita Jinunggyi.")
                        end
                end
                when __TARGET__.target.click  or
                        20084.chat."Eu tenho a Pedra-Espírita Jinunggyi" with pc.count_item(30220) > 0  begin
                        target.delete("__TARGET__")
if pc.count_item(30220) > 0 then 
                        say_title("O Biólogo Chaegirab:")
---                                                   l
                        say("")
say("Muito Obrigado.")
say("Irei-te recompensar..")
say("Leva a receita secreta que contém")
say("informações sobre o Futuro.")
say("Entrega-a ao Baek Go,")
say("para novos testes.")
                        say("Com a tua ajuda eu aprendi muito acerca dos Orcs.")
                        say("")
                        say("")
                        pc.remove_item(30220,1)
                        set_state(__reward)
else
                say_title("O Biólogo Chaegirab")
say("Tu não possuis o seguinte item: "..item_name(30220).."!")
say("")
return
                end
        end
 
end
        state __reward begin
                when letter begin
                        send_letter("A recompensa do Biólogo")
                        local v = find_npc_by_vnum(20018)
                        if v != 0 then
                                target.vid("__TARGET__", v, "Baek-Go")
                        end
                end
                when button or info begin
                        say_title("A recompensa do Biólogo")
                        ---                                                   l
                        say("")
                        say("Como recompensa por me ajudares")
                        say("vou-te dar uma receita")
                        say("para a poção secreta.")
                        say("Por favor dá isto ao Baek Go, ele vai criar a")
say("poção.")
                        say("")
                end
                when __TARGET__.target.click  or
                        20018.chat."A Receita Secreta"  begin
                        target.delete("__TARGET__")
                        say_title("Baek Go:")
                        say("")
                        say("Deixa-me dar uma olhadela..")
                        say("É a receita que o Chaegirab te deu?")
                        say("Hmm, ótimo.")
                        say("Tu ganhaste uma caixa vermelha.")
                        say("Obrigado.")
                        say("")
-----------                                                   l
say_reward("Como recompensa pelo Biólogo,")
say_reward("Tu recebeste +30% de velocidade de movimento")
say_reward("permanentemente.")
affect.add_collect(apply.MOV_SPEED, 30, 60*60*24*365*60) -- 60Years
pc.give_item2(50109)
                        clear_letter()
                        set_quest_state("collect_quest_lv40", "run")
                        set_state(__complete)
                end
        end
        state __giveup__ begin
                when 20084.chat."Outra tentativa." begin
                        say_title("O Biólogo Chaegirab:")
                        say("")
                        say("Podes tentar outra vez?")
                        say("Hmm, muito bem!")
                        say("Isso satisfaz-me bastante, mas")
                        say("por favor tenta de novo.")
                        say("Ok, vejo-te mais tarde.")
                        set_state(start)
             end
         end
        state __complete begin
        end
end
 

 

Bem como o titulo diz gostava de saber como remover a duração de entrega dos dentes, já tentei remover a linha & comentar & alterar:

 

if  is_test_server()  then 
pc.setqf("duration",get_time()+2) 
else
pc.setqf("duration",get_time()+1*1*1) -----------------------------------22½Ã°£

 

No entanto obtive sempre o mesmo resultado, não funcionou.

As quest são das files maxmi 4.1 com a pequena alteração de estarem traduzidas.

 

 

Agradeço a ajuda,

LikeAG6

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

Remove (cuidado com a segunda remoção, terás de ajustar os end)

 

and get_time() <= pc.getqf("duration")

 

if get_time() > pc.getqf("duration") then

 

if  is_test_server()  then 
pc
.setqf("duration",get_time()+2) 
else
pc.setqf("duration",get_time()+1*1*1) -----------------------------------22½Ã°£
end

 

pc.setqf("duration",0)

 

 

_______________________________________________________

 

OU

 

 

Muda

 

if get_time() > pc.getqf("duration") then

 

Para

 

if get_time() => pc.getqf("duration") then

 

 

Assim como:

 

if  is_test_server()  then 
pc
.setqf("duration",get_time()+2) 
else
pc.setqf("duration",get_time()+1*1*1)
end

 

 

Para:

pc.setqf("duration",get_time())

Share this post


Link to post
Share on other sites
antiblock
Elveron

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this