diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-08 14:36:57 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-08 14:36:57 -0300 |
commit | ea3ee9e0dc8e2e7bf639d5c095ff7ce5255902d2 (patch) | |
tree | a045b41049660722b033dbe6bae8a174309bcea6 /npc | |
parent | 78e75ded4c111b93daa7769046fbeff09cae499f (diff) | |
download | serverdata-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.txt | 26 |
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; } |