summaryrefslogtreecommitdiff
path: root/npc/009-7/eventHandler.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/009-7/eventHandler.txt')
-rwxr-xr-xnpc/009-7/eventHandler.txt46
1 files changed, 1 insertions, 45 deletions
diff --git a/npc/009-7/eventHandler.txt b/npc/009-7/eventHandler.txt
index 3f2df68a..0ddf96d2 100755
--- a/npc/009-7/eventHandler.txt
+++ b/npc/009-7/eventHandler.txt
@@ -80,53 +80,9 @@ OnInit:
$@fightclub_y1 = 42;
$@fightclub_x2 = 38;
$@fightclub_y2 = 48;
- callfunc "fightclub_StartUp";
- callfunc "fightclub_CleanStage";
- goto L_StartTimer;
-
-L_StartTimer:
- if($SANGUINE & $@SV_FCDBit != 0) end;
- if(debug >= 2) end;
- setnpctimer 0;
- initnpctimer;
end;
OnTimer2000:
// this events checks who is on stage every 2 seconds
- set $@areausers, getareausers("009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2); // get the number of players on stage
- if (($@areausers > 2) || (($@Duel_CurrentDuel < 1) && ($@areausers >= 1))) goto L_Intrusion; // too many players on the stage
- if (($@Duel_CurrentDuel < 1) && ($@Duel_Started != 1)) goto L_Request; // start the next duel
- if ($@Duel_Started != 1) goto L_StartTimer; // no intrusion and no duel ongoing so loop again
- if (attachrid($@Duel_BluePlayer) == 0) goto L_BlueMissing;
- if (isin("009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_BlueMissing;
- if (ispcdead() == 1) goto L_IAmACorpse;
- if (attachrid($@Duel_RedPlayer) == 0) goto L_RedMissing;
- if (isin("009-7", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_RedMissing;
- if (ispcdead() == 1) goto L_IAmACorpse;
- detachrid;
- goto L_StartTimer;
-
-L_Request:
- callfunc "fightclub_NextBattle";
- goto L_StartTimer;
-
-L_IAmACorpse:
- $@duel_loser = getcharid(3);
- callfunc "fightclub_death";
- goto L_StartTimer;
-
-L_RedMissing:
- $@Duel_Missing = 1;
- callfunc "fightclub_Missing";
- goto L_StartTimer;
-
-L_BlueMissing:
- $@Duel_Missing = 2;
- callfunc "fightclub_Missing";
- goto L_StartTimer;
-
-L_Intrusion:
- donpcevent "#FightClubUtils::OnCommandIntrusion"; // we can not attach a second timer to this npc so we use another one
- callfunc "fightclub_Intrusion";
- goto L_StartTimer;
+ end;
}