All pastes #140374 Raw Edit

Stuff

public text v1 · immutable
#140374 ·published 2006-08-20 12:35 UTC
rendered paste body
pcbot1.mrc

----------------------------------------------------------------------------------------------------

alias c1 { return $+(07,$1-) } 
alias c2 { return $+(04,$1-) }

on *:join:#: {
    var %setgroupnum = $rand(1,2)
    writeini PcBotList.ini %setgroupnum $address($nick,2) $replace($address($nick,2),$chr(32),-)
    msg $nick $c1(You were set to group) $c2(%setgroupnum)
}

on *:text:*:#: {

  if ($address($nick,2) == $readini(PcBotList.ini,1,$address($nick,2))) {

    tokenize 32 $strip($1-) 
    if ($left($1,1) !isin @!) halt 
    if ($right($1,-1) == pcw) var %style = pcworld
    elseif ($right($1,-1) == pc-world) var %style = pcworld
    elseif ($right($1,-1) == world) var %style = pcworld
    elseif ($right($1,-1) == setworld) var %style = setworld

    set $+(%,stats.display.,%ID) $iif($left($1,1) == @,msg $nick,notice $nick)

    alias process { 
      var %display = $($+(%,stats.display.,%ID),2)

      if (%style == pcworld) {
        if ($nick isop $chan || $nick ishop $chan || $nick isvoice $chan || $address($nick,2) == $address($me,2)) { %display $c1(The current PC world is:) $c2($readini(PCWorld.ini,PC-World,PCWorld)) }
        else { %display $c1(The current PC world is:) $c2(Get Voice to see!) }
      }
      elseif (%style == setworld) {
        if ($nick isop #ownpc || $nick ishop #ownpc) {
          if ($2 isnum 1-132) { writeini PCWorld.ini PC-World PCWorld $replace($2,$chr(32),-) }
          else { msg $nick $c1(Please enter a valid world) }
        }
      }
    }
  }
}

----------------------------------------------------------------------------------------------------


pcbot2.mrc

----------------------------------------------------------------------------------------------------

alias c1 { return $+(07,$1-) } 
alias c2 { return $+(04,$1-) }

on *:join:#: { if ([1]Zeus ison $chan) { halt } {
    var %setgroupnum = $rand(1,2)
    writeini PcBotList.ini %setgroupnum $address($nick,2) $replace($address($nick,2),$chr(32),-)
    msg $nick $c1(You were set to group) $c2(%setgroupnum)
  }
}

on *:text:*:#: {

  if ($address($nick,2) == $readini(PcBotList.ini,2,$address($nick,2))) {

    tokenize 32 $strip($1-) 
    if ($left($1,1) !isin @!) halt 
    if ($right($1,-1) == pcw) var %style = pcworld
    elseif ($right($1,-1) == pc-world) var %style = pcworld
    elseif ($right($1,-1) == world) var %style = pcworld
    elseif ($right($1,-1) == setworld) var %style = setworld

    set $+(%,stats.display.,%ID) $iif($left($1,1) == @,msg $nick,notice $nick)

    alias process { 
      var %display = $($+(%,stats.display.,%ID),2)

      if (%style == pcworld) {
        if ($nick isop $chan || $nick ishop $chan || $nick isvoice $chan || $address($nick,2) == $address($me,2)) { %display $c1(The current PC world is:) $c2($readini(PCWorld.ini,PC-World,PCWorld)) }
        else { %display $c1(The current PC world is:) $c2(Get Voice to see!) }
      }
      elseif (%style == setworld) {
        if ($nick isop #ownpc || $nick ishop #ownpc) {
          if ($2 isnum 1-132) { writeini PCWorld.ini PC-World PCWorld $replace($2,$chr(32),-) }
          else { msg $nick $c1(Please enter a valid world) }
        }
      }
    }
  }
}

----------------------------------------------------------------------------------------------------