summaryrefslogtreecommitdiff
path: root/npc/functions/gmbot.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/gmbot.txt')
-rw-r--r--npc/functions/gmbot.txt26
1 files changed, 16 insertions, 10 deletions
diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt
index 072f64fe4..778796ce2 100644
--- a/npc/functions/gmbot.txt
+++ b/npc/functions/gmbot.txt
@@ -14,12 +14,17 @@ OnBourneAgain:
getexp BaseLevel**3, 0;
Mobpt = Mobpt + 165;
// We need to start over
+ .bar=true;
OnInit:
$@MK=monster("boss", 45, 45, "The Monster King", MonsterKing, 1, "Monster King::OnBourneAgain");
- // Variables which other NPCs must take in account
- $@MK_AGGRO=0;
- $@MK_SCENE=0;
+ if (!.bar) {
+ // Variables which other NPCs must take in account
+ $@MK_AGGRO=0;
+ $@MK_SCENE=0;
+ } else {
+ .bar=false;
+ }
// Variables only for this NPC
.users=getusers(1);
@@ -29,8 +34,8 @@ OnInit:
.cid="150002";
// Constants
- // We should jump straight to loop (it runs every 62 seconds)
-OnTimer62000:
+ // We should jump straight to loop (it runs every 90 seconds)
+OnTimer90000:
// Regenerate some data, and kill spurious mobs
.users=getusers(1);
if (mobcount(.mp$, "Monster King::OnSlaveDie")) {
@@ -51,8 +56,8 @@ OnTimer62000:
initnpctimer;
}
- // Raise aggro
- $@MK_AGGRO+=.users;
+ // Raise aggro (1 pt per 2 users)
+ $@MK_AGGRO+=(.users/2);
// Mana Stone
if (.mp$ == "011-1")
@@ -97,8 +102,8 @@ OnTimer62000:
end;
}
- // Siege events
- if ($@MK_AGGRO >= 30 && rand(0,100) < 70) {
+ // Siege events (req. 40 aggro, and 70% chances to begin)
+ if ($@MK_AGGRO >= 40 && rand(0,100) < 70) {
// Tulimshar
if (.mp$ ~= "003-*") {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
@@ -112,7 +117,8 @@ OnTimer62000:
donpcevent("#HurnscaldSiege::OnMKSiege");
}
}
- // Decide if we should have an event here
+
+ // If a player is nearby, MK might randomly make an event for said player
if (.nearby > 1 && $@MK_AGGRO >= rand(0,100)){
// We should decide event kind, but that's NYI
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;