summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-08 14:36:57 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-08 14:36:57 -0300
commitea3ee9e0dc8e2e7bf639d5c095ff7ce5255902d2 (patch)
treea045b41049660722b033dbe6bae8a174309bcea6 /npc
parent78e75ded4c111b93daa7769046fbeff09cae499f (diff)
downloadserverdata-ea3ee9e0dc8e2e7bf639d5c095ff7ce5255902d2.tar.gz
serverdata-ea3ee9e0dc8e2e7bf639d5c095ff7ce5255902d2.tar.bz2
serverdata-ea3ee9e0dc8e2e7bf639d5c095ff7ce5255902d2.tar.xz
serverdata-ea3ee9e0dc8e2e7bf639d5c095ff7ce5255902d2.zip
@setq, the GM Quest Debugger
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/debug-quest.txt26
1 files changed, 24 insertions, 2 deletions
diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt
index cb28a4f11..75801a3da 100644
--- a/npc/commands/debug-quest.txt
+++ b/npc/commands/debug-quest.txt
@@ -53,14 +53,36 @@ function script GlobalQuestDebug {
end;
OnCall:
- if (!is_gm())
- {
+ if (!is_gm()) {
end;
}
GlobalQuestDebug;
closedialog;
end;
+OnSetq:
+ if (.@atcmd_numparameters < 2) {
+ dispbottom "setq called with invalid arguments (min. 2)";
+ dispbottom "GM Command syntax: @setq <quest_id> <val1> <val2> <val3>";
+ end;
+ }
+ .@q=atoi(.@atcmd_parameters$[0]);
+ switch (.@atcmd_numparameters < 2) {
+ case 4:
+ setq3 .@q, atoi(.@atcmd_parameters$[3]);
+ case 3:
+ setq2 .@q, atoi(.@atcmd_parameters$[2]);
+ case 2:
+ setq1 .@q, atoi(.@atcmd_parameters$[1]);
+ break;
+ default:
+ dispbottom "setq called with invalid arguments (max. 4)";
+ dispbottom "GM Command syntax: @setq <quest_id> <val1> <val2> <val3>";
+ break;
+ }
+ end;
+
OnInit:
bindatcmd "qdebug", "@qdebug::OnCall", 99, 99, 1;
+ bindatcmd "setq", "@qdebug::OnSetq", 99, 99, 1;
}