on $*:TEXT:/^[@.`!](tour((n)?(y|ament)?))/Si:#DM-tournaments, #DM, #DM-shop, #DM-bank: {
if ($network != TundraIRC) {
notice $nick %c1 $+ You only can do this on the great $+ %c3 TundraIRC network $+ %c1 $+ , Type $+ %c6 /server irc.TundraIRC.net $+ %c1 to get there.
halt
}
if (%dmnick. [ $+ [ $nick ] ] == 1) {
if (%dmid. [ $+ [ $nick ] ] == 1) {
if ($chan != #DM-tournaments) {
notice $nick %c1 $+ You only can do this in $+ %c2 #DM-tournaments $+ %c1 .
halt
}
if (%dm.tournament == on) {
notice $nick %c1 $+ There is already a $+ %c5 tournament $+ %c1 running, please wait.
halt
}
if (!$2 || !$3) {
if (%dm.tournament == on) {
halt
}
notice $nick %c1 $+ Please type this: $+ %c3 !tournament <people to join> <stake>
halt
}
if ($2 != 4 && $2 != 8 && $2 != 16) {
notice $nick %c1 $+ Please choose $+ %c4 4 $+ %c1 $+ , $+ %c4 8 $+ %c1 or $+ %c4 16 $+ %c1 people to join!
HALT
}
msg $chan %c2 $+ $nick $+ %c1 started a tournament. Stake: %c3 %dm.tournament.stake $+ %c1 coins. Type $+ %c3 !join-tournament $+ %c1 to join it!
set %dm.chan2 #DM-tournaments
set %dm.tournament On
set %tournament.starter $nick
set %dm.tournamentppl 1
set %dm.tournament.stake $3
set %dm.tournament.people $2
}
else {
notice $nick %c1 $+ You need to register first. Type %c5 $+ `dm-register $+ %c1 first and follow the instructions.
}
}
else {
notice $nick %c1 $+ You need to identify first! Type $+ %c3 !id(entify) yourpass $+ %c1 in my PM.
}
}
on $*:TEXT:/^[!@`.](j(oin)?(-| )?tour(n|nam(ent)?|ny)?)/Si:#DM-tournaments, #DM, #DM-shop, #DM-bank: {
if ($network != TundraIRC) {
notice $nick %c1 $+ You only can do this on the great $+ %c3 TundraIRC network $+ %c1 $+ , Type $+ %c6 /server irc.TundraIRC.net $+ %c1 to get there.
halt
}
if ($chan != #DM-tournaments) {
notice $nick %c1 $+ You only can do this in $+ %c2 #DM-tournaments $+ %c1 .
halt
}
if (%dmnick. [ $+ [ $nick ] ] == 1) {
if (%dmid. [ $+ [ $nick ] ] == 1) {
if ($nick isin %dm.tournicks) {
notice $nick %c1 $+ You're already in the tournament, please wait until it starts.
halt
}
if ($calc(%dmmoney. [ $+ [ $nick ] ] - %dm.tournament.stake) < 0) {
if (!%dmmoney. [ $+ [ $nick ] ]) .set %dmmoney. [ $+ [ $nick ] ] 0
notice $nick %c1 $+ Insufficient money. You need $+ %c3 %dm.tournament.stake $+ %c1 coins, while you have only $+ %c3 %dmmoney. [ $+ [ $nick ] ] $+ %c1 coins.
halt
}
if (%dm.tournamentwins. [ $+ [ $nick ] ] == $null) { .set %dm.tournamentwins. [ $+ [ $nick ] ] 0 }
inc %dm.tournament.prize %dm.tournament.stake
inc %dm.tournamentppl 1
set %dm.tournicks %dm.tournicks $nick
if (%dm.tournament == 1) {
Set %dm.tournament.player.1 %tournaments.starter
}
if (%dm.tournament == 2) {
Set %dm.tournament.player.2 $nick
}
if (%dm.tournament == 3) {
Set %dm.tournament.player.3 $nick
}
if (%dm.tournament == 4) {
Set %dm.tournament.player.4 $nick
}
if (%dm.tournament == 5) {
Set %dm.tournament.player.5 $nick
}
if (%dm.tournament == 6) {
Set %dm.tournament.player.6 $nick
}
if (%dm.tournament == 7) {
Set %dm.tournament.player.7 $nick
}
if (%dm.tournament == 8) {
Set %dm.tournament.player.8 $nick
}
if (%dm.tournament == 9) {
Set %dm.tournament.player.9 $nick
}
if (%dm.tournament == 10) {
Set %dm.tournament.player.10 $nick
}
if (%dm.tournament == 11) {
Set %dm.tournament.player.11 $nick
}
if (%dm.tournament == 12) {
Set %dm.tournament.player.12 $nick
}
if (%dm.tournament == 13) {
Set %dm.tournament.player.13 $nick
}
if (%dm.tournament == 14) {
Set %dm.tournament.player.14 $nick
}
if (%dm.tournament == 15) {
Set %dm.tournament.player.15 $nick
}
if (%dm.tournament == 16) {
Set %dm.tournament.player.16 $nick
}
Msg $chan %c2 $+ $nick $+ %c1 joined the tournament, we need $+ %c3 $calc(%dm.tournament.people - %dm.tournamentppl) $+ %c1 people more.
if (%dm.tournament == %dm.tournament.people) {
msg $chan %c4 $+ The tournaments are starting! $+ %c5 Have fun!
fight1
}
}
else {
notice $nick %c1 $+ You need to register first. Type %c5 $+ `dm-register $+ %c1 first and follow the instructions.
}
}
else {
notice $nick %c1 $+ You need to identify first! Type $+ %c3 !id(entify) yourpass $+ %c1 in my PM.
}
}
alias -l nextround {
if (%dm.tournament.people == 8 && %fight == 1) {
fight2
}
if (%dm.tournament.people == 8 && %fight == 2) {
fight3
}
if (%dm.tournament.people == 8 && %fight == 3) {
fight4
}
if (%dm.tournament.people == 8 && %fight == 4) {
fight5.semi
}
if (%dm.tournament.people == 8 && %fight == 5) {
fight6.semi
}
if (%dm.tournament.people == 8 && %fight == 6) {
fight7.final
}
if (%dm.tournament.people == 8 && %fight == 7) {
msg $chan %c2 $+ %dm.tournament.winner.7 $+ %c1 has won the $+ %c5 Tournament $+ %c1 $+ ! Therefor he gets %dm.tournament.prize!
inc %dm.tournament.wins. [ $+ [ %dm.tournament.winner.7 ] ]
inc %dM.money. [ $+ [ %dm.tournament.winner.7 ] ]
}
if (%dm.tournament.people == 4 && %fight == 1) {
fight2
}
if (%dm.tournament.people == 4 && %fight == 2) {
fight3.final
}
if (%dm.tournament.people == 4 && %fight == 3) {
msg $chan %c2 $+ %dm.tournament.winner.3 $+ %c1 has won the $+ %c5 Tournament $+ %c1 $+ ! Therefor he gets %dm.tournament.prize!
inc %dm.tournament.wins. [ $+ [ %dm.tournament.winner.3 ] ]
inc %dm.money. [ $+ [ %dm.tournament.winner.3 ] ]
}
if (%dm.tournament.people == 16 && %fight == 1) {
fight2
}
if (%dm.tournament.people == 16 && %fight == 2) {
fight3
}
if (%dm.tournament.people == 16 && %fight == 3) {
fight4
}
if (%dm.tournament.people == 16 && %fight == 4) {
fight5
}
if (%dm.tournament.people == 16 && %fight == 5) {
fight6
}
if (%dm.tournament.people == 16 && %fight == 6) {
fight7
}
if (%dm.tournament.people == 16 && %fight == 7) {
fight8
}
if (%dm.tournament.people == 16 && %fight == 8) {
fight9.kwart
}
if (%dm.tournament.people == 16 && %fight == 9) {
fight10.kwart
}
if (%dm.tournament.people == 16 && %fight == 10) {
fight11.kwart
}
if (%dm.tournament.people == 16 && %fight == 11) {
fight12.kwart
}
if (%dm.tournament.people == 16 && %fight == 12) {
fight13.kwart
}
if (%dm.tournament.people == 16 && %fight == 13) {
fight14.kwart
}
if (%dm.tournament.people == 16 && %fight == 14) {
fight15.final
}
if (%dm.tournament.people == 16 && %fight == 15) {
msg $chan %c2 $+ %dm.tournament.winner.3 $+ %c1 has won the $+ %c5 Tournament $+ %c1 $+ ! Therefor he gets %dm.tournament.prize!
inc %dm.tournament.wins. [ $+ [ %dm.tournament.winner.15 ] ]
inc %dM.money. [ $+ [ %dm.tournament.winner.15 ] ]
}
}
alias -l fight1 {
set %Dm.player1 %dm.tournament.player1
set %dm.player2 %dm.tournament.player2
msg $chan %c1 $+ Now fighting in the first battle of this tournament: $+ %c2 %dm.tournament.player1 $+ %c4 Vs. $+ %c2 %dm.tournament.player2 $+ %c4 $+ !
set %fight 1
}
alias -l fight2 {
set %Dm.player1 %dm.tournament.player3
set %dm.player2 %dm.tournament.player4
msg $chan %c1 $+ The 2 people that will now compeet are $+ %c2 %dm.tournament.player3 $+ %c4 and $+ %c2 %dm.tournament.player4 $+ %c4 $+ !
set %fight 2
}
alias -l fight3 {
set %Dm.player1 %dm.tournament.player5
set %dm.player2 %dm.tournament.player6
msg $chan %c1 $+ This is already the $+ %c5 third fight $+ %c1 of this tournament, $+ %c2 %dm.tournament.player5 $+ %c4 and $+ %c2 %dm.tournament.player6 $+ %c1 will compeet.
set %fight 3
}
alias -l fight4 {
set %Dm.player1 %dm.tournament.player7
set %dm.player2 %dm.tournament.player8
msg $chan %c1 $+ Now compeeting are $+ %c2 %dm.tournament.player7 $+ %c4 and $+ %c2 %dm.tournament.player8 $+ %c4 $+ !
set %fight 4
}
alias -l fight5 {
set %Dm.player1 %dm.tournament.player9
set %dm.player2 %dm.tournament.player10
msg $chan %c1 $+ The fight we're gonna see now is: $+ %c2 %dm.tournament.player9 $+ %c4 Vs. $+ %c1 %dm.tournament.player10 $+ %c4 $+ !
set %fight 5
}
alias -l fight6 {
set %Dm.player1 %dm.tournament.player11
set %dm.player2 %dm.tournament.player12
msg $chan %c1 $+ Next fight is between: $+ %c2 %dm.tournament.player11 $+ %c4 and $+ %c2 %dm.tournament.player12 $+ %c4 $+ !
set %fight 6
}
alias -l fight7 {
set %Dm.player1 %dm.tournament.player13
set %dm.player2 %dm.tournament.player14
msg $chan %c1 $+ What a fantastic fight this is gonna be! $+ %c2 %dm.tournament.player13 $+ %c4 Vs. $+ %c2 %dm.tournament.player14 $+ %c4 $+ !
set %fight 7
}
alias -l fight8 {
set %Dm.player1 %dm.tournament.player15
set %dm.player2 %dm.tournament.player16
msg $chan %c1 $+ This is the last fight until the next rounds! $+ %c2 %dm.tournament.player15 $+ %c4 Vs. $+ %c2 %dm.tournament.player16 $+ %c4 $+ !
set %fight 8
}
alias fight5.semi {
set %dm.player1 %dm.tournament.winner.1
set %DM.player2 %dm.tournament.winner.2
msg $chan %c1 $+ It's now the semi finals! $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 dm.player2 $+ %c4 $+ !
set %fight 5
}
alias fight6.semi {
set %dm.player1 %dm.tournament.winner.3
set %DM.player2 %dm.tournament.winner.4
msg $chan %c1 $+ They have come so far, but now one of them will have to die! %c2 $+ %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 6
}
alias fight7.final {
set %dm.player1 %dm.tournament.winner.5
set %DM.player2 %dm.tournament.winner.6
msg $chan %c1 $+ This is the one and only final! $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 7
}
alias fight3.final {
set %dm.player1 %dm.tournament.winner.1
set %DM.player2 %dm.tournament.winner.2
msg $chan %c1 $+ This is the one and only final! $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 3
}
alias -l fight9.kwart {
set %DM.player1 %dm.tournament.winner.1
set %DM.player2 %dm.tournament.winner.2
msg $chan %c1 $+ Now fighting: $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 9
}
alias -l fight10.kwart {
set %DM.player1 %dm.tournament.winner.3
set %DM.player2 %dm.tournament.winner.4
msg $chan %c1 $+ Now fighting: $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 10
}
alias -l fight11.kwart {
set %DM.player1 %dm.tournament.winner.5
set %DM.player2 %dm.tournament.winner.6
msg $chan %c1 $+ Now fighting: $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 11
}
alias -l fight12.kwart {
set %DM.player1 %dm.tournament.winner.7
set %DM.player2 %dm.tournament.winner.8
msg $chan %c1 $+ Now fighting: $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 12
}
alias -l fight13.semi {
set %DM.player1 %dm.tournament.winner.9
set %DM.player2 %dm.tournament.winner.10
msg $chan %c1 $+ Now fighting: $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 13
}
alias -l fight14.semi {
set %DM.player1 %dm.tournament.winner.11
set %DM.player2 %dm.tournament.winner.12
msg $chan %c1 $+ And last but not least: $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 14
}
alias -l fight15.final {
set %DM.player1 %dm.tournament.winner.13
set %DM.player2 %dm.tournament.winner.14
msg $chan %c1 $+ This is the one and only final! $+ %c2 %dm.player1 $+ %c4 Vs. $+ %c2 %dm.player2 $+ %c4 $+ !
set %fight 15
}