Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias socks {
- sockopen Smogon www.smogon.com 80
- set %move $$1-
- }
- alias abortsocks {
- sockclose Smogon
- }
- on *:sockopen:Smogon: {
- sockwrite -nt Smogon GET /forums/showpost.php?p=3710694&postcount=3 HTTP/1.0
- sockwrite -nt Smogon Host: www.smogon.com
- sockwrite -nt Smogon $crlf
- }
- on *:sockread:Smogon: {
- var %text
- sockread %text
- if (($+(*<b>,%move,$chr(58),*</b>*) iswm %text) || ($+(*<b>,%move,</b>,$chr(58),*) iswm %text)) {
- if (%found != 1) {
- set %found 1
- }
- }
- else if (($+(*<b>,*,$chr(58),*</b>*) iswm %text) || ($+(*<b>,*,</b>,$chr(58),*) iswm %text) || *style=* iswm %text) && (%found == 1) {
- unset %found
- unset %move
- sockclose Smogon
- }
- if (%found == 1 && $nohtml(%text) != $null) {
- echo -a 5[ $+ $time $+ ] <CharScript> $nohtml(%text)
- }
- }
- alias -l nohtml {
- var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
- return %x
- }
- on *:sockclose:Smogon: {
- echo -a 5[ $+ $time $+ ] <CharScript> Could not find data for that move.
- }
Advertisement
Add Comment
Please, Sign In to add comment