summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-02-17 10:25:10 -0500
committergumi <git@gumi.ca>2018-02-17 10:25:10 -0500
commit8ca42e79e5f117546cb9197c0c673f44bf3e47da (patch)
tree8d646c1e32d0a17647b74fa9f81d44ee9d91ee06 /world/map/npc
parent5912a5a07f1bfa45fbb6312a1d4cf0049318c737 (diff)
downloadclassic-serverdata-8ca42e79e5f117546cb9197c0c673f44bf3e47da.tar.gz
classic-serverdata-8ca42e79e5f117546cb9197c0c673f44bf3e47da.tar.bz2
classic-serverdata-8ca42e79e5f117546cb9197c0c673f44bf3e47da.tar.xz
classic-serverdata-8ca42e79e5f117546cb9197c0c673f44bf3e47da.zip
add a command to show/hide the gm level
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/commands/_import.txt1
-rw-r--r--world/map/npc/commands/gm.txt32
2 files changed, 33 insertions, 0 deletions
diff --git a/world/map/npc/commands/_import.txt b/world/map/npc/commands/_import.txt
index c6e96268..814530bc 100644
--- a/world/map/npc/commands/_import.txt
+++ b/world/map/npc/commands/_import.txt
@@ -14,3 +14,4 @@ npc: npc/commands/mute.txt
npc: npc/commands/npctalk.txt
npc: npc/commands/music.txt
npc: npc/commands/python.txt
+npc: npc/commands/gm.txt
diff --git a/world/map/npc/commands/gm.txt b/world/map/npc/commands/gm.txt
new file mode 100644
index 00000000..823019bf
--- /dev/null
+++ b/world/map/npc/commands/gm.txt
@@ -0,0 +1,32 @@
+-|script|@group|32767
+{
+ end;
+
+OnHide:
+ if (GM < 10 && GM < G_SYSOP) end;
+
+ if (GM == 99) set GM, 98;
+ else set GM, (GM - (GM % 10)) + 1;
+
+ message strcharinfo(0), "hidelevel : Your GM level is now hidden.";
+ end;
+
+OnShow:
+ if (GM < 10 && GM < G_SYSOP) end;
+
+ if (GM == 98) set GM, 99;
+ else set GM, GM - (GM % 10);
+
+ message strcharinfo(0), "showlevel : Your GM level is now visible.";
+ end;
+
+OnInit:
+ registercmd chr(ATCMD_SYMBOL) + "showgroup", strnpcinfo(0) + "::OnShow";
+ registercmd chr(ATCMD_SYMBOL) + "showgm", strnpcinfo(0) + "::OnShow";
+ registercmd chr(ATCMD_SYMBOL) + "showlevel", strnpcinfo(0) + "::OnShow";
+
+ registercmd chr(ATCMD_SYMBOL) + "hidegroup", strnpcinfo(0) + "::OnHide";
+ registercmd chr(ATCMD_SYMBOL) + "hidegm", strnpcinfo(0) + "::OnHide";
+ registercmd chr(ATCMD_SYMBOL) + "hidelevel", strnpcinfo(0) + "::OnHide";
+ end;
+}