diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-06-03 22:15:24 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-06-03 22:15:24 -0300 |
commit | fec09a8fb32391d36e78e18c458d7471f314c7b1 (patch) | |
tree | 788588d4a33268467ec48c3d6e0d81aa223ac0b1 /npc | |
parent | b5aec4d711b30c0efd1181ea2ebb82c72515701e (diff) | |
download | serverdata-fec09a8fb32391d36e78e18c458d7471f314c7b1.tar.gz serverdata-fec09a8fb32391d36e78e18c458d7471f314c7b1.tar.bz2 serverdata-fec09a8fb32391d36e78e18c458d7471f314c7b1.tar.xz serverdata-fec09a8fb32391d36e78e18c458d7471f314c7b1.zip |
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.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/mkbot.txt | 24 | ||||
-rw-r--r-- | npc/functions/mobpoint.txt | 1 |
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 |