Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ImageSearch2015.au3>
- #include <GUIConstantsEx.au3>
- #include <MsgBoxConstants.au3>
- #include <AutoItConstants.au3>
- #include <Misc.au3>
- #include <WindowsConstants.au3>
- $dll = DllOpen("user32.dll")
- HotKeySet("{F1}", "myExit")
- $x = WinActivate("RuneScape")
- $x1=0
- $y1=0
- $x = 1
- $y = 1
- ;~ $picture = "RSettings.png"
- $picture = "GSettings.png"
- $picture1 = "Rresize.png"
- $picture2 = "SetMin.png"
- $picture3 = "Close.png"
- $picture4 = "Settings.png"
- $picture5 = "BottomIron.png"
- $picture6 = "Compass.png"
- $picture7 = "MiniMapsMap.png"
- $picture8 = "IronOre.png"
- $picture9 = "IronError.png"
- $picture10 = "CompassReset.png"
- $picture11 = "Portaln.png"
- $picture12 = "Bank.png"
- $picture13 = "ExitPortal.png"
- $picture14 = "MiningIcon.png"
- $picture15 = "BankAll.png"
- $picture16 = "ChatBox.png"
- $picture17 = "LogBackIn.png"
- $picture18 = "LoggingIn.png"
- $FindMySelf = False
- $CompassResetDone = False
- $CompassRight = False
- $Statement1 = False
- $ResetAll = False
- $MiningIcon2 = False
- $result6969 = False
- $Count = 0
- $TopLeftx = @DesktopWidth * 0
- $TopLefty = @DesktopHeight * 0
- $IronTopLeftx = @DesktopWidth / 2.20
- $IronTopLefty = @DesktopHeight / 2.45
- $IronBottomRightx = @DesktopWidth / 1.85
- $IronBottomRighty = @DesktopHeight / 1.6
- $Bankingx = @DesktopWidth / 2.4
- $Bankingy = @DesktopHeight /2.35
- $BankingOutx = @DesktopWidth / 1.777777777
- $BankingOuty = @DesktopHeight / 1.66409
- $PortalOutWalkx = @DesktopWidth / 2.4489759
- $PortalOutWalky = @DesktopHeight / 2.6086956
- $timer = TimerInit()
- ConsoleWrite($timer)
- While (1)
- While (1)
- RunescapeRestart ()
- If $result6969 = True Then
- LC($x1,$y1)
- MouseMove($IronTopLeftx,$IronTopLefty,1)
- ExitLoop
- EndIf
- $waitingtostart = _ImageSearch($picture18,1,$x1,$y1,10,0)
- If $waitingtostart = True Then
- Do
- $waitingtostart = _ImageSearch($picture18,1,$x1,$y1,10,0)
- Until $waitingtostart = False
- EndIf
- If $result6969 = False Then
- If $ResetAll = False Then
- ResetAllGraphicSetings ()
- Else
- EndIf
- If $CompassResetDone = False Then
- FindCompass ()
- Else
- EndIf
- MouseDragging ()
- ;~ If $CompassRight = False Then
- ;~ CompassRight ()
- ;~ Else
- ;~ EndIf
- If $FindMyself = False Then
- FindMySelf ()
- Sleep(5000)
- EndIf
- BankingGoingIn ()
- $result6969 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- If $result6969 = True Then
- LC($x1,$y1)
- ExitLoop
- EndIf
- Sleep(6200)
- BankingAll ()
- $result6969 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- If $result6969 = True Then
- LC($x1,$y1)
- ExitLoop
- EndIf
- Sleep(400)
- BankingOut ()
- $result6969 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- If $result6969 = True Then
- LC($x1,$y1)
- ExitLoop
- EndIf
- Sleep(4000)
- PortalOutWalk ()
- $result6969 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- If $result6969 = True Then
- LC($x1,$y1)
- ExitLoop
- EndIf
- Sleep(1750)
- Chatting ()
- Sleep(1000)
- MineIron ()
- EndIf
- WEnd
- WEnd
- ;~ Func SettingsClick ()
- ;~ Do
- ;~ $result = _ImageSearch($picture2,1,$x1,$y1,120,0)
- ;~ ConsoleWrite($result)
- ;~ Until $result = True;
- ;~ If $result=1 Then
- ;~ MouseMove($x1,$y1,1)
- ;~ MouseClick($MOUSE_CLICK_LEFT)
- ;~ Else
- ;~ MsgBox(0,"msg","Ending")
- ;~ EndIf
- ;~ EndFunc
- ;~ Func ScreenReset ()
- ;~ Do
- ;~ $result = _ImageSearch($picture,1,$x1,$y1,0,0)
- ;~ ConsoleWrite($result)
- ;~ Until $result = True;
- ;~ If $result=1 Then
- ;~ MouseMove($x1,$y1,1)
- ;~ MouseClick($MOUSE_CLICK_LEFT)
- ;~ Else
- ;~ MsgBox(0,"msg","Ending")
- ;~ EndIf
- ;~ SettingsClick ()
- ;~ EndFunc
- Func myExit ()
- msgbox(0,"Exiting", "You killed me :(")
- exit
- EndFunc
- func LC($x, $y)
- MouseClick("left", $x, $y, 1 ,1)
- EndFunc
- func RC($x, $y)
- MouseClick("right", $x, $y, 1 ,1)
- EndFunc
- Func SetGraphics ()
- Do
- $result = _ImageSearch($picture,1,$x1,$y1,50,0)
- ConsoleWrite($result)
- Until $result = True;
- If $result=1 Then
- MouseMove($x1,$y1,1)
- MouseClick($MOUSE_CLICK_LEFT)
- EndIf
- EndFunc
- Func SetMinSettings ()
- Do
- $result = _ImageSearch($picture2,1,$x1,$y1,75,0)
- ConsoleWrite($result)
- Until $result = True;
- If $result=1 Then
- MouseMove($x1,$y1,1)
- MouseClick($MOUSE_CLICK_LEFT)
- EndIf
- EndFunc
- Func CloseSettings ()
- Do
- $result = _ImageSearch($picture3,1,$x1,$y1,10,0)
- ConsoleWrite($result)
- Until $result = True;
- If $result=1 Then
- MouseMove($x1,$y1,1)
- MouseClick($MOUSE_CLICK_LEFT)
- EndIf
- EndFunc
- Func OpenSettings ()
- $result = _ImageSearch($picture4,1,$x1,$y1,10,0)
- ;~ ConsoleWrite($result)
- If $result=1 Then
- MouseMove($x1,$y1,1)
- MouseClick($MOUSE_CLICK_LEFT)
- EndIf
- EndFunc
- Func FixedScreen ()
- Do
- $result = _ImageSearch($picture1,1,$x1,$y1,100,0)
- ConsoleWrite($result)
- Until $result = True;
- If $result=1 Then
- MouseMove($x1,$y1,1)
- MouseClick($MOUSE_CLICK_LEFT)
- EndIf
- EndFunc
- Func ResetAllGraphicSetings ()
- $ResetAll = False
- while(Not($ResetAll))
- WinWaitActive("RuneScape", "", 10)
- OpenSettings ()
- SetGraphics ()
- SetMinSettings ()
- FixedScreen ()
- CloseSettings ()
- Global $ResetAll = True
- WEnd
- EndFunc
- Func MineIron ()
- Do
- if $Statement1=False Then
- Global $pixels = PixelSearch($IronTopLeftx / 1.2,$IronTopLefty / 1.2,$IronBottomRightx * 1.2,$IronBottomRighty * 1.2,0x4E2B19,2)
- If Not @error Then
- LC($pixels[0],$pixels[1])
- Sleep(2200)
- $result2 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- Global $Statement1 = _ImageSearch($picture9,1,$x1,$y1,50,0)
- If $Statement1 = True Then
- $Statement1 = True
- EndIf
- If $result2 = True Then
- LC($x1,$y1)
- EndIf
- EndIf
- ElseIf $Statement1=True Then
- EndIf
- Until $Statement1 = True or $result2 = True
- EndFunc
- ;~ Func CompassRight ()
- ;~ Global $CompassRight = False
- ;~ $i3 = 0
- ;~ Send("{PGDN down}")
- ;~ Send("{UP down}")
- ;~ sleep(500)
- ;~ Send("{PGDN UP}")
- ;~ Send("{UP UP}")
- ;~ If $CompassRight = False Then
- ;~ Do
- ;~ $result = _ImageSearch($picture10,1,$x1,$y1,10,0)
- ;~ If $result = False Then
- ;~ $SendingRight = Send("{RIGHT}")
- ;~ Sleep(500)
- ;~ ElseIf $result = True Then
- ;~ Global $CompassRight = True
- ;~ EndIf
- ;~ Until $CompassRight = True
- ;~ endif
- ;~ EndFunc
- Func FindCompass ()
- $CompassResetDone = False
- while(Not($CompassResetDone))
- $result = _ImageSearch($picture7,1,$x1,$y1,150,0)
- ;~ConsoleWrite($result)
- MouseMove($x1,$y1,1)
- $position = MouseGetPos()
- Global $compasspositionx = $position[0]
- Global $compasspositiony = $position[1]
- Global $RcCompassx = $compasspositionx
- Global $RcCompassy = $compasspositiony / 0.56
- ;~ ConsoleWrite(".......")
- ;~ ConsoleWrite($RcCompassy)
- ;~ ConsoleWrite(".......")
- ;~ ConsoleWrite($RcCompassx)
- ;~ ConsoleWrite(".......")
- Global $LcCompassx = $RcCompassx + 1
- Global $LcCompassy = $RcCompassy / 0.65
- RC($compasspositionx,$RcCompassy)
- LC($LcCompassx,$LcCompassy)
- if Not @error Then
- Global $CompassResetDone = True
- EndIf
- WEnd
- EndFunc
- Func FindChatArea ()
- EndFunc
- Func BankingGoingIn ()
- $BankIn1 = False
- while(Not($BankIn1))
- $BankIn = PixelSearch($TopLeftx,$TopLefty,@DesktopWidth,@DesktopHeight,0xE0270F,1)
- if NOT(@error) Then
- LC($BankIn[0],$BankIn[1])
- Sleep(4500)
- EndIf
- $BankInBlocks = PixelSearch($TopLefty,$TopLeftx,@DesktopWidth,@DesktopHeight,0x808688,10)
- if NOT(@error) Then
- $BankIn1 = True
- EndIf
- WEnd
- EndFunc
- Func MouseMove123 ()
- $move = False
- $xmove = $x
- $ymove = $y
- $ymove1 = 0
- $xmove1 = 0
- MouseMove(@DesktopWidth / 2,$ymove,1)
- $x = $x + 10
- $y = $y + 10
- EndFunc
- Func BankingAll ()
- LC($Bankingx,$Bankingy)
- Sleep(1000)
- Do
- $result = _ImageSearch($picture15,1,$x1,$y1,5,0)
- until $result = True
- LC($x1,$y1)
- EndFunc
- Func BankingOut ()
- LC($BankingOutx,$BankingOuty)
- EndFunc
- Func FindMySelf ()
- If $FindMySelf = False Then
- MouseMove($LcCompassx,$LcCompassy,5)
- Sleep(200)
- MouseWheel($MOUSE_WHEEL_DOWN,20)
- Sleep(1000)
- MouseWheel($MOUSE_WHEEL_UP,5)
- Sleep(1000)
- Do
- If $MiningIcon2 = False Then
- Global $MiningIcon2 = _ImageSearch($picture14,1,$x1,$y1,40,0)
- ConsoleWrite("-----------------")
- ConsoleWrite($MiningIcon2)
- EndIf
- If $MiningIcon2 = True Then
- ;~ $MiningIconClickx = $MiningIcon2[0]
- ;~ $MiningIconClicky = $MiningIcon2[1]
- Sleep(500)
- MouseMove($x1,$y1,20)
- Sleep(500)
- $position = MouseGetPos()
- Sleep(500)
- $MiningIconClickx = $position[0]
- Sleep(100)
- $MiningIconClicky = $position[1]
- Sleep(100)
- ; 540 / 2 = 270
- LC($MiningIconClickx,$MiningIconClicky)
- Sleep(5500)
- LC($MiningIconClickx / 5,$MiningIconClicky * 3.9)
- Sleep(6000)
- Global $MiningIcon2 = True
- EndIf
- Until $MiningIcon2 = True
- EndIf
- $FindMySelf = True
- EndFunc
- Func PortalOutWalk ()
- LC($PortalOutWalkx,$PortalOutWalky)
- $result2 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- If $result2 = True then
- LC($x1,$y1)
- EndIf
- Sleep(3000)
- EndFunc
- Func RandomWords ()
- $Random = Random(1,20,1)
- If $Random = 1 Then
- Global $word = "YES"
- ElseIf $Random = 2 Then
- Global $word = "nooooooooo"
- ElseIf $Random = 3 Then
- Global $word = "Im having so much fun haha"
- ElseIf $Random = 4 Then
- Global $word = "How long you guys play runescape?"
- ElseIf $Random = 5 Then
- Global $word = "I have been playing this for forever so much has changed."
- ElseIf $Random = 6 Then
- Global $word = "How long have you guys been mining? haha"
- ElseIf $Random = 7 Then
- Global $word = "Wel......"
- ElseIf $Random = 8 Then
- Global $word = "This is so much than playing basketball lol"
- ElseIf $Random = 9 Then
- Global $word = "When did you guys first play this?"
- ElseIf $Random = 10 Then
- Global $word = "This has been my favoirte skill...... most of the time haha"
- ElseIf $Random = 11 Then
- Global $word = "Can get much better"
- ElseIf $Random = 12 Then
- Global $word = "How much gold do you guys have?"
- ElseIf $Random = 13 Then
- Global $word = "I type random words lol"
- ElseIf $Random = 14 Then
- Global $word = "Do you guys love me?"
- ElseIf $Random = 15 Then
- Global $word = "Does anybody know when new update to runescape comes?"
- ElseIf $Random = 16 Then
- Global $word = "Well im getting tired...."
- ElseIf $Random = 17 Then
- Global $word = "This is my life dreammm........not"
- ElseIf $Random = 18 Then
- Global $word = "I wonder if there is gonna be a runescape 4"
- ElseIf $Random = 19 Then
- Global $word = "I bet (new) runescape will diwndle to a ember within next 4 years."
- ElseIf $Random = 20 Then
- Global $word = "Well........have you guys play the new game diep.io..... hard af to get above 250k!"
- EndIf
- EndFunc
- Func Chatting ()
- RandomWords ()
- Do
- $result = _ImageSearch($picture16,1,$x1,$y1,10,0)
- $result2 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- Until $result = True or $result2 = True
- LC($x1,$y1)
- Send($word)
- Sleep(50)
- Send("{ENTER}")
- Sleep(100)
- Send("{ESC}")
- EndFunc
- Func RunescapeRestart ()
- Global $result6969 = _ImageSearch($picture17,1,$x1,$y1,10,0)
- If $result6969 = True Then
- LC($x1,$y1)
- EndIf
- EndFunc
- Func MouseDragging ()
- Do
- $result = _ImageSearch($picture10,1,$x1,$y1,0,0)
- MouseClickDrag("middle",@DesktopWidth / 2, @DesktopHeight / 2,@DesktopWidth / 2.85, @DesktopHeight / 2)
- Until $result = True
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement