Jump to content

Recommended Posts

Hello. I'm starting my journey with Metin2 servers as hobby. I've came across probably simple problem. I've added a chain of some hunting missions and the first one starts at level 1. But when character gets level 2 before finishing level 1 mission and then finishes it on level 2, the next mission doesn't pop up unless you relog or level up again. Is there a way to refresh quests after finishing one? There is code :
 

Spoiler

quest pol_01 begin
    state start begin
        when login or levelup with pc.get_level() >= 1 begin
            set_state("polowanie1")
        end
    end
    
    state polowanie1 begin
        when letter begin


            send_letter_ex("Polowanie #1", "ex", "scroll_open.tga")

        end

        when button or info begin
            say_title("Polowanie #1")
            say("Wybierz na jaki cel chcesz zapolować.")
            local s = select("6 Głodny Dziki Pies","3 Wilk","Anuluj")
            if s == 1 then
                set_state("polowanie1_1")
                clear_letter()
            end
            if s == 2 then
                set_state("polowanie1_2")
                clear_letter()
            end
            if s == 3 then
                return
            end
        end
    end

    state polowanie1_1 begin
        when letter begin
            send_letter_ex("Polowanie #1", "ex", "scroll_open.tga")
        end

        when button or info begin
            say_title("Polowanie")
            say("Twoim celem jest 6x Głodny Dziki Pies.")
            say("Twój cel znajduje się w M1.")
            say("")
            say_reward(string.format("Nagroda to 1.500 yang, 15 EXP oraz Zbroja +0."))
        end

        when kill with npc.get_race() == 171 begin
            pc.setqf("licznik1_1", pc.getqf("licznik1_1")+1)
            q.set_counter("Pozostałe", 6-pc.getqf("licznik1_1"))

            if pc.getqf("licznik1_1") == 6 then
                say_title("Polowanie ukończone")
                say("Udało Ci się ukończyć polowanie!")
                say("Oto Twoja nagroda:")
                say_reward(string.format("1.500 Yang, 15 EXP oraz Zbroja +0."))
                pc.give_gold(1500)
                pc.give_exp2(15)
                if pc.job==0 then
                        pc.give_item2(11200)
                end
                if pc.job==1 then
                        pc.give_item2(11400)
                end
                if pc.job==2 then
                        pc.give_item2(11600)
                end
                if pc.job==3 then        
                        pc.give_item2(11800)
                end    
                clear_letter()
                set_state("koniec1_1")
                set_quest_state("polowanko_02","run")
            end
        end
    end

    state koniec1_1 begin
    end

    state polowanie1_2 begin
        when letter begin
            send_letter_ex("Polowanie #1", "ex", "scroll_open.tga")
        end

        when button or info begin
            say_title("Polowanie")
            say("Twoim celem jest 3x Wilk.")
            say("Twój cel znajduje się w M1.")
            say("")
            say_reward(string.format("Nagroda to 1.500 yang, 15 EXP oraz Zełm +0."))
        end

        when kill with npc.get_race() == 102 begin
            pc.setqf("licznik1_2", pc.getqf("licznik1_2")+1)
            q.set_counter("Pozostało", 3-pc.getqf("licznik1_2"))

            if pc.getqf("licznik1_2") == 3 then
                say_title("Polowanie ukończone")
                say("Udało Ci się ukończyć polowanie!")
                say("Oto Twoja nagroda:")
                say_reward(string.format("1.500 Yang, 15 EXP oraz Zbroja +0."))
                pc.give_gold(1500)
                pc.give_exp2(15)
                if pc.job==0 then
                        pc.give_item2(11200)
                end
                if pc.job==1 then
                        pc.give_item2(11400)
                end
                if pc.job==2 then
                        pc.give_item2(11600)
                end
                if pc.job==3 then        
                        pc.give_item2(11800)
                end    
                clear_letter()
                set_state("koniec1_2")
                set_quest_state("polowanko_02","run")
            end
        end
    end

    state koniec1_2 begin
    end
end

 

Link to comment
https://metin2.dev/topic/33642-problem-with-quest-not-popping-up/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.