Jump to content
  • 0

Questions about making a dungeon



Hello everyone! So, I want to make a dungeon but there are little things I couldn't make clear in my mind as I didn't find any specific information for this that could help me. 

I've seen the big picture of making a dungeon, but for example:

-everytime I use server_timer I receive error in syserr

SYSERR: Dec 11 05:42:44 :: _clear_server_timer: LUA PREVENT: Wrong argument on ClearServerTimer!

Do you know what might be the cause? 

I use it something like this:

server_timer("Dungeon_Time", 60*40, d.get_map_index())

And if the final boss is killed I call

    when Dungeon_Time.server_timer begin
            if d.select(get_server_timer_arg()) then

clear_server_timer("Dungeon_Time", get_server_timer_arg())    (I hope that I wrote this correct because I'm writing from phone but I used the functions like I'vd seen in other quests). 

If I use the simple timer function there is no problem, but still I couldn't find if it is ok to stick to timer as I've seen a lot of quests using the server_timer. 

Another error I get is:

SYSERR: Dec 11 05:42:29 :: SetQuestNPCID: cannot reset quest npc id - already running quest [13 TestPlayer]

Maybe it doesn't have anything to do with the dungeon but I didn't see this error before doing the dungeon, maybe someone knows what could be the problem. 

Is ok using the quest flag like this? 

d.setf("Flag1", d.getf("Flag1")+1)
            if d.getf("Flag1") == 150 then

Do something etc. 

Is it ok to clear the flag after it's triggered like this:

d.setf("Flag1", 0) or I'm doing it wrong or there is no need to clear them because they will be cleared automatically? Thank you for the answers, 

Have a nice day! 

Edited by regal
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1
  • Developer

Couple of things.

A server_timer is an event that is supposed to run once. Unless you decide to make a loop out of it - which on this case, it'd make sense to use clear_server_timer to ensure you cancel it.


Obviously, you must bind map indexes into them, especially when it comes to dungeons, since they mostly are private instances, their indexes go up to 10.000, so you want these timers to run exclusively on the runs. The first approach is correct.

Nevertheless, I recommend you to keep using d.get_map_index upon clearing them - since it is exactly the function you should use.


About the flags. Yes, you're doing it correctly. I don't remember, though, if dungeon flags' definitions are set and updated on the fly, though you can use this preferred and common practice used in quest-flags, however it's all about taste:

local my_flag = d.getf("Flag1") + 1
d.setf("Flag1", my_flag)

if my_flag == 150 then
	d.setf("Flag1", 0)


As for the issue you described, and you seem unsure where it comes from. Personally, I'm not quite familiar with it, and don't even have such log in my files, but I can only guess it's related to a malfunction in the usage of the npc.lock and npc.unlock quest-functions. My advice is to review any quest that uses either of them and attempt to trigger this error - then you'll find where it comes from.

Edited by PACI
  • Love 1

when you return 0 and server doesn't boot:


Link to comment
Share on other sites

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

  • Activity

    1. 43

      Upgraded Reference (TMP4 Base) By Ulthar

    2. 2

      TXT File To Lower Case [Phaselis Map Works]

    3. 43

      Upgraded Reference (TMP4 Base) By Ulthar

    4. 43

      Upgraded Reference (TMP4 Base) By Ulthar

    5. 5

      Official Environment Effect Options [REVERSED]

    6. 1

      4 Alternatives Open Source to Trello

  • Recently Browsing

    • No registered users viewing this page.
  • 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.