Cup Bot v1.2 BETA

By xDaeMoN on Jan 11, 2005

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.
  }
} 

Comments

Sign in to comment.
Ernkje   -  Mar 12, 2009

xDaeMoN can you create the kz jump cup bot?

 Respond  
F*U*R*B*Y*   -  Dec 09, 2007

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/

 Respond  
google123   -  Dec 09, 2007

where is the download klick button?

 Respond  
Storm2108   -  Jul 07, 2007

Lol i feel sorry for you mate answering all these noobs :P oh yeah good bot 7/10

 Respond  
MISTERIOO   -  Jun 20, 2007

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

 Respond  
GTi   -  Oct 24, 2006

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!

 Respond  
glentjen   -  May 06, 2006

How I can download that script and where must i place it?

 Respond  
xDaeMoN   -  Apr 21, 2006

On this part \'ON @:TEXT:!:#Channelname: {\', change the \'#Channelname\'.

 Respond  
WiseR   -  Apr 21, 2006

no.. i want to change channel name!!

 Respond  
xDaeMoN   -  Apr 21, 2006

To change the nick? \'/nick newnick\'

 Respond  
WiseR   -  Apr 21, 2006

what is the comment to change name on my mirc channel?

 Respond  
xDaeMoN   -  Apr 12, 2006

This script is for a bot, so if you pasted it to YOUR remotes, then you will be the bot. You would need to use another client to type the commands. Make sure that you change the channel name too.

 Respond  
stuh15   -  Apr 12, 2006

hey deamon, i\'ve done everything on this page i can see, i put the script on my alt+r, then typed !start 5on5 8, and nothing happens :\

 Respond  
WiseR   -  Mar 30, 2006

plz can you yust please write it??

 Respond  
xDaeMoN   -  Mar 28, 2006

Just copy/paste the commands that are listed on the \"Author\'s Notes\" section on top.

 Respond  
WiseR   -  Mar 28, 2006

Can you Write it down.. so i can copy it?

 Respond  
xDaeMoN   -  Mar 28, 2006

The commands are listed on top.

 Respond  
WiseR   -  Mar 28, 2006

to let it work?

 Respond  
WiseR   -  Mar 28, 2006

What must i write on my channel then?

 Respond  
xDaeMoN   -  Mar 27, 2006

If you meant the script, see the notes above on how to set it up on your bot. Also make sure that the #Channel is changed.

 Respond  
WiseR   -  Mar 27, 2006

were should i set it?!!

 Respond  
swewolf   -  Mar 21, 2006

hi, nice bot. just some commands missing =)
like ->
!whois

is ... to start any sort of # cup, not just 8,16,32 =/ set maps for each round in the cup. maybe -> !set map1 de_dust2 and the !win would be nice =) !set map2 de_nuke !set map3 de_inferno
 Respond  
xDaeMoN   -  Mar 13, 2006

Then you type !start 5on5 8.

 Respond  
dodgee   -  Mar 13, 2006

how do you start this lol
To start: !start < Cup_Type > < #_of_Clans >

say for for example l wanted 5on5 8 clans what would l put ?

 Respond  
J^   -  Feb 20, 2006

ok i am new to this and i would like to run a cup on my irc channel and could some please help me with it and guide me through it please!

 Respond  
etreX   -  Jan 31, 2006

Hey xDaemoN, I need some help, can you lend me your email ?

 Respond  
eguk   -  Jan 03, 2006

ok cool

 Respond  
xDaeMoN   -  Jan 03, 2006

Uhm, the script above is already the updated version ;)

I\'ll see what I can do on the rankings.

 Respond  
eguk   -  Jan 03, 2006

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!! :)

 Respond  
xDaeMoN   -  Jan 03, 2006

@ equk,

  1. the bug with the !set command has already been fixed with version 1.2. Use the updated version. The cup.ini file is deleted when the cup is ended so there will be a new file everytime you start a cup.
  2. What do you suggest on setting the winner?
  3. You cannot enter a clan/players when you have not yet started the cup. See the commands on top how to start one.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.