I made this yesterday, but then you deleted the thread...

Code:
alias lookup_test {
  var %s lookup $+ $calc($sock(lookup*,0) + 1)
  sockclose %s
  sockopen %s www.mtggoldfish.com 80
  sockmark %s 0
}

on *:sockopen:lookup?*:{
  sockwrite -n $sockname GET /player/smdster HTTP/1.1
  sockwrite -n $sockname Host: www.mtggoldfish.com 
  sockwrite -n $sockname
}

on *:sockread:lookup?*:{
  var %read
  sockread %read
  ;echo -s %read
  if ($sockbr) {
    if (*<td><a href="/deck/?*">?*</a></td>* iswm %read) {
      echo -a $gettok($gettok(%read,3,62),1,60)
      if ($calc($sock($sockname).mark + 1) == 3) sockclose $sockname
      else sockmark $sockname $v1
    }
  }
}
Type /lookup_test
The socket name are now dynamic so you can get more than one running at the same time, it use the /sockmark command to create the counter (to 3)


#mircscripting @ irc.swiftirc.net == the best mIRC help channel