summaryrefslogtreecommitdiff
path: root/npc/009-7/eventHandler.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/009-7/eventHandler.txt')
-rw-r--r--npc/009-7/eventHandler.txt88
1 files changed, 88 insertions, 0 deletions
diff --git a/npc/009-7/eventHandler.txt b/npc/009-7/eventHandler.txt
new file mode 100644
index 00000000..0ddf96d2
--- /dev/null
+++ b/npc/009-7/eventHandler.txt
@@ -0,0 +1,88 @@
+
+009-7,45,33,0 script #trapdoor2FightClub NPC327,0,0,{
+ if(countitem(647)||countitem(725)||countitem(1178)||countitem(5131)||countitem(5132)||countitem(5133)||countitem(5134)||countitem(5135)||countitem(5136)||countitem(5137)||countitem(5138)||countitem(5139)||countitem(5140)||(getgmlevel()>=20)) goto L_Enter;
+ end;
+
+L_Enter:
+ warp "009-7",34,22; // this warp is a special thanks for contributors
+ end;
+}
+009-7,33,21,0 script #trapdoor3FightClub NPC327,0,0,{
+ warp "009-7",44,32;
+ end;
+}
+
+009-7,22,38,0 script #FightClubUtils NPC32767,{
+ end;
+
+OnIntrusion:
+ if(getgmlevel() >= 60) end; // allow GMs to be in the ring
+ if(getcharid(3) == $@Duel_RedPlayer) end; // do not kill the red fighter
+ if(getcharid(3) == $@Duel_BluePlayer) end; // do not kill the blue fighter
+ donpcevent "Rouge#Duels::OnAnnounceIntrusion";
+ callfunc "fightclub_DestroyMe"; // only kill the intruder(s)
+ end;
+
+OnDelayedStart:
+ callfunc "fightclub_StartBattle";
+ end;
+
+OnDelayedNextBattle:
+ callfunc "fightclub_NextBattleProceed";
+ end;
+
+OnBecomeKiller:
+ callfunc "fightclub_enter_killer";
+ end;
+
+OnCommandIntrusion:
+ areatimer 0, "009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2, 0, "#FightClubUtils::OnIntrusion"; // we can not do this directly on #handler because it already have a timer
+ end;
+}
+
+009-7,20,45,0 script #FightClubTimeLimit NPC32767,0,0,{
+ end;
+
+OnStartTimer:
+ $@Duel_TotalTime = 0;
+ goto L_StartTimer;
+
+OnStopTimer:
+ stopnpctimer;
+ end;
+
+OnTimer1000:
+ $@Duel_TotalTime = ($@Duel_TotalTime + 1);
+ if($@Duel_TotalTime >= $@Duel_TimeLimit) goto L_TimeOut;
+ goto L_StartTimer;
+
+L_TimeOut:
+ stopnpctimer;
+ callfunc "fightclub_TimeOut";
+ end;
+
+L_StartTimer:
+ setnpctimer 0;
+ initnpctimer;
+ end;
+
+OnInit:
+ $@Duel_TotalTime = 0;
+ end;
+}
+
+009-7,20,44,0 script #FightClubHandler NPC32767,0,0,{
+ end;
+
+OnInit:
+ // this event is called when the map server boots up
+ $@fightclub_x1 = 27;
+ $@fightclub_y1 = 42;
+ $@fightclub_x2 = 38;
+ $@fightclub_y2 = 48;
+ end;
+
+OnTimer2000:
+ // this events checks who is on stage every 2 seconds
+ end;
+}