Post by ikk on Apr 11, 2019 22:42:41 GMT
So I'm playing a fishing game and I'm trying to find & click on the fishing spots.
These spots move from time to time, but the tricky part is the way they look.. It's sort of a .gif of white / blue particles over a static water texture.
Here are four examples of what these fishing spots look like: imgur.com/a/cSyDOiZ
At first, I thought I could just take few screenshots, and hope for the best. But that gives unreliable results.
These are the screenshots I took at first: imgur.com/a/ujRl6SX
But when searching for those, it clicked all over the water, rocks, and plants. And only sometimes where it actually was supposed to.
So I tried cropping the images, which is slightly better, but still quite unreliable.
Then, since the images are .png I tried to make them have transparent backgrounds, only displaying the water particles: imgur.com/a/mN74yw3
And this hardly ever finds the spots.
Here is my code thus far:
Literally any help at all would be appreciated. This has been such a headache trying to figure out how to recognize these fishing spots via color / pixels.
fishingRegion1 = Region(1300, 850, 275, 275)
activeTable = {"w1.png", "w2.png", "w3.png", "w4.png", "w5.png", "w6.png", "w7.png", "w8.png", "w9.png", "w10.png", "w11.png", "w12.png", "w13.png", "w14.png", "w15.png", "w16.png", "w17.png"}
function findActiveFishingSpot()
snapshot()
toast("Looking for fishing spot...")
for i, png in ipairs(activeTable) do
reg = fishingRegion1:exists(png)
if (reg ~= nil) then
reg:highlight(0.5)
return reg
end
end
usePreviousSnap(false) -- remember to set the value back to false
toast("Couldn't find a spot...")
return nil
end
Literally any help at all would be appreciated. This has been such a headache trying to figure out how to recognize these fishing spots via color / pixels.