summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
authorHello TMW <hello@themanaworld.org>2024-11-02 15:51:40 +0000
committerLed Mitz <smoothshifter@tuta.io>2024-11-02 15:51:40 +0000
commitfb94560f16159b3a73050d2ea6df524a7d74d5cb (patch)
tree98f454d1925bfe401c6129639535837190182b65 /world
parent88c1eef1047e59a40bbe1c03a641d938bef02c40 (diff)
downloadserverdata-fb94560f16159b3a73050d2ea6df524a7d74d5cb.tar.gz
serverdata-fb94560f16159b3a73050d2ea6df524a7d74d5cb.tar.bz2
serverdata-fb94560f16159b3a73050d2ea6df524a7d74d5cb.tar.xz
serverdata-fb94560f16159b3a73050d2ea6df524a7d74d5cb.zip
This is small script implementing @labyrinth-reset command.stable
It resets doomsday chests state in Labyrinth (099-8) to non-visited state, so map could be revisited by players again. In fact this thing only needed since TMWA's @setvar doesnt allows to completely unset string variable. Also resetting array of size 100 manually is not best idea ever. This command is GM > 60 and its invocation logged to GM log and GM tab. NB: doesnt resets players "greed" variables (they're per player). Tested on my local server and works like planned.
Diffstat (limited to 'world')
-rw-r--r--world/map/npc/commands/_import.txt1
-rw-r--r--world/map/npc/commands/labyrinth-reset.txt23
2 files changed, 24 insertions, 0 deletions
diff --git a/world/map/npc/commands/_import.txt b/world/map/npc/commands/_import.txt
index 6e2f0cc2..0b28a3ea 100644
--- a/world/map/npc/commands/_import.txt
+++ b/world/map/npc/commands/_import.txt
@@ -22,3 +22,4 @@ npc: npc/commands/divorce.txt
npc: npc/commands/exp.txt
npc: npc/commands/dailypoints.txt
npc: npc/commands/mobpoints.txt
+npc: npc/commands/labyrinth-reset.txt
diff --git a/world/map/npc/commands/labyrinth-reset.txt b/world/map/npc/commands/labyrinth-reset.txt
new file mode 100644
index 00000000..e95eb3ee
--- /dev/null
+++ b/world/map/npc/commands/labyrinth-reset.txt
@@ -0,0 +1,23 @@
+-|script|labyrinth-reset|32767
+{
+ if (GM < 60) goto L_GM;
+ gmlog "(Labyrinth XP Chest state reset) @labyrinth-reset " + @args$;
+ wgm "labyrinth-reset : " + strcharinfo(0) + " invoked @labyrinth-reset (Labyrinth XP Chest state cleaner) " + @args$;
+ set .@i, 0;
+ goto L_CleanSlot;
+
+L_CleanSlot:
+ set $DD5A_EXPCHEST$[.@i], "";
+ set .@i, (.@i + 1);
+ if (.@i > 99) message strcharinfo(0), "labyrinth-reset : complete!";
+ if (.@i > 99) end;
+ goto L_CleanSlot;
+
+L_GM:
+ message strcharinfo(0), "labyrinth-reset : GM command is level 60, but you are level " + GM;
+ end;
+
+OnInit:
+ registercmd chr(ATCMD_SYMBOL) + "labyrinth-reset", strnpcinfo(0);
+ end;
+}