glacier_rat

Muten

Apr 21st, 2010
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. alias stats {
  2. sockopen stats hiscore.runescape.com 80
  3. sockmark stats $+($replace($1-,$chr(32),_),|,echo -a)
  4. }
  5. on *:SOCKOPEN:stats: {
  6. sockwrite -nt $sockname GET $+(/hiscorepersonal.ws?user1=,$gettok($sock(stats).mark,1,124)) HTTP/1.1
  7. sockwrite -nt $sockname Host: $+(hiscore.runescape.com,$str($crlf,2))
  8. }
  9. on *:SOCKREAD:stats: {
  10. if (!$sockerr) {
  11. var %s
  12. sockread %s
  13. if ($iskill(%s)) {
  14. var %skill %s,%x 0 | while (%x < 4) { sockread %s | inc %x }
  15. tokenize 60 %s
  16. tokenize 62 $1
  17. if ($2 != $null) { sockmark stats $addtok($sock(stats).mark,14 $+ $fix(%skill) (12 $+ $2 $+ 14),124) }
  18. if (%skill == Dungeoneering) {
  19. tokenize 124 $sock(stats).mark
  20. $2 $logo($upper($replace($1,_,$chr(32)))) $3-19
  21. if ($20 || $22 || $24) { $2 $logo($upper($replace($1,_,$chr(32)))) $20- }
  22. sockclose $sockname
  23. }
  24. }
  25. }
  26. }
  27. alias iskill {
  28. return $istok(Overall Prayer Attack Defence Strength Hitpoints Ranged Magic Cooking Woodcutting Fletching Fishing Firemaking Crafting Smithing Mining Herblore Agility Thieving Slayer Farming Runecrafting Hunter Construction Summoning Dungeoneering,$1,32)
  29. }
  30. alias logo return 14(12 $+ $1- $+ 14) —›
  31. on $*:TEXT:/^[!@.](rs)?stats/Si:#: {
  32. if (!$($+(%,statflood,$nick),2)) && (!$sock(stats)) {
  33. set -u3 $+(%,statflood,$nick) on
  34. sockopen stats hiscore.runescape.com 80
  35. sockmark stats $+($replace($2-,$chr(32),_),|,$iif($left($1,1) == @,msg #,.notice $nick))
  36. }
  37. }
  38. alias fix { return $replace($$1,Attack,Att,Strength,Str,Ranged,Range,Defence,Def,Hitpoints,HP,Agility,Agi,Herblore,Herb,Magic,Mage,Woodcutting,WC,Firemaking,FM,Thieving,Thief,Slayer,Slay,Prayer,Pray,Construction,Con,Runecraft,RC,Fletching,Fletch,Fishing,Fish,Cooking,Cook,Crafting,Craft,Dungeon) }
Add Comment
Please, Sign In to add comment