summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-11-01 15:12:34 -0200
committerJesusaves <cpntb1@ymail.com>2018-11-01 15:12:34 -0200
commit7d3dff968fa1bae95812a787c89d402956483102 (patch)
tree93f08f3e21ca884939f23b894aa09a0263713a82
parent14a13de605ecc04164a10e5f38222c78f2c97985 (diff)
downloadserverdata-7d3dff968fa1bae95812a787c89d402956483102.tar.gz
serverdata-7d3dff968fa1bae95812a787c89d402956483102.tar.bz2
serverdata-7d3dff968fa1bae95812a787c89d402956483102.tar.xz
serverdata-7d3dff968fa1bae95812a787c89d402956483102.zip
Dirty & Messy script
-rw-r--r--npc/023-2/mk.txt60
1 files changed, 58 insertions, 2 deletions
diff --git a/npc/023-2/mk.txt b/npc/023-2/mk.txt
index d383f5310..0fdfb0154 100644
--- a/npc/023-2/mk.txt
+++ b/npc/023-2/mk.txt
@@ -44,22 +44,78 @@ OnHour00:
// Event Handler
-OnCycle:
+L_Finish:
+ // Just being bigger is not enough. Must be over the double for the advantage draw (about 1 player for 10m)
+ if (.victory_count > (.defeat_count*2)) {
+ announce "The fight ends in draw! The Monster King did accomplish what he set, though...", bc_all|bc_npc;
+ $MANA_BINT-=1;
+ $MANA_BLVL-=1;
+ $MANA_JLVL+=1;
+ } else if (.victory_count < 100) { // 1 player for 5 minutes is enough to prevent this loss
+ announce "The Monster King, after moping the floor with the players, accomplish what he set, and left...", bc_all|bc_npc;
+ $MANA_BINT+=1;
+ $MANA_BLVL+=1;
+ $MANA_JLVL+=1;
+ } else {
+ announce "The fight ends in draw, with advantage to the Monster King...", bc_all|bc_npc;
+ $MANA_BINT+=1;
+ $MANA_BLVL-=1;
+ $MANA_JLVL+=1;
+ }
+L_Finish2:
+ killmonsterall("023-2");
+ .wcycle=0;
+ maptimer("023-2", 10, "The Monster King#NLib::OnReturn");
+ stopnpctimer;
+ end;
+
+OnTimer3000:
+ .wcycle+=3;
.@pl=getareausers("023-2", 21, 109, 31, 114);
.@pla=getmapusers("023-2");
if (.@pl <= 0 && .@pla > 0)
mapannounce "023-2", "##1WARNING: Players outside the Monster King room counts toward DEFEAT count!", 0;
.victory_count+=.@pl;
- if (.@pl <= 0)
+
+ // Processment
+ if (.@pl <= 0) {
.defeat_count+=1;
+ } else if (.wcycle % 30 == 3) {
+ areamonster "023-2", 21, 109, 31, 114, "Monster", any(AngryScorpion, BlackSlime, BlackScorpion, Wolvern, BlueSlime, SlimeBlast, CaveMaggot), .@pl;
+ } else if (.wcycle % 30 == 18) {
+ areamonster "023-2", 21, 109, 31, 114, "Monster", any(BlackSlime, BlueSlime, SlimeBlast), 1; // PS. Drop “Demure Dark Soul” ¬.¬
+ }
+ if (.wcycle >= 900) goto L_Finish;
+ initnpctimer;
+ end;
+
+OnVictory:
+ announce "Players have defeated the Monster King! He fleed from the cave after leaving a decoy!", bc_all|bc_npc;
+ $MANA_BINT-=10;
+ $MANA_BLVL-=10;
+ $MANA_JLVL-=5;
+ goto L_Finish2;
end;
OnBegin:
.defeat_count=0;
.victory_count=0;
+ .wcycle=0;
announce "The fight against the Monster King ends in 15 minutes. If he is forced to flee, that'll result as victory.", bc_all|bc_npc;
announce "Each cycle there are players fighting against him will result in victory points. The opposite will result in defeat points.", bc_all|bc_npc;
announce "More players fighting will result in more victory points. This may affect drastically the result.", bc_all|bc_npc;
+ movenpc(.name$, 0, 0);
+ monster("023-2", 24, 111, "The Monster King", MonsterKing, 1, "The Monster King#NLib::OnVictory");
+ monster("023-2", 30, 109, "Andrei Sakar", AndreiSakar, 1);
+ areamonster "023-2", 21, 109, 31, 114, "Monster", AngryScorpion, 1;
+ areamonster "023-2", 21, 109, 31, 114, "Monster", BlackSlime, 2;
+ areamonster "023-2", 21, 109, 31, 114, "Monster", BlueSlime, 1;
+ areamonster "023-2", 21, 109, 31, 114, "Monster", CaveMaggot, 1;
+ initnpctimer;
+ end;
+
+OnReturn:
+ warp "019-2", 43, 55;
end;
}