RuneScape Stats Script [BETA]
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 0.0 (of 0 scores) |
| Date Added | Jul 04, 2009 |
| Last Updated | Jul 05, 2009 |
| Tags | mirc rs runescape script stat stats trev |
Introduction
The next update will contain the single skill lookup; whenever I feel like doing it lel.
Disclaimer:
The parser used to retrieve data from is property of RuneScript. I do not own the parser or the bot.
Their parser. My script.
(11:33:48 PM) (@Trev) !stats
(11:33:50 PM) —› (Notice:) -W|R|I|S|T- (Warg_Rider20™) Overall: 1780 Attack: 95 Defence: 86 Strength: 95 HP: 96 Mage: 85 Pray: 71 Cook: 82 Fletch: 92 Woodcutt: 87 Fishing: 81 Firemake: 70 Craft: 71 Smithing: 55 Mining: 67 Herblore: 55 Agility: 60 Thieving: 60 Farming: 54 Slayer: 85 Runecraft: 60 Hunter: 54 Summoning: 68
(11:33:50 PM) —› (Notice:) -W|R|I|S|T- (Warg_Rider20™) Duel: 1811 FOG: 529
Update July 5th, 2009: Fixed the bug where if the RSN you were searching for was not ranked in FOG or Dueling, it showed a blank line like so: [(11:54:45 AM) —› (Notice:) -W|R|I|S|T- (i_two_spec™)] I fixed it where it'll set it as N/R if the RSN is not ranked: [(12:31:59 PM) (@W|R|I|S|T) (i_two_spec™) FOG: N/R Duel: N/R] I don't see anymore bugs, it should be working 99.9% now.
mIRC Snippet:
RuneScape Stats Script [BETA]
Posted on Jul 5, 2009 3:44 am
Posted on Jul 5, 2009 3:44 am
By your intro it looks good i'll have to give it a try.
mIRC Snippet:
RuneScape Stats Script [BETA]
Posted on Jul 6, 2009 6:40 am
Posted on Jul 6, 2009 6:40 am
hi
u can use "sockmark" instead "set" then use var for $2/$nick
for sockread u can use a regex and hash tables also that an idea to better explain my comment
u can use "sockmark" instead "set" then use var for $2/$nick
for sockread u can use a regex and hash tables also that an idea to better explain my comment
| Code: |
| on $*:TEXT:/^[!.@]stats/Si:#:{ if ($2) var %rsn.nick $replace($2-,$chr(32),$chr(95)) elseif ($readini(Defnames.ini,DefRSN,$address($nick,3))) var %rsn.nick $v1 Else var %rsn.nick $nick sockopen Stats. www.rscript.org 80 sockmark Stats. $iif($mid($1,1,1) == $chr(64),msg #,.notice $nick) |www.rscript.org| %rsn.nick } on *:SOCKOPEN:Stats.:{ tokenize 124 $sock($sockname).mark sockwrite -n $sockname GET /lookup.php?type=stats&user= $+ $3 HTTP/1.1 sockwrite -n $sockname Host: $2 sockwrite -n $sockname $crlf } on *:SOCKREAD:Stats.:{ if ($sockerr) { halt } Else { tokenize 124 $sock($sockname).mark var %stats | sockread %stats if (%stats == STAT: not found) { $1 $lg(Error) $cc1($chr(40)) $cc2($2) $cc1($chr(41)) $cc2(was not found in the RuneScape Hiscores.) | sockclose $sockname } elseif $regex($1-,/STAT\:(Overall|Attack|Defence|Strength|Hitpoints|Ranged|Prayer|Magic|Cooking|Woodcutting|Fletching|Fishing|Firemaking|Crafting|Smithing|Mining|Herblore|Agility|Thieving|Slayer|Farming|Hunter|Construction|Summoning|Runecraft)\s\w+\s(\d+)/i) { hadd -m stats.x $regml(1) $cc2($regml(1) $+ :) $cc1($regml(2)) } elseif $regex($1-,/STAT:(Dueling|FOG)\s\w+(\s(\d+))?/i) { hadd -m stats.y $regml(1) $cc2($regml(1) $+ :) $cc1($iif($regml(3),$v1,N/R)) } elseif (*DEBUG:* iswm %stats) { $1 $lg($3) $regsubex($str(.,$hget(stats.x,0).data),/./g,$hget(stats.x,\n).data $+ $chr(32)) $1 $lg($3) $regsubex($str(.,$hget(stats.y,0).data),/./g,$hget(stats.y,\n).data $+ $chr(32)) sockclose $sockname } } } on *:sockclose:Stats.:hfree -w stats.* |
mIRC Snippet:
RuneScape Stats Script [BETA]
Posted on Jul 6, 2009 1:02 pm
Posted on Jul 6, 2009 1:02 pm
I don't know how to use hash tables; copying your script would teach me nothing.
Thanks though.
Thanks though.
mIRC Snippet:
RuneScape Stats Script [BETA]
Posted on Jul 7, 2009 3:11 am
Posted on Jul 7, 2009 3:11 am
hash table is like ini file
e.g
add data in:
ini file: /writeini file.ini NAME ITEM DATA
Hash tables: /hadd -m NAME ITEM DATA
read or get data
ini file: $readini(file.ini,NAME,ITEM) return DATA
Hash tables: $hget(NAME,ITEM) return DATA
take look at /help $hget
u have many parameter for $hget
$hget(NAME,0).item return the total number of item for NAME
$hget(NAME,1).item return the first item
$hget(NAME,1).data return the first data
e.g: NAME = Trev ; ITEM = testitem ; DATA = data test ok
1 2 3-
NAME ITEM DATA
/hadd -m Trev testitem data test ok
now u can try this
//echo -a $hget(trev,testitem) => return "data test ok"
//echo -a $hget(trev,1).data => return "data test ok"
//echo -a $hget(trev,1).item => return "testitem"
//echo -a $hget(trev,0).item => return "1"
now take look at /help $hget u'll find more about it :)
e.g
add data in:
ini file: /writeini file.ini NAME ITEM DATA
Hash tables: /hadd -m NAME ITEM DATA
read or get data
ini file: $readini(file.ini,NAME,ITEM) return DATA
Hash tables: $hget(NAME,ITEM) return DATA
take look at /help $hget
u have many parameter for $hget
$hget(NAME,0).item return the total number of item for NAME
$hget(NAME,1).item return the first item
$hget(NAME,1).data return the first data
e.g: NAME = Trev ; ITEM = testitem ; DATA = data test ok
1 2 3-
NAME ITEM DATA
/hadd -m Trev testitem data test ok
now u can try this
//echo -a $hget(trev,testitem) => return "data test ok"
//echo -a $hget(trev,1).data => return "data test ok"
//echo -a $hget(trev,1).item => return "testitem"
//echo -a $hget(trev,0).item => return "1"
now take look at /help $hget u'll find more about it :)






