Time depending

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
C3PO
Posts: 109
Joined: Sun Jul 10, 2011 2:45 pm

Time depending

#1 Post 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?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Time depending

#2 Post 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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Post Reply