From 921f100af87307c830d2736f801c6b7ed29aa4ad Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 1 Jun 2018 17:19:21 -0300 Subject: Introducing @k, which will broadcast to #world too --- npc/commands/kami.txt | 26 ++++++++++++++++++++++++++ npc/commands/music.txt | 6 ++---- npc/commands/wgm.txt | 15 ++++----------- npc/scripts.conf | 1 + 4 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 npc/commands/kami.txt diff --git a/npc/commands/kami.txt b/npc/commands/kami.txt new file mode 100644 index 000000000..4204ae5fe --- /dev/null +++ b/npc/commands/kami.txt @@ -0,0 +1,26 @@ +// TMW2 Script +// +// @k atcommand +// Broadcast, and broadcast to #world too +// +// group lv: 0 +// group char lv: 0 +// log: True +// +// usage: +// @wgm Help +// + +- script @k 32767,{ + end; + +OnCall: + .@request$ = strcharinfo(0)+": "+.@atcmd_parameters$[0]; + channelmes("#world", .@request$); + announce l(.@request$), bc_all|bc_npc; + end; + + +OnInit: + bindatcmd "k", "@k::OnCall", 80, 80, 1; +} diff --git a/npc/commands/music.txt b/npc/commands/music.txt index 82b7fc139..3a964083b 100644 --- a/npc/commands/music.txt +++ b/npc/commands/music.txt @@ -15,8 +15,7 @@ end; OnCall: - if (!is_gm()) - { + if (!is_gm()) { end; } @@ -26,8 +25,7 @@ OnCall: .@key$ = .@atcmd_parameters$[0]; .@m$ = htget(.hash, .@key$, "Not found"); - if (.@m$ == "Not found") - { + if (.@m$ == "Not found") { //.@m$ = implode(.@atcmd_parameters$[0], " "); dispbottom "Invalid music key. Current accepted values are:"; dispbottom "ship, city, ghoul, surreal, magic, forest, mythica, acid, misuse, prelude, sunrise, peace, toast"; diff --git a/npc/commands/wgm.txt b/npc/commands/wgm.txt index f356305f4..e48d0ed1b 100644 --- a/npc/commands/wgm.txt +++ b/npc/commands/wgm.txt @@ -13,18 +13,11 @@ end; OnCall: - .@request$ = strtoupper(strip(.@atcmd_parameters$[0])); // sanitize - .@map$ = ""; - .@x = 0; - .@y = 0; - - if (.@map$ == "") - { - .@map$ = .@atcmd_parameters$[0]; - } - - atcommand("@request "+.@map$); + .@request$ = .@atcmd_parameters$[0]; + atcommand("@request "+.@request$); + end; OnInit: bindatcmd "wgm", "@wgm::OnCall", 0, 0, 1; + end; } diff --git a/npc/scripts.conf b/npc/scripts.conf index aeaf614d7..330fd4f18 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -61,6 +61,7 @@ "npc/commands/debug-preset.txt", "npc/commands/debug.txt", "npc/commands/event.txt", +"npc/commands/kami.txt", "npc/commands/motd-debug-text.txt", "npc/commands/motd.txt", "npc/commands/rate-management.txt", -- cgit v1.2.3-60-g2f50