SVN 96: new rest function
Posted: Mon Jul 27, 2009 5:42 am
New function to restore mana and healthpoints if under a certain level. This function could also be used, if you want to do a time based rest in a waypoint file, it will detect aggro while resting and fight back
_restfix ( base time to rest in sec)
_restrnd ( max random addition to basetime 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 new options:Default value if not defined is 15% both.
e.g.
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(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
To look not so bottish, please use the random time options!!!
Code: Select all
player:rest( _restfix,[ _restrnd[, time|full[, _restaddrnd]]])_restrnd ( max random addition to basetime 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 new options:
Code: Select all
<option name="HP_REST" value="15" />
<option name="MP_REST" value="15" />
e.g.
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(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
To look not so bottish, please use the random time options!!!