A cup bot for a Counter-Strike channel. This has been requested by most people so I made one. Available cups on the bot: From 1on1 to 5on5. You could set 8, 16 or 32 clans. Hope this is what most of you gamers are looking for. Let me know if there's a bug/suggestions. Copy/paste this on a new remote script (ALT-R -> FiLE -> New).
** Commands:
OPs:
To start: !start < Cup_Type > < #_of_Clans >
To End: !end
To set a price: !setprice < Price >
To Add a clan: !add < ClanName > < Players >
To Delete a clan: !del < Clanname >
To set a...
Scheme: !set scheme < homepage >
Map: !set map < map >
War time: !set wtime < time >
Price: !set price < price >
Everybody:
To list all Clans: !list
To know price: !price
To know war time: !wtime
** Change #Channelname
;-----------------------------------------------------------
;Cup Bot by xDaeMoN
;Date: 1/10/05
;
;Available Cups: from 1on1 to 5on5
;Clans: 8, 16 or 32
;----------------------------------------------------------------
ON @*:TEXT:!*:#Channelname: {
if ($1 == !start) && ($nick isop $chan) {
if ( !%cup.start ) {
if ($2) && ($istok(1on1.2on2.3on3.4on4.5on5,$2,46)) {
if ($3) && ($3 isnum) && ($istok(8.16.32,$3,46)) {
set %cup.type $2
set %cup.teams $3
set %cup.start yes
set %cup.players $left($2,1)
set %cup.team.count 0
.msg $chan ** [Cup:] %cup.type [Clans:] $($+(0,/,%cup.teams),2) has now Started.
goto topset
}
else .notice $nick ** Insufficient Parameters (Invalid $chr(35) of Teams): !start <CupType> < $+ $chr(35) of Clans (Available: 8,16,32)>
}
else .notice $nick ** Insufficient Parameters (Invalid Cup Type): !start <CupType> < $+ $chr(35) of Clans>
}
else .notice $nick A Cup has already started. Type !end to end the cup.
}
elseif ($1 == !end) && ($nick isop $chan) {
if (%cup.start) {
.msg $chan ** [Cup:] %cup.type [Clans:] $($+(%cup.team.count,/,%cup.teams),2) has now Ended.
topic $chan Welcome to $chan - Cup! [Cup:] No Info [Clans:] No Info
unset %cup.*
.remove cup.ini
}
else .notice $nick No Cup has started yet.
}
elseif ($1 == !add) {
if ( %cup.start ) {
if (%cup.team.count < %cup.teams) {
if ($2) {
if ( !$readini(cup.ini, %cup.type, $2) ) {
if ($3) && ($numtok($3-,44) == %cup.players) {
writeini -n cup.ini %cup.type $2 $3-
.notice $nick ** Added Clan $2 with Players: $3-
inc %cup.team.count
goto topset
}
else .notice $nick ** Insufficient Parameters (Incomplete players): !add <ClanName> < $+ %cup.players Player(s) (separated with a comma if more than 1)>
}
else .notice $nick Clan $2 has already been added.
}
else .notice $nick ** Insufficient Parameters (No Clan Name Given): !add <ClanName> < $+ %cup.players Player(s) (separated with a comma if more than 1)>
}
else .notice $nick Cup: %cup.type has already reached the max Clan limit.
}
else .notice $nick No Cup has started yet.
}
elseif ($1 == !del) {
if (%cup.start) {
if ($2) {
if ($ini(cup.ini, %cup.type, $2)) {
remini cup.ini %cup.type $2
.notice $nick ** Removed Clan $2 $+ .
dec %cup.team.count
goto topset
}
else .notice $nick Clan $2 does not exist.
}
else .notice $nick ** Insufficient Parameters (No Clan name given): !del <TeamName>
}
else .notice $nick No Cup has started yet.
}
elseif ($1 == !set) && ($nick isop $chan) {
if (%cup.start) {
if ($2 == price) {
if ($3) {
set %cup.price $3
.notice $nick ** Cup %cup.type Price set to $+(',$3,')
}
else .notice $nick ** Insufficient Parameters (No Price Set): !set price <Price>
}
elseif ($2 == map) {
if ($3) {
set %cup.map $3
.notice $nick ** Cup %cup.type Map set to $+(',$3,')
}
else .notice $nick ** Insufficient Parameters (No Map Set): !set map <Price>
}
elseif ($2 == scheme) {
if ($3) {
set %cup.scheme $3
.notice $nick ** Cup %cup.type Scheme set to $+(',$3,')
}
else .notice $nick ** Insufficient Parameters (No Scheme Set): !set scheme <Price>
}
elseif ($2 == wtime) {
if ($3) {
set %cup.wtime $3
.notice $nick ** Cup %cup.type War Time set to $+(',$3,')
}
else .notice $nick ** Insufficient Parameters (No War Time Set): !set scheme <WarTime>
}
:topset
topic $chan Welcome to $chan - Cup! [Cup:] %cup.type [Clans:] $($+(%cup.team.count,/,%cup.teams),2) [Price:] %cup.price $&
[Scheme:] %cup.scheme [Map:] %cup.map [Start:] %cup.wtime
}
else .notice $nick No Cup has started yet.
}
elseif ($1 == !list) {
if (%cup.start) {
if ( $ini(cup.ini, %cup.type) ) {
.notice $nick ** Clan list for %cup.type $+($ini(cup.ini, %cup.type, 0),/,%cup.teams) **
var %g = 1
while $ini(cup.ini, %cup.type, %g) {
.notice $nick $v1
inc %g
}
.notice $nick ** End of Clan list **
}
else .notice $nick ** Clan List is Empty
}
else .notice $nick No Cup has started yet.
}
elseif ($1 == !price) {
if (%cup.start) {
if (%cup.price != $null) {
.notice $nick ** Cup %cup.type Price is $+(',$v1,')
}
else .notice $nick ** No Price has been set yet.
}
else .notice $nick No Cup has started yet.
}
elseif ($1 == !wtime) {
if (%cup.start) {
if (%cup.wtime != $null) {
.notice $nick ** Cup %cup.type War Time is $+(',$v1,')
}
else .notice $nick ** No War Time has been set yet.
}
else .notice $nick No Cup has started yet.
}
}
google123 the code is in the textbox, this one does not require to be downloaded before hand, but if your talking about mIRC you can get it from http://www.mirc.com/
what i can do for the bot make a team serveron vs team serveroff ? what i have to write , because now the sometimes make serveron vs serveron or serveroff vs serveroff :S can anyone help me pls
is this correct ? :
timer5cupstatus off
set %5addnow 0
.msg $chan %c.s The $+ %5cupkanal $+ 5on5 cup is now FULL! - Proceeding.. %c.e
timer 1 5 mode $chan +mD
timer 1 7 .msg $chan %c.s [#21] %5team1 \'serveron\' ( $+ %5team1.pl2 $+ ) vs. %5team9 \'serveroff\' ( $+ %5team9.pl2 $+ ) %c.e
timer 1 8 .msg $chan %c.s [#22] %5team5 \'serveroff\' ( $+ %5team5.pl2 $+ ) vs. %5team12 \'serveron\' ( $+ %5team12.pl2 $+ ) %c.e
timer 1 10 .msg $chan %c.s [#23] %5team2 \'serveron\' ( $+ %5team2.pl2 $+ ) vs. %5team10 \'serveroff\' ( $+ %5team10.pl2 $+ ) %c.e
timer 1 12 .msg $chan %c.s [#24] %5team7 \'serveroff\' ( $+ %5team7.pl2 $+ ) vs. %5team15 \'serveron\' ( $+ %5team15.pl2 $+ ) %c.e
timer 1 14 .msg $chan %c.s [#25] %5team3 \'serveron\' ( $+ %5team3.pl2 $+ ) vs. %5team11 \'serveroff\' ( $+ %5team11.pl2 $+ ) %c.e
timer 1 15 .msg $chan %c.s [#26] %5team8 \'serveroff\' ( $+ %5team8.pl2 $+ ) vs. %5team16 \'serveron\' ( $+ %5team16.pl2 $+ ) %c.e
timer 1 16 .msg $chan %c.s [#27] %5team4 \'serveron\' ( $+ %5team4.pl2 $+ ) vs. %5team13 \'serveroff\' ( $+ %5team13.pl2 $+ ) %c.e
timer 1 17 .msg $chan %c.s [#28] %5team6 \'serveroff\' ( $+ %5team6.pl2 $+ ) vs. %5team14 \'serveron\' ( $+ %5team14.pl2 $+ ) %c.e
timer 1 19 .msg $chan %c.s Remember to record demos! %c.m Map is: $+ %5map $+ %c.e
timer 1 20 .msg $chan %c.s %string %c.m %string2 %c.e
timer 1 23 mode $chan -mD
goto end
hello! this is my first post here, but i have been where for a while checking up on things. my point is that i am was setting a bot for the channel of big portuguese gaming online comunity, but now i wanted to use in the bot this script ( because it looks the best from what i have seen ) but i think that\'s it is a shame it doesn\'t have a !winner command.
It would also be cool if the bot sended randow messages to the channel, for example, a game was schedule for today, so all day long untill the war time it keeps sending messages with like 3600 time between.
Also is it possible for the bot to conect to a ladder/cup system ( from a site ) so it messages the channel with the games beeing played today that were schedule in the site? like clanbase uses in their channels..
can\'t remember anything more right now .. !winner !ranks ( for the ladder and cup ), the conection to a site and some more stuff i would remember when the bot would be in use!
tkz in advance if you do this little things!
ok cool, which is the version 1.2 ?
about the winners, well usually the cup is made up of rounds. for example, with 8 clans, there would be three knockout rounds.
so at the start you would say etc... and then after each match there should be a command like !win and so team1 will go through to the next round. i dont know anythng about scripts so i dunno how hard this is to make. gl though!! :)
@ equk,