Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

Quest Problem


Fr3zy94

Question

I don't know how but some players got kills with - this in my quest:

quest pvpduel begin
    state start begin
        when levelup with pc.level == 90 begin
            set_state(player_kill)
        end
    end

    state player_kill begin
        when letter begin
            send_letter("Înfrânge-þi Inamicii")
        end

        when button or info begin
            say_title("Înfrânge-þi Inamicii!")
            say("")
            say("Dovedeºte cã eºti cel mai bun,")
            say("Înfrânge-þi inamicii în lupta,")
            say("în dueluri sau în arena de razboi")
            say("a breslei.")
            say("")
            say_reward("Ucide 100 de jucãtorii")
            say_reward("ªi iþi vei primi recompensa!")
            say("")
            pc.setqf("state", 100)
            q.set_counter("Inamici rãmaºi:", 100)
         set_state (kill)
        end
   end

   state kill begin
      when letter begin
         send_letter("Înfrânge-þi Inamicii")
      end
      
      when button or info begin
            say("")
            say("Dovedeºte cã eºti cel mai bun,")
            say("Înfrânge-þi inamicii în lupta,")
            say("în dueluri sau în arena de razboi")
            say("a breslei.")
            say("")
            say_reward("Ucide 100 de jucãtorii")
            say_reward("ªi iþi vei primi recompensa!")
            say("")
         say_reward("Inamici rãmaºi: "..pc.getqf("state").." ")
      end


        when kill begin
            if npc.is_pc() then
            local count = pc.getqf("state") - 1
            if count <= 100 then
                pc.setqf("state", count)
                q.set_counter("Inamici rãmaºi:", count)
            end
            if count == 0 then
                say_title("Înfrânge-þi Inamicii!")
                say("Ai dovedit cã eºti cel mai bun!")
                say("Ai participat la foarte multe")
                say("lupte,ºi ai ieºit învingãtor")
                say("Ai înfrânt 100 de jucãtori.")
                say("Recompesa:")
                say_reward("5% împotriva oricarei rase.")
                affect.add_collect_point(POINT_ATTBONUS_WARRIOR,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_ASSASSIN,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SURA,5,60*60*24*365*60)    
                affect.add_collect_point(POINT_ATTBONUS_SHAMAN,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_WOLFMAN,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATT_GRADE,60,60*60*24*365*60)
                affect.add_collect_point(POINT_DEF_GRADE,60,60*60*24*365*60)
                notice_all("".. pc.get_name() .." a ucis 100 de jucãtori.")
                clear_letter()
                set_state(__COMPLETE__)

            end
        end
    end
    end

    state __COMPLETE__ begin
    end
end

tlUya4E.png

Link to comment

6 answers to this question

Recommended Posts

  • 0

Try this

quest pvpduel begin
    state start begin
        when levelup with pc.level == 90 begin
            set_state(player_kill)
        end
    end
 
    state player_kill begin
        when letter begin
            send_letter("Înfrânge-þi Inamicii")
        end
 
        when button or info begin
            say_title("Înfrânge-þi Inamicii!")
            say("")
            say("Dovedeºte cã eºti cel mai bun,")
            say("Înfrânge-þi inamicii în lupta,")
            say("în dueluri sau în arena de razboi")
            say("a breslei.")
            say("")
            say_reward("Ucide 100 de jucãtorii")
            say_reward("ªi iþi vei primi recompensa!")
            say("")
            q.set_counter("Inamici rãmaºi:", 100)
         set_state (kill)
        end
   end
 
   state kill begin
      when letter begin
         send_letter("Înfrânge-þi Inamicii")
      end
       
      when button or info begin
            say("")
            say("Dovedeºte cã eºti cel mai bun,")
            say("Înfrânge-þi inamicii în lupta,")
            say("în dueluri sau în arena de razboi")
            say("a breslei.")
            say("")
            say_reward("Ucide 100 de jucãtorii")
            say_reward("ªi iþi vei primi recompensa!")
            say("")
         say_reward("Inamici rãmaºi: "..pc.getqf("state").." ")
      end
 
 
        when kill begin
            if npc.is_pc() then
            local count = pc.getqf("state") + 1
            if 100 - count > 0 then
                pc.setqf("state", count)
                q.set_counter("Inamici rãmaºi:", 100 - count)
            end
            if 100 - count <= 0 then
                say_title("Înfrânge-þi Inamicii!")
                say("Ai dovedit cã eºti cel mai bun!")
                say("Ai participat la foarte multe")
                say("lupte,ºi ai ieºit învingãtor")
                say("Ai înfrânt 100 de jucãtori.")
                say("Recompesa:")
                say_reward("5% împotriva oricarei rase.")
                affect.add_collect_point(POINT_ATTBONUS_WARRIOR,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_ASSASSIN,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_SURA,5,60*60*24*365*60)    
                affect.add_collect_point(POINT_ATTBONUS_SHAMAN,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATTBONUS_WOLFMAN,5,60*60*24*365*60)
                affect.add_collect_point(POINT_ATT_GRADE,60,60*60*24*365*60)
                affect.add_collect_point(POINT_DEF_GRADE,60,60*60*24*365*60)
                notice_all("".. pc.get_name() .." a ucis 100 de jucãtori.")
                clear_letter()
                set_state(__COMPLETE__)
 
            end
        end
    end
    end
 
    state __COMPLETE__ begin
    end
end
  • Love 1
Link to comment
  • 0
  • Premium

 

local count = pc.getqf("state") - 1

 try with +1 because you don't say how much is state and you verify the count with <=

local count = pc.getqf("state") + 1
  • Love 1
Link to comment

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

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 1

      [HELP] Costume bonusing with item not working

    2. 10

      Fix Taskbar Highlight Python

    3. 13

      Reduce server memory usage

    4. 87

      How To Enchant & Transform Costume

    5. 2

      Old m2 function

  • Recently Browsing

    • No registered users viewing this page.

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.