All pastes #621911 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-16 14:35 UTC
rendered paste body
av doesn't work, and the code for checking reqs doesn't either

on *:JOIN:#kings-channel: {
  if (%autovoice [ $+ [ $nick ] ] == %autovoice [ $+ [ $nick ] ]) {
    mode $chan +v $nick
  }
  else {
    set %joinnick $nick
  }
  if ($sock(socket67187)) .sockclose socket67187
  set %chan $chan
  sockopen socket67187 www.slushpuppy.silverinterlocution.org 80
}
on *:SOCKOPEN:socket67187: {
  sockwrite -nt $sockname GET /rsstats.php?stats= $+ %joinnick HTTP/1.1
  sockwrite -nt $sockname Host: www.slushpuppy.silverinterlocution.org
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:socket67187: {
  if ($sockerr) {
    msg %chan Socket Error: $sockname $+ . Error code: $sockerr Please inform $me of this error message.
    halt
  }
  else {
    var %sockreader
    sockread %sockreader
    if (*The Combat level for* iswm %sockreader) {
      var %tempvar $remove(%sockreader,<br>)
      var %sockreader2 | sockread %sockreader2
      if (*Overall:* iswm %sockreader2) {
        Set %att $gettok(%sockreader2,4,32)
        Set %str $gettok(%sockreader2,8,32)
        Set %combat $gettok(%tempvar,7,32)
        set %attnstr $calc(%att + %str)
        msg %chan Attack + Strength = %attnstr Combat = %combat
        cbcheck
      }
    }
    if (* $+ %joinnick does not feature in the hiscores.* iswm %sockreader) {
      ban -ku60 %chan %joinnick Please use your rs name 1 min ban!
      sockclose $sockname
    }
  }
}

alias cbcheck {
  if (%attnstr < 150) {
    set %under 5
    if (%combat < 90) {
      set %under2 5
      set %under3 $calc(%under + %under2)
      if (%under3 > 9) {
        ban -ku600 %chan %joinnick Sorry you dont meet reqs please come back when you do
      }
      unset %under
      unset %under2
      unset %joinnick
      unset %attnstr
      unset %combat
      unset %att
      unset %str
    }
    else {
      msg %chan %joinnick Meets the reqs!
      unset %under
      unset %under2
      unset %joinnick
      unset %attnstr
      unset %combat
      unset %att
      unset %str
    }
  }
}
on *:TEXT:!av*:$chan: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    mode $chan +v $2
    set %autovoice [ $+ [ $2 ] ]
    msg $chan $2 has been added to the auto voice script
  }
}
on *:TEXT:!setpcw*:#: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    set %pcw $2
    set %nick2 $nick
    inc %setworlds [ $+ [ $nick ] ]
    inc %setworldschan
    set %ctime $ctime
    unset %viewd
    msg $chan There is a new Pest Control world! Type !pcw to view it!
  }
}
On $*:TEXT:/^[!@](pcw|pc|w|world)/Si:#: {
  if ($nick isop $chan) || ($nick ishop $chan) || {
    inc %viewd
    notice $nick <Pest Control> < World: %pcw > <Set: $duration($calc($ctime - %ctime)) ago >   < set by %nick2 > < Used: %viewd >
  }

  on *:TEXT:!showpcw*:#: {
    if ($nick isop $chan) || ($nick ishop $chan){
    .msg $nick Now showing Pest-Control world every 20 seconds.
    timerpcwshow 0 20 msg $chan <Pest Control> < World: %pcw > <Set: $duration($calc($ctime - %ctime)) ago >   < set by %nick2 > < Used: %viewd >
  }
}
on *:TEXT:!showoff*:#: {
  if ($nick isop $chan) || ($nick ishop $chan){
  .msg $nick Showing pest-control world every 20 seconds stopped.
  timerpcwshow off
}
}
on *:invite:#: join $chan
}