Guest User

yourname

a guest
Apr 7th, 2010
287
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. alias istats {
  2. if (!$1) { echo -a params: /istats nick | halt }
  3. sockopen irpg. $+ $1 idlerpg.rizon.net 80
  4. }
  5.  
  6. on *:sockopen:irpg.*:{
  7. if ($sockerr || $sockbr) { echo -a Unable to connect to http://idlerpg.rizon.net | halt }
  8. sockwrite -tn $sockname GET /playerview.php?player= $+ $gettok($sockname,2,46) HTTP/1.0
  9. sockwrite -tn $sockname Host: idlerpg.rizon.net
  10. sockwrite -tn $sockname $crlf
  11. }
  12. on 1:sockread:irpg.*:{
  13. if ($sockerr > 0) return
  14. sockread %temp
  15. if ($sockbr == 0) return
  16. if (%temp == $null) %temp = -
  17. else if ($regex(%temp,^.*<b>Level:</b>[^\d]*(\d+)<br\s*/>.*$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Level $regml(1)
  18. else if ($regex(%temp,^.*<b>Next level:</b> (.+)<br\s*/>.*$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Next level $regml(1)
  19. else if (*No such user.* iswm %temp) {
  20. echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : User not found. Incorrect case maybe?
  21. sockclose $sockname
  22. }
  23. else if ($regex(%temp,^.*(\[\d{2}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}\].*)<br\s*/>.*$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : $regml(1)
  24. else if (*Offline* iswmcs %temp) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Status: 4Offline
  25. else if (*Online* iswmcs %temp) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Status: 9Online
  26. else if ($regex(%temp,^.*sum:\s+(\d+)<br\s*/>$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Item sum: $regml(1)
  27. else if ($regex(%temp,^.*total:\s+(.+)</p>.*$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Penalty sum: $regml(1)
  28. }
RAW Paste Data