All pastes #550102 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-08 09:55 UTC
rendered paste body
on *:text:*:#: {
  elseif ($regex($1,/^([!@])?co?mb/Si)) { set %stat Combat }
  elseif ($regex($1,/^([!@])?att/Si)) { set %stat Attack }
  elseif ($regex($1,/^([!@])?def/Si)) { set %stat Defence }
  elseif ($regex($1,/^([!@])?str/Si)) { set %stat Strength }
  elseif ($regex($1,/^([!@])?h(p|it)/Si)) { set %stat Hitpoints }
  elseif ($regex($1,/^([!@])?rang/Si)) { set %stat Ranged }
  elseif ($regex($1,/^([!@])?pray/Si)) { set %stat Prayer }
  elseif ($regex($1,/^([!@])?mag[ei]/Si)) { set %stat Magic }
  elseif ($regex($1,/^([!@])?cook/Si)) { set %stat Cooking }
  elseif ($regex($1,/^([!@])?w(c|oodcut)/Si)) { set %stat Woodcutting }
  elseif ($regex($1,/^([!@])?flet/Si)) { set %stat Fletching }
  elseif ($regex($1,/^([!@])?fish/Si)) { set %stat Fishing }
  elseif ($regex($1,/^([!@])?f(m|iremak)/Si)) { set %stat Firemaking  }
  elseif ($regex($1,/^([!@])?craft/Si)) { set %stat Crafting }
  elseif ($regex($1,/^([!@])?smith/Si)) { set %stat Smithing }
  elseif ($regex($1,/^([!@])?min/Si)) { set %stat Mining }
  elseif ($regex($1,/^([!@])?herb/Si)) { set %stat Herblore }
  elseif ($regex($1,/^([!@])?agi/Si)) { set %stat Agility }
  elseif ($regex($1,/^([!@])?th(ie|ei)/Si)) { set %stat Thieving }
  elseif ($regex($1,/^([!@])?slay/Si)) { set %stat Slayer }
  elseif ($regex($1,/^([!@])?farm/Si)) { set %stat Farming }
  elseif ($regex($1,/^([!@])?r(c|une)/Si)) { set %stat Runecraft }
  elseif ($regex($1,/^([!@])?hunt/Si)) { set %stat Hunter }
  elseif ($regex($1,/^([!@])?c(s|on)/Si)) { set %stat Construction }
  if ($2 == $null) { set %lookupnick $Nick }
  else { set %lookupnick $2 }
  if (%stat == attack) { set %2ndstat defence }
  if (%stat == defence) { set %2ndstat strength }
  if (%stat == strength) { set %2ndstat hitpoints }
  if (%stat == hitpoints) { set %2ndstat ranged }
  if (%stat == ranged) { set %2ndstat prayer }
  if (%stat == prayer) { set %2ndstat magic }
  if (%stat == magic) { set %2ndstat cooking }
  if (%stat == cooking) { set %2ndstat woodcutting }
  if (%stat == woodcutting) { set %2ndstat fletching }
  if (%stat == fletching) { set %2ndstat fishing }
  if (%stat == fishing) { set %2ndstat firemaking }
  if (%stat == firemaking) { set %2ndstat crafting }
  if (%stat == crafting) { set %2ndstat smithing }
  if (%stat == smithing) { set %2ndstat mining }
  if (%stat == mining) { set %2ndstat herblore }
  if (%stat == herblore) { set %2ndstat agility }
  if (%stat == ahility) { set %2ndstat thiefing }
  if (%stat == thiefing) { set %2ndstat slayer }
  if (%stat == slayer) { set %2ndstat farming }
  if (%stat == runecraft { set %2ndstat consctuction }
  if ($sock(socket39977)) .sockclose socket39977
  set %chan $chan
  sockopen socket39977 www.slushpuppy.silverinterlocution.org 80
}
on *:SOCKOPEN:socket39977: {
  sockwrite -nt $sockname GET /rsstats.php?stats= HTTP/1.1
  sockwrite -nt $sockname Host: www.slushpuppy.silverinterlocution.org
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:socket39977: {
  if ($sockerr) {
    msg %chan Socket Error: $sockname $+ . Error code: $sockerr Please inform $me of this error message.
    halt
  }
  else {
    var %sockreader
    sockread %sockreader
    if (*Overall:* iswm %sockreader) {
      var %tempvar $remove(%sockreader,<br>,%2ndstat)
      msg %chan %stat %tempvar
      unset %chan
      sockclose $sockname
    }
  }
}

elseif ($regex($1,/^([!@])?co?mb/Si)) { set %stat Combat
  elseif ($regex($1,/^([!@])?att/Si)) { set %stat Attack
    elseif ($regex($1,/^([!@])?def/Si)) { set %stat Defence
      elseif ($regex($1,/^([!@])?str/Si)) { set %stat Strength
        elseif ($regex($1,/^([!@])?h(p|it)/Si)) { set %stat Hitpoints
          elseif ($regex($1,/^([!@])?rang/Si)) { set %stat Ranged
            elseif ($regex($1,/^([!@])?pray/Si)) { set %stat Prayer
              elseif ($regex($1,/^([!@])?mag[ei]/Si)) { set %stat Magic
                elseif ($regex($1,/^([!@])?cook/Si)) { set %stat Cooking
                  elseif ($regex($1,/^([!@])?w(c|oodcut)/Si)) { set %stat Woodcutting
                    elseif ($regex($1,/^([!@])?flet/Si)) { set %stat Fletching
                      elseif ($regex($1,/^([!@])?fish/Si)) { set %stat Fishing
                        elseif ($regex($1,/^([!@])?f(m|iremak)/Si)) { set %stat Firemaking
                          elseif ($regex($1,/^([!@])?craft/Si)) { set %stat Crafting
                            elseif ($regex($1,/^([!@])?smith/Si)) { set %stat Smithing
                              elseif ($regex($1,/^([!@])?min/Si)) { set %stat Mining
                                elseif ($regex($1,/^([!@])?herb/Si)) { set %stat Herblore
                                  elseif ($regex($1,/^([!@])?agi/Si)) { set %stat Agility
                                    elseif ($regex($1,/^([!@])?th(ie|ei)/Si)) { set %stat Thieving
                                      elseif ($regex($1,/^([!@])?slay/Si)) { set %stat Slayer
                                        elseif ($regex($1,/^([!@])?farm/Si)) { set %stat Farming
                                          elseif ($regex($1,/^([!@])?r(c|une)/Si)) { set %stat Runecraft
                                            elseif ($regex($1,/^([!@])?hunt/Si)) { set %stat Hunter
                                              elseif ($regex($1,/^([!@])?c(s|on)/Si)) { set %stat Construction