rendered paste bodyalias c1 { return $+(14, $1-) }
alias c2 { return $+(07,$1-) }
on *:text:*:#: {
tokenize 32 $strip($1-)
if ( $readini(mutechan.ini , channel , $chan) = yes) { halt
}
if ($left($1,1) !isin @!.) halt
if ($right($1,-1) == stats) var %style = astats
elseif ($regex($1,/co?mb(at)?/Si)) var %style = combat
elseif ($setskill($remove($1,@,!,.))) var %style = istat, %skill = $setskill($remove($1,@,!,.))
elseif ($right($1,-1) == setrsn) && ($2) {
if ($2 == -h) {
writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($3-,$chr(32),-)
.notice $nick You're default RSN for the host $mask($fulladdress,3) has been set to $3-
}
else {
writeini DefRSN.ini RSNs $nick $replace($2-,$chr(32),-)
.notice $nick You're default RSN for the nick $nick has been set to $2-
}
halt
}
else halt
inc %ID
if ($len($2-) > 12) {
$($+(%,stats.display.,%ID),2) $c1(The nick) $c2($2-) $c1(is too long)
cleanup %ID
halt
}
elseif ($2) set $+(%,stats.rsn.,%ID) $replace($2-,$chr(32),-)
elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) set $+(%,stats.rsn.,%ID) $ifmatch
elseif ($readini(DefRSN.ini,RSNs,$nick)) set $+(%,stats.rsn.,%ID) $ifmatch
else set $+(%,stats.rsn.,%ID) $nick
set $+(%,stats.style.,%ID) %style
set $+(%,stats.skill.,%ID) %skill
set $+(%,stats.display.,%ID) $iif($left($1,1) == @,msg $chan,notice $nick)
sockopen $+(stats.,%ID) hiscore.runescape.com 80
}
on *:sockopen:stats.*: {
var %id = $gettok($sockname,2,46)
sockwrite -n $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ $($+(%,stats.rsn.,%ID),2) HTTP/1.1
sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf
}
on *:sockread:stats.*: {
sockread &Incoming
bwrite $sockname -1 -1 &Incoming
if ($bfind(&Incoming, 1, </html>).text) makehash $sockname
elseif ($bfind(&Incoming, 1, does not feature in the hiscores.).text) {
$($+(%,stats.display.,%ID),2) $c2(Results Found = 0) $c3(|) $c1(The Runescape NickName) $c3(|) $c2($($+(%,stats.rsn.,%ID),2)) $c3(|) $c1(Sucks which is why hes not listed on the Runescape's High Scores!) $c3(|)
cleanup $gettok($sockname,2,46)
}
}
alias -l makehash {
var %file = $1
bread %file 1 $file(%file).size &stats
var %currentstat, %x = 1
while (%x) {
var %x = $bfind(&stats,$calc(%x + 1),<a href="overall.ws?table=)
var %currentstat = $striptags($bvar(&stats,%x,200).text)
tokenize 10 %currentstat
hadd -m %file $1 $2 $3 $4 $xp2next($3,$4)
}
process %file
}
alias process {
var %table = $1, %id = $gettok($1,2,46), %x = 0, $&
%display = $($+(%,stats.display.,%ID),2), $&
%rsn = $($+(%,stats.rsn.,%ID),2), $&
%skill = $($+(%,stats.skill.,%ID),2), $&
%style = $($+(%,stats.style.,%ID),2)
if (%style == astats) {
while (%x <= 2300) {
tokenize 32 $hget(%table,$setskill(%x))
if ($2) var %statline = %statline $c1($setskill(%x)) $c2($2)
inc %x
}
%display $c1(Stats for) $c2(%rsn) $+ $c1(:)
%display %statline
}
elseif (%style == istat) {
if (!$hget(%table,%skill)) %display $c2(Results Found = 0) $c1(The Runescape Name) $c2(%rsn) $c1(Sucks at) $c2(%skill)
else {
tokenize 32 $hget(%table,%skill)
%display $c2(%skill) $c1(stats for) $c2(%rsn) $+ $c1(:)
%display $c1(Rank:) $c2($1) $c1(Level:) $c2($bytes($2,b)) $c1(Exp:) $c2($3) $&
$iif(%skill != Overall,$c1(Exp to lvl) $c2($calc($2 + 1)) $+ $c1(:) $c2($bytes($4,b)))
if (%skill == attack) { %display $c1($c1(For Level)) $c2($calc($2 + 1)) $c1(Attack) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 436))|)%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 200)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 268))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 280)))%display $c1(Experiments:) $c2($ceil($calc($4 / 400))) 4 $c1(For Level) $c2($bytes($2,b))4attack! $c1( $nextlevel ) }
if (%skill == Strength) { %display $c1($c1(For Level)) $c2($calc($2 + 1)) $c1(Strength) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 436)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 200)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 268))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 280))) }
if (%skill == range) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Range) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 436)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 200)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 268))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 280))) }
if (%skill == Defence) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Defence) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 436)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 200)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 268))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 280))) }
if (%skill == Hitpoints) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(HitPoints) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 144)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 66)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 89))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 93))) }
if (%skill == Prayer) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Prayer) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Dragon Bones:) $c2($ceil($calc($4 / 72)))%display $c1(Big/Jogre Bones:) $c2($ceil($calc($4 / 15)))%display $c1(Baby Dragon:) $c2($ceil($calc($4 / 30))))%display $c1(Normal or Burnt:) $c2($ceil($calc($4 / 4.5))) }
if (%skill == Fletching) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Fletching) $c2(%rsn) $+ $c1(:) Must Cut: $c1(Oak Longbows:) $c2($ceil($calc($4 / 50)))%display $c1(Willo LongBows:) $c2($ceil($calc($4 / 83.33)))%display $c1(Yew LongBows:) $c2($ceil($calc($4 / 150))))%display $c1(Magic LongBows:) $c2($ceil($calc($4 / 183.33))) }
if (%skill == Magic) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Magic) $c2(%rsn) $+ $c1(:) Must Cast: $c1(Fire Bolt:) $c2($ceil($calc($4 / 34.5)))%display $c1(Vulnerability:) $c2($ceil($calc($4 / 76)))%display $c1(Stun:) $c2($ceil($calc($4 / 90))))%display $c1(Enchant Level 6 Jewellery:) $c2($ceil($calc($4 / 97))) }
if (%skill == Agility) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Agility) $c2(%rsn) $+ $c1(:) Must Do/Have: $c1(1 Arena Ticket:) $c2($ceil($calc($4 / 240)))%display $c1(25 Arena Tickets:) $c2($ceil($calc($4 / 6500)))%display $c1(1000 Arena Tickets:) $c2($ceil($calc($4 / 320000))))%display $c1(Gnome Course:) $c2($ceil($calc($4 / 86)))%display $c1(Barbarian Course:) $c2($ceil($calc($4 / 153.2)))%display $c1(Ape Atoll Course:) $c2($ceil($calc($4 / 580)))%display $c1(Wilderness Course:) $c2($ceil($calc($4 / 571.5)))%display $c1(Werewolves Course:) $c2($ceil($calc($4 / 540))) }
if (%skill == Herblore) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Herblore) $c2(%rsn) $+ $c1(:) Must ID/Make: $c1(Identify Guam Leaf) $c2($ceil($calc($4 / 2.5)))%display $c1(Attack Potion:) $c2($ceil($calc($4 / 25)))%display $c1(Identify Ranarr Weed:) $c2($ceil($calc($4 / 8))))%display $c1(Prayer pots:) $c2($ceil($calc($4 / 87.5)))%display $c1(Identify Kwuarm:) $c2($ceil($calc($4 / 11.25)))%display $c1(Super Strength Potion:) $c2($ceil($calc($4 / 125)))%display $c1(Identify Dwarf Weed:) $c2($ceil($calc($4 / 13.75)))%display $c1(Ranging Potion:) $c2($ceil($calc($4 / 162.5))) }
if (%skill == Thieving) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Thieving) $c2(%rsn) $+ $c1(:) Steal From: $c1(Man:) $c2($ceil($calc($4 / 8)),)%display $c1(Guard:) $c2($ceil($calc($4 / 46.8)))%display $c1(Knight of Ardougne:) $c2($ceil($calc($4 / 84.3))))%display $c1(Gnome:) $c2($ceil($calc($4 / 198.3)))%display $c1(Hero:) $c2($ceil($calc($4 / 275.3)))%display $c1(Elf:) $c2($ceil($calc($4 / 353.3)))%display $c1(Cake Stall:) $c2($ceil($calc($4 / 16)))%display $c1(Nature Rune Chest:) $c2($ceil($calc($4 / 25)))%display $c1(Blood Rune Chest:) $c2($ceil($calc($4 / 250)))%display $c1(Paladin Chest:) $c2($ceil($calc($4 / 500))) }
if (%skill == RuneCrafting) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Runecrafting) $c2(%rsn) $+ $c1(:) Must Make: $c1(Air Runes:) $c2($ceil($calc($4 / 5)))%display $c1(Mind Runes:) $c2($ceil($calc($4 / 5.5)))%display $c1(Water Runes:) $c2($ceil($calc($4 / 6))))%display $c1(Earth Runes:) $c2($ceil($calc($4 / 6.5)))%display $c1(Fire Runes:) $c2($ceil($calc($4 / 7)))%display $c1(Body Runes:) $c2($ceil($calc($4 / 7.5)))%display $c1(Cosmic Runes:)$c2($ceil($calc($4 / 8)))%display $c1(Chaos Runes:) $c2($ceil($calc($4 / 8.5)))%display $c1(Nature Runes:) $c2($ceil($calc($4 / 9)))%display $c1(Law Runes:) $c2($ceil($calc($4 / 9.5))))%display $c1(Death Runes:) $c2($ceil($calc($4 / 10))) }
if (%skill == atk) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Attack) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 436)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 200)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 268))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 280))) 4 $c1(For Level) $c2($bytes($2,b))4attack! }
if (%skill == Str) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Strength) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 436)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 200)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 268))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 280))) }
if (%skill == Def) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Defence) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 436)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 200)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 268))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 280))) }
if (%skill == Hp) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(HitPoints) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Blue Dragons:) $c2($ceil($calc($4 / 144)))%display $c1(Rock Crabs:) $c2($ceil($calc($4 / 66)))%display $c1(Shadow Warriors:) $c2($ceil($calc($4 / 89))))%display $c1(Dagannoth (level 74):) $c2($ceil($calc($4 / 93))) }
if (%skill == Pray) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Prayer) $c2(%rsn) $+ $c1(:) Must Kill: $c1(Dragon Bones:) $c2($ceil($calc($4 / 72)))%display $c1(Big/Jogre Bones:) $c2($ceil($calc($4 / 15)))%display $c1(Baby Dragon:) $c2($ceil($calc($4 / 30))))%display $c1(Normal or Burnt:) $c2($ceil($calc($4 / 4.5))) }
if (%skill == Fletch) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Fletching) $c2(%rsn) $+ $c1(:) Must Cut: $c1(Oak Longbows:) $c2($ceil($calc($4 / 50)))%display $c1(Willo LongBows:) $c2($ceil($calc($4 / 83.33)))%display $c1(Yew LongBows:) $c2($ceil($calc($4 / 150))))%display $c1(Magic LongBows:) $c2($ceil($calc($4 / 183.33))) }
if (%skill == Agility) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Agility) $c2(%rsn) $+ $c1(:) Must Do/Have: $c1(1 Arena Ticket:) $c2($ceil($calc($4 / 240)))%display $c1(25 Arena Tickets:) $c2($ceil($calc($4 / 6500)))%display $c1(1000 Arena Tickets:) $c2($ceil($calc($4 / 320000))))%display $c1(Gnome Course:) $c2($ceil($calc($4 / 86)))%display $c1(Barbarian Course:) $c2($ceil($calc($4 / 153.2)))%display $c1(Ape Atoll Course:) $c2($ceil($calc($4 / 580)))%display $c1(Wilderness Course:) $c2($ceil($calc($4 / 571.5)))%display $c1(Werewolves Course:) $c2($ceil($calc($4 / 540))) }
if (%skill == Herb) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Herblore) $c2(%rsn) $+ $c1(:) Must ID/Make: $c1(Identify Guam Leaf) $c2($ceil($calc($4 / 2.5)))%display $c1(Attack Potion:) $c2($ceil($calc($4 / 25)))%display $c1(Identify Ranarr Weed:) $c2($ceil($calc($4 / 8))))%display $c1(Prayer pots:) $c2($ceil($calc($4 / 87.5)))%display $c1(Identify Kwuarm:) $c2($ceil($calc($4 / 11.25)))%display $c1(Super Strength Potion:) $c2($ceil($calc($4 / 125)))%display $c1(Identify Dwarf Weed:) $c2($ceil($calc($4 / 13.75)))%display $c1(Ranging Potion:) $c2($ceil($calc($4 / 162.5))) }
if (%skill == Thieve) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Thieving) $c2(%rsn) $+ $c1(:) Steal From: $c1(Man:) $c2($ceil($calc($4 / 8)))%display $c1(Guard:) $c2($ceil($calc($4 / 46.8)))%display $c1(Knight of Ardougne:) $c2($ceil($calc($4 / 84.3))))%display $c1(Gnome:) $c2($ceil($calc($4 / 198.3)))%display $c1(Hero:) $c2($ceil($calc($4 / 275.3)))%display $c1(Elf:) $c2($ceil($calc($4 / 353.3)))%display $c1(Cake Stall:) $c2($ceil($calc($4 / 16)))%display $c1(Nature Rune Chest:) $c2($ceil($calc($4 / 25)))%display $c1(Blood Rune Chest:) $c2($ceil($calc($4 / 250)))%display $c1(Paladin Chest:) $c2($ceil($calc($4 / 500))) }
if (%skill == RCIng) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Runecrafting) $c2(%rsn) $+ $c1(:) Must Make: $c1(Air Runes:) $c2($ceil($calc($4 / 5)))%display $c1(Mind Runes:) $c2($ceil($calc($4 / 5.5)))%display $c1(Water Runes:) $c2($ceil($calc($4 / 6))))%display $c1(Earth Runes:) $c2($ceil($calc($4 / 6.5)))%display $c1(Fire Runes:) $c2($ceil($calc($4 / 7)))%display $c1(Body Runes:) $c2($ceil($calc($4 / 7.5)))%display $c1(Cosmic Runes:)$c2($ceil($calc($4 / 8)))%display $c1(Chaos Runes:) $c2($ceil($calc($4 / 8.5)))%display $c1(Nature Runes:) $c2($ceil($calc($4 / 9)))%display $c1(Law Runes:) $c2($ceil($calc($4 / 9.5))))%display $c1(Death Runes:) $c2($ceil($calc($4 / 10))) }
if (%skill == Woodcutting) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Woodcutting) $c2(%rsn) $+ $c1(:)Must Chop: $c1(Normal Tree:) $c2($ceil($calc($4 / 25)))%display $c1(Oak Tree:) $c2($ceil($calc($4 / 35.7)))%display $c1(Willow Tree:) $c2($ceil($calc($4 / 67.5))))%display $c1(Teak Tree:) $c2($ceil($calc($4 / 85)))%display $c1(Hollow Tree:) $c2($ceil($calc($4 / 82.5)))%display $c1(Maple Tree:) $c2($ceil($calc($4 / 100)))%display $c1(Mahogany Tree:) $c2($ceil($calc($4 / 125)))%display $c1(Yew Tree:) $c2($ceil($calc($4 / 175)))%display $c1(Magic Tree:) $c2($ceil($calc($4 / 250))) }
if (%skill == Wc) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Woodcutting) $c2(%rsn) $+ $c1(:)Must Chop: $c1(Normal Tree:) $c2($ceil($calc($4 / 25)))%display $c1(Oak Tree:) $c2($ceil($calc($4 / 35.7)))%display $c1(Willow Tree:) $c2($ceil($calc($4 / 67.5))))%display $c1(Teak Tree:) $c2($ceil($calc($4 / 85)))%display $c1(Hollow Tree:) $c2($ceil($calc($4 / 82.5)))%display $c1(Maple Tree:) $c2($ceil($calc($4 / 100)))%display $c1(Mahogany Tree:) $c2($ceil($calc($4 / 125)))%display $c1(Yew Tree:) $c2($ceil($calc($4 / 175)))%display $c1(Magic Tree:) $c2($ceil($calc($4 / 250))) }
if (%skill == Fishing) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Fishing) $c2(%rsn) $+ $c1(:)Must Catch: $c1(Trout:) $c2($ceil($calc($4 / 50)))%display $c1(Tuna:) $c2($ceil($calc($4 / 80)))%display $c1(Lobster:) $c2($ceil($calc($4 / 90))))%display $c1(Bass:) $c2($ceil($calc($4 / 100)))%display $c1(Swordfish:) $c2($ceil($calc($4 / 100)))%display $c1(MonkFish:) $c2($ceil($calc($4 / 120)))%display $c1(Shark:) $c2($ceil($calc($4 / 110)))%display $c1(Sea Turtle:) $c2($ceil($calc($4 / 38)))%display $c1(Manta Ray:) $c2($ceil($calc($4 / 46))) }
if (%skill == Firemaking) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Firemaking) $c2(%rsn) $+ $c1(:)Must Burn: $c1(Normal Log:) $c2($ceil($calc($4 / 40)))%display $c1(Oak Log:) $c2($ceil($calc($4 / 60)))%display $c1(Willow Log:) $c2($ceil($calc($4 / 90))))%display $c1(Teak Log:) $c2($ceil($calc($4 / 105)))%display $c1(Maple Log:) $c2($ceil($calc($4 / 135)))%display $c1(Mahogany Log:) $c2($ceil($calc($4 / 157.5)))%display $c1(Yew Log:) $c2($ceil($calc($4 / 202.5)))%display $c1(Magic Log:) $c2($ceil($calc($4 / 303.75))) }
if (%skill == Crafting) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Crafting) $c2(%rsn) $+ $c1(:)Must Make: $c1(Green Dragonhide Vambraces:) $c2($ceil($calc($4 / 62)))%display $c1(Green Dragonhide Chaps:) $c2($ceil($calc($4 / 124))))%display $c1(Green Dragonhide Body:) $c2($ceil($calc($4 / 186)))%display $c1(Blue Dragonhide Vambraces:) $c2($ceil($calc($4 / 70)))%display $c1(Blue Dragonhide Chaps:) $c2($ceil($calc($4 / 140)))%display $c1(Blue Dragonhide Body:) $c2($ceil($calc($4 / 210)))%display $c1(Red Dragonhide Vambraces:) $c2($ceil($calc($4 / 78)))%display $c1(Red Dragonhide Chaps:) $c2($ceil($calc($4 / 156)))%display $c1(Red Dragonhide Body:) $c2($ceil($calc($4 / 234)))%display $c1(Black Dragonhide Vambraces:) $c2($ceil($calc($4 / 86)))%display $c1(Black Dragonhide Chaps:) $c2($ceil($calc($4 / 172)))%display $c1(Black Dragonhide Vambraces:) $c2($ceil($calc($4 / 258))) }
if (%skill == Crafting) { .timer 1 10 %display $c3(Gem Crafting) $c1(For Level) $c2($calc($2 + 1)) $c1(Crafting) $c2(%rsn) $+ $c1(:) $c1(Cut&Craft Sapphire Amulet:) $c2($ceil($calc($4 / 115)))%display $c1(Emerald Amulet:) $c2($ceil($calc($4 / 70)))%display $c1(Ruby Amulet:) $c2($ceil($calc($4 / 85)))%display $c1(Cut&Craft Dragonstone Ring:) $c2($ceil($calc($4 / 227.5)))%display $c1(Bow Strings:) $c2($ceil($calc($4 / 15)))%display $c1(Glass Vials:) $c2($ceil($calc($4 / 35)))%display $c1(Holy Symbol:) $c2($ceil($calc($4 / 50))) }
if (%skill == Mining) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Mining) $c2(%rsn) $+ $c1(: )Must Mine: $c1(Pure Essence:) $c2($ceil($calc($4 / 5)))%display $c1(Iron:) $c2($ceil($calc($4 / 35)))%display $c1(Silver:) $c2($ceil($calc($4 / 40))))%display $c1(Gold:) $c2($ceil($calc($4 / 65)))%display $c1(Mithril:) $c2($ceil($calc($4 / 80)))%display $c1(Adamantite:) $c2($ceil($calc($4 / 95)))%display $c1(Runite:) $c2($ceil($calc($4 / 125)))%display $c1(Coal:) $c2($ceil($calc($4 / 50))) }
if (%skill == Smithing) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Smithing) $c2(%rsn) $+ $c1(:) Must Smelt Bars: $c1(Bronze Bars:) $c2($ceil($calc($4 / 6.2)))%display $c1(Iron Bars:) $c2($ceil($calc($4 / 12.5)))%display $c1(Steel Bars:) $c2($ceil($calc($4 / 17.5))))%display $c1(Mithril Bars:) $c2($ceil($calc($4 / 30)))%display $c1(Adamant Bars:) $c2($ceil($calc($4 / 37.5)))%display $c1(Rune Bars:) $c2($ceil($calc($4 / 50)))%display 4$c1(For Level) $c2($calc($2 + 1)) 4Smithing $c2(%rsn) $+ $c1(:) Can Smith Plates: $c1(Bronze Plate-Bodies:) $c2($ceil($calc($4 / 62.5)))%display $c1(Iron Plate-Bodies:) $c2($ceil($calc($4 / 125)))%display $c1(Steel Plate-Bodies:) $c2($ceil($calc($4 / 187.5)))%display $c1(Mithril Plate-Bodies:) $c2($ceil($calc($4 / 250)))%display $c1(Adamant Plate-Bodies:) $c2($ceil($calc($4 / 312.5)))%display $c1(Rune Plate-Bodies:) $c2($ceil($calc($4 / 375))) }
if (%skill == cooking) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Fishing) $c2(%rsn) $+ $c1(:)Must Cook: $c1(Trout:) $c2($ceil($calc($4 / 70)))%display $c1(Tuna:) $c2($ceil($calc($4 / 100)))%display $c1(Lobster:) $c2($ceil($calc($4 / 120))))%display $c1(Bass:) $c2($ceil($calc($4 / 130)))%display $c1(Swordfish:) $c2($ceil($calc($4 / 140)))%display $c1(MonkFish:) $c2($ceil($calc($4 / 150)))%display $c1(Shark:) $c2($ceil($calc($4 / 210)))%display $c1(Sea Turtle:) $c2($ceil($calc($4 / 211.3)))%display $c1(Manta Ray:) $c2($ceil($calc($4 / 216.3))) }
if (%skill == Hunter) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Hunting) $c2(%rsn) $+ $c1(:)Must Hunt: $c1(Crimson Swift:) $c2($ceil($calc($4 / 34)))%display $c1(Copper Longtail:) $c2($ceil($calc($4 / 61)))%display $c1(Sapphire Glacialis:) $c2($ceil($calc($4 / 34))))%display $c1(Horned Graahk:) $c2($ceil($calc($4 / 240)))%display $c1(Razor-backed Kebbit:) $c2($ceil($calc($4 / 348)))%display $c1(Sabre-toothed Kyatt:) $c2($ceil($calc($4 / 300)))%display $c1(Red Salamander:) $c2($ceil($calc($4 / 272)))%display $c1(Black Salamander:) $c2($ceil($calc($4 / 304)))%display $c1(Dashing Kebbit:) $c2($ceil($calc($4 / 156))) }
if (%skill == scripting) { %display $c1(For Level) $c2($calc($2 + 1)) $c1(Range) $c2(%rsn) $+ $c1(:)Must range: $c1(Green Dragonhide Vambraces:) $c2($ceil($calc($4 / 62)))%display $c1(Green Dragonhide Chaps:) $c2($ceil($calc($4 / 124))))%display $c1(Green Dragonhide Body:) $c2($ceil($calc($4 / 186)))%display $c1(Blue Dragonhide Vambraces:) $c2($ceil($calc($4 / 70)))%display $c1(Blue Dragonhide Chaps:) $c2($ceil($calc($4 / 140)))%display $c1(Blue Dragonhide Body:) $c2($ceil($calc($4 / 210)))%display $c1(Red Dragonhide Vambraces:) $c2($ceil($calc($4 / 78)))%display $c1(Red Dragonhide Chaps:) $c2($ceil($calc($4 / 156)))%display $c1(Red Dragonhide Body:) $c2($ceil($calc($4 / 234)))%display $c1(Black Dragonhide Vambraces:) $c2($ceil($calc($4 / 86)))%display $c1(Black Dragonhide Chaps:) $c2($ceil($calc($4 / 172)))%display $c1(Black Dragonhide Vambraces:) $c2($ceil($calc($4 / 258))) }
}
}
elseif (%style == combat) {
var %a.mult = .32707, %s.mult = .324, %d.mult = .25, %h.mult = .25, %p.mult = .124, %r.mult = .487, %m.mult = .487
var %a = $iif($gettok($hget(%table,attack),2,32),$v1,-), $&
%s = $iif($gettok($hget(%table,strength),2,32),$v1,-), $&
%d = $iif($gettok($hget(%table,defence),2,32),$v1,-), $&
%h = $iif($gettok($hget(%table,hitpoints),2,32),$v1,-), $&
%r = $iif($gettok($hget(%table,ranged),2,32),$v1,-), $&
%m = $iif($gettok($hget(%table,magic),2,32),$v1,-), $&
%p = $iif($gettok($hget(%table,prayer),2,32),$v1,-)
var %meleecombat = $calc(%a * %a.mult + %s * %s.mult + %d * %d.mult + %h * %h.mult + %p * %p.mult), $&
%RangedCombat = $calc(%r * %r.mult + %p * %p.mult + %d * %d.mult + %h * %h.mult), $&
%MagicCombat = $calc(%m * %m.mult + %p * %p.mult + %d * %d.mult + %h * %h.mult)
if (%MagicCombat == %RangedCombat) && (%MagicCombat == %RangedCombat) {
%display $c3(Results Found! = 0) $c1(The nick) $c2(%rsn) $c1(does not appear in the hiscores for any combat skills)
cleanup %id
halt
}
elseif (%MagicCombat > %RangedCombat) && (%MagicCombat > %MeleeCombat) var %cmbstyle = Magic, %Combat = %MagicCombat
elseif (%RangedCombat > %MeleeCombat) var %cmbstyle = Ranged, %Combat = %RangedCombat
else var %cmbstyle = melee, %combat = %MeleeCombat
var %cmb.temp = $abs($calc($int($calc(%combat +1)) - %combat)), $&
%a.2lvl = $ceil($calc(%cmb.temp / %a.mult)), %s.2lvl = $ceil($calc(%cmb.temp / %s.mult)), $&
%d.2lvl = $ceil($calc(%cmb.temp / %d.mult)), %m.2lvl = $ceil($calc(%cmb.temp / %m.mult)), $&
%r.2lvl = $ceil($calc(%cmb.temp / %r.mult)), %p.2lvl = $ceil($calc(%cmb.temp / %p.mult))
if (%cmbstyle == magic) var %dynamic.2lvl = $c1(Magic:) $c2(%m.2lvl)
elseif (%cmbstyle == Ranged) var %dynamic.2lvl = $c1(Ranged:) $c2(%r.2lvl)
else var %dynamic.2lvl = $c1(Att:) $c2(%a.2lvl) $c1(Str:) $c2(%s.2lvl)
var %combat = $round(%combat,2), %next = $ceil(%combat)
%display $c2(%rsn) $c1(is) $c2(%combat) $c1(%cmbstyle style combat)
%display $c1(Attack:) $c2(%a) $c1(Defence:) $c2(%d) $c1(Strength:) $c2(%s) $c1(Hits:) $c2(%h) $&
$c1(Mage:) $c2(%m) $c1(Range:) $c2(%r) $c1(Pray:) $c2(%p)
%display $c1(Levels for) $c2(%next) $+ $c1(:) %dynamic.2lvl $&
$c1(Def/Hp:) $c2(%d.2lvl) $c1(Prayer:) $c2(%p.2lvl)
}
cleanup %id
}
alias -l cleanup {
unset $+(%,stats.*.,$1)
sockclose $+(Stats.,$1)
.remove $+(Stats.,$1)
}
alias -l xp {
var %x = 1, %level = $calc($1 - 1), %xp = 0
while (%x <= %level) {
var %TempXp = $calc((%x + 300 * 2^(%x / 7)) /4)
inc %xp %TempXp
inc %x
}
return $int(%xp)
}
alias -l xp2Next {
var %xp = $remove($2,$chr(44)), %nextxp = $xp($calc($1 + 1))
return $calc(%nextxp - %xp)
}
alias -l striptags { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return %x }
alias -l setskill {
if ($1 == 000) || ($regex($1,/^(st|(skill)?total|overall)$/Si)) return Overall
elseif ($1 == 10) || ($regex($1,/^at(t|k|tack)$/Si)) return Attack
elseif ($1 == 20) || ($regex($1,/^def(en[cs]e)?$$/Si)) return Defence
elseif ($1 == 30) || ($regex($1,/^str(ength)?$/Si)) return Strength
elseif ($1 == 40) || ($regex($1,/^hp|hit(s|points?)?$/Si)) return Hitpoints
elseif ($1 == 50) || ($regex($1,/^range(r|d|ing)?$/Si)) return Ranged
elseif ($1 == 60) || ($regex($1,/^Pray(er)?$$/Si)) return Prayer
elseif ($1 == 70) || ($regex($1,/^mag(e|ic)$$/Si)) return Magic
elseif ($1 == 80) || ($regex($1,/^cook(ing)?$/Si)) return Cooking
elseif ($1 == 90) || ($regex($1,/^wc|wood(cut(ting)?)?$/Si)) return Woodcutting
elseif ($1 == 100) || ($regex($1,/^fletch(ing)?$/Si)) return Fletching
elseif ($1 == 110) || ($regex($1,/^fish(ing)?$/Si)) return Fishing
elseif ($1 == 120) || ($regex($1,/^(fire|fm)(make?(ing)?|ing)?$/Si)) return Firemaking
elseif ($1 == 130) || ($regex($1,/^craft(ing)?$/Si)) return Crafting
elseif ($1 == 140) || ($regex($1,/^(smith|smelt)(ing)?$/Si)) return Smithing
elseif ($1 == 150) || ($regex($1,/^mine(ing)?$/Si)) return Mining
elseif ($1 == 160) || ($regex($1,/^herb(law|lore)?$/Si)) return Herblore
elseif ($1 == 170) || ($regex($1,/^agil(ity)?$/Si)) return Agility
elseif ($1 == 180) || ($regex($1,/^(th(ei|ie)[fv](e|ing)?)$/Si)) return Thieving
elseif ($1 == 190) || ($regex($1,/^slay(er|ing)?$/Si)) return Slayer
elseif ($1 == 200) || ($regex($1,/^farm(er|ing)?$/Si)) return Farming
elseif ($1 == 210) || ($regex($1,/^(rc|runecraft)(er|ing)?$/Si)) return Runecraft
elseif ($1 == 230) || ($regex($1,/^carp(entry)?$/Si)) return Construction
elseif ($1 == 240) || ($regex($1,/^hunt(er|ing)?$/Si)) return Hunter
}
alias /nextlvl {
;;; Calculates XP to level;;;
/var %x = 1, %level = $calc($1 - 1), %xp = 0
/while (%x <= %level) {
/var %tempxp = $calc($floor($calc(%x + 300 * 2 ^ (%x / 7))) / 4)
/inc %xp %tempxp
/inc %x
}
/return $int(%xp)
}