Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

Random monster kill to continue dungeon



Hi, im writing quest for my dungeon. I want to start regen where will be like 400 monsters. And i want that one from that 400 monsters will be right and when i kill it it ports me.

I writed this 


        when 6101.kill or 6102.kill or 6103.kill or 6104.kill with pc.in_dungeon() and d.getf("ledov_dungeon_level") == 1 begin
            local n = number(1,8)
            if n == 1 or game.get_event_flag("trumetin") == 7 then
                d.notice("Správná příšera byla zabita.")
                d.setf("ledov_dungeon_level", 2)
                server_timer("ledov_dungeon_spawner", 15, d.get_map_index())    
                game.set_event_flag("trumetin", game.get_event_flag("trumetin")+1)

Which works fine. But when i set the number to local n = number(1,8) sometimes i have to kill more than 8 monsters sometimes it work good. I dont know what is wrong. Can anybody help please? Thank you 🙂

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

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

  • 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.