on *:TEXT:!set *:#: {
if (($nick isop $chan) || ($nick ishop $chan)) {
if ($2 == event) {
set %world $3
set %team1 $4
set %team2 $5
set %team3 $6
set %wait $calc($7 * 60)
notice $nick Event set to start in %wait seconds. World to be played in will be %world $+ . The first team will be %team1 $+ , the second team will be %team2 $+ , and the third team will be %team3 $+ .
msg $chan 9UBG Castle Wars event!14WORLD:6 %world $+ 1. 14TEAM:6 %team1 $+ 1. Game starts in $calc(%wait / 60) minutes.
.timerUBGAD 0 60 msg $chan 9UBG Castle Wars event!14WORLD:6 %world $+ 1. 14TEAM:6 %team1 $+ 1. Game starts in $calc(%wait / 60) minutes.
set %UBGcnt 1
.timer 1 %wait StartGame
}
elseif ($2 == link1) {
set %link1 $3
}
elseif ($2 == link2) {
set %link2 $3
}
elseif ($2 == link3) {
set %link3 $3
}
}
}
alias StartGame {
.timerUBGAD Off
set %wait 1200
msg $chan 9UBG Castle Wars event started in 14World6 %world $+ , 14Team6 $($+(%,team,%UBGcnt),2) $+ . It's time to pwn!
:game1
.timerUBGTimeLeft $calc(%wait / 60) 60 msg $chan 9UBG Castle Wars event!14WORLD:6 %world $+ 1. 14TEAM:6 $($+(%,team,%UBGcnt),2) $+ 1. Time left: $calc(%wait / 60) minutes.
.timerUBGInter 1 %wait GameInter
}
alias GameInter {
if (%UBGcnt == 3) { GameEnd | return }
msg $chan 9UBG castle wars event intermission (5 minutes)! 14World6 %world $+ , 14Team6 $($+(%,team,%UBGcnt),2) $+ 1. Prepare yourself.
inc %UBGcnt
.timerUBGInter 1 300 StartGame
}
alias GameEnd {
msg $chan Good games UBG, can't wait for the next one :D
unset %world, %team1, %team2, %team3, %wait, %UBG*
}