Code: Select all
bind pub - !stats stats:private
proc stats:private {nick uhost hand chan text} {
set rsname [lindex $text 0]
set site "http://*/stats2.php?name=$rsname"
set token [::http::geturl $site]
set content [::http::data $token]
::http::cleanup $content
foreach line [split $content \n] {
putserv "NOTICE $nick :Runescape hiscores lookup for $rsname"
putserv "NOTICE $nick :$line"
}
}
The site it connects is a single line containing the stats as shown in the second notice. What I need to do is, get rid of the third notice (the repeat of the the first one). I also need to know how to put it into colour, and, for the second notice to put all the words in darkred (5,0) and the numbers in darkblue (2,0).-Bot- Runescape hiscores lookup for hamish150
-Bot- Overall: 970 Attack: 64 Defence: 60 Strength: 59 Hitpoints: 61 Ranged: 51 Prayer: 41 Magic: 50 Cooking: 62 Woodcutting: 56 Fletching: 34 Fishing: 61 Firemaking: 41 Crafting: 49 Mining: 55 Agility: 40 Thieving: 37 Slayer: 31
-Bot- Runescape hiscores lookup for hamish150
I also need it so that if there are no numbers in $line it will return that the user's hiscores aren't ranked.
Also how would I be able to make it so that if the user types two words or more as a name, for example:
!stats jim bob jones
It will set $rsname as jim_bob_jones?
Thanks!