diff --git a/zone/command.cpp b/zone/command.cpp index 123d3889b..bf3c95dee 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -438,6 +438,7 @@ int command_init(void) command_add("wp", "[add/delete] [grid_num] [pause] [wp_num] [-h] - Add/delete a waypoint to/from a wandering grid", 170, command_wp) || command_add("wpadd", "[pause] [-h] - Add your current location as a waypoint to your NPC target's AI path", 170, command_wpadd) || command_add("wpinfo", "- Show waypoint info about your NPC target", 170, command_wpinfo) || + command_add("ww", "Casts the provided spell ID to all players currently online. Use caution with this!", 250, command_ww) || command_add("xtargets", "Show your targets Extended Targets and optionally set how many xtargets they can have.", 250, command_xtargets) || command_add("zclip", "[min] [max] - modifies and resends zhdr packet", 80, command_zclip) || command_add("zcolor", "[red] [green] [blue] - Change sky color", 80, command_zcolor) || @@ -737,6 +738,16 @@ void command_logcommand(Client *c, const char *message) /* * commands go below here */ +void command_ww(Client *c, const Seperator *sep) +{ + if (sep->arg[1][0] && Seperator::IsNumber(sep->arg[1])) { + int spell_id = atoi(sep->arg[1]); + quest_manager.WorldWideCastSpell(spell_id, 0, 0); + worldserver.SendEmoteMessage(0, 0, 15, fmt::format(" A GM has cast {} world-wide!", GetSpellName(spell_id)).c_str()); + } + else + c->Message(Chat::Yellow, "Usage: #ww "); +} void command_setstat(Client* c, const Seperator* sep){ if(sep->arg[1][0] && sep->arg[2][0] && c->GetTarget()!=0 && c->GetTarget()->IsClient()){ c->GetTarget()->CastToClient()->SetStats(atoi(sep->arg[1]),atoi(sep->arg[2])); diff --git a/zone/command.h b/zone/command.h index a6f967d78..b42f1446d 100644 --- a/zone/command.h +++ b/zone/command.h @@ -344,6 +344,7 @@ void command_worldshutdown(Client *c, const Seperator *sep); void command_wp(Client *c, const Seperator *sep); void command_wpadd(Client *c, const Seperator *sep); void command_wpinfo(Client *c, const Seperator *sep); +void command_ww(Client *c, const Seperator *sep); void command_xtargets(Client *c, const Seperator *sep); void command_zclip(Client *c, const Seperator *sep); void command_zcolor(Client *c, const Seperator *sep);