summaryrefslogtreecommitdiff
path: root/npc/functions/mkbot.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/mkbot.txt')
-rw-r--r--npc/functions/mkbot.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/npc/functions/mkbot.txt b/npc/functions/mkbot.txt
index 1b0d2b0cb..1ea3f2ba8 100644
--- a/npc/functions/mkbot.txt
+++ b/npc/functions/mkbot.txt
@@ -259,7 +259,19 @@ function script MKAggro {
.@aggro=getarg(0, killedrid);
.@moblv=strmobinfo(3,.@aggro);
.@aggro=min(5, .@moblv / 30);
+
+ // Cycles of 30 seconds
+ if (@mkaggra+30 > gettimetick(2)) {
+ .@aggro -= @mkaggrb;
+ if (.@aggro <= 0)
+ return;
+ } else {
+ @mkaggrb=0;
+ }
+ // Increase monster king aggro and update ticks
$@MK_AGGRO += .@aggro;
+ @mkaggra=gettimetick(2);
+ @mkaggrb=.@aggro + @mkaggrb;
return;
}