|
Post by sonatta on Apr 3, 2018 20:57:38 GMT
im using nox emulator with 1280x720 landscape im trying to automate ragnarok andro mobile and it doesnt click anything Settings:setCompareDimension(true, 1280)
Settings:setScriptDimension(true, 1280)
while true do
existsClick("violet.png")
wait(1)
end
and heres my raw cropped image from screenshot image/violet.png
|
|
|
Post by Mercobots on Apr 3, 2018 23:54:05 GMT
try to add a white dot at your image just to clear some doubts
|
|
|
Post by sonatta on Apr 4, 2018 13:04:53 GMT
thanks i added white dots its working now!! however sometimes target covering the white dot and it fails to detect the images. does ankulua cant detect pure solid color image? so it must be with white dots or with patterns?
|
|
|
Post by Mercobots on Apr 5, 2018 0:29:51 GMT
|
|
|
Post by sonatta on Apr 5, 2018 6:44:36 GMT
i read the help file but it says it only getcolor but i want to detect it and click it
can you give me example of detecting color then click it when found on screen?
|
|
|
Post by Mercobots on Apr 5, 2018 12:24:46 GMT
you need to know the color value in advance, let say for black
black = { r = 0, g = 0, b = 0, }
r,g,b = getColor(L(x,y))
if r == black.r and g == black.g and b == black.b then print('Color match') end
|
|
|
Post by sonatta on Apr 5, 2018 19:18:06 GMT
sorry im kinda new. how do i click it?
black = { r = 0, g = 0, b = 0, }
r,g,b = getColor(L(x,y))
if r == black.r and g == black.g and b == black.b then click(black) end
|
|
|
Post by Mercobots on Apr 5, 2018 23:12:21 GMT
use the same location when getting the black color
black = { r = 0, g = 0, b = 0, }
loc = Location(x,y)
r,g,b = getColor(loc)
if r == black.r and g == black.g and b == black.b then click(loc) end
|
|
|
Post by sonatta on Apr 6, 2018 6:50:35 GMT
its giving nme runtime error any idea why? violet = { r = 128, g = 0, b = 64, }
loc = Location(x,y)
r,g,b = getColor(loc)
while true do
if r == violet.r and g == violet.g and b == violet.b then
click(loc)
wait(1)
end
end
|
|
|
Post by AnkuLua on Apr 6, 2018 7:08:19 GMT
You didn't set values to x and y.
|
|
|
Post by sonatta on Apr 6, 2018 9:39:38 GMT
sorry i want to search the color in whole screen or region how can i able to do that?
|
|
|
Post by Mercobots on Apr 6, 2018 11:37:07 GMT
You "can't" is possible but is insane do something like this, my advise is to crop a image from player and define the targetoffset, If exists('player.Png'):targetOffset(-10,20) then Loc = getLastMatch():getTarget() End
|
|