Mix Bot **UPDATED**

By UK-Sw1ft on May 24, 2005

ok here's an updated version of my mix bot, its got a little more functions .

; Mix Bot v0.2 By Sw1ft
; Date: 24/05/05
; Copright(c) @ #UK.Mix

;;Commands
;;$start
;;$stop
;;$access owner/remove/give

;; owner = owner
;;give = mix admin
;;remove == remove there admin/owner

;; HF !

on 1:LOAD:{
  set %mix.channel $$?="Enter you Mix Channel"
  set %mix.Server $$?="Enter Mix Server IP"
  set %owner $$?="Enter Owners Nick"
  writeini owner.ini %mix.channel $address(%owner,1) owner
  unset %team
  unset %mix.count
  set %mix.map None
  set %mix.server None
  set %mix.players 5
}

on 1:TEXT:$($!access*):%mix.channel:{
  if ($readini(owner.ini,%mix.channel,$address($nick,1) == owner)) {
    if ($2 == Give) {
      writeini mix-admins.ini $chan $address($3,1) admin
      msg # Done.
      mode $chan +v $3
      notice $3 You Are now A Mix Admin
      halt
    }
    if ($2 == remove) {
      remini mix-admins.ini %mix.channel $address($3,1)
      msg # done.
      mode $chan -v $3
      notice $3 You Are no Longer A Mix Admin.
      halt
    }
    if ($2 == owner) {
      writeini owner.ini %mix.channel $address($nick,1) owner
      mode $chan +o $3
      msg # done.
      notice $3 you Are Now A Mix Admin !
      halt
    }
  }
}

on 1:JOIN:%mix.channel:{
  if ($readini(mix-admins.ini,$chan,$address($nick,1) == admin)) {
   mode $chan +v $nick
    msg # [- $nick Is A Mix Admin. -]
  }
}

on 1:TEXT:$($!Start):%mix.channel:{
  if ($readini(mix-admins.ini,$chan,$address($nick,1) == admin)) {
    if (%mix == on) { notice $nick Mix Allready Active $nick $+ .
    }
    else {
      amsg [- Mix Has Started @ $chan , Type !add To Play! -]
      inc %mix.total
      set %mix on
      set %mix.admin $nick
      topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
      notice $nick [- Setup commands: $chr(36) $+ map < Map> ][ $chr(36) $+ game <Game Type> ][ $chr(36) $+ Stop To Stop The Mix! -]
      notice $nick /msg $me password <password>
      notice $nick [- Commands To Be done In Channel! -]
      halt
    }
  }
}
on 1:TEXT:$($!map*):%mix.channel:{
  if ($nick == %mix.admin) {
    set %mix.map $2
    topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
    notice $nick Map Is Set To $2
    halt
  }
}

on 1:TEXT:$($!game*):%mix.channel:{
  if ($nick == %mix.admin) {
    set %mix.game $2
    topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
    notice $nick Game Type Is Set To $2
    halt
  }
}

on 1:TEXT:$($!stop):%mix.channel:{
  if ($readini(owner.ini,%mix.channel,$address($nick,1) == owner)) {
    if ($nick == %mix.admin) {
      dec %mix.total
      topic $chan 7[- Welcome To #UK.Mix 7][ Supported By #United-Kingdom 7][ Total Mixes: %mix.total 7][ News: %news -7]
      set %mix.map None
     unset %mix.count
     unset %team
     unset %mix.admin
     set %mix off 
      set %team
      set %mix.game 0 
      set %mix.map 0  
      set %password 0
      notice $nick Mix Has Been Stopped.
      halt
    }
  }
}
on *:text:!add*:%mix.channel:{
  if (%mix != on) { halt
  }
  else {
    inc %mix.count
    if ($istok(%team, $nick, 32)) { notice $nick You're already In The Mix. 
      return 
    }
    else {    
      if (%mix.count == %mix.players) { 
        mode %mix.channel +m 
        topic %mix.channel 7[- Welcome To #UK.Mix 7][ Supported By #United-Kingdom 7][ Total Mixes: %mix.total 7][ News: %news -7]
        getip 
        msg %mix.channel [- Supported By: #United-Kingdom ][ Sponsored By: you? and You? -]
        msg %mix.channel [- If you didnt get pass contact the admin: %mix.admin -]
        set %mix off 
        set %team
        set %mix.game 0 
        set %mix.map 0  
        set %password 0
        unset %mix.admin
        mode %mix.channel -m 
      }
      else {
        set %team $addtok(%team, $nick, 32)
        topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
        halt
      }
    }
  }
}
on 1:TEXT:!remove:%mix.channel:{
  if ($istok(%team, $nick, 32)) {
    dec %mix.count
    set %team $remtok(%team, $nick, 32)
    topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
    notice $nick Done.
    halt
  }
  else { notice $nick You Are Not In The Team.
  }
}

on 1:TEXT:!mixes:%mix.channel:{
  msg # Total Mixes: %mix.total
}

on 1:TEXT:!team:%mix.channel:{
  if (%mix) {
    msg $chan Current Mix Team: %team 
    halt
  }
  else { halt
  }
}

alias getip {
  var %d = 1
  while (%d <= $numtok(%team,32)) {
    msg $gettok(%team, %d, 32) [- Mix Has Now Started ][Server: %mix.server ][IP: %password ][ If There Is No Details Here, Please Conatct: %mix.admin ][ Please Join Server Now, Thx ]
    inc %d
  }
}
on 1:TEXT:password*:?:{
  if ($readini(owner.ini,%mix.channel,$address($nick,1) == OWNER)) {
    if ($readini(mix-admins.ini,$chan,$address($nick,1) == admin)) {
      if ($nick isop %mix.channel) {
        set %password $2
        notice $nick Password Has Been Set.
      }
    }
  }
}

on 1:TEXT:$($!news*):#uk.mix:{
  if ($readini(owner.ini,%mix.channel,$address($nick,1) == OWNER)) {
    if (%mix == on) {
      /set %news $2-
      /topic %mix.channel 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
      halt
    }
    elseif (%mix == off) {
      /set %news $2-
      /topic %mix.channel 7[- Welcome To #UK.Mix 7][ Supported By #United-Kingdom 7][ Total Mixes: %mix.total 7][ News: %news -7]
    }
  }
}

on 1:PART:%mix.channel:{
  if ($istok(%team, $nick, 32)) {
    /set %team $remtok(%team, $nick, 32)
    /topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
    halt
  }
}

on 1:KICK:%mix.channel:{
  if ($istok(%team, $nick, 32)) {
    /set %team $remtok(%team, $nick, 32)
   / topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
    halt
  }
}

on 1:BAN:%mix.channel:{
  if ($istok(%team, $nick, 32)) {
    /set %team $remtok(%team, $nick, 32)
    /topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
    halt
  }
}

on 1:QUIT:{
  if ($istok(%team, $nick, 32)) {
    /set %team $remtok(%team, $nick, 32)
    /topic $chan 7[- Mix Sarted 7][ !add 7/ !remove 7][ Map: %mix.map 7][ Game Type: %mix.game 7][ Team: %team 7][ Total Mixes: %mix.total -7]
    halt
  }
}

Comments

Sign in to comment.
LikWydd   -  Sep 24, 2005

i cant seem to get this to run, what am i doing wrong?

 Respond  
Zashi   -  May 28, 2005

What does this bot do anyway? o_O

 Respond  
supergeo   -  May 25, 2005

I\'d delete the /\'s in the code if I were you. It makes it look more clean and professional.

 Respond  
Yoinx   -  May 24, 2005

I dont know about that, however not being consistent with it does. either lose the /\'s or put them infront of all the commands to make it look uniform.

 Respond  
t0k3d   -  May 24, 2005

why are you using \"/\"s in scripts? it just makes it look sloppy and amateurish

 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.