Page 1 of 1
Differents between the wait, sleep, rest, stop functions
Posted: Sun Dec 19, 2010 2:56 pm
by Douky
hi,
where are the difference between the follow functions?
I have read the Rom-Wiki(
Link) but it's still not quite clear to me.
Thanks for reply.
Re: Differents between the wait, sleep, rest, stop functions
Posted: Sun Dec 19, 2010 4:25 pm
by jduartedj
Rest makes the bot rest for a while. say rest(5) rests for 5 secs, but i'm not sure if it takes secs os msecs.
Sleep makes the bot sleep, that is, to rest until you press delete.
Stop make your bot stop altogether, the script ends and the only option it to leave rom-bot and restart it.
yrest is a 'system' rest, it is equivalent to programming wait or pause statements, it makes the script wait for x ms, yrest(5000), the script waits for 5 secs.
Re: Differents between the wait, sleep, rest, stop functions
Posted: Sun Dec 19, 2010 5:35 pm
by Douky
thank you, now its clear to me =)
Re: Differents between the wait, sleep, rest, stop functions
Posted: Sun Dec 19, 2010 6:13 pm
by jduartedj
yvw!

Re: Differents between the wait, sleep, rest, stop functions
Posted: Mon Dec 20, 2010 3:42 am
by Rickster
do you have some more informations, or a place I can read about these two functions?
Exspecially I want to know, which of the above mentioned functions still let the bot react on atacks.
Re: Differents between the wait, sleep, rest, stop functions
Posted: Mon Dec 20, 2010 6:15 am
by Douky
Code: Select all
player:rest( minrest [, maxrest[, time|full[, restaddrnd]]]);
minrest ( min time to rest in sec) maxrest ( max time to in sec) resttype ( time | full ) time = rest the given time | full = stop resting after being full / default = time restaddrnd ( max random addition after being full in sec)
If using type 'full', the bot will only rest if HP or MP is below a defined level. You define that level in your profile with the options: Code:
Code: Select all
<option name="HP_REST" value="15" />
<option name="MP_REST" value="15" />
Default value if not defined is 15% each.
Code: Select all
examples:
player:rest(20) will rest for 20 seconds.
player:rest(60, 20) will rest between 60 and 80 seconds.
player:rest(90, 40, "full") will rest up to between 90 and 130 seconds, and stop resting if being full
player:rest(90, 40, "time") will rest up to between 90 and 130 seconds, and not stop resting if being full
player:rest(20, 40, "full, 20") will rest up to between 20 and 60 seconds, and stop resting if being full, and wait after that between 1-20 seconds
--------
Pause the bot at that waypoint in a sleep mode. The bot will still fight back attackers and sleep again after doing that. Press DEL if you want to continue. Similar functions are 'player.restrnd()' and 'stopPE()'.
>>>Click me to get to the rom-wiki<<<
Re: Differents between the wait, sleep, rest, stop functions
Posted: Mon Dec 20, 2010 10:39 am
by jduartedj
Rickster wrote:do you have some more informations, or a place I can read about these two functions?
Exspecially I want to know, which of the above mentioned functions still let the bot react on atacks.
1. Read WIKI
2. DID you even read my post???