summaryrefslogtreecommitdiff
path: root/npc/commands
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-11 14:37:27 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-11 14:37:27 -0300
commit2d7b48e978d6b048dea7ef97eb786cb99aac204b (patch)
tree305eda3da6b0b0b8e6346faefc3a7b5b6e608ecd /npc/commands
parenta8c5258e01e09cf63c850a92f442ad21d569a5aa (diff)
downloadserverdata-2d7b48e978d6b048dea7ef97eb786cb99aac204b.tar.gz
serverdata-2d7b48e978d6b048dea7ef97eb786cb99aac204b.tar.bz2
serverdata-2d7b48e978d6b048dea7ef97eb786cb99aac204b.tar.xz
serverdata-2d7b48e978d6b048dea7ef97eb786cb99aac204b.zip
Re-add @showgm/@hidegm commands
Diffstat (limited to 'npc/commands')
-rw-r--r--npc/commands/gm.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/npc/commands/gm.txt b/npc/commands/gm.txt
new file mode 100644
index 00000000..b402cda8
--- /dev/null
+++ b/npc/commands/gm.txt
@@ -0,0 +1,41 @@
+// @showgm/@hidegm atcommand
+// TEMPORALY hides GM level (or revert it)
+//
+// group lv: 20+
+// group char lv: 99
+// log: False
+//
+// usage:
+// @showgm
+// #showgm "char" <delta>
+//
+
+- script @group 32767,{
+ end;
+
+OnHide:
+ .@gm=getgroupid();
+ if (.@gm < 20) end;
+ if (.@gm % 10 != 0) end;
+ setgroupid(.@gm+1);
+ dispbottom "hidelevel : "+l("Your GM level is now hidden.");
+ end;
+
+OnShow:
+ .@gm=getgroupid();
+ if (.@gm < 20) end;
+ if (.@gm % 10 != 1) end;
+ setgroupid(.@gm-1);
+ dispbottom "showlevel : "+l("Your GM level is now visible.");
+ end;
+
+OnInit:
+ bindatcmd "showgroup", "@group::OnShow", 20, 99, 0;
+ bindatcmd "showgm", "@group::OnShow", 20, 99, 0;
+ bindatcmd "showlevel", "@group::OnShow", 20, 99, 0;
+
+ bindatcmd "hidegroup", "@group::OnHide", 20, 99, 0;
+ bindatcmd "hidegm", "@group::OnHide", 20, 99, 0;
+ bindatcmd "hidelevel", "@group::OnHide", 20, 99, 0;
+ end;
+}