yrest(xxx) question

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
pugzilla
Posts: 43
Joined: Tue Jun 16, 2015 3:58 pm

yrest(xxx) question

#1 Post by pugzilla » Tue Aug 11, 2015 4:58 pm

how long is a hours time if i use yrest(xxxx)

thanks!

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: yrest(xxx) question

#2 Post by Bill D Cat » Tue Aug 11, 2015 5:02 pm

Well, yrest(1000) is 1 second. So it would be 60 seconds * 60 minutes * 1000 = 3,600,000

Optionally, you can use player:rest(3600) which will rest for the same time, but will awaken and fight back if attacked.

pugzilla
Posts: 43
Joined: Tue Jun 16, 2015 3:58 pm

Re: yrest(xxx) question

#3 Post by pugzilla » Tue Aug 11, 2015 6:10 pm

ok thanks for the info

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: yrest(xxx) question

#4 Post by lisa » Tue Aug 11, 2015 11:29 pm

you can even use maths in the function itself

yrest(1000*60*60)

saves having to remember big numbers, only need to remember 1000 is for 1 second.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: yrest(xxx) question

#5 Post by BlubBlab » Wed Aug 12, 2015 2:57 am

Yean but those a function that are already in MM1

Code: Select all

-- Convert hours to timer value
function hoursToTimer(hours)
	return math.floor( hours * 3600000 );
end

-- Convert minutes to timer value
function minutesToTimer(minutes)
	return math.floor( minutes * 60000 );
end

-- Converts seconds to timer value
function secondsToTimer(seconds)
	return math.floor( seconds * 1000 );
end

Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests