I figured someone would want some of these:
Here is my gem miner - it turns the gems into bolt tips
Code:
WinWait, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , WinActivate, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
WinWaitActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
#Persistent
SetTimer, logger, 1000
tally=0 ;Clicks
tally2=0 ;Crushes
tally3=0 ;Cuts
path=C:\Users\Evan\Desktop\Macros\Gem Miner\
x=0
y=0
FileAppend, `n`n, total.txt
start:
;Main Segment
while(true)
{
while(true)
{
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , Sleep, 1000
Else
{
Break
}
}
;Checks for random event
PixelSearch, z, w, 16, 310, 1598, 511, 0xB8DAEF , 60, Fast
if Errorlevel
{
;FileAppend, Rand. Event, logger.txt
FileAppend, ----RANDOM EVENT----, total.txt
Gosub, logOut
Exit
}
PixelSearch, x, y, 7, 3, 1403, 785, 0x601862, 10, Fast
if(errorlevel)
{
;Waits for Gem to appear
RandSleep(1000)
gosub, start
}
Else
{
;Checks for full inventory
PixelSearch, z, w, 1569, 805, 1573, 810, 0x335E59, 50, Fast
if(errorlevel)
{
gosub, cut
}
Else
{
tally++
RandClickLeft(x, y, 2)
RandSleep(3000)
}
}
}
cut:
;Cut gems
chisel(1440, 662)
chisel(1487, 662)
chisel(1530, 662)
chisel(1574, 662)
chisel(1446, 698)
chisel(1487, 698)
chisel(1530, 698)
chisel(1574, 698)
chisel(1446, 734)
chisel(1487, 734)
chisel(1530, 734)
chisel(1574, 734)
chisel(1446, 770)
chisel(1487, 770)
chisel(1530, 770)
chisel(1574, 770)
chisel(1446, 804)
chisel(1487, 804)
chisel(1530, 804)
chisel(1574, 804)
;Cut into bolt tips
bolts:
bolt(1440, 662)
bolt(1487, 662)
bolt(1530, 662)
bolt(1574, 662)
bolt(1446, 698)
bolt(1487, 698)
bolt(1530, 698)
bolt(1574, 698)
bolt(1446, 734)
bolt(1487, 734)
bolt(1530, 734)
bolt(1574, 734)
bolt(1446, 770)
bolt(1487, 770)
bolt(1530, 770)
bolt(1574, 770)
bolt(1446, 804)
bolt(1487, 804)
bolt(1530, 804)
bolt(1574, 804)
;Ensures inventory is cleared
gosub, start
Stats:
MsgBox, Clicks: %tally% LogOuts: %tally2% Level Ups: %tally3%
return
logOut:
WinActivate, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome
RandClickLeft(1590, 108, 3)
RandClickLeft(1521, 786, 3)
RandSleep(1000)
return
logger:
FileAppend, Clicks: %tally% Crushes: %tally2% Cuts: %tally3%, total.txt
return
chisel(chis_x, chis_y)
{
RandClickLeft(1436, 581, 5)
RandSleep(700)
RandClickLeft(chis_x, chis_y, 5)
RandSleep(1000)
PixelSearch, z, w, 11, 707, 523, 838, 0x1F98FF, 10, Fast
if(!errorlevel)
{
RandClickLeft(203, 728, 3)
RandSleep(700)
RandClickLeft(269, 786, 10)
RandSleep(1700)
return
}
else
{
RandSleep(200)
return
}
return
}
bolt(bolt_x, bolt_y)
{
PixelSearch, x, y, bolt_x-9, bolt_y-9, bolt_x+9, bolt_y+9, 0xC2C2CB, 5, Fast
if(!errorlevel)
{
RandClickRight(x, y, 0)
RandSleep(400)
RandClickLeft(x, y+43, 0)
RandSleep(400)
tally2++
return
}
RandClickLeft(1436, 581, 5)
RandSleep(700)
RandClickLeft(bolt_x, bolt_y, 5)
RandSleep(1000)
PixelSearch, z, w, 11, 707, 523, 838, 0x1F98FF, 10, Fast
if(!errorlevel)
{
RandClickLeft(203, 728, 3)
RandSleep(800)
RandClickLeft(269, 786, 10)
RandSleep(3000)
tally3++
return
}
else
{
RandSleep(200)
return
}
}
RandSleep(length)
{
Random Temp, length-(length/5), length+(length/5)
Sleep, %Temp%
}
RandClickLeft(x, y, tol)
{
Random xOut, x-tol, x+tol
Random yOut, y-tol, y+tol
MouseClick, left, %xOut%, %yOut%
}
RandClickRight(x, y, tol)
{
Random xOut, x-tol, x+tol
Random yOut, y-tol, y+tol
MouseClick, right, %xOut%, %yOut%
}
Here is a fletching carver I use. It got me 99 fletching.
I was in the middle of renovating it, so some parts aren't used, and some are commented out.
Code:
WinWait, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , WinActivate, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
WinWaitActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
bowType=1
waitTally=0
tally=0
switch1=0
path=C:\Users\Evan\Desktop\Macros\Fletch\
begin:
;Checks which button to use
bowtype=2
;Checks to see if bank is open
ImageSearch, x, y, 571, 154, 1039, 197, *50 %path%BankConf.bmp
if ErrorLevel
{
MsgBox, Please open the bank before starting.
Pause, On, 0
}
;Basix withdrawal
RandClickRight(595, 214, 5, 5)
RandSleep(300)
RandClickLeft(581, 332, 10, 2)
RandSleep(300)
RandClickLeft(1036, 148, 2, 2)
RandSleep(600)
;--Start Complex--
;Click on knife
;Flawed Knife Algorithm
/*Loop
{
PixelSearch, z, w, 972, 311, 1165, 580, 0x555559 , 60, Fast
if ErrorLevel
{
RandSleep(50)
waitTally++
if(waitTally>=20)
{
switch1=1
Gosub, bank
if(switch1==1)
{
switch1=0
MsgBox, You need a knife
Pause, On, 0
Gosub, bank
}
}
}
Else
{
Break
}
}
PixelSearch, x, y, 972, 311, 1165, 580, 0x555559 , 20, Fast
RandClickLeft(x, y, 4, 4)
RandSleep(400)
*/
;Click on knife
RandClickLeft(1444, 590, 4, 4)
;Click on Log
RandClickLeft(1486, 590, 4, 4)
;Waits for make all button
Loop
{
PixelSearch, z, w, 75, 814, 104, 840, 0xDCDCDC , 60, Fast
if ErrorLevel
{
Break
}
else
{
RandSleep(30)
}
}
RandSleep(600)
;Clicks on the correct make all button
if(bowType==1)
{
RandClickLeft(167, 791, 10, 10)
}
else
{
RandClickLeft(265, 788, 10, 10)
}
;Unreliable wait system
/*
Loop
{
PixelSearch, z, w, 75, 814, 104, 840, 0xDCDCDC , 60, Fast
if ErrorLevel
{
;Break
}
PixelSearch, z, w, 1563, 801, 1572, 807, 0x4D7986 , 60, Fast
if ErrorLevel
{
Sleep, 100
}
else
{
break
}
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , Sleep, 5000
}
*/
RandSleep(47000)
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , Sleep, 10000
;Bank Click
Bank:
PixelSearch, x, y, 825, 478, 905, 540, 0x455B6D , 10, Fast
RandClickLeft(x, y, 2, 2)
;Waits for bank to pop up
Loop
{
ImageSearch, x, y, 571, 154, 1039, 197, *100 %path%BankConf.bmp
if ErrorLevel
{
Sleep, 10
}
else
{
Break
}
}
;Deposits
RandClickRight(1487, 591, 5, 5)
RandSleep(300)
RandClickLeft(1486, 701, 10, 2)
;Record
tally++
gosub, begin
RandSleep(length)
{
Random Temp, length-(length/5), length+(length/5)
Sleep, %Temp%
}
RandClickLeft(x, y, xtol, ytol)
{
Random xOut, x-xtol, x+xtol
Random yOut, y-ytol, y+ytol
MouseClick, left, %xOut%, %yOut%
}
RandClickRight(x, y, xtol, ytol)
{
Random xOut, x-xtol, x+xtol
Random yOut, y-ytol, y+ytol
MouseClick, right, %xOut%, %yOut%
}
PixelCheckSum( X=0, Y=0, W=3, H=3, Title="" ) {
hWn := WinExist( Title ), hDC := DllCall( "GetDC", UInt,hWn )
mDC := DllCall( "CreateCompatibleDC", UInt,hDC )
NumPut( VarSetCapacity(BI,40,0),BI ), NumPut( W,BI,4 ) , NumPut( H,BI,8 )
NumPut( 32,NumPut( 1,BI,12,"UShort" ),0,"UShort" ) , NumPut( 0,BI,16 )
hBM := DllCall( "CreateDIBSection", UInt,mDC, UInt,&BI , Int,0, UIntP,pB, Int,0,Int,0 )
oBM := DllCall( "SelectObject", UInt,mDC, UInt,hBM ) , Rop := 0x40000000|0x00CC0020
DllCall( "BitBlt", UInt,mDC, Int,0,Int,0, Int,W,Int,H, UInt,hDC, Int,X,Int,Y, UInt,Rop )
DllCall( "shlwapi\HashData", UInt,pB, UInt,W*H*4, Int64P,Hash, UInt,8 )
VarSetCapacity(HH,16,0), DllCall( "msvcrt\sprintf", Str,HH, Str,"%016I64X",UInt64,Hash )
DllCall( "DeleteObject", UInt,hBM ), DllCall( "DeleteObject", UInt,oBM )
DllCall( "DeleteDC", UInt,mDC ), DllCall( "ReleaseDC", UInt,hWn, UInt,hDC )
Return HH
}
Here is my herb combiner (with vials of water)
Code:
WinWait, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , WinActivate, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
WinWaitActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
tally=0
switch1=0
path=C:\Users\Evan\Desktop\Macros\HerbCombiner\
begin:
;Checks to see if bank is open
ImageSearch, x, y, 440, 130, 930, 195, *50 %path%BankConf.bmp
if ErrorLevel
{
MsgBox, Please open the bank before starting.
Pause, On, 0
}
;Basix withdrawal
MouseClick, right, 472, 205
RandSleep(500)
MouseClick, left, 503, 285
RandSleep(500)
MouseClick, right, 567, 218
RandSleep(500)
MouseClick, left, 527, 296
RandSleep(500)
MouseClick, left, 915, 142
RandSleep(500)
;--Start Complex--
;Click on vial
PixelSearch, z, w, 972, 311, 1165, 580, 0xA87770 , 60, Fast
if ErrorLevel{
if (switch1=1)
{
switch1=0
MsgBox, You are out of Vials of Water
Pause, On, 0
Gosub, bank
}
switch1=1
Gosub, bank
}
Else
{
PixelSearch, x, y, 972, 311, 1165, 580, 0xA87770 , 20, Fast
RandClickLeft(x, y, 3)
RandSleep(600)
}
;Click on Herb
PixelSearch, z, w, 972, 311, 1165, 580, 0x2E6946 , 60, Fast
if ErrorLevel
{
if (switch2=1)
{
switch2=0
MsgBox, You are out of Herbs
Pause, On, 0
Gosub, bank
}
switch2=1
Gosub, bank
}
Else
{
PixelSearch, x, y, 972, 311, 1165, 580, 0x2E6946 , 20, Fast
RandClickLeft(x, y, 3)
}
;Clicks on make all
Loop{
ImageSearch, z, w, 620, 490, 750, 570, *100 %path%ButtonVial.bmp
if ErrorLevel{
Sleep, 10
}
else{
Break
}
}
ImageSearch, x, y, 620, 490, 750, 570, *100 %path%ButtonVial.bmp
RandSleep(300)
RandClickLeft(x, y+20, 10)
;Waits for mixing to be done
Loop{
PixelSearch, z, w, 975, 462, 1153, 568, 0xA1716B , 60, Fast
if ErrorLevel{
Break
}
else{
Sleep, 100
}
}
;Bank Click
Bank:
PixelSearch, x, y, 710, 249, 752, 312, 0x364856 , 5, Fast
RandClickLeft(x, y, 2)
;Waits for bank to pop up
Loop{
ImageSearch, x, y, 440, 130, 930, 195, *100 %path%BankConf.bmp
if ErrorLevel{
Sleep, 10
}
else{
Break
}
}
;Deposits
PixelSearch, x, y, 801, 397, 840, 430, 0x1C4B79 , 6, Fast
RandClickLeft(x, y, 2)
RandSleep(300)
;Record
tally++
gosub, begin
RandSleep(length)
{
Random Temp, length-(length/5), length+(length/5)
Sleep, %Temp%
}
RandClickLeft(x, y, tol)
{
Random xOut, x-tol, x+tol
Random yOut, y-tol, y+tol
MouseClick, left, %xOut%, %yOut%
}
RandClickRight(x, y, tol)
{
Random xOut, x-tol, x+tol
Random yOut, y-tol, y+tol
MouseClick, right, %xOut%, %yOut%
}
PixelCheckSum( X=0, Y=0, W=3, H=3, Title="" ) {
hWn := WinExist( Title ), hDC := DllCall( "GetDC", UInt,hWn )
mDC := DllCall( "CreateCompatibleDC", UInt,hDC )
NumPut( VarSetCapacity(BI,40,0),BI ), NumPut( W,BI,4 ) , NumPut( H,BI,8 )
NumPut( 32,NumPut( 1,BI,12,"UShort" ),0,"UShort" ) , NumPut( 0,BI,16 )
hBM := DllCall( "CreateDIBSection", UInt,mDC, UInt,&BI , Int,0, UIntP,pB, Int,0,Int,0 )
oBM := DllCall( "SelectObject", UInt,mDC, UInt,hBM ) , Rop := 0x40000000|0x00CC0020
DllCall( "BitBlt", UInt,mDC, Int,0,Int,0, Int,W,Int,H, UInt,hDC, Int,X,Int,Y, UInt,Rop )
DllCall( "shlwapi\HashData", UInt,pB, UInt,W*H*4, Int64P,Hash, UInt,8 )
VarSetCapacity(HH,16,0), DllCall( "msvcrt\sprintf", Str,HH, Str,"%016I64X",UInt64,Hash )
DllCall( "DeleteObject", UInt,hBM ), DllCall( "DeleteObject", UInt,oBM )
DllCall( "DeleteDC", UInt,mDC ), DllCall( "ReleaseDC", UInt,hWn, UInt,hDC )
Return HH
}
Here is my favorite ivy chopper code:
It is still under construction.
Code:
WinWait, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , WinActivate, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
WinWaitActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome,
#Persistent
SetTimer, logger, 10000
SetTimer, chat, 1200000
testMode=0
newLog=1
timer=0 ;Total time ellapsed
tally=0 ;Clicks
tally2=0 ;Logouts
tally3=0 ;Levels up
path=C:\Users\Evan\Desktop\Macros\Ivy\ ;For logger file
x=0 ;x click position
y=0 ;y click position
Menu, tray, add
Menu, tray, add
Menu, tray, add
Menu, tray, add, LogOut, logOut
Menu, tray, add, Stats, stats
Menu, tray, add, Reset, reset
reset:
resetNorth:=1
start:
RandSleep(2500)
quickStart:
;clicks on ivy
PixelSearch, z, w, 7, 406, 1592, 408, 0xBDEBF1 , 20, Fast
if(!errorlevel && resetNorth==1)
{
resetNorth=0
;Clicks on north
RandClickLeft(1457, 129, 3)
RandSleep(500)
}
/*
PixelSearch, t, u, 9, 482, 1597, 604, 0x344A52 , 5, Fast
if(!errorlevel)
{
;Nest detection
RandClickLeft(t, u, 0)
RandSleep(1000)
gosub, start
}
*/
PixelSearch, x, y, 7, 406, 1592, 408, 0x438161 , 5, Fast
if(errorLevel)
{
RandSleep(1000)
Gosub, start
}
Else
{
tally++
RandClickLeft(x, y, 0)
/*If(Mod(tally, 10)==0)
{
;FileAppend, Ten Clicks Total: %tally%, logger.txt
}
*/
}
RandSleep(5000)
while(true)
{
while(true)
{
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , Sleep, 1000
Else
{
Break
}
}
;Checks for idle logout
PixelSearch, t, u, 482, 667, 1007, 720, 0x32C0FF , 50, Fast
if !ErrorLevel
{
logOut=1
}
else
{
logOut=0
}
;Checks for random event
PixelSearch, z, w, 16, 310, 1598, 511, 0xB8DAEF , 60, Fast
if Errorlevel
{
randEvent=1
}
else
{
randEvent=0
}
;Checks for level up
PixelSearch, z, w, 58, 814, 85, 837, 0xDCDCDC , 30, Fast
if ErrorLevel
{
levelUp=1
}
else
{
levelUp=0
}
;Checks to see if still chopping
PixelSearch, z, w, 793, 388, 843, 475, 0x529E76 , 10, Fast
if ErrorLevel
{
chop=1
}
else
{
chop=0
}
;Checks for change
if (logOut==1||randEvent==1||levelUp==1||chop==1)
{
gosub, act
}
}
act:
while(true)
{
IfWinNotActive, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome, , Sleep, 1000
Else
{
Break
}
}
;Checks for idle logout
PixelSearch, t, u, 482, 667, 1007, 720, 0x32C0FF , 50, Fast
if !ErrorLevel
{
logOut=1
}
else
{
logOut=0
}
;Checks for random event
PixelSearch, z, w, 16, 310, 1598, 511, 0xB8DAEF , 60, Fast
if Errorlevel
{
randEvent=1
}
else
{
randEvent=0
}
;Checks for level up
PixelSearch, z, w, 58, 814, 85, 837, 0xDCDCDC , 30, Fast
if ErrorLevel
{
levelUp=1
}
else
{
levelUp=0
}
;Checks to see if still chopping
PixelSearch, z, w, 793, 388, 843, 475, 0x529E76 , 10, Fast
if ErrorLevel
{
chop=1
}
else
{
chop=0
}
;Checks for idle logout
if (logOut==1)
{
;MsgBox, Idle Logout
tally2++
;FileAppend, LogOut Total: %tally2%, logger.txt
RandSleep(5000)
RandClickLeft(t, u, 0)
RandSleep(1000)
Gosub, reset
}
;Checks for random event
else if (randEvent==1)
{
;FileAppend, Rand. Event, logger.txt
FileAppend, ----RANDOM EVENT----, total.txt
Gosub, logOut
MsgBox, A rand event has occurred.
pause, on, 0
Exit
}
;Checks for level up
else if (levelUp==1)
{
;MsgBox, Leveled
;FileAppend, LEVELLED, logger.txt
tally3++
Gosub, start
}
;Checks to see if still chopping
else if(chop==1)
{
;MsgBox, Ivy Cut
Gosub, start
}
return
Stats:
MsgBox, Clicks: %tally% LogOuts: %tally2% Level Ups: %tally3%
return
logOut:
WinActivate, RuneScape - The Number 1 Free Multiplayer Game - Google Chrome
RandClickLeft(1590, 108, 3)
RandClickLeft(1521, 786, 3)
RandSleep(1000)
return
logger:
if(newLog==1&&testmode==0)
{
newLog=0
FileAppend, `n----------------------------------------------------------------------------------------`n, total.txt
}
if(testmode==1)
{
return
}
else if(testmode==0)
{
timer+=10
FileAppend, %timer% (Time Ellapsed) -- Clicks: %tally% LogOuts: %tally2% Level ups: %tally3%`n, total.txt
return
}
Else
{
return
}
chat:
random, words,0,10
if(words==0)
{
send, /hi {enter}
}
else if(words==1)
{
send, /how r u {enter}
}
else if(words==2)
{
send, /whats up {enter}
}
else if(words==3)
{
send, /whatcha doing {enter}
}
else if(words==4)
{
send, /hiya {enter}
}
else if(words==5)
{
send, /hey everyone {enter}
}
else if(words==6)
{
send, /hiiiiii {enter}
}
else if(words==7)
{
send, /im really bored {enter}
}
else if(words==8)
{
send, /are you bored {enter}
}
else if(words==9)
{
send, /lets go pvp {enter}
}
else if(words==10)
{
send, /lolz {enter}
}
logOut()
{
gosub, logOut
}
RandSleep(length)
{
Random Temp, length-(length/5), length+(length/5)
Sleep, %Temp%
}
RandClickLeft(x, y, tol)
{
Random xOut, x-tol, x+tol
Random yOut, y-tol, y+tol
MouseClick, left, %xOut%, %yOut%
}
RandClickRight(x, y, tol)
{
Random xOut, x-tol, x+tol
Random yOut, y-tol, y+tol
MouseClick, right, %xOut%, %yOut%
}
I also have multiple miners, runecrafters, woodcutting, etc bots.
If you have any suggestions, feel free to email me at:
teitelmane (at) yahoo (dot) com