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/003-3/malindou.txt | 1 + npc/019-2/guards.txt | 1 + npc/023-2/mk.txt | 21 ++++++++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index f6cff15c9..9acbba5ae 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -136,6 +136,7 @@ OnInit: $NLIB_HIGHNAME$=""; addmapmask "019-3", MASK_MATTACK; setmapflagnosave("019-3", "000-1", 22, 22); + setmapflagnosave("020-1", "000-1", 22, 22); setmapflag("019-3",mf_bexp,25); setmapflag("020-1",mf_bexp,150); $UPDATE=1539721040; diff --git a/npc/019-2/guards.txt b/npc/019-2/guards.txt index 21fa1b771..af1a162bc 100644 --- a/npc/019-2/guards.txt +++ b/npc/019-2/guards.txt @@ -36,6 +36,7 @@ $NLIB_HIGHTIME=0; $NLIB_HIGHNAME$=""; setmapflagnosave("019-3", "000-1", 22, 22); + setmapflagnosave("020-1", "000-1", 22, 22); setmapflag("019-3",mf_bexp,25); setmapflag("020-1",mf_bexp,150); channelmes("#world", "Nivalis Liberation Day has started."); 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