summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/mkbot.txt24
-rw-r--r--npc/functions/mobpoint.txt1
2 files changed, 19 insertions, 6 deletions
diff --git a/npc/functions/mkbot.txt b/npc/functions/mkbot.txt
index 415334875..1b0d2b0cb 100644
--- a/npc/functions/mkbot.txt
+++ b/npc/functions/mkbot.txt
@@ -161,8 +161,8 @@ OnTimer90000:
end;
}
- // Siege events (req. 300 aggro, 3 users, and 70% chances to begin)
- if ($@MK_AGGRO >= ($GAME_STORYLINE == 2 ? 300 : 900) && .users >= 3 && rand2(0,100) < 70 &&
+ // Siege events (req. 700 aggro, 3 users, and 75% chances to begin)
+ if ($@MK_AGGRO >= ($GAME_STORYLINE == 2 ? 700 : 2100) && .users >= 3 && rand2(0,100) < 75 &&
is_between(1, 4, $GAME_STORYLINE) && $@MK_THROTTLE < gettimetick(2)){
// Delta handles the compulsory wait time between waves.
// 7 hours normally, 24 hours if the army is in disarray.
@@ -201,8 +201,8 @@ OnTimer90000:
}
// If a player is nearby while the Monster King prepares, event may happen
- // Minimum 60 Aggro
- if (.nearby > 1 && $@MK_AGGRO >= 80 &&
+ // Minimum 90 Aggro
+ if (.nearby > 1 && $@MK_AGGRO >= 90 &&
($GAME_STORYLINE == 1 || ($GAME_STORYLINE >= 3 && $@MK_THROTTLE >= gettimetick(2)) )){
// We should decide event kind, but that's NYI
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
@@ -210,8 +210,9 @@ OnTimer90000:
getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, $@MK);
// Spawn stuff
- areamonster(.@m$, .@x-20, .@y-20, .@x+20, .@y+20, "Monster", ManaGhost, ($@MK_AGGRO/10)+.nearby, "Monster King::OnSlaveDie");
- $@MK_AGGRO=($@MK_AGGRO*$GAME_STORYLINE)/5;
+ areamonster(.@m$, .@x-20, .@y-20, .@x+20, .@y+20, "Monster", ManaGhost, ($@MK_AGGRO/20)+.nearby, "Monster King::OnSlaveDie");
+ //$@MK_AGGRO=($@MK_AGGRO*$GAME_STORYLINE)/5;
+ $@MK_AGGRO-=80; // Reduce aggro, but do not deplete it
}
// Maybe, just maybe, game storyline must be updated here
@@ -251,3 +252,14 @@ OnTimer90000:
end;
}
+// MKAggro(mobID) → Monster King aggro
+function script MKAggro {
+ // Every 30 levels gives +1 to monster king aggro
+ // Monsters below level 30 do not generate aggro
+ .@aggro=getarg(0, killedrid);
+ .@moblv=strmobinfo(3,.@aggro);
+ .@aggro=min(5, .@moblv / 30);
+ $@MK_AGGRO += .@aggro;
+ return;
+}
+
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index e09121fc3..1d030c3a7 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -82,6 +82,7 @@ OnNPCKillEvent:
callfunc "CraftmasterDay";
callfunc "CadisQuestCheck";
callfunc "GeminiKill";
+ callfunc "MKAggro";
// Unset killedrid. This affects multiple calls of this function
// But it is in overall more reliable imao