Gather Bot

By HoBbo! on Jun 03, 2005

A gather bot. I know its been made before so please dont flame. This is my first script so please be gentle :] . It features a Member Auth System and commands such as !add , !add b , !remove etc. To turn it on type !on, and !off to turn it off ( obviously :D ) . Also use msg the bot !server [ip]e.g.
/msg BOTNAME !server 45.345.45.435:42534
/msg BOTNAME !pass carrot
use !newdb to clear the database of users
to register with bot, use:
/msg BOTNAME !register [user] [pass] .
to auth with bot, use:
/msg BOTNAME !auth [user] [pass] .
Also, auth de-authentication after channel part.

Please submit constructive comments and any errors you find. Thanks

EDIT: Added !needsub !sub and !cancelsub commands and fixed an authing error too

EDIT2: Added !map (forgot that) and !mixteams command

on *:TEXT:!ban *:%gchan: {
  if ( $nick isop $chan ) {
    mode %gchan kick $2
    mode %gchan +b $2
  }
}
on *:TEXT:!needsub:%gchan: {
  if ( $nick isop $chan ) {
    set %needsub 1
    msg %gchan 120,5 7::0 Admin: %admin  Has Requested a sub. Use !sub to join the game 7::
  }
}
on *:TEXT:!sub:%gchan: {
  if ( %needsub = 1 ) {
    if ( $read(dataa.txt,w,$nick) = $null ) { notice $nick 120,5 7::0 You Must be Authed to Sub. 7:: }
    else { set %needsub 0 | msg $nick 120,5 7::0 Please Join  %servip  with password  %servpass  7:: }
  }
  else notice $nick 120,5 7::0 Sorry No Sub needed at the moment  7:: 
}
on *:TEXT:!cancelsub:%gchan: {
  if ( $nick isop $chan ) {
    if ( %needsub = 1 ) { unset %needsub | notice $nick 120,5 7::0 Sub Canceled  7:: }
    else notice $nick 120,5 7::0 No Sub Requested. So it cant be canceled!  7::  
  }
}
on *:TEXT:!teams:%gchan: {
  if ( %on = 1 ) {
    msgchan
  }
  else msg $chan 120,5 7::0 No Gather at the moment  7::
}
on *:TEXT:!on:#:{
  if ( %on = 1 ) { msg $chan 120,5 7::0 A Gather is in process ! 7:: }
  else {  
    set %gchan $chan
    set %admin $nick
    set %on 1
    set %user1 ?
    set %user2 ?
    set %user3 ?
    set %user4 ?
    set %user5 ?
    set %user6 ?
    set %user7 ?
    set %user8 ?
    set %user9 ?
    set %user10 ?
    /msg $chan 120,5 7::0 Gather Starting! 7::
  }
}
alias msgchan {
  /msg $chan 120,57::0 15Team A 0: %user1 - %user2 - %user3 - %user4 - %user5 - 15Team B 0: %user6 - %user7 - %user8 - %user9 - %user10  Map: %servmap  7::
}
alias msgnick {
  /msg %user1 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team A Your Admin is  %admin   7::
  /msg %user2 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team A Your Admin is  %admin   7::
  /msg %user3 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team A Your Admin is  %admin   7::
  /msg %user4 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team A Your Admin is  %admin   7::
  /msg %user5 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team A Your Admin is  %admin   7::
  /msg %user6 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team B Your Admin is  %admin   7::
  /msg %user7 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team B Your Admin is  %admin   7::
  /msg %user8 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team B Your Admin is  %admin   7::
  /msg %user9 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team B Your Admin is  %admin   7::
  /msg %user10 120,5 7::0 The Gather is Full Connect to: %servip  Password: %servpass  You are on team B Your Admin is  %admin   7::
}
on *:TEXT:!add:%gchan: {
  if ( %on = 1 ) {
    if ( $read(dataa.txt,w,$nick) = $null ) { notice $nick 120,5 7::0 You're not Authed. Msg HoBbo User Pass 7:: }
    else { 
      if ( $nick = %user1 || $nick = %user3 || $nick = %user4 || $nick = %user5 || $nick = %user6 || $nick = %user7 || $nick = %user8 || $nick = %user9 || $nick = %user10 ) {
      notice $nick 120,5 7::0 You're Already Added, use !remove to remove yourself from gather 7:: }
      else {
        if ( %user1 = ? ) { set %user1 $nick | msgchan } 
        elseif ( %user2 = ? ) { set %user2 $nick | msgchan }
        elseif ( %user3 = ? ) { set %user3 $nick | msgchan }
        elseif ( %user4 = ? ) { set %user4 $nick | msgchan }
        elseif ( %user5 = ? ) { set %user5 $nick | msgchan }
        elseif ( %user6 = ? ) { set %user6 $nick | msgchan }
        elseif ( %user7 = ? ) { set %user7 $nick | msgchan }
        elseif ( %user8 = ? ) { set %user8 $nick | msgchan }
        elseif ( %user9 = ? ) { set %user9 $nick | msgchan }
        elseif ( %user10 = ? ) { set %user10 $nick | msgchan | msgnick }
        else notice chan 120,5 7::0 Gather is Full 7::
      }
    }
  }
  else notice $nick 120,5 7::0 No Gather at the moment 7::
}

on *:TEXT:!add b:%gchan: {
  if ( %on = 1 ) {
    if ( $read(dataa.txt,w,$nick) = $null ) { notice $nick 120,5 7::0 You're not Authed. Msg HoBbo !auth User Pass 7:: }
    else { 
      if ( $nick = %user1 || $nick = %user3 || $nick = %user4 || $nick = %user5 || $nick = %user6 || $nick = %user7 || $nick = %user8 || $nick = %user9 || $nick = %user10 ) {
      notice $nick 120,5 7::0 You're Already Added, use !remove to remove yourself from gather 7:: }
      else {
        if ( %user6 = ? ) { set %user6 $nick | msgchan }
        elseif ( %user7 = ? ) { set %user7 $nick | msgchan }
        elseif ( %user8 = ? ) { set %user8 $nick | msgchan }
        elseif ( %user9 = ? ) { set %user9 $nick | msgchan }
        elseif ( %user10 = ? ) { set %user10 $nick | msgchan | msgnick }
        else notice chan 120,5 7::0 Gather is Full 7::
      }
    }
  }
  else notice $nick 120,5 7::0 No Gather at the moment 7::
}
on *:TEXT:!remove:%gchan: {
  if ( %on = 1 ) {
    if ( $nick = %user1 ) { set %user1 ? | set %out 1 }
    elseif ( $nick = %user2 ) { set %user2 ? | set %out 2 }
    elseif ( $nick = %user3 ) { set %user3 ? | set %out 3 }
    elseif ( $nick = %user4 ) { set %user4 ? | set %out 4 }
    elseif ( $nick = %user5 ) { set %user5 ? | set %out 5 }
    elseif ( $nick = %user6 ) { set %user6 ? | set %out 6 }
    elseif ( $nick = %user7 ) { set %user7 ? | set %out 7 }
    elseif ( $nick = %user8 ) { set %user8 ? | set %out 8 }
    elseif ( $nick = %user9 ) { set %user9 ? | set %out 9 }
    elseif ( $nick = %user10 ) { set %user10 ? | set %out 10 }
    else notice $nick 120,5 7::0 You cant remove from the Gather Because your not in it! 7::
    if ( %out = 1 ) { set %user1  %user2 | set %user2  %user3 | set %user3  %user4 | set %user4  %user5 | set %user5  ? }
    if ( %out = 2 ) { set %user2  %user3 | set %user3  %user4 | set %user4  %user5 | set %user5 ? }
    if ( %out = 3 ) { set %user3  %user4 | set %user4  %user5 | set %user5 ? }
    if ( %out = 4 ) { set %user4  %user5 | set %user5 ? }
    if ( %out = 6 ) { set %user6  %user7 | set %user7  %user8 | set %user8  %user9 | set %user9  %user10 | set %user10 ? }
    if ( %out = 7 ) { set %user7  %user8 | set %user8  %user9 | set %user9  %user10 | set %user10 ? }
    if ( %out = 8 ) { set %user8  %user9 | set %user9  %user10 | set %user10 ? }
    if ( %out = 9 ) { set %user9  %user10 | set %user10 ? }
    if ( %out = 10 ) { set %user10 ? }    
    msgchan
  }
  else notice $nick 120,5 7::0 No Gather at the moment! 7::
}
on *:text:!server *:?: {
  if ($nick isop %gchan) {
    set %servip  $2 
  }
  else {
    halt
  }
}
on *:text:!pass *:?: {
  if ($nick isop %gchan) {
    set %servpass  $2 
  }
  else {
    halt
  }
}
on *:TEXT:!off:%gchan: {
  unset %on 
  unset %admin
  unset %user1
  unset %user2
  unset %user3
  unset %user4
  unset %user5
  unset %user6
  unset %user7
  unset %user8
  unset %user9
  unset %user10
  msg $chan 120,5 7::0 Gather is 4OFF 7::
}
on *:TEXT:!newdb:%gchan:{
  if ( $nick isop $chan ) {
    /write -c datab.txt
    /write -c datal.txt
    /write -c dataa.txt
    notice $nick 120,5 7::0 New Database Created 7::
  }
}
on *:TEXT:!register **:?:{
  set %user $2
  set %pass $3
  if ( $read(datal.txt,w,%user) = $null ) { notice $nick 120,5 Successfully Registered! 7:: |  /write datab.txt %user %pass $nick | /write datal.txt %user }  
  else { notice $nick 120,5 7::0 Sorry Username Taken 7:: }
}
on *:TEXT:!auth **:?: {
  if ( $nick ison %gchan ) {  
    set %use $2
    set %pas $3
    if ( $read(datab.txt,w,%use %pas *) = $null ) { notice $nick 120,5 7::0 Sorry, Invalid username or password 7:: }
    else { notice $nick 120,5 7::0 Successfully Authed 7:: | /write dataa.txt $nick }
  }
  else msg $nick 120,5 7::0 You must be in %gchan  to auth! 7::
} 
on *:NICK: {
  if ( $newnick ison %gchan ) {
    if ( $nick = %user1 ) { set %user1 $newnick | msgchan }
    elseif ( $nick = %user2 ) { set %user2 $newnick | msgchan }
    elseif ( $nick = %user3 ) { set %user3 $newnick | msgchan }
    elseif ( $nick = %user4 ) { set %user4 $newnick | msgchan }
    elseif ( $nick = %user5 ) { set %user5 $newnick | msgchan }
    elseif ( $nick = %user6 ) { set %user6 $newnick | msgchan }
    elseif ( $nick = %user7 ) { set %user7 $newnick | msgchan }
    elseif ( $nick = %user8 ) { set %user8 $newnick | msgchan }
    elseif ( $nick = %user9 ) { set %user9 $newnick | msgchan }
    elseif ( $nick = %user10 ) { set %user10 $newnick | msgchan }
    //write -ds $+ $nick dataa.txt
    //write dataa.txt $newnick
    if ( $nick = %admin ) { set %admin $newnick }
  }
}
on *:PART:%gchan: {
  if ( $read(dataa.txt,w,$nick) = $null ) { }
  else { //write -ds $+ $nick dataa.txt | msg $nick 120,5 7::0 Auto De-authentication after channel part 7::
  }
}
on *:TEXT:!map *:%gchan: {
  if ( $nick isop %gchan ) && ( %on = 1 ) { 
    set %servmap $2
    msgchan
  }
}
on *:TEXT:!mixteams:%gchan: {
  if ( $nick isop %gchan ) && ( %on = 1 ) {
    set %temp1 %user3
    set %temp2 %user7
    set %temp3 %user1
    set %temp4 %user4
    set %temp5 %user6
    set %temp6 %user8
    set %temp7 %user5
    set %temp8 %user9
    set %temp9 %user10
    set %temp10 %user2
    set %user1 %temp7
    set %user2 %temp3 
    set %user3 %temp6
    set %user4 %temp1
    set %user5 %temp9
    set %user6 %temp5
    set %user7 %temp4
    set %user8 %temp10
    set %user9 %temp8
    set %user10 %temp2
    msgchan
  }
}

Comments

Sign in to comment.
mitcakos12   -  Apr 19, 2013

i can't to install in my channel. Why? who can to help me?

 Respond  
freakstar`   -  Apr 05, 2012

i found it but i dont know who to give a game plz tell me

 Respond  
freakstar`   -  Apr 05, 2012

how i can this bot works? msg me asap plz..
blackpoison tell me if you know

 Respond  
hackmaster   -  Oct 08, 2009

look at the information in top of this page... god damnit man!

 Respond  
bLacKpoisoN   -  Jan 07, 2008

Ok it works, but!!

[7:03:pm] !add
[7:03:pm] -GatherBot- :: You\'re not Authed. Msg HoBbo User Pass ::

why does it say this, how do i fix?

 Respond  
bLacKpoisoN   -  Jan 07, 2008

how do i make this script work

please tell me step by step where to paste it in and etc..

 Respond  
MaxDamage   -  Jun 30, 2005

i can\'t get the menu up to control it nothing is working :/

 Respond  
PoiXon   -  Jun 05, 2005

on the command !off you have lots of variables to unset

unset %user1
unset %user2
unset %user3
unset %user4
unset %user5
unset %user6
unset %user7
unset %user8
unset %user9
unset %user10

you could just do \"unset %user*\" :)

 Respond  
-rAz-   -  Jun 04, 2005

nvm sorry my mistake

 Respond  
-rAz-   -  Jun 04, 2005

erm the !teams arnt working?

 Respond  
HoBbo!   -  Jun 04, 2005

o yeah D-Link, i forgot to about that. Ill stick it in. And a do a !mixteams feature aswell

 Respond  
D-link   -  Jun 04, 2005

amm its lame bot i must to say..
you dont have options to set a map
or mixing but nice

 Respond  
DarthReven   -  Jun 04, 2005

i\'m not big on gather bots but from what i can see it looks nice

 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.