summaryrefslogtreecommitdiff
path: root/npc/functions/maze.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/maze.txt')
-rw-r--r--npc/functions/maze.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/npc/functions/maze.txt b/npc/functions/maze.txt
index 8fd9c438e..b2dde03b4 100644
--- a/npc/functions/maze.txt
+++ b/npc/functions/maze.txt
@@ -14,13 +14,15 @@
// But does not initializes anything
function script CreateMaze {
.@scope = getarg(0, IOT_CHAR);
+ .@min = getarg(1, MAZE_MIN);
+ .@max = getarg(2, MAZE_MAX);
// Pseudo-random maze ID
// (It is not random at all; But two mazes won't repeat)
MAZE_ID += 1;
- if (MAZE_ID > MAZE_MAX)
- MAZE_ID = MAZE_MIN;
- if (MAZE_ID < MAZE_MIN)
- MAZE_ID = MAZE_MIN;
+ if (MAZE_ID > .@max)
+ MAZE_ID = .@min;
+ if (MAZE_ID < .@min)
+ MAZE_ID = .@min;
.@MAZEMP$=sprintf("030-%02d", MAZE_ID);
MAZE_MAP$=sprintf("mz%02d@"+getcharid(0), MAZE_ID);