What were the changes you did to get it to work? I've tried for a while and can't get it to recognize the moving objectDrknyss wrote: ↑24 Jan 2022, 15:35That was it! Everything is working properly now! Thank you so much. I totally missed that.
I really appreciate your help and back and forth on all this. I'm still learning a lot here but It feels great to have something finally work like it should!
Thank you again!
Need Assistance Improving a Script to Automate Fishing on a Game in the browser.
Re: Need Assistance Improving a Script to Automate Fishing on a Game in the browser.
-
- Posts: 1
- Joined: 04 Jun 2022, 02:41
Re: Need Assistance Improving a Script to Automate Fishing on a Game in the browser.
You don't mind dropping the script?Drknyss wrote: ↑24 Jan 2022, 15:35That was it! Everything is working properly now! Thank you so much. I totally missed that.
I really appreciate your help and back and forth on all this. I'm still learning a lot here but It feels great to have something finally work like it should!
Thank you again!
Re: Need Assistance Improving a Script to Automate Fishing on a Game in the browser.
can you share the final code?
Re: Need Assistance Improving a Script to Automate Fishing on a Game in the browser.
Hey, could you please share the script? I've been trying to edit it, but the script only detects first fish and then breaks, however blue circle detection works just fine.
Code: Select all
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
xpos1=
xpos2=
SetMouseDelay,-1
SetBatchLines, -1
Process, Priority,, High
InputBox, howmuchbait, Bait Amount,How much bait to use?, ; Input Amount of Bait to Use
tooltip, Put mouse in top left corner of pond and press F1
Return
f1::
If xpos1 =
{
MouseGetPos, xpos1, ypos1
tooltip, Put mouse in bottom right corner of pond and press F1
Return
}
If xpos2 =
{
MouseGetPos, xpos2, ypos2
; tooltip, Put mouse in the Left Middle of pond and press F1
; Return
}
tooltip, fishing will begin in 3 seconds. Press F2 to end early
sleep 3000
tooltip
loop {
loop {
PixelSearch, 1Px, 1Py, %xpos1%, %ypos1%, %xpos2%, %ypos2%, 0x50452F, 20, Fast ; Find Fish
if (ErrorLevel = 1)
{
tooltip, No Fish Found
}
else if (ErrorLevel = 0)
{
1Py := 1Py + 30
MouseClick, left, %1Px%, %1Py% ; Click on Fish
tooltip, Fish Found, Click
fishcount++ ; Increase Fish Count
break
}
}
sleep 500
loop {
loopcount++ ; Displays a count on screen to verify search is progressing
PixelSearch, 2Px, 2Py, %xpos1%, %ypos1%, %xpos2%, %ypos2%, 0xFF0000, 5, Fast ; Find Blue Button
if (ErrorLevel = 1)
{
tooltip, No Circle Found. Attempt %loopcount%
}
else if (ErrorLevel = 0)
{
tooltip, I found the Circle!
2Py := 2Py + 50
MouseMove, %2Px%, %2Py% ; Used to test Mouse Click Position
MouseClick, left, %2Px%, %2Py% ; Click on Blue Button
; tooltip, I tried to click the Circle!
break
}
sleep 500
}
if fishcount = %howmuchbait% ; End Fishing if Fishcount = Bait Wanted to Use
break
}
f2::
Msgbox, I got you %fishcount% fish ; Display number of fish caught
reload ;exitapp
Re: Need Assistance Improving a Script to Automate Fishing on a Game in the browser.
Hi all
Can anyone share the code for this script, mine is allways clicking at the very top of my display for the fish after first try.
THANKS
Can anyone share the code for this script, mine is allways clicking at the very top of my display for the fish after first try.
Code: Select all
xpos1=
xpos2=
SetMouseDelay,-1
SetBatchLines, -1
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
Process, Priority,, High
InputBox, howmuchbait, Bait Amount,How much bait to use?, ; Input Amount of Bait to Use
tooltip, Put mouse in top left corner of pond and press F1
Return
f1::
If xpos1 =
{
MouseGetPos, xpos1, ypos1
tooltip, Put mouse in bottom right corner of pond and press F1
Return
}
If xpos2 =
{
MouseGetPos, xpos2, ypos2
tooltip, Put mouse in the Left Middle of pond and press F1
Return
}
tooltip, fishing will begin in 3 seconds. Press F2 to end early
sleep 3000
tooltip
loop {
loop {
PixelSearch, 1Px, 1Py, %xpos1%, %ypos1%, %xpos2%, %ypos2%, 0x50452F, 20, Fast ; Find Fish
if (ErrorLevel = 1)
{
tooltip, No Fish Found
}
else if (ErrorLevel = 0)
{
1Py := 1Py + 30
MouseClick, left, %1Px%, %1Py% ; Click on Fish
tooltip, Fish Found, Click
fishcount++ ; Increase Fish Count
break
}
}
sleep 500
loop {
loopcount++ ; Displays a count on screen to verify search is progressing
PixelSearch, 2Px, 2Py, %xpos1%, %ypos1%, %xpos2%, %ypos2%, 0xFF0000, 5, Fast ; Find Blue Button
if (ErrorLevel = 1)
{
tooltip, No Circle Found. Attempt %loopcount%
}
else if (ErrorLevel = 0)
{
tooltip, I found the Circle!
2Py := 2Py + 50
MouseMove, %2Px%, %2Py% ; Used to test Mouse Click Position
MouseClick, left, %2Px%, %2Py% ; Click on Blue Button
; tooltip, I tried to click the Circle!
break
}
sleep 500
}
if fishcount = %howmuchbait% ; End Fishing if Fishcount = Bait Wanted to Use
break
}
f2::
Msgbox, I got you %fishcount% fish ; Display number of fish caught
reload ;exitapp
THANKS