alias htmlfree {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}
menu channel {
Friends List:{
dialog -m nick nick
}
}
menu NickList {
Add {
set %friend $1
write friends.txt $1
notify $1
echo -a You Have Added $1 To Your Friends List.
if (%dialog.nick == on) {
did -a nick 4 %friend
while (%1 < $did(nick,4).lines) {
inc %1 1
if ($gettok($did(nick,4,%1),1,32) isin %friend) {
did -o nick 4 %1 $gettok($did(nick,4,%1),1,32) $iif($notify($did(nick,4,%1)).ison == $true,online,offline)
}
}
}
}
}
alias nk dialog -m nick nick
dialog nick {
title "Friendslist"
size -1 -1 127 233
option dbu
text "Friends List, Created by RussellReal.", 10, 3 1 94 10, left
text "Nickname To Add", 1, 15 7 94 10, left
edit "", 2, 2 15 70 13, left
Button "Submit", 3, 74 15 25 13, Right
list 4, 2 30 123 150, left
button "Remove", 5, 22 177 41 21, left
button "Channels", 17, 64 177 41 21, left
button "Query", 6, 1 177 20 10, left
button "Notice", 7, 1 188 20 10, left
button "Whois", 8, 106 177 20 10, left
button "Invite", 9, 106 188 20 10, left
button "My Site", 11, 100 1 23 9, right
button "Clear All", 12, 99 15 25 13, Right
text "Google Search - RuneScape Highscore Look-up", 13, 1 200 126 10, center
edit "", 14, 1 209 126 10, left
button "Search!", 15, 3 220 60 10
button "Rs Stat Look-Up!", 16, 64 220 60 10
}
alias RSHS dialog -m stats stats
dialog stats {
title "RS HIGH SCORE LOOK-UP"
size -1 -1 200 202
option dbu
text "Combat:", 1, 105 10 20 10, left
text "Overall:" 2, 155 10 20 10, left
text "Nickname:", 3, 2 10 25 10, left
edit "", 30, 28 10 50 10, left
edit "", 31, 125 10 28 10, left
edit "", 32, 171 10 28 10, left
button "Look up", 99, 78 10 25 10, center
box "Experience", 98, 50 25 45 175, center
box "Experience", 97, 150 25 45 175, center
box "Lvl", 96, 29 25 13 175, left
box "Lvl", 95, 129 25 13 175, left
box "Skill", 94, 1 25 28 175, left
box "Skill", 93, 101 25 28 175, left
text "Attack:", 4, 3 35 25 10, left
edit "", 33, 30 35 10 10, left
edit "", 55, 50 35 44 10, left
text "Strength:", 5, 3 50 25 10, left
edit "", 34, 30 50 10 10, left
edit "", 56, 50 50 44 10, left
text "Defence:", 6, 3 65 25 10, left
edit "", 35, 30 65 10 10, left
edit "", 57, 50 65 44 10, left
text "Magic:", 7, 3 80 25 10, left
edit "", 36, 30 80 10 10, left
edit "", 58, 50 80 44 10, left
text "Range:", 8, 3 95 25 10, left
edit "", 37, 30 95 10 10, left
edit "", 59, 50 95 44 10, left
text "HitPoints:", 9, 3 110 25 10, left
edit "", 38, 30 110 10 10, left
edit "", 60, 50 110 44 10, left
text "Prayer:", 10, 3 125 25 10, left
edit "", 39, 30 125 10 10, left
edit "", 61, 50 125 44 10, left
text "Agility:", 11, 3 140 25 10, left
edit "", 40, 30 140 10 10, left
edit "", 62, 50 140 44 10, left
text "Herblore:", 12, 3 155 25 10, left
edit "", 41, 30 155 10 10, left
edit "", 63, 50 155 44 10, left
text "Thieving:", 13, 3 170 25 10, left
edit "", 42, 30 170 10 10, left
edit "", 64, 50 170 44 10, left
text "Runecrft:", 14, 3 185 25 10, left
edit "", 43, 30 185 10 10, left
edit "", 65, 50 185 44 10, left
text "Crafting:", 15, 103 35 25 10, left
edit "", 44, 130 35 10 10, left
edit "", 66, 150 35 44 10, left
text "Fletching:", 16, 103 50 25 10, left
edit "", 45, 130 50 10 10, left
edit "", 67, 150 50 44 10, left
text "Mining:", 17, 103 65 25 10, left
edit "", 46, 130 65 10 10, left
edit "", 68, 150 65 44 10, left
text "Fishing:", 18, 103 80 25 10, left
edit "", 47, 130 80 10 10, left
edit "", 69, 150 80 44 10, left
text "Cooking:", 19, 103 95 25 10, left
edit "", 48, 130 95 10 10, left
edit "", 70, 150 95 44 10, left
text "Firemking:", 20, 103 110 25 10, left
edit "", 49, 130 110 10 10, left
edit "", 71, 150 110 44 10, left
text "Woodcut:", 21, 103 125 25 10, left
edit "", 50, 130 125 10 10, left
edit "", 72, 150 125 44 10, left
text "Slayer:", 22, 103 140 25 10, left
edit "", 51, 130 140 10 10, left
edit "", 73, 150 140 44 10, left
text "Farming:", 23, 103 155 25 10, left
edit "", 52, 130 155 10 10, left
edit "", 74, 150 155 44 10, left
text "Con:", 24, 103 170 25 10, left
edit "", 53, 130 170 10 10, left
edit "", 75, 150 170 44 10, left
text "Smith:", 25, 103 185 25 10, left
edit "", 54, 130 185 10 10, left
edit "", 76, 150 185 44 10, left
}
alias whoisd dialog -m whois whois
dialog whois {
title "Whois Results"
size -1 -1 250 140
option dbu
text "Hostmask", 1, 100 5 50 10, center
edit "User is offline", 2, 5 16 240 10, center
text "Identified?", 3, 100 31 50 10, center
edit "nick isn't identified", 4, 5 42 240 10, center
text "Channels", 5, 100 56 50 10, center
edit "User is offline", 6, 5 67 240 10, center
text "Server", 7, 100 82 50 10, center
edit "User is offline", 8, 5 93 240 10, center
text "Idle Time", 9, 100 108 50 10, center
edit "Idle Time UnRetrievable", 10, 5 119 240 10, center
}
alias channfo dialog -m channfo channfo
dialog channfo {
title "User's Channels"
option dbu
size -1 -1 100 106
box "Channels", 1, 1 1 98 90
list 2, 2 8 96 86, left
box "", 3, 1 89 98 17
button "Info", 4, 3 94 46 10
button "Join", 5, 51 94 46 10
}
on *:DIALOG:channfo:init:0:{
dialog -x gathering
if (* iswm %chans) {
var %c = 0
while (%c < $numtok(%chans,32)) {
inc %c 1
did -a channfo 2 $gettok(%chans,%c,32)
}
}
else {
did -a channfo 2 This Nick Isn't On Any Channel
did -b channfo 4-5
}
disable #channels
unset %chans
}
on *:DIALOG:channfo:sclick:*:{
if ($did == 4) {
if ($did(channfo,2).seltext == $null) { selchani | halt }
cs info $did(channfo,2).seltext
}
if ($did == 5) {
if ($did(channfo,2).seltext == $null) { selchanj | halt }
join $did(channfo,2).seltext
}
}
alias selchani dialog -m selchani selchani
dialog selchani {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a channel from the list, before you click the info button", 1, 5 5 130 15, center
}
alias selchanj dialog -m selchanj selchanj
dialog selchanj {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a channel from the list, before you click the join button", 1, 5 5 130 15, center
}
on *:DIALOG:stats:init:0:{
if (%slookup != $null) {
set %lookup.d $replace(%slookup,$chr(32),+)
did -a stats 30 %slookup
did -rb stats 31-76
sockopen lookup www.rscript.org 80
else { halt }
}
}
on *:dialog:stats:sclick:99:{
set %lookup.d $did(stats,30)
set %lookup.d $replace(%lookup.d,$chr(32),+)
did -rb stats 31-76
sockopen lookup www.rscript.org 80
}
alias google dialog -m google google
dialog google {
title "Google - I'm Feeling Lucky Results"
size -1 -1 200 25
option dbu
edit "", 1, 5 5 190 10, center
}
on *:dialog:google:init:*:{
did -o google 1 1 %google
sockclose google
}
on *:dialog:nick:dclick:*:{
query $gettok($did(nick,4).seltext,1,32)
}
alias offline dialog -m offline offline
dialog offline {
title "Error"
size -1 -1 140 25
option dbu
text "This nickname is offline, Please wait till they are online before you query him\her", 1, 5 5 130 15, center
}
alias offlinec dialog -m offlinec offlinec
dialog offlinec {
title "Error"
size -1 -1 140 25
option dbu
text "This nickname is offline, Please wait till they are online before you check the channels he\she is on", 1, 5 5 130 15, center
}
alias nonickc dialog -m nonickc nonickc
dialog nonickc {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a nickname from your list before you press the channels button", 1, 5 5 130 15, center
}
alias offlinei dialog -m offlinei offlinei
dialog offlinei {
title "Error"
size -1 -1 140 25
option dbu
text "This nickname is offline, Please wait till they is online before you invite him\her", 1, 5 5 130 15, center
}
alias offlinew dialog -m offlinew offlinew
dialog offlinew {
title "Error"
size -1 -1 140 25
option dbu
text "This nickname is offline, Please wait till they is online before you whois him\her", 1, 5 5 130 15, center
}
alias offlinen dialog -m offlinen offlinen
dialog offlinen {
title "Error"
size -1 -1 140 25
option dbu
text "This nickname is offline, Please wait till they is online before you notice him\her", 1, 5 5 130 15, center
}
alias nonickn dialog -m nnickn nnickn
dialog nnickn {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a nickname from your friends list before you click the Notice button", 1, 5 5 130 15, center
}
alias nonickq dialog -m nnickq nnickq
dialog nnickq {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a nickname from your friends list before you click the query button", 1, 5 5 130 15, center
}
alias nonicki dialog -m nnicki nnicki
dialog nnicki {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a nickname from your friends list before you click the invite button", 1, 5 5 130 15, center
}
alias nonick dialog -m nnick nnick
dialog nnick {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a nickname from your friends list before you click the Remove button", 1, 5 5 130 15, center
}
alias notext dialog -m ntext ntext
dialog ntext {
title "Error"
size -1 -1 140 25
option dbu
text "Please type a nickname into the edit box, then press submit.", 1, 5 5 130 15, center
}
alias nowhois dialog -m nwhois nwhois
dialog nwhois {
title "Error"
size -1 -1 140 25
option dbu
text "Please select a nickname from your friends list before you click the whois button", 1, 5 5 130 15, center
}
alias Russl dialog -m link link
dialog link {
title "RussellReal's Scripting Forum"
size -1 -1 140 25
option dbu
text "RussellReal's Scripting Forum:", 1, 5 5 130 10, center
link "http://z7.invisionfree.com/Scripting_Fun/index.php", 2, 9 15 130 10, center
}
on *:dialog:link:sclick:2:{
//run http://z7.invisionfree.com/Scripting_fun
}
on *:dialog:nick:close:*:{
set %dialog.nick off
}
on *:dialog:nick:init:0:{
set %dialog.nick on
var %f = 0
while (%f < $lines(friends.txt)) {
inc %f 1
did -a nick 4 $read(friends.txt, %f)
}
var %1 = 0
while (%1 < $did(nick,4).lines) {
inc %1 1
did -o nick 4 %1 $gettok($did(nick,4,%1),1,32) $iif($notify($did(nick,4,%1)).ison == $true,online,offline)
}
}
on *:dialog:nick:sclick:*:{
if ($did == 3) {
if ($did(nick,2) != $null) {
set %friend $did(nick,2).text
notify %friend
did -a nick 4 %friend
write friends.txt %friend
did -r nick 2
while (%1 < $did(nick,4).lines) {
inc %1 1
if ($gettok($did(nick,4,%1),1,32) isin %friend) {
did -o nick 4 %1 $gettok($did(nick,4,%1),1,32) $iif($notify($did(nick,4,%1)).ison == $true,online,offline)
}
}
}
else { notext }
}
if ($did == 5) {
if ($did(nick,4).seltext == $null) { nonick }
else {
notify -r $did(nick,4).seltext
write -ds $+ $gettok($did(nick,4).seltext,1,32) friends.txt
did -d nick 4 $did(nick,4).sel
}
}
if ($did == 6) {
if ($did(nick,4).seltext == $null) { nonickq | halt }
if ($gettok($did(nick,4).seltext,2,32) == offline) { offline | halt }
query $gettok($did(nick,4).seltext,1,32)
}
if ($did == 7) {
if ($did(nick,4).seltext == $null) { nonickn | halt }
if ($gettok($did(nick,4).seltext,2,32) == offline) { offlinen | halt }
notice $gettok($did(nick,4).seltext,1,32) $?="Enter The Message You Wish To Send To $gettok($did(nick,4).seltext,1,32) $+ "
}
if ($did == 8) {
if ($did(nick,4).seltext == $null) { nowhois }
else {
if ($gettok($did(nick,4).seltext,2,32) == offline) { offlinew | halt }
set %Whois $gettok($did(nick,4).seltext,1,32)
whois $gettok($did(nick,4).seltext,1,32)
whoisd
enable #whois
}
}
if ($did == 9) {
if ($did(nick,4).seltext == $null) { nonicki | halt }
if ($gettok($did(nick,4).seltext,2,32) == offline) { offlinei | halt }
invite $gettok($did(nick,4).seltext,1,32) $?="Enter The Channel You Wish To Invite $did(nick,4).seltext Into"
}
if ($did == 11) { russl }
if ($did == 12) {
var %a = 0
while (%a < $did(nick,4).lines) {
inc %a 1
notify -r $gettok($did(nick,4,%a),1,32)
}
did -r nick 4
remove friends.txt
}
if ($did == 15) {
if ($did(nick,14) != $null) {
/set %lookup $replace($did(nick,14),$chr(32),+)
/sockopen google www.google.com 80
}
else { halt }
}
if ($did == 16) {
if ($did(nick,14) != $null) {
set %slookup $did(nick,14)
RSHS
unset %slookup
}
else {
RSHS
}
}
if ($did == 17) {
if ($did(nick,4).seltext == $null) { nonickc | halt }
if ($gettok($did(nick,4).seltext,2,32) == offline) { offlinec | halt }
enable #channels
whois $gettok($did(nick,4).seltext,1,32)
gathering
timer 1 1 channfo
}
}
alias gathering dialog -m gathering gathering
dialog gathering {
title "Gathering Channels..."
size -1 -1 100 20
option dbu
text "Please Wait......", 1, 1 5 98 10, center
}
#channels off
raw 319:* {
set %chans $replace($3-,@#,$chr(35),$+($chr(37),#),$chr(35),+#,$chr(35),##,$chr(35))
}
#channels end
#whois off
raw 311:* {
if (%dialog.nick == on) {
set %311 $3-
did -r whois 2
did -a whois 2 %311
}
}
raw 307:* {
if (%dialog.nick == on) {
set %307 $3-
did -r whois 4
did -a whois 4 %307
}
}
raw 313:* {
if (%dialog.nick == on) {
set %313 $3-
}
}
raw 312:* {
if (%dialog.nick == on) {
set %312 $3
did -r whois 8
did -a whois 8 %312
}
}
raw 317:* {
if (%dialog.nick == on) {
set %317 $duration($3)
did -r whois 10
did -a whois 10 %317
disable #whois
}
}
raw 319:* {
if (%dialog.nick == on) {
set %319 $3-
did -r whois 6
did -a whois 6 %319
}
}
#whois end
on *:NOTIFY:{
if (%dialog.nick == on) {
set %blah $nick
var %h = 0
while (%h < $did(nick,4).lines) {
inc %h 1
if ($gettok($did(nick,4,%h),1,32) isin %blah) {
did -o nick 4 %h $gettok($did(nick,4,%h),1,32) online
}
}
}
}
on *:UNOTIFY:{
if (%dialog.nick == on) {
set %blah1 $nick
var %h = 0
while (%h < $did(nick,4).lines) {
inc %h 1
if ($gettok($did(nick,4,%h),1,32) isin %blah1) {
did -o nick 4 %h $gettok($did(nick,4,%h),1,32) offline
}
}
}
}
on *:sockopen:google:{
sockwrite -nt $sockname GET /search?hl=en&q= $+ %lookup $+ &btnI=I%27m+Feeling+Lucky HTTP/1.1
sockwrite -nt $sockname Host: www.google.com $+ $crlf $+ $crlf
}
on *:sockread:google:{
sockread %temptext
tokenize 32 $htmlfree(%temptext)
if ($sockerr) {
set %google $sockerr
google
halt
}
if ($1 == location:) {
set %google $2
google
halt
}
if ($1 == Your) {
set %google No Results Found
google
halt
}
}
on *:SOCKCLOSE:google:{
unset %google
unset %temptext
}
on *:SOCKOPEN:lookup:{
sockwrite -nt $sockname GET /statpage.php?user= [ $+ [ %lookup.d ] ] HTTP/1.1
sockwrite -nt $sockname Host: rscript.org $+ $crlf $+ $crlf
}
on *:SOCKREAD:lookup:{
var %total
sockread -f %total
tokenize 32 $remove(%total,Stat:)
if (*does not feature* iswm $1-) { did -er stat 30-76 | sockclose $sockname }
if (Overall == $1) { did -eo stats 32 1 $iif($3 isnum,$3,NA) }
if (Attack == $1) { did -eo stats 33 1 $iif($3 isnum,$3,NA) | did -eo stats 55 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Hitpoints == $1) { did -eo stats 38 1 $iif($3 isnum,$3,NA) | did -eo stats 60 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Prayer == $1) { did -eo stats 39 1 $iif($3 isnum,$3,NA) | did -eo stats 61 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Strength == $1) { did -eo stats 34 1 $iif($3 isnum,$3,NA) | did -eo stats 56 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Defence == $1) { did -eo stats 35 1 $iif($3 isnum,$3,1) | did -eo stats 57 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Ranged == $1) { did -eo stats 37 1 $iif($3 isnum,$3,NA) | did -eo stats 59 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Magic == $1) {
did -eo stats 36 1 $iif($3 isnum,$3,NA)
did -eo stats 58 1 $iif($remove($4,$chr(44)) isnum,$4,NA)
did -eo stats 31 1 $cmbcalc($did(stats,33),$iif($did(stats,35) != NA,$did(stats,35),1),$did(stats,34),$did(stats,38),$did(stats,39))
}
if (Herblore == $1) { did -eo stats 41 1 $iif($3 isnum,$3,NA) | did -eo stats 63 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Agility == $1) { did -eo stats 40 1 $iif($3 isnum,$3,NA) | did -eo stats 62 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Thieving == $1) { did -eo stats 42 1 $iif($3 isnum,$3,NA) | did -eo stats 64 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Crafting == $1) { did -eo stats 44 1 $iif($3 isnum,$3,NA) | did -eo stats 66 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Fletching == $1) { did -eo stats 45 1 $iif($3 isnum,$3,NA) | did -eo stats 67 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Slayer == $1) { did -eo stats 51 1 $iif($3 isnum,$3,NA) | did -eo stats 73 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Mining == $1) { did -eo stats 46 1 $iif($3 isnum,$3,NA) | did -eo stats 68 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Smithing == $1) { did -eo stats 54 1 $iif($3 isnum,$3,NA) | did -eo stats 76 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Fishing == $1) { did -eo stats 47 1 $iif($3 isnum,$3,NA) | did -eo stats 69 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Cooking == $1) { did -eo stats 48 1 $iif($3 isnum,$3,NA) | did -eo stats 70 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Runecraft == $1) { did -eo stats 43 1 $iif($3 isnum,$3,NA) | did -eo stats 65 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Firemaking == $1) { did -eo stats 49 1 $iif($3 isnum,$3,NA) | did -eo stats 71 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Woodcutting == $1) { did -eo stats 50 1 $iif($3 isnum,$3,NA) | did -eo stats 72 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Farming == $1) { did -eo stats 52 1 $iif($3 isnum,$3,NA) | did -eo stats 74 1 $iif($remove($4,$chr(44)) isnum,$4,NA) }
if (Construction == $1) {
did -eo stats 53 1 $iif($3 isnum,$3,NA)
did -eo stats 75 1 $iif($remove($4,$chr(44)) isnum,$4,NA)
sockclose $sockname
}
}
on *:SOCKCLOSE:lookup:{
unset %lookup.d
}
alias cmbcalc {
return $calc((0.32707*$1)+(0.249*$2)+(0.324*$3)+(0.25*$4)+(0.124*$5))
}