summaryrefslogtreecommitdiff
path: root/world/map/npc/009-7/eventHandler.txt
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2014-11-04 13:01:07 -0500
committermekolat <mekolat@gmail.com>2014-11-12 14:02:47 -0500
commit64a4adaa06f1059c4ac705199d5a0716c8edef60 (patch)
tree32d1f05c6e846aa791f82d1773f2972f71ad166e /world/map/npc/009-7/eventHandler.txt
parent0ca075ae66c4e6a983e1f25f6e63a39ee12a568e (diff)
downloadserverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.tar.gz
serverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.tar.bz2
serverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.tar.xz
serverdata-64a4adaa06f1059c4ac705199d5a0716c8edef60.zip
fix fight club => v0.4
disallow towel inside ring kill on exit replace killer var with duel_killer remove nosave trigger restart on enable/disable remove accept/decline notification fix ring x2 and y2 forbid betsanc and asorm fix password var in debug allow random passwords handle all effects do not accept if not present fix rules check map too warp randomly on death fallthrough if no acceptable requests use bitmasking instead of modulo remove resave simplify goback do not re-declare randompassword password minigame
Diffstat (limited to 'world/map/npc/009-7/eventHandler.txt')
-rw-r--r--world/map/npc/009-7/eventHandler.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/world/map/npc/009-7/eventHandler.txt b/world/map/npc/009-7/eventHandler.txt
index dcaae899..fa809fd2 100644
--- a/world/map/npc/009-7/eventHandler.txt
+++ b/world/map/npc/009-7/eventHandler.txt
@@ -1,6 +1,6 @@
// this file handles every events related to the fight club and calls the appropriate functions from core
-009-7.gat,45,33,0|script|#trapdoor2#FightClub|327,0,0
+009-7.gat,45,33,0|script|#trapdoor2FightClub|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;
@@ -9,13 +9,13 @@ L_Enter:
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
+009-7.gat,33,21,0|script|#trapdoor3FightClub|327,0,0
{
warp "009-7.gat",44,32;
end;
}
-009-7.gat,22,38,0|script|#FightClub#utils|127
+009-7.gat,22,38,0|script|#FightClubUtils|127
{
end;
@@ -40,11 +40,11 @@ OnBecomeKiller:
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
+ areatimer "009-7.gat", $@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.gat,20,45,0|script|#FightClub#TimeLimit|127,0,0
+009-7.gat,20,45,0|script|#FightClubTimeLimit|127,0,0
{
end;
@@ -76,7 +76,7 @@ OnInit:
end;
}
-009-7.gat,20,44,0|script|#FightClub#handler|127,0,0
+009-7.gat,20,44,0|script|#FightClubHandler|127,0,0
{
end;
@@ -87,7 +87,7 @@ OnInit:
set $@fightclub_x2, 38;
set $@fightclub_y2, 48;
callfunc "fightclub_StartUp";
- if(($fightclub_enabled % 5) != 3) end;
+ if($SANGUINE & $@SV_FCDBit != 0) end;
callfunc "fightclub_CleanStage";
goto L_StartTimer;
@@ -100,7 +100,8 @@ 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 (($@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.gat", $@fightclub_x1, $@fightclub_y1, $@fightclub_x2, $@fightclub_y2) == 0) goto L_BlueMissing;
if (isdead() == 1) goto L_IAmACorpse;
@@ -110,6 +111,10 @@ OnTimer2000:
detachrid;
goto L_StartTimer;
+L_Request:
+ callfunc "fightclub_NextBattle";
+ goto L_StartTimer;
+
L_IAmACorpse:
set $@duel_loser, getcharid(3);
callfunc "fightclub_death";
@@ -126,7 +131,7 @@ L_BlueMissing:
goto L_StartTimer;
L_Intrusion:
- cmdothernpc "#FightClub#utils", "Intrusion"; // we can not attach a second timer to this npc so we use another one
+ cmdothernpc "#FightClubUtils", "Intrusion"; // we can not attach a second timer to this npc so we use another one
callfunc "fightclub_Intrusion";
goto L_StartTimer;
}