Code:
Func ChangeQ()
MouseClick("left", Round(236* $x_ratio),Round(485 * $y_ratio)) ;opens change quest menu
$gX = 0
$gY = 0
sleep(1000)
If _ImageSearchArea($pngLoc & "change2.png", 1, 0, 0, @DesktopWidth, @DesktopHeight, $gX, $gY, 90) Then
MouseClick("left", $gX, $gY - 3, 1, 3)
MouseMove(Round(Random(0, 400) * $x_ratio), Round(Random(700, 1080) * $y_ratio), 3) ;Moves mouse out of the way
sleep(1000)
Call("changeq5")
if _ImageSearchArea($pngLoc & "change3.png", 1, 0, 0, @DesktopWidth, @DesktopHeight, $gX, $gY, 90) Then
mouseclick("left", $gX, $gY - 3, 1, 3)
sleep(500)
Call("changeq3")
EndIf
EndIf
EndFunc
Func Changeq5()
If _imagesearcharea($pngloc & "change5.png", 1, 0, 0, @Desktopwidth, @DesktopHeight, $gX, $gY, 90) Then
Mouseclick("left" $gX, $gY - 3, 1, 3)
MouseMove(Round(Random(0, 400) * $x_ratio), Round(Random(700, 1080) * $y_ratio), 3) ;moves mouse out of the way
sleep(1000)
Call("selection")
EndIf
EndFunc
func selection()
If _ImageSearchArea($pngLoc & "selectq.png", 1, 0, 0, @DesktopWidth, @DesktopHeight, $gX, $gY, 90) Then
Mouseclick("left" $gX, $gY - 3, 1, 3,)
MouseMove(Round(Random(0, 400) * $x_ratio), Round(Random(700, 1080) * $y_ratio), 3) ;Moves mouse out of the way
sleep(1000)
call("ok")
EndIf
EndFunc
func ok()
If _ImageSearchArea($pngLoc & "Ok.png", 1, 0, 0, @DesktopWidth, @DesktopHeight, $gX, $gY, 90) Then
MouseClick("left" $gX, $gY - 3, 1, 3,)
MouseMove(Round(Random(0, 400) * $x_ratio), Round(Random(700, 1080) * $y_ratio), 3) ;Moves mouse out of the way
sleep(1000)
call("start")
EndIf
EndFunc
func start()
If _ImageSearchArea($pngLoc & "startgame.png", 1, 0, 0, @DesktopWidth, @DesktopHeight, $gX, $gY, 90) Then
MouseClick("left" $gX, $gY - 3, 1, 3,)
MouseMove(Round(Random(0, 400) * $x_ratio), Round(Random(700, 1080) * $y_ratio), 3) ;Moves mouse out of the way
sleep(1000)
EndIf
EndFunc
func changeq3()
If _ImageSearchArea($pngLoc & "change3.png", 1, 0, 0, @DesktopWidth, @DesktopHeight, $gX, $gY, 90) Then
MouseClick("left" $gX, $gY - 3, 1, 3,)
MouseMove(Round(Random(0, 400) * $x_ratio), Round(Random(700, 1080) * $y_ratio), 3) ;Moves mouse out of the way
sleep(1000)
call("change4")
EndIf
EndFunc
Func change4()
if _ImageSearchArea($pngLoc & "change4.png", 1, 0, 0, @DesktopWidth, @DesktopHeight, $gX, $gY, 90) Then
MouseClick("left" $gX, $gY - 3, 1, 3,)
MouseMove(Round(Random(0, 400) * $x_ratio), Round(Random(700, 1080) * $y_ratio), 3) ;Moves mouse out of the way
sleep(1000)
call("selection")
EndIf
EndFunc