Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REG = {}
- -- Ankulua
- SIMILAR = 0.7
- WIDTH = 720
- HEIGHT = 1280
- ROOT = scriptPath()
- DIR_IMAGES = ROOT .. "images/"
- DIR_LIBS = ROOT .. "libs/"
- setImagePath(DIR_IMAGES)
- -- Ankulua settings
- Settings:setCompareDimension(true, WIDTH)
- Settings:setScriptDimension(true, WIDTH)
- Settings:set("MinSimilarity", 0.8)
- --libs/add debug
- --add debug lua
- dofile(scriptPath().."DebugMyScript.luac")
- luaLib = loadstring(httpGet("https://raw.githubusercontent.com/mercobots/luaLib/master/luaLib.lua"))
- luaLib()
- commonLib = loadstring(httpGet("https://raw.githubusercontent.com/AnkuLua/commonLib/master/commonLib.lua"))
- commonLib()
- REG.image = {
- image_region = Region(0, 0, 720, 1280),
- image_region2 = Region(532, 436, 180, 60),
- -- image_region2 = Region(432, 811, 246, 85),
- image_region3 = Region(495, 1181, 180, 60),
- image_region4 = Region(362, 716, 240, 80),
- image_region5 = Region(433, 876, 170, 80),
- image_region6 = Region(508, 914, 80, 80),
- image_region7 = Region(18, 18, 60, 60),
- image_region8 = Region(157, 1164, 420, 114),
- }
- function joinrally()
- toast("Joining Rally")
- if REG.image.image_region:existsClick("bos1.png", 10) then
- if REG.image.image_region8:existsClick("join.png", 4) then
- rallyset()
- else keyevent(4) joinrally2()
- end
- end
- end
- function joinrally2()
- if REG.image.image_region2:existsClick("bos1.png", 100) then
- if REG.image.image_region:waitClick("join.png", 100) then
- rallyset()
- else REG.image.image_region7:existsClick("back.png")
- keyevent(4) joinrally3()
- end
- end
- end
- function joinrally3()
- if REG.image.image_region3:existsClick("bos3.png", 1) then
- if REG.image.image_region:waitClick("join.png", 1) then
- rallyset()
- else REG.image.image_region7:existsClick("back.png")
- keyevent(4) joinrally()
- end
- end
- end
- function rallyset()
- if REG.image.image_region:click("prst.png") then
- if REG.image.image_region:click("mrch.png") then
- if REG.image.image_region4:waitClick("confirmstm.png", 2) then
- do stam()
- end
- else if REG.image.image_region:click("acm.png") then
- if REG.image.image_region:click("war.png") then
- joinrally()
- end
- end
- end
- end
- end
- end
- function stam()
- if REG.image.image_region5:existsClick("usestm.png", 2) then
- if REG.image.image_region6:existsClick("usestm2.png", 2)then
- if REG.image.image_region7:existsClick("back.png") then
- if REG.image.image_region:click("mrch.png") then
- --I changed this ^ from march.png
- if REG.image.image_region:click("acm.png") then
- if REG.image.image_region:click("war.png") then
- joinrally()
- end
- end
- end
- end
- end
- end
- end
- -----Main Script Start-----
- while true do
- joinrally()
- end
Add Comment
Please, Sign In to add comment