diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-12-11 20:11:35 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-12-11 20:11:35 -0300 |
commit | 1f512de5ac072ab84e289ed0d977795aa18d0565 (patch) | |
tree | 56b0fdf9923efd33110f979864406bef2165c1b6 /npc | |
parent | 4cd390c6b42c78e45d0ae325eabc37a50fe2c0bb (diff) | |
download | serverdata-1f512de5ac072ab84e289ed0d977795aa18d0565.tar.gz serverdata-1f512de5ac072ab84e289ed0d977795aa18d0565.tar.bz2 serverdata-1f512de5ac072ab84e289ed0d977795aa18d0565.tar.xz serverdata-1f512de5ac072ab84e289ed0d977795aa18d0565.zip |
Add a command to nuke the instances if a restart is required
Diffstat (limited to 'npc')
-rw-r--r-- | npc/annuals/xmas/2021.txt | 2 | ||||
-rw-r--r-- | npc/commands/kami.txt | 11 |
2 files changed, 12 insertions, 1 deletions
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; } |