summaryrefslogtreecommitdiff
path: root/world/map/npc/009-7/eventHandler.txt
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2014-10-29 13:46:02 -0400
committermekolat <mekolat@gmail.com>2014-10-30 14:21:17 -0400
commit7486b2b9f4447b7b5b7f5d8c5ec13b867a2978c7 (patch)
tree4bc2f2005ebcd63c8904401f92c871e2101db2c7 /world/map/npc/009-7/eventHandler.txt
parenta3cb94d85559f5c90115599fa0fdcd2455210c4a (diff)
downloadserverdata-7486b2b9f4447b7b5b7f5d8c5ec13b867a2978c7.tar.gz
serverdata-7486b2b9f4447b7b5b7f5d8c5ec13b867a2978c7.tar.bz2
serverdata-7486b2b9f4447b7b5b7f5d8c5ec13b867a2978c7.tar.xz
serverdata-7486b2b9f4447b7b5b7f5d8c5ec13b867a2978c7.zip
double the indentation
Diffstat (limited to 'world/map/npc/009-7/eventHandler.txt')
-rw-r--r--world/map/npc/009-7/eventHandler.txt188
1 files changed, 94 insertions, 94 deletions
diff --git a/world/map/npc/009-7/eventHandler.txt b/world/map/npc/009-7/eventHandler.txt
index 662b222a..6e560f35 100644
--- a/world/map/npc/009-7/eventHandler.txt
+++ b/world/map/npc/009-7/eventHandler.txt
@@ -2,157 +2,157 @@
009-7.gat,45,33,0|script|#trapdoor2#FightClub|327,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;
+ 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.gat",34,22; // this warp is a special thanks for contributors
- end;
+ warp "009-7.gat",34,22; // this warp is a special thanks for contributors
+ end;
}
009-7.gat,33,21,0|script|#trapdoor3#FightClub|327,0,0,
{
- warp "009-7.gat",44,32;
- end;
+ warp "009-7.gat",44,32;
+ end;
}
009-7.gat,22,38,0|script|#FightClub#utils|127,
{
- end;
+ 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;
+ 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;
+ callfunc "fightclub_StartBattle";
+ end;
OnDelayedNextBattle:
- callfunc "fightclub_NextBattleProceed";
- end;
+ callfunc "fightclub_NextBattleProceed";
+ end;
OnBecomeKiller:
- callfunc "fightclub_enter_killer";
- end;
+ callfunc "fightclub_enter_killer";
+ end;
OnCommandIntrusion:
- areatimer "009-7.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2, 0, "#FightClub#utils::OnIntrusion"; // we can not do this directly on #handler because it already have a timer
- end;
+ areatimer "009-7.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2, 0, "#FightClub#utils::OnIntrusion"; // we can not do this directly on #handler because it already have a timer
+ end;
}
009-7.gat,20,45,0|script|#FightClub#TimeLimit|127,0,0,
{
- end;
+ end;
OnStartTimer:
- set $@Duel_TotalTime, 0;
- goto L_StartTimer;
+ set $@Duel_TotalTime, 0;
+ goto L_StartTimer;
OnStopTimer:
- stopnpctimer;
- end;
+ stopnpctimer;
+ end;
OnTimer1000:
- set $@Duel_TotalTime, ($@Duel_TotalTime + 1);
- if($@Duel_TotalTime >= $@Duel_TimeLimit) goto L_TimeOut;
- goto L_StartTimer;
+ set $@Duel_TotalTime, ($@Duel_TotalTime + 1);
+ if($@Duel_TotalTime >= $@Duel_TimeLimit) goto L_TimeOut;
+ goto L_StartTimer;
L_TimeOut:
- stopnpctimer;
- callfunc "fightclub_TimeOut";
- end;
+ stopnpctimer;
+ callfunc "fightclub_TimeOut";
+ end;
L_StartTimer:
- setnpctimer 0;
- initnpctimer;
- end;
+ setnpctimer 0;
+ initnpctimer;
+ end;
OnInit:
- set $@Duel_TotalTime, 0;
- end;
+ set $@Duel_TotalTime, 0;
+ end;
}
009-7.gat,20,44,0|script|#FightClub#handler|127,0,0,
{
- end;
+ end;
OnInit:
- // this event is called when the map server boots up
- set $@fightclub_x1, 27;
- set $@fightclub_y1, 42;
- set $@fightclub_x2, 38;
- set $@fightclub_y2, 48;
- callfunc "fightclub_StartUp";
- if(($fightclub_enabled % 5) != 3) end;
- callfunc "fightclub_CleanStage";
- goto L_StartTimer;
+ // this event is called when the map server boots up
+ set $@fightclub_x1, 27;
+ set $@fightclub_y1, 42;
+ set $@fightclub_x2, 38;
+ set $@fightclub_y2, 48;
+ callfunc "fightclub_StartUp";
+ if(($fightclub_enabled % 5) != 3) end;
+ callfunc "fightclub_CleanStage";
+ goto L_StartTimer;
L_StartTimer:
- setnpctimer 0;
- initnpctimer;
- end;
+ setnpctimer 0;
+ initnpctimer;
+ end;
OnTimer2000:
- // this events checks who is on stage every 2 seconds
- set $@areausers, getareausers("009-7.gat", $@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_StartTimer; // no intrusion and no duel ongoing so loop again
- if (attachrid($@Duel_BluePlayer) == 0) goto L_BlueMissing;
- if (isin("009-7.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_BlueMissing;
- if (isdead() == 1) goto L_IAmACorpse;
- if (attachrid($@Duel_RedPlayer) == 0) goto L_RedMissing;
- if (isin("009-7.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_RedMissing;
- if (isdead() == 1) goto L_IAmACorpse;
- detachrid;
- goto L_StartTimer;
+ // this events checks who is on stage every 2 seconds
+ set $@areausers, getareausers("009-7.gat", $@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_StartTimer; // no intrusion and no duel ongoing so loop again
+ if (attachrid($@Duel_BluePlayer) == 0) goto L_BlueMissing;
+ if (isin("009-7.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_BlueMissing;
+ if (isdead() == 1) goto L_IAmACorpse;
+ if (attachrid($@Duel_RedPlayer) == 0) goto L_RedMissing;
+ if (isin("009-7.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_RedMissing;
+ if (isdead() == 1) goto L_IAmACorpse;
+ detachrid;
+ goto L_StartTimer;
L_IAmACorpse:
- set $@duel_loser, getcharid(3);
- callfunc "fightclub_death";
- goto L_StartTimer;
+ set $@duel_loser, getcharid(3);
+ callfunc "fightclub_death";
+ goto L_StartTimer;
L_RedMissing:
- set $@Duel_Missing, 1;
- callfunc "fightclub_Missing";
- goto L_StartTimer;
+ set $@Duel_Missing, 1;
+ callfunc "fightclub_Missing";
+ goto L_StartTimer;
L_BlueMissing:
- set $@Duel_Missing, 2;
- callfunc "fightclub_Missing";
- goto L_StartTimer;
+ set $@Duel_Missing, 2;
+ callfunc "fightclub_Missing";
+ goto L_StartTimer;
L_Intrusion:
- cmdothernpc "#FightClub#utils", "Intrusion"; // we can not attach a second timer to this npc so we use another one
- callfunc "fightclub_Intrusion";
- goto L_StartTimer;
+ cmdothernpc "#FightClub#utils", "Intrusion"; // we can not attach a second timer to this npc so we use another one
+ callfunc "fightclub_Intrusion";
+ goto L_StartTimer;
OnPCKilledEvent: // fired with the RID of the victim
- set @killer, 0;
- if(@Duel_Fighter != 1) end;
- if(getmap() != "009-7") end;
- set $@duel_loser, getcharid(3); // grab the rid of the victim
- set $@duel_winner, @killerrid; // grab the rid of the killer
- set @killerrid, 0; // reset killerid
- callfunc "fightclub_death";
- end;
+ set @killer, 0;
+ if(@Duel_Fighter != 1) end;
+ if(getmap() != "009-7") end;
+ set $@duel_loser, getcharid(3); // grab the rid of the victim
+ set $@duel_winner, @killerrid; // grab the rid of the killer
+ set @killerrid, 0; // reset killerid
+ callfunc "fightclub_death";
+ end;
OnPCDieEvent: // fired with the RID of the victim
- callfunc "fightclub_GoBack"; // TODO: we need a unified death handler
- set @killer, 0;
- if(@Duel_Fighter != 1) end;
- if (($@Duel_CurrentDuel < 1) || ($@Duel_Started != 1)) goto L_Reset;
- if(getmap() != "009-7") end;
- set @killerrid, 0; // since the player was not murdered, the killerrid is 0
- set $@duel_loser, getcharid(3); // grab the rid of the victim
- callfunc "fightclub_death";
- end;
+ callfunc "fightclub_GoBack"; // TODO: we need a unified death handler
+ set @killer, 0;
+ if(@Duel_Fighter != 1) end;
+ if (($@Duel_CurrentDuel < 1) || ($@Duel_Started != 1)) goto L_Reset;
+ if(getmap() != "009-7") end;
+ set @killerrid, 0; // since the player was not murdered, the killerrid is 0
+ set $@duel_loser, getcharid(3); // grab the rid of the victim
+ callfunc "fightclub_death";
+ end;
L_Reset: // the player has duel_fighter but no duel is ongoing (happens if the player quit before fightclub_exit can be called)
- if(debug) donpcevent "Debug#Duels::OnVictimInDuelNoDuel";
- callfunc "fightclub_DestroyMe"; // here we attempt to resume the interrupted procedure
- end;
+ if(debug) donpcevent "Debug#Duels::OnVictimInDuelNoDuel";
+ callfunc "fightclub_DestroyMe"; // here we attempt to resume the interrupted procedure
+ end;
}