delta
Contributors
Posts: 29
|
Post by delta on Apr 3, 2020 22:41:56 GMT
Having trouble figuring out why it wont detect my image, the region is correct and if i lower the similarity it starts clicking on everything. Video and code below. ----- created by AnkuLua snap and play script ------
immersive = false
setImmersiveMode(immersive)
genVersion = "8.5.6-pro2"
setAutoGameArea = true
pcall (autoGameArea, setAutoGameArea)
scriptDimension = 2792
Settings:setScriptDimension(true, scriptDimension)
Settings:setCompareDimension(true, scriptDimension)
local index = 1
touchList = {}
waitList = {}
------ 1 -----
touchList[index] = {target = "LobbyPlayButton.png", region = Region(2590, 1082, 190, 65), id = "1", action = 'click'}
index = index + 1
------ 2 -----
touchList[index] = {target = "ReadyUp.png", region = Region(2530, 873, 218, 50), id = "2", action = 'click'}
index = index + 1
------ 3 -----
touchList[index] = {target = "b.png", region = Region(2600, 904, 221, 75), id = "3", action = 'click'}
index = index + 1
--adb push C:\pch /storage/emulated/0/AnkuLua/snapAndPlay imgur.com/a/1kEMfpQand theese are the images that its searching for
|
|
|
Post by Exilereven on Apr 4, 2020 2:57:54 GMT
Having trouble figuring out why it wont detect my image, the region is correct and if i lower the similarity it starts clicking on everything. Video and code below. ----- created by AnkuLua snap and play script ------
immersive = false
setImmersiveMode(immersive)
genVersion = "8.5.6-pro2"
setAutoGameArea = true
pcall (autoGameArea, setAutoGameArea)
scriptDimension = 2792
Settings:setScriptDimension(true, scriptDimension)
Settings:setCompareDimension(true, scriptDimension)
local index = 1
touchList = {}
waitList = {}
------ 1 -----
touchList[index] = {target = "LobbyPlayButton.png", region = Region(2590, 1082, 190, 65), id = "1", action = 'click'}
index = index + 1
------ 2 -----
touchList[index] = {target = "ReadyUp.png", region = Region(2530, 873, 218, 50), id = "2", action = 'click'}
index = index + 1
------ 3 -----
touchList[index] = {target = "b.png", region = Region(2600, 904, 221, 75), id = "3", action = 'click'}
index = index + 1
--adb push C:\pch /storage/emulated/0/AnkuLua/snapAndPlay imgur.com/a/1kEMfpQand theese are the images that its searching for Why compare reso of 2792..... that is very strange number for reso. I would make sure your resolution settings are correct?
|
|
delta
Contributors
Posts: 29
|
Post by delta on Apr 4, 2020 3:38:30 GMT
Having trouble figuring out why it wont detect my image, the region is correct and if i lower the similarity it starts clicking on everything. Video and code below. ----- created by AnkuLua snap and play script ------
immersive = false
setImmersiveMode(immersive)
genVersion = "8.5.6-pro2"
setAutoGameArea = true
pcall (autoGameArea, setAutoGameArea)
scriptDimension = 2792
Settings:setScriptDimension(true, scriptDimension)
Settings:setCompareDimension(true, scriptDimension)
local index = 1
touchList = {}
waitList = {}
------ 1 -----
touchList[index] = {target = "LobbyPlayButton.png", region = Region(2590, 1082, 190, 65), id = "1", action = 'click'}
index = index + 1
------ 2 -----
touchList[index] = {target = "ReadyUp.png", region = Region(2530, 873, 218, 50), id = "2", action = 'click'}
index = index + 1
------ 3 -----
touchList[index] = {target = "b.png", region = Region(2600, 904, 221, 75), id = "3", action = 'click'}
index = index + 1
--adb push C:\pch /storage/emulated/0/AnkuLua/snapAndPlay imgur.com/a/1kEMfpQand theese are the images that its searching for Why compare reso of 2792..... that is very strange number for reso. I would make sure your resolution settings are correct? The phone I'm using is a Note 8, it's a curved screen, not sure if that would affect it. Thanks for replying
|
|
|
Post by Exilereven on Apr 4, 2020 4:57:50 GMT
I literally have a note 8.... as well. 1080x2220 is your resolution. So all of your images will need to be captured in 1080, compare is 1080. Also, if your game switches between landscape and portrait mode then you will need screen shots for both, portrait 1080, landscape 2220 respectively. When a customer asks me to make a bot first thing I do is look up the specs for there phone, make them run a resolution script on the actual device, determine if they need to run in immersive(game uses full screen with on screen buttons when you swipe like the note 8) so i run my scripts in immersive. Anyway, once you figure out how to get one image detected you will see how it starts coming together. Let me know if you need any advice, I got the same phone man , and I do about 90% of my coding fully on my phone. Termux is your best friend. Allows you to run programs that will compile lua code and lots of other fun stuff you can "only do on a computer", I can do anything on this phone you can do with the computer.
|
|