mIRC Home    About    Download    Register    News    Help

Print Thread
#134791 04/11/05 08:29 PM
Joined: Sep 2005
Posts: 3
S
S_A_2 Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Sep 2005
Posts: 3
Code:

alias -l setvariables {
;  Skill name color:
set %color.skillname

;  Rank color:
set %color.rank 9

;  Level color:
set %color.level 15

;  Experience color:
set %color.exp 4

;  Name color:
set %color.name 9

;  Default color:
set %color.default $color(notice)


set %doline 1
set %color.skillname $remove(%color.skillname,) | set %color.rank $remove(%color.rank,) | set %color.level $remove(%color.level,) | set %color.exp $remove(%color.exp,) | set %color.name $remove(%color.name,) | set %color.default $remove(%color.default,)
}
alias -l striptags { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return %x } 
ALIAS rs {
if (!$1) { set %searchname $$?="User to search?" }
else { set %searchname $1- }
set %searchname $replace(%searchname,$chr(32),$chr(43))
inc %rsstatssockval 1
sockopen $+(rsstats,%rsstatssockval) hiscore.runescape.com 80
}
on *:sockopen:rsstats* { 
.timertimeout $+ $sockname 1 10 timeout $sockname
unset %line
sockwrite -n $sockname GET /aff/runescape/hiscorepersonal.cgi?username= $+ %searchname HTTP/1.0 
sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf 
setvariables
echo %color.default -a Looking up high score statistics for $+ %color.name $replace($upper(%searchname),$chr(43),$chr(32)) $+ ...
}
on *:sockread:rsstats* {
if ($sockerr) { echo %color.default -a Error. $sockerr | halt }
else {
var %temptext | sockread %temptext
if (does not currently appear isin %temptext) { 
echo %color.default -a  $+ %color.name $replace(%searchname,$chr(43),$chr(32)) is not in the high scores!
.timertimeout $+ $sockname off
sockclose $sockname
halt
}
if (RuneScape isin %temptext) { halt }
if (*class=c>* iswm %temptext) {
if (%doline) {
unset %doline
echo %color.default -a      SKILL    |   RANK  | LEVEL | EXPERIENCE 
echo %color.default -a --------------+---------+-------+------------
}
set %skillline %skillline $+(,%color.skillname, ,$str( ,$calc(12 - $len($striptags(%temptext)))),$striptags(%temptext), ,,$chr(124),,%color.rank))
}
if (<td align="right">*</td><td align="right"> iswm %temptext) { set %skillline %skillline $+($str( ,$calc(7 - $len($striptags(%temptext)))),$striptags(%temptext), ,,$chr(124),,%color.level) | set %line 1 | halt }
if (%line == 1) && ($striptags(%temptext)) { unset %line | set %skillline %skillline $+($str( ,$calc(5 - $len($striptags(%temptext)))),$striptags(%temptext), ,,$chr(124),,%color.exp) }
if (%temptext == </td><td align="right">) { set %line 2 }
if (%line == 2) && ($striptags(%temptext)) { set %skillline %skillline $+($striptags(%temptext), ,) | unset %line | finishline } 
}
}
on *:sockclose:rsstats* { .timertimeout $+ $sockname off }
ALIAS -l finishline { echo %color.default -a %skillline | unset %line | unset %skillline }
alias -l timeout { echo %color.default -a The socket timed out. Please try again. | sockclose $1 } 


now when i type '/rs svend aage 2' it search the highscore for this game and show them in status bar like this :


Can u make it so when a guy fox exsample say !stats svend aage 2 it will say this in his status bar:
Stats Information For svend aage 2 - overall lvl: 1,438
Attack: 91 Strength: 99 Hp: 93 Ranged: 85 Prayer: 43 Magic: 85 Cooking: 82 Woodcutting: 75 Fishing: 77 Firemaking: 68 Crafting: 70 Smithing: 58 Mining: 66 Herblore: 57 Fletching: 85 Thieving: 67 Agility: 70 Slayer: 56 Farming: 35 RuneCrafting: 55

and so it only fill like 3 lines instead of 20

ill be happy if anyone understand me

thx for ur time

#134792 05/11/05 01:47 PM
Joined: Sep 2005
Posts: 3
S
S_A_2 Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Sep 2005
Posts: 3
umm i can explain it in another way...

i need a script so whne i type !stats username here

it goes to http://hiscore-web.runescape.com/lang/en/aff/windowsclient/hiscorepersonal.cgi?username=

and put the username at end of the url...

Then i want it to copy all the skills and lvl and notice the guy/girl that typed !stats username here with the skill + level

heres and exsample:

A guy in my channel type: !stats svend aage 2

Then the script go to http://hiscore-web.runescape.com/lang/en/aff/windowsclient/hiscorepersonal.cgi?username=svend+aage+2

and copy the stats + level and notice him like this:
overall:: 1,438 - Melee Level: 95 Attack: 91 Strength: 99 Hp: 93 Ranged: 85 Prayer: 43 Magic: 85 Cooking: 82 Woodcutting: 75 Fishing: 77 Firemaking: 68 Crafting: 70 Smithing: 58 Mining: 66 Herblore: 56 Fletching: 85 Thieving: 67 Agility: 70 Slayer: 56 RuneCrafting: 55 Farming: 35

Last edited by S_A_2; 05/11/05 01:48 PM.

Link Copied to Clipboard