All pastes #349132 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-10 16:08 UTC
rendered paste body
on $*:TEXT:/^[!@]co?mb(at)? */Si:#: {
  inc %ID 1
  /hadd -m table. $+ %ID Huser. $+ %ID $replace($2-,$chr(32),$chr(37) $+ 20)
  /hadd -m table. $+ %ID Hdisplay. $+ %ID $iif($left($1,1) == @,msg $chan,notice $nick)
  if ($len($2-) > 12) { $hget(table. $+ %ID,Hdisplay. $+ %ID) 14The nickname4 $2- 14is too long! | halt } 
  if ($2) /hadd -m table. $+ %ID Huser. $+ %ID $replace($2-,$chr(32),$chr(95)) 
  elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) /hadd -m table. $+ %ID Huser. $+ %ID $ifmatch 
  elseif ($readini(DefRSN.ini,RSNs,$nick)) /hadd -m table. $+ %ID Huser. $+ %ID $ifmatch 
  else /hadd -m table. $+ %ID Huser. $+ %ID $nick 
  sockopen $+(cmb.,%ID) www.parsers.o-ss.net 80
}
on *:SOCKOPEN:cmb.*:{
  var %ID = $gettok($sockname,2,46)
  sockwrite -nt $sockname GET /stats.php?mode=cmb&user= $+ $hget(table. $+ %ID,Huser. $+ %ID) HTTP/1.1
  sockwrite -nt $sockname Host: www.parsers.o-ss.net $+ $crlf $+ $crlf
}
on *:SOCKREAD:cmb.*:{
  var %ID = $gettok($sockname,2,46)
  if ($sockerr) { 
    echo -a Error. 
    halt 
  }
  else {
    var %read 
    sockread %read
    if (Attack:* iswm %read) /hadd -m table. $+ %ID HAttack. $+ %ID $remove(%read,attack:)
    if (defence:* iswm %read) /hadd -m table. $+ %ID Hdefence. $+ %ID $remove(%read,defence:)
    if (strength:* iswm %read) /hadd -m table. $+ %ID Hstrength. $+ %ID $remove(%read,strength:)
    if (range:* iswm %read) /hadd -m table. $+ %ID Hrange. $+ %ID $remove(%read,range:)
    if (magic:* iswm %read) /hadd -m table. $+ %ID Hmagic. $+ %ID $remove(%read,magic:)
    if (prayer:* iswm %read) /hadd -m table. $+ %ID Hprayer. $+ %ID $remove(%read,prayer:)
    if (hitpoints:* iswm %read) /hadd -m table. $+ %ID Hhitpoints. $+ %ID $remove(%read,hitpoints:)
    if (combat:* iswm %read) /hadd -m table. $+ %ID Hcombat. $+ %ID $remove(%read,combat:)
    if (class:* iswm %read) /hadd -m table. $+ %ID Hclass. $+ %ID $remove(%read,class:)
    if (Att:* iswm %read) /hadd -m table. $+ %ID HAtt. $+ %ID $remove(%read,Att:)
    if (def:* iswm %read) /hadd -m table. $+ %ID Hdef. $+ %ID $remove(%read,def:)
    if (str:* iswm %read) /hadd -m table. $+ %ID Hstr. $+ %ID $remove(%read,str:)
    if (rng:* iswm %read) /hadd -m table. $+ %ID Hrng. $+ %ID $remove(%read,rng:)
    if (mage:* iswm %read) /hadd -m table. $+ %ID Hmage. $+ %ID $remove(%read,mage:)
    if (pray:* iswm %read) /hadd -m table. $+ %ID Hpray. $+ %ID $remove(%read,pray:)
    if (*end* iswm %read) {
      $hget(table. $+ %ID,Hdisplay. $+ %ID) 14Combat stats for4 $hget(table. $+ %ID,Huser. $+ %ID) $+ 14:
      $hget(table. $+ %ID,Hdisplay. $+ %ID) 14Level4 $hget(table. $+ %ID,Hcombat. $+ %ID) ( $+ $hget(table. $+ %ID,Hclass. $+ %ID) based $+ )
      $hget(table. $+ %ID,Hdisplay. $+ %ID) 14Attack4 $hget(table. $+ %ID,Hattack. $+ %ID) 14Strength4 $hget(table. $+ %ID,Hstrength. $+ %ID) 14Defence4 $hget(table. $+ %ID,Hdefence. $+ %ID) 14Hitpoints4 $hget(table. $+ %ID,Hhitpoints. $+ %ID) 14Ranged4 $hget(table. $+ %ID,HRange. $+ %ID) 14Prayer4 $hget(table. $+ %ID,Hprayer. $+ %ID) 14Magic4 $hget(table. $+ %ID,Hmagic. $+ %ID)
      $hget(table. $+ %ID,Hdisplay. $+ %ID) 14Levels for4 $calc($hget(table. $+ %ID,Hcombat. $+ %ID) + 1) combat14: Att:4 $hget(table. $+ %ID,Hatt. $+ %ID) 14str:4 $hget(table. $+ %ID,Hstr. $+ %ID) 14def/hp:4 $hget(table. $+ %ID,Hdef. $+ %ID) 14Prayer:4 $hget(table. $+ %ID,Hpray. $+ %ID)
      $hget(table. $+ %ID,Hdisplay. $+ %ID) %logo
      sockclose $sockname
    }
  }
}