Page 1 of 1

Instead od durability, timecheck?

Posted: Fri Feb 19, 2010 4:46 am
by net_ralf
Can i somehow get a timer implemented into my bot. So that after 4 hours of fighting use recall,pause for a few seconds and then use the repair route to the merchant,do the auto repair and then go to the the fighting route. Please don't give an answer with just "yes its possible." Yes i lookked through the wikis.

Thx in advance

Re: Instead od durability, timecheck?

Posted: Fri Feb 19, 2010 11:59 am
by j_schlott

Code: Select all

if(player.free_counter1 == 0) then player.free_counter1 = os.time(); end;
if( os.difftime(os.time(), player.free_counter1) > 14400 ) then  --4 hours
player.free_counter1 = os.time();
player:rest(1);
RoMScript("UseSkill(1,2);");  --recall
yrest(40000);  --wait while load screen
loadPaths("bot_repair.xml");  --load repair path from teleport drop
end

Re: Instead od durability, timecheck?

Posted: Sat Feb 20, 2010 12:55 pm
by net_ralf
i will test it on monday, thx man :)

Re: Instead od durability, timecheck?

Posted: Sun Feb 21, 2010 10:25 am
by net_ralf
Stupid question but where do I put this? is this a micromacro script and i have to save it as an lua script or can i put this at the beginning of a waypoint file?

yes i am a noob :)

Re: Instead od durability, timecheck?

Posted: Sun Feb 21, 2010 10:57 pm
by j_schlott
it goes inside your huntingwaypoint.xml, inside one of the points in your path

Code: Select all

<waypoints>
   <!-- # 1 --><waypoint x="00000" z="00000"></waypoint>
	<!-- # 2 --><waypoint x="00000" z="00000"></waypoint>
	<!-- # 3 --><waypoint x="00000" z="00000">
        HERE
   </waypoint>
	<!-- # 4 --><waypoint x="00000" z="00000"></waypoint>
	<!-- # 5 --><waypoint x="00000" z="00000"></waypoint>
	<!-- # 6 --><waypoint x="00000" z="00000"></waypoint>
	<!-- # 7 --><waypoint x="00000" z="00000"></waypoint>
	<!-- # 8 --><waypoint x="00000" z="00000"></waypoint>
	<!-- # 9 --><waypoint x="00000" z="00000"></waypoint>
</waypoints>
i put mine here inside waypoint 3, you want to put it in one of your waypoints that is safe
not near enemies, if they spawn while your casting recall it will mess it up, so pick a point along your path that is safe

youll need to make a 2nd waypointfile.xml that runs from the teleport drop, interacts with the NPC, than runs back to hunting spot and loads that path