Page 1 of 1
Time depending
Posted: Thu Mar 22, 2012 12:13 am
by C3PO
Hello again,
is it possible to interrupt the bot when it's for example at 3am or to do something if it 6:32?
Re: Time depending
Posted: Thu Mar 22, 2012 1:03 am
by rock5
Something like
Code: Select all
local date = os.date("*t")
if date.hour >= 3 then
repeat
yrest(10000)
date = os.date("*t")
until date.hour >= 6 and date.min >= 32
-- do something
end
At 3 it will pause and wait until 6:32, then it will "do something". I suggest putting it in a safe waypoint were it would be safe to stop for that amount of time. This is untested.