Jump to content

Random monster kill to continue dungeon


Recommended Posts

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 

Spoiler

        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.")
                ledov_dungeon.clear_ledovdungeon()
                d.setf("ledov_dungeon_level", 2)
                server_timer("ledov_dungeon_spawner", 15, d.get_map_index())    
            else
                game.set_event_flag("trumetin", game.get_event_flag("trumetin")+1)
            end
        end

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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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