dialog RSToolkit { title "Bugs Bunny RSToolkit pwnz joo" size -1 -1 177 138 option dbu tab "Info", 8, -3 0 283 159 edit "", 4, 2 27 170 74, tab 8 read multi vsbar text " Runescape News:", 5, 3 17 57 8, tab 8 button "Check News", 6, 134 16 37 10, tab 8 text "", 1, 38 115 49 8, tab 8 button "Refresh", 2, 2 126 24 10, tab 8 check "Auto-Refresh", 3, 30 126 43 10, tab 8 text "Read More:", 17, 4 102 30 8, tab 8 link "", 18, 35 102 134 8, tab 8 text "Total Players:", 19, 3 115 34 8, tab 8 tab "Stats Lookup", 7 edit "", 13, 46 23 42 10, tab 7 autohs text " Username:", 14, 12 24 33 8, tab 7 button "Get Stats", 15, 96 23 31 10, tab 7 edit "", 16, 12 40 154 90, tab 7 read multi vsbar button "Clear", 12, 131 23 21 10, tab 7 tab "Price Check", 11 text "Item:", 21, 12 24 17 8, tab 11 edit "", 22, 31 23 58 10, tab 11 autohs button "Get Price", 23, 96 23 31 10, tab 11 button "Clear", 24, 131 23 21 10, tab 11 edit "", 25, 12 40 154 90, tab 11 read multi vsbar tab "Notes", 20 edit "", 9, 6 23 162 90, tab 20 multi return autovs vsbar button "Save", 10, 138 115 29 12, tab 20 } Menu Channel { Rs Toolkit:If (!$Dialog(RSToolkit)) { Dialog -m RSToolkit RSToolkit } } On *:DIALOG:RSToolkit:Init:0:{ Var %Sckid = $Right($Ticks,6) Sockopen Toolkit.Players. [ $+ [ %Sckid ] ] Runescape.com 80 Sockopen Toolkit.News. [ $+ [ %Sckid ] ] Runescape.com 80 .Loadbuf -o RSToolkit 9 Notes.txt } On *:DIALOG:RSToolkit:Close:0:{ If ($Timer(RefreshPlayers)) { TimerRefreshPlayers Off } .Remove Notes.txt Var %x = 1, %y = $Did(9).lines While (%x <= %y) { Write Notes.txt $Did(9,%x).text Inc %x } } On *:DIALOG:RSToolkit:Dclick:18:{ Run $Did(18).text } On *:DIALOG:RSToolkit:Sclick:15:{ Var %Sckid = $Right($Ticks,6) Sockopen Toolkit.Stats. [ $+ [ %Sckid ] ] o-ss.net 80 Sockmark Toolkit.Stats. [ $+ [ %Sckid ] ] $Did(13).text Did -r $Dname 16 } On *:DIALOG:RSToolkit:Sclick:23:{ Var %Sckid = $Right($Ticks,6) Sockopen Toolkit.Price. [ $+ [ %Sckid ] ] o-ss.net 80 Sockmark Toolkit.Price. [ $+ [ %Sckid ] ] $Did(22).text } On *:DIALOG:RSToolkit:Sclick:24:{ Did -r RSToolkit 22 } On *:DIALOG:RSToolkit:Sclick:12:{ Did -r RSToolkit 16 } On *:DIALOG:RSToolkit:Sclick:10:{ .Remove Notes.txt Var %x = 1, %y = $Did(9).lines While (%x <= %y) { Write Notes.txt $Did(9,%x).text Inc %x } } On *:DIALOG:RSToolkit:Sclick:6:{ Var %Sckid = $Right($Ticks,6) Sockopen Toolkit.News. [ $+ [ %Sckid ] ] Runescape.com 80 } On *:DIALOG:RSToolkit:Sclick:3:{ If ($Did(3).state = 1) { Var %Sckid = $Right($Ticks,6) .TimerRefreshPlayers 0 30 Sockopen Toolkit.Players. [ $+ [ %Sckid ] ] Runescape.com 80 } Else { .TimerRefreshPlayers Off } } On *:DIALOG:RSToolkit:Sclick:2:{ Var %Sckid = $Right($Ticks,6) Sockopen Toolkit.Players. [ $+ [ %Sckid ] ] Runescape.com 80 } On *:SOCKOPEN:Toolkit.Players.*:{ Sockwrite -nt $Sockname GET /title.ws HTTP/1.1 Sockwrite -nt $Sockname Host: runescape.com Sockwrite -nt $Sockname $crlf Did -r RSToolkit 1 } On *:SOCKREAD:Toolkit.Players.*:{ If ($Sockerr) { Sockclose $Sockname | Halt } Else { Var %Sockreader Sockread %Sockreader If (There are currently * people playing! iswm %Sockreader) { Tokenize 32 %Sockreader Did -a RSToolkit 1 $bytes($4,bd) Sockclose $Sockname } } } On *:SOCKOPEN:Toolkit.News.*:{ Sockwrite -nt $Sockname GET /title.ws HTTP/1.1 Sockwrite -nt $Sockname Host: Runescape.Com Sockwrite -nt $Sockname $crlf Did -r RSToolkit 4 } On *:SOCKREAD:Toolkit.News.*:{ If ($Sockerr) { Sockclose $Sockname | Halt } Else { Var %Sckid = $Right($Sockname,6), %Sockreader Sockread %Sockreader If ($Regex(%Sockreader,/href="http://news\.runescape\.com/newsitem.ws\?id=(\d+)">/i)) { Did -ra RSToolkit 18 http://news.runescape.com/newsitem.ws?id= $+ $Regml(1) Sockclose $Sockname } ElseIf (