|
Post by rajikhushi70 on Jun 16, 2017 3:19:09 GMT
Hello Sir,
how to call one function inside another?
actually i have 3 different function.....
in first function i want to call another function like as blow...
local function getAltar()
while true do
local t = Timer()
if exists("altar.png", 5) then
toast("altar Found after: " .. t:check())
getLastMatch():highlight(3)
click(getLastMatch())
startAltar function should start from here... how can i call that function here?
end
-- pick a random move
local direction = math.random(1, #move)
toast(direction)
swipe(move[direction][1], move[direction][2])
wait(3)
end
end
--
local startAltar = function()
wait(2)
click(Location(215,910))
wait(5)
click(Location(530,1185))
wait(5)
click(Location(375,1185))
wait(2)
if exists(insufficientResourcesInfo) then
keyevent(4)
wait(2)
keyevent(4)
wait(2)
click(Location(695,1230))
wait(3)
click(Location(580,1225))
wait(3)
click(Location(645,200))
wait(3)
click(Location(500,290))
wait(3)
click(Location(175,850))
wait(3)
keyevent(4)
wait(3)
keyevent(4)
wait(2)
click(Location(695,1230))
wait(1)
getAltar()
else
getAltar()
end
end
-- start altar function
startAltar()
|
|
|
Post by Mercobots on Jun 17, 2017 12:33:24 GMT
local bot = require(bot_name) bot:start()
local function startAltar() end
local function getAltar()
while true do
local t = Timer()
if exists("altar.png", 5) then
toast("altar Found after: " .. t:check())
getLastMatch():highlight(3)
click(getLastMatch())
startAltar() end end end
getAltar()
|
|