summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-23 02:46:29 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-23 02:46:29 -0300
commite0218b0526466a44286042167f076a7756b6481b (patch)
treebc33846552dbc28e62653864a108fc6cae46bb8c
parentbfc68f0644e2a21fbe12cf1513f577fc82052956 (diff)
downloadserverdata-e0218b0526466a44286042167f076a7756b6481b.tar.gz
serverdata-e0218b0526466a44286042167f076a7756b6481b.tar.bz2
serverdata-e0218b0526466a44286042167f076a7756b6481b.tar.xz
serverdata-e0218b0526466a44286042167f076a7756b6481b.zip
I need a random tool...
-rw-r--r--npc/maze0/config.txt29
1 files changed, 22 insertions, 7 deletions
diff --git a/npc/maze0/config.txt b/npc/maze0/config.txt
index 3f59d30fe..d2613a3b3 100644
--- a/npc/maze0/config.txt
+++ b/npc/maze0/config.txt
@@ -521,7 +521,7 @@ function script GenerateMaze {
"↑", "→", "↓", "←",
"⮠", "⮡", "⮢", "⮣",
"ㅓ", "ㅏ", "ㅗ", "T",
- "|", "—", "𐘁";
+ "|", "—", "𐘁\ ";
debugmes "[STATUS] Finishing...";
for (.@y=0; .@y < MAZE_MY; .@y++) {
.@l$="";
@@ -535,8 +535,8 @@ function script GenerateMaze {
}
// Debug human readable format + a easy to grep-replace RNG
// Pseudo-rng example: $@MAZES_12_4 = Random Maze 12, Row 4
- // On the example, replace VAR with "MAZES_12"
- debugmes "[REPORT-SA] setarray $@VAR_%d, %s", .@y, .@l$; // SetArray
+ // On the example, replace VAR_X with "MAZES_12"
+ debugmes "[REPORT-SA] setarray $@VAR_X_%d%s;", .@y, .@l$; // SetArray
debugmes "[REPORT-HR] %s", .@lb$; // HumanReadable
}
@@ -726,14 +726,29 @@ maze0,30,30,0 script #MazeMaster NPC_MONA,{
mesf "Height (%d-25): ", max(1, @yvar);
input .@y, max(1, @yvar), 25;
+ // Amount of copies
+ mesf "N. Copies: ";
+ input .@loop, 1, 100;
+
// Prevent bugs
@xvar=.@x; @yvar=.@y;
}
- GenerateMaze(.@x, .@y);
- if (@menu != 2) {
- CreateMaze();
- InitMaze(0, 0);
+
+ if (@menu == 2) {
+ freeloop(true);
+ for (.@i=0; .@i < .@loop; .@i++) {
+ GenerateMaze(.@x, .@y);
+ debugmes "";
+ debugmes "";
+ freeloop(true);
+ }
+ freeloop(false);
+ close;
}
+
+ GenerateMaze(.@x, .@y);
+ CreateMaze();
+ InitMaze(0, 0);
end;
}