From fec09a8fb32391d36e78e18c458d7471f314c7b1 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 3 Jun 2022 22:15:24 -0300 Subject: Modify Monster King Aggro rules (affect sieges). Previously, every 2 users per 90s would give 1 aggro, and sieges happen at 300. This rule was kept, but aggro is now generated by killing monsters. +1 aggro per monster level 30+ slain. Sieges happen at 700. --- npc/functions/mkbot.txt | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'npc/functions/mkbot.txt') 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; +} + -- cgit v1.2.3-60-g2f50