All pastes #545288 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-06 19:23 UTC
rendered paste body
on *:text:!Commands:#peepants: {
  if (%cw_start == on) {
    msg #peepants 4#1 commands4 #1 type !cw, !cwspam or !say
  }
  elseif (%cw_start == off) {
    msg #peepants 4#1 commands4 #1 type !cw, !cwspam or !say
  }
}

on *:text:!cw:#peepants: { msg #peepants 4#1 cw started4 #1 cw is opened4!
  {
    inc %cw_num
    msg $chan 4#1 cw started4 #1 to join type !ADD, to leave the cw type !DEL and to turn off the cw type !OFF.
    msg $chan 4#1 cw started4 #1 players4:1 x4 -1 x4 -1 x
    set %cw_start on
  }
}

on *:Text:!off:#peepants:{ 
  if (%cw_start == on) {
    set %cw_start off
    unset %players
    msg $chan 4#1 cw ended4 #
  }
  elseif (%cw_start == off) {
    msg $chan 4#1 cw status4 #1 there's no cw opened4!
  }
}

on *:text:!add:#peepants:{
  if (%cw_start == on) {
    if ($nick !isin $gettok(%players,1-,44)) {
      set %players $addtok(%players,$nick,44)
      msg #peepants 4#1 cw status4 #1 players4: 1 $+ $iif($gettok(%players,1,44) == $null,x,$replace($gettok(%players,1,44),`Fixer,1`Fixer0)) $+ 4 - 1 $+ $iif($gettok(%players,2,44) == $null,x,$replace($gettok(%players,2,44),`Fixer,1`Fixer0)) $+ 4 - 1 $+ $iif($gettok(%players,3,44) == $null,x,$replace($gettok(%players,3,44),`Fixer,1`Fixer9))
      if ($gettok(%players,3,44) != $null) {
        msg $chan 4#1 cw status4 #1 now the cw can start4!1 i'll advertise some clan.
        warn.cw
        set %cw_start off
      }
    }
    elseif ($nick isin $gettok(%players,1-,44)) {
      msg $chan 4#1 cw started4 #1 you're already in the cw.
    }
  }
  elseif (%cw_start == off) {
    msg $chan 4#1 cw status4 #1 no cw opened4!1 type !CW to start a new one.
  }
}

alias warn.cw { 
  amsg 4#1 peepants4 #1 Looking for a fcw/cw4 #1 Possible line up4: 1 $gettok(%players,1,44)4 -1 $gettok(%players,2,44)4 -1 $gettok(%players,3,44)
  unset %players
}

on *:text:!del:#peepants:{
  if (%cw_start == on) {
    if ($nick !isin $gettok(%players,1-,44)) {
      msg $chan 4#1 cw status4 #1 you're not in the current cw.
    }
    if ($nick isin $gettok(%players,1-,44)) {
      set %players $remtok(%players,$nick,44)
      msg #peepants 4#1 cw status4 #1 players4: 1 $+ $iif($gettok(%players,1,44) == $null,x,$replace($gettok(%players,1,44),`Fixer,1`Fixer0)) $+ 4 - 1 $+ $iif($gettok(%players,2,44) == $null,x,$replace($gettok(%players,2,44),`Fixer,1`Fixer0)) $+ 4 - 1 $+ $iif($gettok(%players,3,44) == $null,x,$replace($gettok(%players,3,44),`Fixer,1`Fixer0))
    }
  }
  elseif (%cw_start == off) {
    msg $chan 4#1 cw status4 #1 no cw opened4!1 type !CW to start a new one. 
  }
}

on *:nick:{
  if (%cw_start == on) {
    if ($nick isin $gettok(%players,1-,44)) {
      set %players $remtok(%players,$nick,44)
      set %players $addtok(%players,$newnick,44)
      msg #peepants 4#1 cw started4 #1 players4: 1 $+ $iif($gettok(%players,1,44) == $null,x,$replace($gettok(%players,1,44),`Fixer,1`Fixer0)) $+ 4 - 1 $+ $iif($gettok(%players,2,44) == $null,x,$replace($gettok(%players,2,44),`Fixer,1`Fixer0)) $+ 4 - 1 $+ $iif($gettok(%players,3,44) == $null,x,$replace($gettok(%players,3,44),`Fixer,1`Fixer0))
    }
    elseif ($nick !isin $gettok(%players,1-,44)) {
      halt
    }
  }
}

on *:text:*:?:{
  msg #peepants 4# 1QUERY 4#1 $nick $+ : $1-
}

on *:Text:!say*:#peepants:{
  msg $2 4#0-1 $+ $nick $+ 0-4#1 $3-
  msg #peepants 4# 1QUERY/CHAN 4#1 $nick --> $2 $+ : $3-
}

on *:text:!cwspam:#peepants:{
  if (%cwSeek) {
    unset %cwSeek
    msg #peepants 4# 1peepants 4#1 is looking for cw/fcw just pm me4!
  }
  else {
    set %cwSeek 1
    msg #peepants 4# 1peepants 4#1 is looking for cw/fcw just pm me4!
  }

  on *:text:*cw*:#Soldat.match: {
    if (%cwSeek && $nick !ison #Soldat.match && !$matchtok($1-,Selecwoo,0,41) && !%cwSeek.ignore. [ $+ [ $strip($replace($1-,$chr(32), )) ] ]) {
      set -u15 %cwSeek.ignore. [ $+ [ $strip($replace($1-,$chr(32), )) ] ] 1
      msg #peepants 4# 1$chan 4#1 $nick said: $+ $1- $+
    }
  }
  on *:text:*Clan war*:#Soldat.match: {
    if (%cwSeek && $nick !ison #Soldat.match && !$matchtok($1-,Selecwoo,0,41) && !%cwSeek.ignore. [ $+ [ $strip($replace($1-,$chr(32), )) ] ]) {
      set -u15 %cwSeek.ignore. [ $+ [ $strip($replace($1-,$chr(32), )) ] ] 1
      msg #peepants 4# 1$chan 4#1 $nick said: $+ $1- $+
    }
  }
  on *:text:*looking*:#Soldat.match: {
    if (%cwSeek && $nick !ison #Soldat.match && !$matchtok($1-,Selecwoo,0,41) && !%cwSeek.ignore. [ $+ [ $strip($replace($1-,$chr(32), )) ] ]) {
      set -u15 %cwSeek.ignore. [ $+ [ $strip($replace($1-,$chr(32), )) ] ] 1
      msg #peepants 4# 1$chan 4#1 $nick said: $+ $1- $+
    }
  }



  on *:Text:!chans:#peepants:{
    var %x = 1
    while (%x <= $chan(0)) {
      var %x1 = $iif($me isop $chan(%x),$addtok(%x1,0@1 $+ $chan(%x),44),$iif($me isvoice $chan(%x),$addtok(%x1,0+1 $+ $chan(%x),44),$addtok(%x1,0*1 $+ $chan(%x),44)))
      inc %x
    }
    msg $chan 4#1 CHANS4 #1 $+ %x1 0(1 $+ $chan(0) $+ 0/1 $+ $+(20) $+ 0)
  }

  on *:text:!join*:#peepants:{
    if ($me ison $2) {
      msg $chan 4#1 CHANS4 #1 i'm already on $2 $+ 4.
    }
    else {
      join $2
    }
  }

  on *:text:!part*:#peepants:{
    if ($me !ison $2) {
      msg $chan 4#1 CHANS4 #1 i'm not on $2 $+ 4.
    }
    else {
      part $2
    }
  }

  on *:Text:!pmself*:#peepants:{
    msg $2 [ $+ $nick $+ ]:

    msg #peepants

  }