summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-05-26 16:08:29 -0300
committerJesusaves <cpntb1@ymail.com>2024-05-26 16:08:29 -0300
commitfa029e199531d125fc63b27f7559eb96574f4e3f (patch)
tree2f0af71bb53c66a8e3311a05652647f413f8e783
parentc4207915639732a0e56c1a0c36fe3c859e655939 (diff)
downloadserverdata-fa029e199531d125fc63b27f7559eb96574f4e3f.tar.gz
serverdata-fa029e199531d125fc63b27f7559eb96574f4e3f.tar.bz2
serverdata-fa029e199531d125fc63b27f7559eb96574f4e3f.tar.xz
serverdata-fa029e199531d125fc63b27f7559eb96574f4e3f.zip
Add debug command
-rw-r--r--npc/commands/kami.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/npc/commands/kami.txt b/npc/commands/kami.txt
index 4c8c6c9dc..a117768cb 100644
--- a/npc/commands/kami.txt
+++ b/npc/commands/kami.txt
@@ -78,6 +78,32 @@ OnHarm2:
harm(.@id, 500, HARM_MISC, Ele_Holy);
end;
+// Casted only via HCP::doevent::@k::OnLagDebug
+OnLagDebug:
+ consoleinfo("Checking for laggy maps, %d", gettimetick(0));
+ freeloop(true);
+ for (.@i=0;.@i<=500;.@i++) {
+ .@m$ = getmapinfo(MAPINFO_NAME, .@i);
+ if (.@m$ != "" && .@m$ != "U") {
+ .@tops[.@i] = mobcount(.@m$, "all");
+ }
+ }
+ freeloop(false);
+ consoleinfo("Done checking, %d", gettimetick(0));
+ .@t1 = array_highest(.@tops);
+ .@m$ = getmapinfo(MAPINFO_NAME, .@t1);
+ consoleinfo("#1 - %s - %s", .@m$, fnum(.@tops[.@t1]));
+ .@tops[.@t1]=-1;
+ .@t1 = array_highest(.@tops);
+ .@m$ = getmapinfo(MAPINFO_NAME, .@t1);
+ consoleinfo("#2 - %s - %s", .@m$, fnum(.@tops[.@t1]));
+ .@tops[.@t1]=-1;
+ .@t1 = array_highest(.@tops);
+ .@m$ = getmapinfo(MAPINFO_NAME, .@t1);
+ consoleinfo("#3 - %s - %s", .@m$, fnum(.@tops[.@t1]));
+ //debugmes getmapinfo(MAPINFO_ID, "032-1");
+ end;
+
OnInit:
bindatcmd "k", "@k::OnCall", 60, 80, 1;
bindatcmd "servmsg", "@k::OnServMsg", 80, 99, 1;