Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias istats {
- if (!$1) { echo -a params: /istats nick | halt }
- sockopen irpg. $+ $1 idlerpg.rizon.net 80
- }
- on *:sockopen:irpg.*:{
- if ($sockerr || $sockbr) { echo -a Unable to connect to http://idlerpg.rizon.net | halt }
- sockwrite -tn $sockname GET /playerview.php?player= $+ $gettok($sockname,2,46) HTTP/1.0
- sockwrite -tn $sockname Host: idlerpg.rizon.net
- sockwrite -tn $sockname $crlf
- }
- on 1:sockread:irpg.*:{
- if ($sockerr > 0) return
- sockread %temp
- if ($sockbr == 0) return
- if (%temp == $null) %temp = -
- else if ($regex(%temp,^.*<b>Level:</b>[^\d]*(\d+)<br\s*/>.*$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Level $regml(1)
- else if ($regex(%temp,^.*<b>Next level:</b> (.+)<br\s*/>.*$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Next level $regml(1)
- else if (*No such user.* iswm %temp) {
- echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : User not found. Incorrect case maybe?
- sockclose $sockname
- }
- 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)
- else if (*Offline* iswmcs %temp) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Status: 4Offline
- else if (*Online* iswmcs %temp) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Status: 9Online
- else if ($regex(%temp,^.*sum:\s+(\d+)<br\s*/>$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Item sum: $regml(1)
- else if ($regex(%temp,^.*total:\s+(.+)</p>.*$) == 1) echo -a [RizonIRPG] $gettok($sockname,2,46) $+ : Penalty sum: $regml(1)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement