summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-01-15 19:38:15 -0300
committerJesusaves <cpntb1@ymail.com>2022-01-15 19:38:15 -0300
commit729402190413df0e5c80c835f1737573eb29750b (patch)
tree71f79f9b4b15e0454b9d1c979cc901076c23f639 /npc
parentc700473d29da75fe2b90b4329e4771f283056ee3 (diff)
downloadserverdata-729402190413df0e5c80c835f1737573eb29750b.tar.gz
serverdata-729402190413df0e5c80c835f1737573eb29750b.tar.bz2
serverdata-729402190413df0e5c80c835f1737573eb29750b.tar.xz
serverdata-729402190413df0e5c80c835f1737573eb29750b.zip
Allow CreateMaze to specify ranges, so 030 domain can have different sizes.
Diffstat (limited to 'npc')
-rw-r--r--npc/001-14/ctrl.txt1
-rw-r--r--npc/functions/maze.txt10
2 files changed, 6 insertions, 5 deletions
diff --git a/npc/001-14/ctrl.txt b/npc/001-14/ctrl.txt
index 448b3ba83..010df94e5 100644
--- a/npc/001-14/ctrl.txt
+++ b/npc/001-14/ctrl.txt
@@ -477,7 +477,6 @@ OnInit:
}
/////////////////////////////////////////////////////////////////////////////////
-// FIXME
001-14,41,46,0 script Hocus#MOLY1000 NPC_BLACKWIZARD,{
if (@moly_chall) end;
mes ".:: " + l("Survival Challenge") + ":: .";
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);