summaryrefslogtreecommitdiff
path: root/npc/commands/debug.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands/debug.txt')
-rw-r--r--npc/commands/debug.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index d5bbc79f..a22f8e28 100644
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -578,6 +578,11 @@ OnSetVar:
.@cmd$=array_shift(.@atcmd_parameters$);
.@idx=atoi(array_shift(.@atcmd_parameters$));
+
+ // Trying to edit global variables
+ if (charat(.@atcmd_parameters$[0], 0) == "$") && !is_admin())
+ Exception("You are not allowed to change global variables.", RB_DISPBOTTOM|RB_ISFATAL);
+
if (charat(.@atcmd_parameters$[0],
getstrlen(.@atcmd_parameters$[0])-1) == "$")
.@str=true;
@@ -666,10 +671,10 @@ OnDoEvent:
OnInit:
registercmd "@debug", "Debug Spell::OnDebug";
- bindatcmd "getvar", "Debug Spell::OnGetVar", 99, 99, 1;
- bindatcmd "get-var", "Debug Spell::OnGetVar", 99, 99, 1;
- bindatcmd "setvar", "Debug Spell::OnSetVar", 99, 99, 1;
- bindatcmd "set-var", "Debug Spell::OnSetVar", 99, 99, 1;
+ bindatcmd "getvar", "Debug Spell::OnGetVar", 40, 40, 1;
+ bindatcmd "get-var", "Debug Spell::OnGetVar", 40, 40, 1;
+ bindatcmd "setvar", "Debug Spell::OnSetVar", 80, 80, 1;
+ bindatcmd "set-var", "Debug Spell::OnSetVar", 80, 80, 1;
bindatcmd "sclear", "Debug Spell::OnSClear", 99, 99, 1;
bindatcmd "allperms", "Debug Spell::OnAllPerms", 99, 100, 1;
bindatcmd "callfunc", "@wgm::OnCallFunc", 99, 99, 1;