From 14a13de605ecc04164a10e5f38222c78f2c97985 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 1 Nov 2018 14:50:01 -0200 Subject: Prepare the fight --- npc/023-2/mk.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'npc/023-2/mk.txt') diff --git a/npc/023-2/mk.txt b/npc/023-2/mk.txt index b88e67633..d383f5310 100644 --- a/npc/023-2/mk.txt +++ b/npc/023-2/mk.txt @@ -41,6 +41,26 @@ OnHour00: } end; + +// Event Handler + +OnCycle: + .@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) + .defeat_count+=1; + end; + +OnBegin: + .defeat_count=0; + .victory_count=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; + end; } @@ -132,4 +152,3 @@ OnTouch: } -// Event -- cgit v1.2.3-60-g2f50