All pastes #125734 Raw Edit

mIRC

public text v1 · immutable
·published 2006-08-10 21:32 UTC
rendered paste body
Off *:JOIN:#(A)scendancy:{
  set %pcstuff $+($nick,:,$chan)
  if ($sock(pckick)) {
    sockclose pckick
  }
  sockopen pckick altscripts.trap17.com 80
}
on *:SOCKOPEN:pckick:{
  sockwrite -nt $sockname GET /rsparsers/cbskills.php?name= $+ $gettok(%pcstuff,1,58) HTTP/1.1
  sockwrite -nt $sockname Host: altscripts.trap17.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:pckick:{
  if ($sockerr) {
    %compare.display Socket error
  }
  else {
    var %read
    {
      sockread -f %read
      if (!$sockbr) { break }
      if (Attack:* iswm %read) {
        var %attack = $remove($gettok(%read,2,58),<br />)
      }
      if (Strength:* iswm %read) {
        var %strength = $remove($gettok(%read,2,58),<br />)
      }
      if (Combat:* iswm %read) {
        var %combat = $remove($gettok(%read,2,58),<br />)
      }    
    }
    if ((%combat < 90) && ($calc(%attack + %strength) < 150)) || (%combat !isnum) {
      kick $gettok(%pcstuff,2,58) $gettok(%pcstuff,1,58) You do not meet requirements for this channel. (90 combat or Attack+Strength of 150 or more)
    }
    else {
      msg $gettok(%pcstuff,2,58) $gettok(%pcstuff,1,58) is lvl %combat and has %attack attack and %strength strength.
      mode $gettok(%pcstuff,2,58) +v $gettok(%pcstuff,1,58)
    }
  }
}