From 1f512de5ac072ab84e289ed0d977795aa18d0565 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 11 Dec 2021 20:11:35 -0300 Subject: Add a command to nuke the instances if a restart is required --- npc/annuals/xmas/2021.txt | 2 +- npc/commands/kami.txt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index 0df9c01e..a21b31c5 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -165,7 +165,7 @@ function script X21INIT { instance_attachmap("080-3", .@inst, false, .@mapc$); instance_attachmap("080-1", .@inst, false, .@mapd$); - instance_set_timeout(1800, 1800, .@inst); + instance_set_timeout(getarg(0, 1800), getarg(0, 1800), .@inst); instance_init(.@inst); /* Create locks */ diff --git a/npc/commands/kami.txt b/npc/commands/kami.txt index 1211fae0..1571ca1a 100644 --- a/npc/commands/kami.txt +++ b/npc/commands/kami.txt @@ -26,6 +26,16 @@ OnServMsg: } end; +OnInstNuke: + // This can be slow, beware + .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC); + for (.@i = 0; .@i < .@c; .@i++) { + attachrid(.@players[.@i],); + X21INIT(5); + detachrid(); + } + end; + OnBuff: // Disabled command, used for debug purposes .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC); @@ -62,6 +72,7 @@ OnInit: bindatcmd "blessing", "@k::OnBuff", 99, 100, 1; bindatcmd "instcheck", "@k::OnInstCheck", 99, 100, 1; bindatcmd "instdestr", "@k::OnInstDestroy", 99, 100, 1; + bindatcmd "instnuke", "@k::OnInstNuke", 99, 100, 1; end; } -- cgit v1.2.3-60-g2f50