From 8c66e15338312154f71e094131abd651f43ef7f0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 18 Apr 2019 15:32:57 -0300 Subject: Update @wgm, I'll be needing that --- npc/commands/wgm.txt | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'npc/commands/wgm.txt') diff --git a/npc/commands/wgm.txt b/npc/commands/wgm.txt index 87d2387b1..e19f86b22 100644 --- a/npc/commands/wgm.txt +++ b/npc/commands/wgm.txt @@ -1,14 +1,16 @@ // Author: Jesusalva // @wgm atcommand -// Request help +// High wizardry, NOT for noobs // -// group lv: 0 -// group char lv: 0 +// group lv: 99 +// group char lv: 100 // log: True +// WARNING: DANGEROUS, may explode server, debug testing only. // // usage: -// @wgm Help +// @callfunc daily_login_bonus_handler +// @doevent @wgm::OnCall // - script @wgm 32767,{ @@ -20,6 +22,30 @@ OnCall: atcommand("@request "+.@request$); end; +OnCallFunc: + if (!$@GM_OVERRIDE) { + dispbottom col("SEVERE ERROR: COMMAND NOT FOUND. EXECUTING SIMILAR COMMAND...", 1); + percentheal -100, -100; + end; + } + .@request$ = strcharinfo(0)+": "; + .@request$ += implode(.@atcmd_parameters$, " "); + callfunc .@request$; + end; + +OnDoEvent: + if (!$@GM_OVERRIDE) { + dispbottom col("SEVERE ERROR: COMMAND NOT FOUND. EXECUTING SIMILAR COMMAND...", 1); + percentheal -100, -100; + end; + } + .@request$ = strcharinfo(0)+": "; + .@request$ += implode(.@atcmd_parameters$, " "); + doevent .@request$; + end; + OnInit: + bindatcmd "callfunc", "@wgm::OnCallFunc", 99, 100, 1; + bindatcmd "doevent", "@wgm::OnDoEvent", 99, 100, 1; end; } -- cgit v1.2.3-60-g2f50