;change the colors; alias -l c1 { return $+($chr(3),14,$1-) } alias -l c2 { return $+($chr(3),07,$1-) } on *:TEXT:*:#: { if ($1 == shit) || ($regex($1,/(=|[^<]*>|<[^>]*>|<[^>]|[0-9])/Si)) || ($3) { halt } inc %ID ;if !defname (you cant use $findfile w/ this); if ($right($1,-1) == defname) && ($2) && ($len($2-) <= 12) { writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($2-,$chr(32),-) notice $nick $c1(your nickname for the adress) $c2($mask($fulladdress,3)) $c1(has been set to) $c2($2-) halt } if ($setskill($right($1,-1))) && (!$3) { ;if its a !skill command; /hadd -m table. $+ %ID Style. $+ %ID stat /hadd -m table. $+ %ID Search. $+ %ID $setskill($remove($1,@,!,.)) /hadd -m table. $+ %ID target. $+ %ID $replace($2-,$chr(32),$chr(95)) /hadd -m table. $+ %ID display. $+ %ID $iif($left($1,1) == @,msg $chan,notice $nick) if ($len($2-) > 12) { $hget(table. $+ %ID,display. $+ %ID) $c1(The nickname) $c2($2-) $c1(is too long) | halt } if ($2) /hadd -m table. $+ %ID target. $+ %ID $replace($2-,$chr(32),$chr(95)) elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) /hadd -m table. $+ %ID target. $+ %ID $ifmatch elseif ($readini(DefRSN.ini,RSNs,$nick)) /hadd -m table. $+ %ID target. $+ %ID $ifmatch else /hadd -m table. $+ %ID target. $+ %ID $nick sockopen $+(rs.,%ID) hiscore.runescape.com 80 } elseif ($right($1,-1) == stats) { ;if its !stats; /hadd -m table. $+ %ID Style. $+ %ID allstats /hadd -m table. $+ %ID target. $+ %ID $replace($2-,$chr(32),$chr(95)) /hadd -m table. $+ %ID display. $+ %ID $iif($left($1,1) == @,msg $chan,notice $nick) if ($len($2-) > 12) { $hget(table. $+ %ID,display. $+ %ID) $c1(The nickname) $c2($2-) $c1(is too long) | halt } if ($2) /hadd -m table. $+ %ID target. $+ %ID $replace($2-,$chr(32),$chr(95)) elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) /hadd -m table. $+ %ID target. $+ %ID $ifmatch elseif ($readini(DefRSN.ini,RSNs,$nick)) /hadd -m table. $+ %ID target. $+ %ID $ifmatch else /hadd -m table. $+ %ID target. $+ %ID $nick sockopen $+(rs.,%ID) hiscore.runescape.com 80 halt } elseif ($regex($1,/co?mb(at)?/Si)) { ;if its !cmb; /hadd -m table. $+ %ID Style. $+ %ID combat /hadd -m table. $+ %ID target. $+ %ID $replace($2-,$chr(32),$chr(95)) /hadd -m table. $+ %ID display. $+ %ID $iif($left($1,1) == @,msg $chan,notice $nick) if ($len($2-) > 12) { $hget(table. $+ %ID,display. $+ %ID) $c1(The nickname) $c2($2-) $c1(is too long) | halt } if ($2) /hadd -m table. $+ %ID target. $+ %ID $replace($2-,$chr(32),$chr(95)) elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) /hadd -m table. $+ %ID target. $+ %ID $ifmatch elseif ($readini(DefRSN.ini,RSNs,$nick)) /hadd -m table. $+ %ID target. $+ %ID $ifmatch else /hadd -m table. $+ %ID target. $+ %ID $nick sockopen $+(rs.,%ID) hiscore.runescape.com 80 halt } else { halt } } on *:SOCKOPEN:rs.*:{ var %ID = $gettok($sockname,2,46) sockwrite -nt $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ $hget(table. $+ %ID,target. $+ %ID) HTTP/1.1 sockwrite -nt $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf } on *:SOCKREAD:rs.*:{ var %ID = $gettok($sockname,2,46), $& %file = $hget(table. $+ %ID,search. $+ %ID), $& %style = $hget(table. $+ %ID,style. $+ %ID) if ($sockerr) { echo -a Error. halt } else { var %read sockread %read if (*feature* iswm %read) { ;if none of the skills for $nick is in highscores; $hget(table. $+ %ID,display. $+ %ID) $c1(The nickname:) $c2($hget(table. $+ %ID,target. $+ %ID)) $c1(did not feature in runescape highscores for any skill!) sockclose $sockname halt } elseif (%style == stat) { if (%file iswm %read) { ;get the rank/level/exp for certain skill; /hadd -m table. $+ %ID rank. $+ %ID $htmlfree($GetRank(%read)) /hadd -m table. $+ %ID Level. $+ %ID $htmlfree($ReadNextLine(%read)) /hadd -m table. $+ %ID exp. $+ %ID $htmlfree($ReadNextLine(%read)) if (!$hget(table. $+ %ID,level. $+ %ID)) { ;if skill isnt ranked; $hget(table. $+ %ID,display. $+ %ID) $c1(The nickname:) $c2($hget(table. $+ %ID,target. $+ %ID)) $c1(did not feature in runescape highscores for) $c2($hget(table. $+ %ID,search. $+ %ID)) sockclose $sockname halt } ;display the informations witch you got above; $hget(table. $+ %ID,display. $+ %ID) $c2(%file) $c1(stats for) $c2($hget(table. $+ %ID,target. $+ %ID)) $+ $c1(:) if (%file == overall) { $hget(table. $+ %ID,display. $+ %ID) $c1(Level:) $c2($hget(table. $+ %ID,level. $+ %ID)) $c1(Rank:) $c2($hget(table. $+ %id,rank. $+ %ID)) $c1(Exp:) $c2($hget(table. $+ %ID,Exp. $+ %ID)) sockclose $sockname halt } $hget(table. $+ %ID,display. $+ %ID) $c1(Level:) $c2($hget(table. $+ %ID,level. $+ %ID)) $c1(Rank:) $c2($hget(table. $+ %id,rank. $+ %ID)) $hget(table. $+ %ID,display. $+ %ID) $c1(Exp:) $c2($hget(table. $+ %ID,Exp. $+ %ID)) $c1(Exp for) $c2($calc($hget(table. $+ %ID,level. $+ %ID) + 1)) $c1(%file) $+ $c1(:) $c2($comma($xp2next($hget(table. $+ %ID,level. $+ %ID),$hget(table. $+ %ID,exp. $+ %ID)))) sockclose $sockname halt } } elseif (%style == allstats) { ;get information about every single stat,; if (Overall iswm %read) /hadd -m table. $+ %ID Hoverall. $+ %ID $c1(Overall:) $c2($htmlfree($GetLevel(%read))) if (Attack iswm %read) /hadd -m table. $+ %ID Hattack. $+ %ID $c1(Attack:) $c2($htmlfree($GetLevel(%read))) if (Defence iswm %read) /hadd -m table. $+ %ID Hdefence. $+ %ID $c1(Defence:) $c2($htmlfree($GetLevel(%read))) if (Strength iswm %read) /hadd -m table. $+ %ID Hstrength. $+ %ID $c1(Strength:) $c2($htmlfree($GetLevel(%read))) if (Hitpoints iswm %read) /hadd -m table. $+ %ID Hhitpoints. $+ %ID $c1(Hitpoints:) $c2($htmlfree($GetLevel(%read))) if (Ranged iswm %read) /hadd -m table. $+ %ID Hrange. $+ %ID $c1(Ranged:) $c2($htmlfree($GetLevel(%read))) if (Prayer iswm %read) /hadd -m table. $+ %ID Hprayer. $+ %ID $c1(Prayer:) $c2($htmlfree($GetLevel(%read))) if (Magic iswm %read) /hadd -m table. $+ %ID Hmagic. $+ %ID $c1(Magic:) $c2($htmlfree($GetLevel(%read))) if (cooking iswm %read) /hadd -m table. $+ %ID Hcook. $+ %ID $c1(Cooking:) $c2($htmlfree($GetLevel(%read))) if (woodcutting iswm %read) /hadd -m table. $+ %ID Hwc. $+ %ID $c1(Woodcutting:) $c2($htmlfree($GetLevel(%read))) if (fletching iswm %read) /hadd -m table. $+ %ID Hfletch. $+ %ID $c1(Fletching:) $c2($htmlfree($GetLevel(%read))) if (fishing iswm %read) /hadd -m table. $+ %ID Hfish. $+ %ID $c1(Fishing:) $c2($htmlfree($GetLevel(%read))) if (Firemaking iswm %read) /hadd -m table. $+ %ID Hfm. $+ %ID $c1(Firemaking:) $c2($htmlfree($GetLevel(%read))) if (Crafting iswm %read) /hadd -m table. $+ %ID Hcraft. $+ %ID $c1(Crafting:) $c2($htmlfree($GetLevel(%read))) if (Smithing iswm %read) /hadd -m table. $+ %ID Hsmith. $+ %ID $c1(Smithing:) $c2($htmlfree($GetLevel(%read))) if (Mining iswm %read) /hadd -m table. $+ %ID Hmining. $+ %ID $c1(Mining:) $c2($htmlfree($GetLevel(%read))) if (Herblore iswm %read) /hadd -m table. $+ %ID Hherb. $+ %ID $c1(Herblore:) $c2($htmlfree($GetLevel(%read))) if (Agility iswm %read) /hadd -m table. $+ %ID Hagility. $+ %ID $c1(Agility:) $c2($htmlfree($GetLevel(%read))) if (Thieving iswm %read) /hadd -m table. $+ %ID Hthieving. $+ %ID $c1(Thieving:) $c2($htmlfree($GetLevel(%read))) if (Slayer iswm %read) /hadd -m table. $+ %ID Hslayer. $+ %ID $c1(Slayer:) $c2($htmlfree($GetLevel(%read))) if (Farming iswm %read) /hadd -m table. $+ %ID Hfarming. $+ %ID $c1(Farming:) $c2($htmlfree($GetLevel(%read)))} if (Runecraft iswm %read) /hadd -m table. $+ %ID Hrunecraft. $+ %ID $c1(Runecraft:) $c2($htmlfree($GetLevel(%read))) if (Hunter iswm %read) /hadd -m table. $+ %ID Hhunter. $+ %ID $c1(Hunter:) $c2($htmlfree($GetLevel(%read)))) if (Construction iswm %read) /hadd -m table. $+ %ID Hcon. $+ %ID $c1(Construction:) $c2($htmlfree($GetLevel(%read))) } if (*class="mainscroll-bottom"* iswm %read) { ;display the information; $hget(table. $+ %ID,display. $+ %ID) $c1(stats for) $c2($hget(table. $+ %ID,target. $+ %ID)) $+ $c1(:) $hget(table. $+ %ID,display. $+ %ID) $hget(table. $+ %ID,hoverall. $+ %ID) $hget(table. $+ %ID,display. $+ %ID) $hget(table. $+ %ID,Hattack. $+ %ID) $hget(table. $+ %ID,Hstrength. $+ %ID) $hget(table. $+ %ID,Hdefence. $+ %ID) $hget(table. $+ %ID,Hhitpoints. $+ %ID) $hget(table. $+ %ID,HRange. $+ %ID) $hget(table. $+ %ID,Hprayer. $+ %ID) $hget(table. $+ %ID,Hmagic. $+ %ID) $hget(table. $+ %ID,Hcook. $+ %ID) $hget(table. $+ %ID,Hwc. $+ %ID) $hget(table. $+ %ID,Hfletch. $+ %ID) $hget(table. $+ %ID,Hfish. $+ %ID) $& $hget(table. $+ %ID,Hfm. $+ %ID) $hget(table. $+ %ID,Hsmith. $+ %ID) $hget(table. $+ %ID,Hmining. $+ %ID) $hget(table. $+ %ID,Hcraft. $+ %ID) $hget(table. $+ %ID,HAgility. $+ %ID) $hget(table. $+ %ID,HThieving. $+ %ID) $hget(table. $+ %ID,HSlayer. $+ %ID) $hget(table. $+ %ID,Hfarming. $+ %ID) $hget(table. $+ %ID,Hrunecarft. $+ %ID) $hget(table. $+ %ID,HHunter. $+ %ID) $hget(table. $+ %ID,Hcon. $+ %ID) sockclose $sockname halt } elseif (%style == combat) { ;Get the Combat skills information; if (Attack iswm %read) /hadd -m table. $+ %ID Hattack. $+ %ID $htmlfree($GetLevel(%read)) if (Defence iswm %read) /hadd -m table. $+ %ID Hdefence. $+ %ID $htmlfree($GetLevel(%read)) if (Strength iswm %read) /hadd -m table. $+ %ID Hstrength. $+ %ID $htmlfree($GetLevel(%read)) if (Hitpoints iswm %read) /hadd -m table. $+ %ID Hhitpoints. $+ %ID $htmlfree($GetLevel(%read)) if (Ranged iswm %read) /hadd -m table. $+ %ID Hrange. $+ %ID $htmlfree($GetLevel(%read)) if (Prayer iswm %read) /hadd -m table. $+ %ID Hprayer. $+ %ID $htmlfree($GetLevel(%read)) if (Magic iswm %read) /hadd -m table. $+ %ID Hmagic. $+ %ID $htmlfree($GetLevel(%read)) ;Calculate the combat level using the Skills, many thanks to steiner for showing me calculate syntax; var %a = $calc($hget(table. $+ %ID,Hdefence. $+ %ID) * 100), $& %b = $calc($hget(table. $+ %ID,Hhitpoints. $+ %ID) * 100), $& %c = $calc($hget(table. $+ %ID,Hprayer. $+ %ID) * 50), $& %base = $calc($calc(%a + %b + %c) / 400), $& %d = $calc($hget(table. $+ %ID,Hattack. $+ %ID) * 130), $& %e = $calc($hget(table. $+ %ID,Hstrength. $+ %ID) * 130) if ($and($hget(table. $+ %ID,Hrange. $+ %ID),1) == 0) var %f = $calc($calc($calc($hget(table. $+ %ID,Hrange. $+ %ID) - 1) + $calc($hget(table. $+ %ID,Hrange. $+ %ID) * 2)) * 65) elseif ($and($hget(table. $+ %ID,Hrange. $+ %ID),1) == 1) var %f = $calc($hget(table. $+ %ID,Hrange. $+ %ID) * 195) if ($and($hget(table. $+ %ID,Hmagic. $+ %ID),1) == 0) var %g = $calc($calc($calc($hget(table. $+ %ID,Hmagic. $+ %ID) - 1) + $calc($hget(table. $+ %ID,Hmagic. $+ %ID) * 2)) * 65) elseif ($and($hget(table. $+ %ID,Hmagic. $+ %ID),1) == 1) var %g = $calc($hget(table. $+ %ID,Hmagic. $+ %ID) * 195) var %mcombat = $calc($calc(%d + %e) / 400), $& %rcombat = $calc(%f / 400), $& %macombat = $calc(%g / 400) if (%mcombat > %rcombat) && (%mcombat > %macombat) { /hadd -m table. $+ %ID HCombat. $+ %id $calc(%mcombat + %base) /hadd -m table. $+ %ID HClass. $+ %id Melee Based