diff options
Diffstat (limited to 'npc/commands/debug-quest.txt')
-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; } |