It's taken me a week or so to start figuring out how ankulua works. So far I have this code running decent. It fails sometimes when it can't find an img, but I'm not sure what to fix yet. And the sped that it detects is horrible, like 6 second to find each tiny pic, with a region lol.
If anyone can help me figure out how to
A. Help me figure out how to speed up finding my imgs, maybe how to use 1920 res, but have compare res be lower, haven't figured that out yet.
B. Maybe someone can just help me with some good pointers for code flow with ankulua.
Here's payed code and download link below for pics used and everything included.
www.dropbox.com/s/fcky41otstyhx4o/mirageBot.zip?dl=0-- ========== Settings ================
Settings:setCompareDimension(true, 1920)
Settings:setScriptDimension(true, 1920)
Settings:set("MinSimilarity", 0.60)
righttop = Region(1220,8,140,140)
center = Region (700,320,600,600)
-- Path
ROOT = ("/storage/emulated/0/AnkuLua/")
DIR_LIB = ROOT .. "lib/"
-- load commonLib
dofile(DIR_LIB .. "commonLib.v1.1.lua")
--========Start Func========
function getLoot ()
center = Region (700,320,600,600)
local imgbag = "itembag.png"
loctake = Location(1670,980)
if
center:existsClick (imgbag) then
wait (1)
click(loctake)
end
attackMob ()
end
--========End Func========
function attackMob ()
while (true) do
righttop = Region(1220,8,200,200)
center = Region (700,320,600,600)
local imgc = "noaggro.png"
local waitTime = 1000
trollPics = {
"trolltop.png",
"trollleft.png",
"trollbot.png",
"trollright.png"
}
i, trolls = existsMultiMax(trollPics)
if trolls then
center:click(trollPics
)
righttop:wait(imgc,waitTime)
getLoot ()
end
end
end
--========Main========
attackMob ()