Page 1 of 1

timelimit

Posted: Thu Oct 21, 2010 4:34 am
by Starrider
Is there any possibility to let the bot farm with a timelimit in a zone an then to load a waypointfile that the bot goes to the npc and selling his trashloot and then foward to the next farming zone? And how to use the teleporter?

Re: timelimit

Posted: Thu Oct 21, 2010 4:53 am
by swietlowka
for teleport use player:target_Object(_objname, _waittime, _harvestall, _donotignore, _evalFunc);
from http://www.solarstrike.net/wiki/index.p ... _Functions and the use ChoseOption function for telporting and yrest to w8 some time to not let it unstick-logout,

there functions for doing something in comparision with time here:
http://www.solarstrike.net/wiki/index.p ... _Variables

but since theres no more os.time i would say theyre obsolete now, u can always use killed mob or smt diffrent

Re: timelimit

Posted: Thu Oct 21, 2010 12:51 pm
by Alkaiser
I might be wrong about this, but, I believe the os.time() function in MicroMacro is independent from the game's os.time() (non)function. It should work.

Re: timelimit

Posted: Thu Oct 21, 2010 1:04 pm
by Starrider
My idea was to use in any way the timestamp from micromacro. There still stand bot is runnning for xx minutes. So i thought that there is any possibility to use this.

Re: timelimit

Posted: Thu Oct 21, 2010 3:44 pm
by Alkaiser
This works for me:

Code: Select all

<onLoad>
	fighttime = os.time()
</onLoad>
	
	if( os.difftime(os.time(), fighttime) > 3600 ) then -- true if one hour has passed since onLoad event
		...
	end

The example linked above by swietlowka is basically the same.

Code: Select all

	if( os.difftime(os.time(), player.BotStartTime) > 3600 ) then
   		...
	end

Re: timelimit

Posted: Fri Oct 22, 2010 1:44 am
by swietlowka
ofc you would have to call for some other wpl or waypoint file to go for your teleporter frome the place of check and then use teleport functions