Online game: FishAO
Website: http://www.fishao.com
Create automation to move keyboard keys, (left and right arrow keys) depends on which way I need to move left and right keyboard keys to keep my target in the middle of these two images. Once catching a fish... the fish pulls from left to right on screen, I need to move to keep the blue (on top and bottom of image attached) icon/indicator towards the middle.
Some help would be very much appreciated.
Fishao
-
- Posts: 1
- Joined: 16 Dec 2017, 18:23
Fishao
- Attachments
-
- Edited Image
- R.jpg (12.08 KiB) Viewed 792 times
-
- Edited Image
- L.jpg (11.96 KiB) Viewed 792 times
-
- How it looks when catching a fish, blue indicator moves from left to right and vice versa.
- Untitled.png (38.08 KiB) Viewed 792 times
Re: Fishao
I had a similar mini game before, but it was vertical. Speed was always a problem and I could never make it 100% accurate. You can take a look at the code and hopefully you or someone else can provide a better fix.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines, -1
; Middle := 464 ; Unused location for the Middle. I just put this here for reference.
x1SearchBox := (1109)
y1SearchBox := (405)
x2SearchBox := (x1SearchBox+0)
y2SearchBox := (y1SearchBox+96)
#MaxThreadsPerHotkey 2
F9::
Toggle := !Toggle
If Toggle = 1
ToolTip, On
SetTimer, RemoveToolTip, 5000
While Toggle
{
PixelSearch, OutputVarX, OutputVarY, %x1SearchBox%, %y1SearchBox%, %x2SearchBox%, %y2SearchBox%, 0xE7E8EB, 22
If ErrorLevel=0
{
If (OutputVarY <= 454)
{
Send, {S Down}
Sleep, 50
Send, {S Up}
Sleep, 50
Send, {S Down}
Sleep, 50
Send, {S Up}
Sleep, 50
Send, {S Down}
Sleep, 50
Send, {S Up}
Sleep, 50
Send, {W Down}
Sleep, 50
Send, {W Up}
}
If (OutputVarY >= 474)
{
Send, {W Down}
Sleep, 50
Send, {W Up}
Sleep, 50
Send, {W Down}
Sleep, 50
Send, {W Up}
Sleep, 50
Send, {W Down}
Sleep, 50
Send, {W Up}
Sleep, 50
Send, {S Down}
Sleep, 50
Send, {S Up}
}
Sleep, 25
}
Return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
F12::Reload
Who is online
Users browsing this forum: No registered users and 77 guests