All pastes #84424 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-07-10 22:24 UTC
rendered paste body
;Pug bot by wonder
on *:START:{
  hmake dodpuggers {
  }
  if (!%pugs) {
    set %pugs 1
  }
  if (!%pugslots) {
    set %pugslots 12
  }
  if (!%pugcolor) {
    set %pugcolor 4
    set %bgpugcolor
  }
  if (!%bgpugcolor) {
    set %bgpugcolor 3
  }
  if (!%midpugcolor) {
    set %midpugcolor 0
  }
}
on *:TEXT:.rules*:#:{
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor Rules $+  $+ %pugcolor $+ :  $+ %midpugcolor $+ http://seanalger.com/cod2pug/Rules.html  $+ %pugcolor $+ %pugprefix2
}
;List commands
on *:TEXT:.join*:#pugdods: {
  if ($hfind(dodpuggers,$nick).data) { msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor You are already on the list. $+ %pugcolor %pugprefix2 | halt }
  if ($hfind(dodpuggers,*,0,w) <= %pugslots) {
    hadd dodpuggers $address($nick,2) $nick
    msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %pugcolor $nick  $+ %midpugcolor $+ added. $+ %pugcolor $calc(%pugslots - $hget(dodpuggers,0).item) $+  $+ %midpugcolor slots remaining.  $+ %pugcolor $+ %pugprefix2
    unset %resetpug
    .timerreset1 off
    set -z %resetpug1 900 | .timerreset 0 900 $iif(%pugreset == $null,rp,halt)
  }
  if ($hfind(dodpuggers,*,0,w) == %pugslots) {
    teams
  }
}  
ON *:TEXT:.quit*:#pugdods: {
  if ($hfind(dodpuggers,$nick,1).data) {
    hdel dodpuggers $address($nick,2)
    msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $nick $+  $+ %midpugcolor has left the list. $+ %pugcolor $calc(%pugslots - $hget(dodpuggers,0).item) $+  $+ %midpugcolor slots remaining. $+ %pugcolor %pugprefix2
    unset %resetpug
    .timerreset off
    set -z %resetpug 900 | .timerreset 0 900 $iif(%pugreset == $null,rp,halt)
  }
  else {
    msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor You are not on the list $+ %pugcolor %pugprefix2
  }
}
on *:text:.view*:#pugdods: {
  var %done 1
  var %need %slots
  var %dodpuggers  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor Pug list $+ %pugcolor $+ : $+ %midpugcolor 
  var %x 1
  while (%x <= $hget(dodpuggers,0).item) {
    var %dodpuggers %dodpuggers $hget(dodpuggers, $+ %x $+ ).data
    inc %done
    inc %x
  }
  while (%done <= %need) {
    var %dodpuggers %dodpuggers
    inc %done
  }
  msg $chan %dodpuggers  $+ %pugcolor $+ · $calc(%pugslots - $hget(dodpuggers,0).item) $+  $+ %midpugcolor Slots remaining.  $+ %pugcolor $+ %pugprefix2
}
on *:TEXT:-topic*:#pugdods: {
  if ($nick isop $chan) { 
    /topic #pugdods  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %midpugcolor Welcome to Call of Duty 2 Pug  $+ %pugcolor $+ %pugprefix2 %pugprefix1  $+ %midpugcolor .help For Commands  $+ %pugcolor $+ %pugprefix2 %pugprefix1  $+ %midpugcolor News $+  $+ %pugcolor $+ : $+ %midpugcolor $2-  $+ %pugcolor $+ %pugprefix2
  }
}
ON *:NICK:{
  if ($hget(dodpuggers,$address($newnick,2))) {
    hadd dodpuggers $address($newnick,2) $newnick
  }
}
on *:PART:#pugdods: {
  if ($hfind(dodpuggers,$nick,1).data) {
    hdel dodpuggers $hfind(dodpuggers,$nick,1,w).data
    msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $nick  $+ %midpugcolor removed (Part). $+ %pugcolor $calc(%pugslots - $hget(dodpuggers,0).item) $+  $+ %midpugcolor slots remaining. $+ %pugcolor %pugprefix2
  }
}
ON *:QUIT:{
  if ($hfind(dodpuggers,$nick,1).data) && ($nick ison #pugdods) {
    hdel dodpuggers $hfind(dodpuggers,$nick,1,w).data
    msg #pugdods  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor Player $+ %pugcolor $nick $+  $+ %midpugcolor removed (Quit). $+ %pugcolor $calc(%pugslots - $hget(dodpuggers,0).item) $+  $+ %midpugcolor slots remaining.  $+ %pugcolor $+ %pugprefix2
  }
}
on *:KICK:#pugdods: {
  if ($hfind(dodpuggers,$knick,1).data) {
    hdel dodpuggers $address($knick,2)
    msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor Player $+ %pugcolor $knick $+  $+ %midpugcolor has been removed. (KICK) $+ %pugcolor $calc(%pugslots - $hget(dodpuggers,0).item)$+  $+ %midpugcolor slots remaining.  $+ %pugcolor $+ %pugprefix2
  }
}
;Information Commands
on *:TEXT:.help*:#pugdods: {
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %pugcolor $+ . $+  $+ %midpugcolor $+ join use to join the pug list.  $+ %pugcolor $+ %pugprefix2
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %pugcolor $+ . $+  $+ %midpugcolor $+ quit use to quit the pug list.  $+ %pugcolor $+ %pugprefix2
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %pugcolor $+ . $+  $+ %midpugcolor $+ view use to view the pug list.  $+ %pugcolor $+ %pugprefix2
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %pugcolor $+ . $+  $+ %midpugcolor $+ comm use to view the ventrilo ip.  $+ %pugcolor $+ %pugprefix2
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %pugcolor $+ . $+  $+ %midpugcolor $+ rules Displays the URL to the rules.  $+ %pugcolor $+ %pugprefix2
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %pugcolor $+ . $+  $+ %midpugcolor $+ server use to view the server list.  $+ %pugcolor $+ %pugprefix2
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1  $+ %pugcolor $+ . $+  $+ %midpugcolor $+ pugs use to show how many pugs have been made.  $+ %pugcolor $+ %pugprefix2
}  
on *:TEXT:.pugs*:#pugdods: {
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor %pugprefix1 $+  $+ %midpugcolor I have served $+ %pugcolor %pugs  $+ %midpugcolor $+ Pugs Since October 27th, 2005.  $+ %pugcolor $+ %pugprefix2
}
on *:TEXT:.serv*:#pugdods: {
  msg $chan being set-up at the moment
}

;Aliases
alias teams2 {
  var %x 1
  while (%x <= $calc($hget(dodpuggers,0).item )) {
    set %pugran $rand(1,10)
    :ran
    if (%pugran !isin %pugused) {
      set %pugused %pugused %pugran
      set %dodplayerz $hget(dodpuggers,$+ %pugran $+ ).data
      inc %x
    }
    else { inc %pugran | GOTO ran }
  }
  msg $chan 0,2Allies: $gettok(%dodplayerz,1,32) $gettok(%dodplayerz,3,32) $gettok(%dodplayerz,5,32) $gettok(%dodplayerz,7,32) $gettok(%dodplayerz,9,32) $gettok(%dodplayerz,11,32)
  msg $chan 0,4Axis: $gettok(%dodplayerz,2,32) $gettok(%dodplayerz,4,32) $gettok(%dodplayerz,6,32) $gettok(%dodplayerz,8,32) $gettok(%dodplayerz,10,32) $gettok(%dodplayerz,12,32)
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor pug number $+ %pugcolor %pugs $+  $+ %midpugcolor brought to you by $me  $+ %pugcolor $+ %pugprefix2
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor messaging dodpuggers, pug commands being halted for a few seconds.  $+ %pugcolor $+ %pugprefix2
  hfree dodpuggers
  hmake dodpuggers
  set %pugran 0
}
alias pmpug {
  var %x 1
  while (%x <= 10) {
    if ($gettok(%dodplayerz,%x,32) isin %odds) {
      msg $gettok(%dodplayerz,%x)  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor Pug %pugs has started. Your team - $gettok(%dodplayerz,1,32) $gettok(%dodplayerz,3,32) $gettok(%dodplayerz,5,32) $gettok(%dodplayerz,7,32) $gettok(%dodplayerz,9,32)  $+ %pugcolor $+ %pugprefix2
      inc %x
    }
    elseif ($gettok(%dodplayerz,%x,32) isin %evens) {
      msg $gettok(%dodplayerz,%x)  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor Pug %pugs has started. Your team - $gettok(%dodplayerz,2,32) $gettok(%dodplayerz,4,32) $gettok(%dodplayerz,6,32) $gettok(%dodplayerz,8,32) $gettok(%dodplayerz,10,32)  $+ %pugcolor $+ %pugprefix2
      inc %x
    }
    inc %pugs
    unset %dodplayerz
  }
}
alias teams {
  var %x 1
  while (%x <= $calc($hget(dodpuggers,0).item )) {
    set %dodplayerz %dodplayerz $hget(dodpuggers, $+ %x $+ ).data
    inc %x
  }
  inc %pugs
  msg $chan 0,2Allies: $gettok(%dodplayerz,1,32) $gettok(%dodplayerz,3,32) $gettok(%dodplayerz,5,32) $gettok(%dodplayerz,7,32) $gettok(%dodplayerz,9,32)
  msg $chan 0,4Axis: $gettok(%dodplayerz,2,32) $gettok(%dodplayerz,4,32) $gettok(%dodplayerz,6,32) $gettok(%dodplayerz,8,32) $gettok(%dodplayerz,10,32)
  msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor pug number $+ %pugcolor %pugs $+  $+ %midpugcolor brought to you by #pugdods  $+ %pugcolor $+ %pugprefix2
  ;msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor messaging dodpuggers, pug commands being halted for a few seconds.  $+ %pugcolor $+ %pugprefix2
  hfree dodpuggers
  hmake dodpuggers
  unset %dodplayerz
  set %dodlastpug $ctime

}
alias rpdod {
  hfree dodpuggers
  hmake dodpuggers
  msg #pugdods  $+ %pugcolor $+ , $+ %bgpugcolor %pugprefix1 $+  $+ %midpugcolor Pug Information Reset after 15 Minutes inactivity.  $+ %pugcolor $+ %pugprefix2
}
on *:TEXT:*:#pugdods:{
 if (.vent == $1) || (.comm == $1) || (.ts == $1) || (.talk == $1) || (.communication == $1) || (.ventrilo == $1) {
 msg $chan  $+ %pugcolor $+ , $+ %bgpugcolor $+ %pugprefix1 $+  $+ %midpugcolor Ventrilo: Dallas7.NationVoice.com:3881  $+ %pugcolor $+ %pugprefix2
}