Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:SOCKOPEN:m.check:{
- sockwrite -nt $sockname GET /results.ws?query=magic+logs&price=all&members=yes HTTP/1.1
- sockwrite -nt $sockname Host: itemdb-rs.runescape.com
- sockwrite -nt $sockname $crlf
- }
- on *:SOCKREAD:m.check:{
- if ($sockerr) { sockclose m.check | sockopen m.check itemdb-rs.runescape.com 80 }
- else {
- var %xx
- sockread %xx
- if (<td><a href="http://itemdb-rs.runescape.com/Magic_logs/viewitem.ws?obj=1513"> Magic logs</a></td> == %xx) {
- sockread %xx | did -ra logs 2 $htmlfree(%xx) | if ($len($did(logs,6))) { did -ra logs 4 $xcalc($did(logs,6) * $htmlfree(%xx)) }
- sockclose $sockname
- }
- }
- }
- alias htmlfree {
- return $remove($1-,td,/span,",span class=,>,<,/,rise,stay,drop)
- }
- menu * {
- -
- WoodCutting:{ mlog }
- }
- alias mlog {
- if ($sock(m.check)) { .sockclose m.check }
- if ($sock(l.check)) { .sockclose l.check }
- if ($dialog(logs)) { dialog -x logs }
- dialog -mdo logs logs logs
- sockopen m.check itemdb-rs.runescape.com 80
- sockopen l.check rscript.org 80
- }
- dialog logs {
- title "Woodcutting"
- size 639 77 128 45
- option dbu
- text "Price:", 1, 71 9 14 8
- edit "", 6, 85 18 41 10
- text "", 4, 70 28 54 7, center
- text "Bank:", 5, 71 19 14 8
- button "+27", 3, 109 6 15 10
- box "Magics", 7, 67 1 60 36
- text "Level:", 8, 11 3 18 8, right
- text "Exp:", 9, 15 12 14 8, right
- text "Rank:", 10, 12 20 17 8, right
- text "Exp Left:", 11, 2 28 27 8, right
- text "Logs Left:", 12, 2 36 27 8, right
- text "", 13, 31 3 10 8
- text "", 14, 31 12 35 8
- text "", 15, 31 20 35 8
- text "", 16, 31 28 35 8
- text "", 17, 31 36 35 8
- button "Update", 18, 42 1 24 10
- text "", 2, 86 9 22 8
- }
- on *:DIALOG:logs:sclick:18:{
- did -r logs 2,4,13-17
- if ($sock(m.check)) { .sockclose m.check }
- if ($sock(l.check)) { .sockclose l.check }
- sockopen m.check itemdb-rs.runescape.com 80
- sockopen l.check rscript.org 80
- }
- on *:DIALOG:logs:edit:6:{
- var %price $did(logs,2)
- tokenize 32 $did(logs,6)
- did -ra logs 4 $xcalc($1 * %price)
- }
- on *:DIALOG:logs:sclick:3:{
- var %price $did(logs,2)
- tokenize 32 $did(logs,6)
- did -ra logs 6 $calc($1 + 27)
- did -ra logs 4 $xcalc($did(logs,6) * %price)
- }
- on *:SOCKOPEN:l.check:{
- sockwrite -nt $sockname GET /lookup.php?type=stats&user=Glacier+Rat HTTP/1.1
- sockwrite -nt $sockname Host: rscript.org
- sockwrite -nt $sockname $crlf
- }
- on *:SOCKREAD:l.check:{
- if ($sockerr) { .sockclose l.check | sockopen l.check rscript.org 80 }
- else {
- var %xx
- sockread %xx
- if (woodcutting isin %xx) {
- tokenize 32 $gettok(%xx,2-,32)
- did -ra logs 13 $2
- did -ra logs 14 $bytes($3,bd)
- did -ra logs 15 $bytes($1,bd)
- did -ra logs 16 $xcalc(13034431- $3)
- did -ra logs 17 $bytes($ceil($calc((13034431- $3)/250)),bd)
- sockclose l.check
- }
- }
- }
- alias xcalc { var %x $replace($remove($1-,$chr(44),a,c,d,e,f,g,h,i,j,l,n,o,p,q,r,s,u,v,w,x,y,z),k,*1000,m,*1000000,b,*1000000000,t,*1000000000000) | return $bytes($calc(%x),bd) }
- ===================================B == R== E== A ===K ==============
- menu * {
- -
- Slayer
- .Slayer Settings
- ..Set task nr.:/set %tasknr $?="Please enter the number of tasks completed:"
- ..Set slay exp.:/set %slayexp $?="Enter current slayer exp:"
- .Aberrant spectres:/set %hp 90 | /set %monstername Aberrant spectres | /ksc
- .Abyssal demons:/set %hp 150 | /set %monstername Abyssal demons | /ksc
- .Aquanite:/set %hp 125 | /set %monstername Aquanite | /ksc
- .Black demons:/set %hp 157 | /set %monstername Black demons | /ksc
- .Black dragons
- ..Baby black dragons:/set %hp 80 | /set %monstername Baby black dragons | /ksc
- ..Black dragons:/set %hp 190 | /set %monstername Black dragons | /ksc
- .Bloodvelds
- ..Bloodvelds:/set %hp 120 | /set %monstername Bloodvelds | /ksc
- ..Mutated bloodvelds:/set %hp 178 | /set %monstername Mutated bloodvelds | /ksc
- .Dagannoths:/set %hp 120 | /set %monstername Dagannoths | /ksc
- .Dark beasts:/set %hp 220 | /set %monstername Dark Beasts | /ksc
- .Dust devils:/set %hp 105 | /set %monstername Dust devils | /ksc
- .Fire giants:/set %hp 111 | /set %monstername Fire giants | /ksc
- .Gargoyles:/set %hp 105 | /set %monstername Gargoyles | /ksc
- .Goraks:/set %hp 112 | /set %monstername Goraks | /ksc
- .Greater demons:/set %hp 87 | /set %monstername Greater demons | /ksc
- .Hellhounds:/set %hp 116 | /set %monstername Hellhounds | /ksc
- .Iron dragons:/set %hp 165 | /set %monstername Iron dragons | /ksc
- .Kalphites
- ..Workers:/set %hp 40 | /set %monstername Kalphite workers | /ksc
- ..Soldiers:/set %hp 90 | /set %monstername Kalphite Soldiers | /ksc
- .Mithril Dragons:/set %hp 254 | /set %monstername Mithril Dragons | /ksc
- .Nechryael:/set %hp 105 | /set %monstername Nechryael | /ksc
- .Steel dragons:/set %hp 210 | /set %monstername Steel Dragons | /ksc
- .Spiritual mages
- ..Zammy:/set %hp 75 | /set %monstername Spiritual mages | /ksc
- ..Sara:/set %hp 85 | /set %monstername Spiritual mages | /ksc
- .Suqahs:/set %hp 106 | /set %monstername Suqahs | /ksc
- .Waterfiends:/set %hp 128 | /set %monstername Waterfiends | /ksc
- .Scabarbites:/set %hp 90 | /set %monstername Scabarites | /ksc
- .Warped:/set %hp 150 | /set %monstername Warped Terrorbirds | /ksc
- .Jungle Strykwyrm:/set %hp 110 | /set %monstername Jungle Strykewurm | /ksc
- .Desert Strykeyurm:/set %hp 120 | /set %monstername Desert Strykewurm | /ksc
- .Ice Strykewyrm:/set %hp 210 | /set %monstername Ice Strywurm | /ksc
- .Cave Horror:/set %hp 55 | /set %monstername Cave Horror | /ksc
- .Banshee:/set %hp 22 | /set %monstername Banshee | /ksc
- }
- alias ksc {
- set %amount $?="Amount of monsters:"
- inc %tasknr
- inc %slayexp $calc(%amount * %hp)
- msg # I'm on task $c2(no. $+ $bytes(%tasknr,bd)) $+ $c1(:) $c2(%amount %monstername) $+ $c1(; that's) $c2($bytes($calc(%amount * %hp * 4),bd)) $c1(cmb XP,) $c2($bytes($floor($calc(%amount * 4/3 * %hp)),bd)) $c1(HP XP &) $c2($bytes($calc(%amount * %hp),bd)) $c1(Slay XP; I will have) $c2($bytes(%slayexp,bd)) $+ $chr(15) $c1(Slayer exp)
- }
- alias slayer {
- msg # I have done $c2($bytes(%tasknr,bd) tasks) $+ $c1(. My last known) $c2(slayer task) $c1(was) $c2(%amount %monstername) $+ $c1(. I gained) $c2($bytes($calc(%amount * %hp * 4),bd) Combat Exp) $+ $c1(;) $c2($bytes($floor($calc(%amount * 4/3 * %hp)),bd) HP Exp) $+ $c1(;) $c2($bytes($calc(%amount * %hp),bd) Slay XP) $c1(Wich also got me a total of) $c2($bytes(%slayexp,bd) Slayer exp)) $+ $c1(!)
- }
- alias c1 return $+($chr(3),10,$1,$chr(3))
- alias c2 return $+($chr(3),07,$1,$chr(3))
Add Comment
Please, Sign In to add comment