diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:36:00 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:36:00 -0300 |
commit | 6967b9e0b63d19141d4f59b7933a960ac81916d0 (patch) | |
tree | 8ecd9cd2461f3598cb7faece71eb77162aa4ef2a /npc/009-7/eventHandler.txt | |
parent | 9877fd4ad81120af8e63e96d5d429092014dc017 (diff) | |
parent | 046c659193e1ca8bd13478678d1277df8bf9395c (diff) | |
download | serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.gz serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.bz2 serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.tar.xz serverdata-6967b9e0b63d19141d4f59b7933a960ac81916d0.zip |
Merge branch 'master' into legacy
Override all files with 'master' version.
This version is meant to preserve git history as requested by bjorn.
Diffstat (limited to 'npc/009-7/eventHandler.txt')
-rw-r--r-- | npc/009-7/eventHandler.txt | 88 |
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; +} |