rendered paste bodymenu channel {
Stat:{
dialog -m stat stat
}
}
dialog stat {
title "XS RuneScape Stat Lookup"
size -1 -1 300 350
text "Player:", 3, 100 10 50 50, right
edit %defrsn, 4, 155 7 80 20, limit 12
button "Look Up", 5, 240 7 50 20
text "COMBAT", 11, 125 30 50 20, center
text "Attack:", 12, 10 50 50 20, right
text "Strength:", 13, 100 50 50 20, right
text "Defence:", 14, 190 50 50 20, right
text "Hitpoints:", 15, 10 70 50 20, right
text "Magic:", 16, 100 70 50 20, right
text "Ranged:", 17, 190 70 50 20, right
text "Prayer:", 18, 10 90 50 20, right
text "Combat:", 19, 100 90 50 20, right
button "ReCalc", 20, 220 90 50 20
edit , 31, 70 48 25 20
edit , 32, 70 68 25 20
edit , 33, 70 88 25 20
edit , 34, 160 48 25 20
edit , 35, 160 68 25 20
edit , 36, 160 88 45 20
edit , 37, 250 48 25 20
edit , 38, 250 68 25 20
text "NONCOMBAT", 50, 115 120 70 20, center
text "Mining:", 51, 10 140 50 50, right
text "Smithing:", 52, 100 140 50 20, right
text "Crafting:", 53, 190 140 50 20, right
edit , 70, 70 138 25 20
edit , 71, 160 138 25 20
edit , 72, 250 138 25 20
text "Fishing:", 54, 10 180 50 20, right
text "Cooking:", 55, 100 180 50 20, right
text "Firemake:", 56, 190 180 50 20, right
edit , 73, 70 178 25 20
edit , 74, 160 178 25 20
edit , 75, 250 178 25 20
text "Fletching:", 57, 10 220 50 20, right
text "Woodcut:", 58, 100 220 50 20, right
text "Runecrft:", 59, 190 220 50 20, right
edit , 76, 70 218 25 20
edit , 77, 160 218 25 20
edit , 78, 250 218 25 20
text "Thieving:", 60, 10 260 50 20, right
text "Agility:", 61, 100 260 50 20, right
text "Herblore:", 62, 190 260 50 20, right
edit , 79, 70 258 25 20
edit , 80, 160 258 25 20
edit , 81, 250 258 25 20
text "Slayer:", 63, 10 300 50 20, right
text "Farming:", 64, 100 300 50 20, right
text "Constr:", 65, 190 300 50 20, right
edit , 82, 70 298 25 20
edit , 83, 160 298 25 20
edit , 84, 250 298 25 20
text "Double click a skill to see a calculator for it.", 90, 1 330 300 20, center
}
dialog skill {
Title %skill
size -1 -1 250 310
text "User", 1, 55 1 50 20
edit , 10, 25 15 80 20, limit 12
button "Look Up", 20, 120 15 50 20
text "Level:", 2, 10 45 50 20, right
edit , 11, 63 43 25 20
text "Next level:", 3, 8 80 70 20
edit , 12, 63 78 25 20
text "EXP:", 4, 100 45 50 20
edit , 13, 125 43 90 20
text "EXP:", 5, 100 80 50 20
edit , 14, 125 78 90 20
text "Rank", 8, 198 1 50 20
edit , 17, 175 15 70 20
text "EXP to next:", 7, 30 110 90 20, center
edit , 16, 115 108 90 20
text "Items to Next Level", 6, 15 140 130 20
list 15, 10 155 230 150
}
dialog combat {
Title "Combat"
size -1 -1 300 200
text "Player:", 1, 5 20 50 20, right
edit , 20, 65 18 80 20, limit 12
button "Look Up", 30, 155 18 50 20
text "Attack:", 2, 5 55 50 20, right
text "Strength:", 3, 95 55 50 20, right
text "Defence:", 4, 185 55 50 20, right
text "Hitpoints:", 5, 5 95 50 20, right
text "Ranged:", 6, 95 95 50 20, right
text "Magic:", 7, 185 95 50 20, right
text "Prayer:", 8, 5 135 50 20, right
edit , 21, 65 52 25 20
edit , 22, 155 52 25 20
edit , 23, 245 52 25 20
edit , 24, 65 92 25 20
edit , 25, 155 92 25 20
edit , 26, 245 92 25 20
edit , 27, 65 132 25 20
text "Combat", 31, 155 120 50 20, center
edit , 32, 155 133 50 20, center
button "Recalc", 33, 100 130 50 25
}
on *:DIALOG:stat:*:*:{
if ($devent == init) {
if (%defrsn == $null) {
set %defrsn $left($?="Default Runescape Username?",12)
if (%defrsn == $null) { halt }
else { .signal dstat %defrsn }
}
if (%defrsn != $null) {
.signal dstat %defrsn
}
}
if ($devent == sclick) {
if ($did == 5) { .signal dstat $replace($did(4),$chr(32),+) }
if ($did == 20) { did -o $dname 36 1 $cmbcalc($did(31),$did(37),$did(34),$did(32),$did(33)) }
}
if ($devent == dclick) {
if ($inrect($mouse.x,$mouse.y,10,220,50,20)) { set %skill Fletching }
if ($inrect($mouse.x,$mouse.y,10,50,50,20)) { set %skill Attack }
if ($inrect($mouse.x,$mouse.y,100,50,50,20)) { set %skill Strength }
if ($inrect($mouse.x,$mouse.y,190,50,50,20)) { set %skill Defence }
if ($inrect($mouse.x,$mouse.y,10,70,50,20)) { set %skill Hitpoints }
if ($inrect($mouse.x,$mouse.y,100,70,50,20)) { set %skill Magic }
if ($inrect($mouse.x,$mouse.y,190,70,50,20)) { set %skill Ranged }
if ($inrect($mouse.x,$mouse.y,10,90,50,20)) { set %skill Prayer }
if ($inrect($mouse.x,$mouse.y,10,140,50,20)) { set %skill Mining }
if ($inrect($mouse.x,$mouse.y,100,140,50,20)) { set %skill Smithing }
if ($inrect($mouse.x,$mouse.y,190,140,50,20)) { set %skill Crafting }
if ($inrect($mouse.x,$mouse.y,10,180,50,20)) { set %skill Fishing }
if ($inrect($mouse.x,$mouse.y,100,180,50,20)) { set %skill Cooking }
if ($inrect($mouse.x,$mouse.y,190,180,50,20)) { set %skill Firemaking }
if ($inrect($mouse.x,$mouse.y,100,220,50,20)) { set %skill Woodcutting }
if ($inrect($mouse.x,$mouse.y,190,220,50,20)) { set %skill Runecraft }
if ($inrect($mouse.x,$mouse.y,10,260,50,20)) { set %skill Thieving }
if ($inrect($mouse.x,$mouse.y,100,260,50,20)) { set %skill Agility }
if ($inrect($mouse.x,$mouse.y,190,260,50,20)) { set %skill Herblore }
if ($inrect($mouse.x,$mouse.y,10,300,50,20)) { set %skill Slayer }
if ($inrect($mouse.x,$mouse.y,100,300,50,20)) { set %skill Farming }
if ($inrect($mouse.x,$mouse.y,190,300,50,20)) { set %skill Construction }
if ($inrect($mouse.x,$mouse.y,100,90,50,20)) {
set %cmb on
dialog -am combat combat | .signal dcmb $did(stat,4)
}
if (%skill) { dialog -am skill skill | .signal dskill $did(stat,4) }
}
if ($devent == close) {
sockclose dstat
sockclose dskill
sockclose dcmb
}
}
on *:DIALOG:skill:*:*:{
if ($devent == init) {
did -o skill 10 1 $did(stat,4)
}
if ($devent == sclick) {
if ($did == 20) {
.signal dskill $replace($did(skill,10),$chr(32),+)
}
}
if ($devent == close) {
sockclose dskill
sockclose dstat
sockclose dcmb
unset %skill
}
}
on *:DIALOG:combat:*:*:{
if ($devent == init) {
did -o combat 20 1 $did(stat,4)
}
if ($devent == sclick) {
if ($did == 30) {
.signal dcmb $replace($did(combat,20),$chr(32),+)
}
if ($did == 33) {
did -o combat 32 1 $cmbcalc($did(21),$did(23),$did(22),$did(24),$did(27))
}
}
if ($devent == dclick) {
if ($inrect($mouse.x,$mouse.y,5,55,50,20)) { set %skill Attack }
if ($inrect($mouse.x,$mouse.y,95,55,50,20)) { set %skill Strength }
if ($inrect($mouse.x,$mouse.y,185,55,50,20)) { set %skill Defence }
if ($inrect($mouse.x,$mouse.y,5,95,50,20)) { set %skill Hitpoints }
if ($inrect($mouse.x,$mouse.y,95,95,50,20)) { set %skill Ranged }
if ($inrect($mouse.x,$mouse.y,185,95,50,20)) { set %skill Magic }
if ($inrect($mouse.x,$mouse.y,5,135,50,20)) { set %skill Prayer }
if (%skill) { dialog -am skill skill | .signal dskill $did(combat,20) }
}
if ($devent == close) {
sockclose dskill
sockclose dstat
sockclose dcmb
unset %cmb
}
}
on *:SIGNAL:dstat:{
did -rb stat 31-38,70-84
set %lookup.d $replace($1-,$chr(32),+)
sockopen dstat www.rscript.org 80
}
on *:SIGNAL:dskill:{
did -rb skill 11-14,16-17
set %lookup.d $replace($1-,$chr(32),+)
sockopen dstat www.rscript.org 80
}
on *:SIGNAL:dcmb:{
did -rb combat 21-27,32
set %lookup.d $replace($1-,$chr(32),+)
sockopen dstat www.rscript.org 80
}
on *:SOCKOPEN:dstat:{
sockwrite -nt $sockname GET /statpage.php?user= [ $+ [ %lookup.d ] ] HTTP/1.1
sockwrite -nt $sockname User-Agent: RuneScript Public (Crawler Bot; rscript.org;)
sockwrite -nt $sockname Host: rscript.org $+ $crlf $+ $crlf
if (%cmb) {
sockrename $sockname dcmb
}
if (%skill) {
sockrename $sockname dskill
}
}
on *:SOCKREAD:dstat:{
var %total | sockread -f %total
tokenize 32 $remove(%total,Stat:)
if (*does not feature* iswm $1-) { did -er stat 31-38,70-84 | sockclose $sockname }
if (Attack == $1) { did -eo stat 31 1 $iif($3 isnum,$3,NA) }
if (Hitpoints == $1) { did -eo stat 32 1 $iif($3 isnum,$3,NA) }
if (Prayer == $1) { did -eo stat 33 1 $iif($3 isnum,$3,NA) }
if (Strength == $1) { did -eo stat 34 1 $iif($3 isnum,$3,NA) }
if (Defence == $1) { did -eo stat 37 1 $iif($3 isnum,$3,1) }
if (Ranged == $1) { did -eo stat 38 1 $iif($3 isnum,$3,NA) }
if (Magic == $1) {
did -eo stat 35 1 $iif($3 isnum,$3,NA)
did -eo stat 36 1 $cmbcalc($did(stat,31),$iif($did(stat,37) != NA,$did(stat,37),1),$did(stat,34),$did(stat,32),$did(stat,33))
}
if (Herblore == $1) { did -eo stat 81 1 $iif($3 isnum,$3,NA) }
if (Agility == $1) { did -eo stat 80 1 $iif($3 isnum,$3,NA) }
if (Thieving == $1) { did -eo stat 79 1 $iif($3 isnum,$3,NA) }
if (Crafting == $1) { did -eo stat 72 1 $iif($3 isnum,$3,NA) }
if (Fletching == $1) { did -eo stat 76 1 $iif($3 isnum,$3,NA) }
if (Slayer == $1) { did -eo stat 82 1 $iif($3 isnum,$3,NA) }
if (Mining == $1) { did -eo stat 70 1 $iif($3 isnum,$3,NA) }
if (Smithing == $1) { did -eo stat 71 1 $iif($3 isnum,$3,NA) }
if (Fishing == $1) { did -eo stat 73 1 $iif($3 isnum,$3,NA) }
if (Cooking == $1) { did -eo stat 74 1 $iif($3 isnum,$3,NA) }
if (Runecraft == $1) { did -eo stat 78 1 $iif($3 isnum,$3,NA) }
if (Firemaking == $1) { did -eo stat 75 1 $iif($3 isnum,$3,NA) }
if (Woodcutting == $1) { did -eo stat 77 1 $iif($3 isnum,$3,NA) }
if (Farming == $1) { did -eo stat 83 1 $iif($3 isnum,$3,NA) }
if (Construction == $1) {
did -eo stat 84 1 $iif($3 isnum,$3,NA)
sockclose $sockname
}
}
on *:SOCKREAD:dskill:{
var %total | sockread -f %total
tokenize 32 $remove(%total,Stat:)
if ($1 == %skill) {
did -eo skill 17 1 $2
did -eo skill 11 1 $3
did -eo skill 12 1 $iif($exists(nextlvl.txt),$iif($calc($3 + 1) isnum 1-99,$calc($3 + 1),NA),NA)
did -eo skill 13 1 $4
did -eo skill 14 1 $iif($exists(nextlvl.txt),$iif($calc($3 + 1) isnum 1-99,$bytes($nextlvl($3),b),NA),NA)
did -eo skill 16 1 $iif($exists(nextlvl.txt),$iif($calc($3 + 1) isnum 1-99,$bytes($calc($nextlvl($3) - $remove($4,$chr(44))),b),0),NA)
did -a skill 15 Coming soon!
sockclose $sockname
}
}
on *:SOCKREAD:dcmb:{
var %total | sockread -f %total
tokenize 32 $remove(%total,Stat:)
if ($1 == Attack) { did -eo combat 21 1 $iif($3 isnum,$3,NA) }
if ($1 == Strength) { did -eo combat 22 1 $iif($3 isnum,$3,NA) }
if ($1 == Defence) { did -eo combat 23 1 $iif($3 isnum,$3,NA) }
if ($1 == Hitpoints) { did -eo combat 24 1 $iif($3 isnum,$3,NA) }
if ($1 == Ranged) { did -eo combat 25 1 $iif($3 isnum,$3,NA) }
if ($1 == Prayer) { did -eo combat 27 1 $iif($3 isnum,$3,NA) }
if ($1 == Magic) {
did -eo combat 26 1 $iif($3 isnum,$3,NA)
did -eo combat 32 1 $cmbcalc($did(combat,21),$iif($did(combat,23) != NA,$did(combat,23),1),$did(combat,22),$did(combat,24),$did(combat,27))
sockclose $sockname
}
}
alias cmbcalc {
return $calc((0.32707*$1)+(0.249*$2)+(0.324*$3)+(0.25*$4)+(0.124*$5))
}
/*
#######################################################################
##WARNING: Everything after this point will attempt to write ##
##a text file to your computer. (C:\Program Files\mIRC\nextlvl.txt) ##
##If you do not want this file simply remove everything after ##
##this line. Doing so will cause the $nextlvl identifier not to ##
##work, which will return NA for your next level and exp till & ##
##for it. ##
#######################################################################
*/
alias nextlvl {
if ($exists(nextlvl.txt)) {
if ($1 !isnum 1-99) { return NA }
else {
var %nextlvl = $1 + 1
return $gettok($read(nextlvl.txt,%nextlvl),2,32)
}
}
elseif ($exists(nextlvl.txt == $false)) {
sockopen nextlvl www.geocities.com 80
}
}
on *:SOCKOPEN:nextlvl:{
sockwrite -nt $sockname GET /x_thanatos/rs/nxtlvl.html HTTP/1.0
sockwrite -nt $sockname Host: www.geocities.com
sockwrite -nt $sockname
}
on *:SOCKREAD:nextlvl:{
var %nxtlvl | sockread -f %nxtlvl
if ($gettok(%nxtlvl,1,32) isnum 1-99) {
write nextlvl.txt $remove(%nxtlvl,</br>)
}
}