How to: using waypoint files (Examples: DQ running, multi )

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
master121
Posts: 45
Joined: Mon Dec 29, 2008 10:40 am

Re: How to: using waypoint files (Examples: DQ running, multi )

#21 Post by master121 » Thu Aug 20, 2009 7:16 am

d003232 wrote:

Code: Select all

if( os.difftime(os.time(), player.BotStartTime) > 3600 ) then
	printf("do some other coding stuff");
end;
Do something, if the bot is running for more then 1 hour (= 3600 seconds). If you pause the bot, the BotStartTime will be reseted.
Is there another way to reset the BotStartTime ?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#22 Post by d003232 » Thu Aug 20, 2009 7:22 am

master121 wrote:
d003232 wrote:

Code: Select all

if( os.difftime(os.time(), player.BotStartTime) > 3600 ) then
	printf("do some other coding stuff");
end;
Do something, if the bot is running for more then 1 hour (= 3600 seconds). If you pause the bot, the BotStartTime will be reseted.
Is there another way to reset the BotStartTime ?
You could just do it by yourself

Code: Select all

player.BotStartTime = 0;
What do you want to do? I would more suggest to use the user fields and copy the time to that fields:

Code: Select all

player.free_field1 = nil;			-- free field for user use
player.free_field2 = nil;			-- free field for user use
player.free_field3 = nil;			-- free field for user use
player.free_counter1 = 0;			-- free counter for user use
player.free_counter2 = 0;			-- free counter for user use
player.free_counter3 = 0;			-- free counter for user use		
player.free_flag1 = false;			-- free flag for user use
player.free_flag2 = false;			-- free flag for user use
player.free_flag3 = false;			-- free flag for user use		
The RoM Bot Online Wiki needs your help!

master121
Posts: 45
Joined: Mon Dec 29, 2008 10:40 am

Re: How to: using waypoint files (Examples: DQ running, multi )

#23 Post by master121 » Thu Aug 20, 2009 7:40 am

I want the bot to repair buy potions after one hour and when it has done that he runs back to the mobs.
But then he goes for repairing again so i have to reset the BotStartTime....
And thanks ;)

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#24 Post by d003232 » Thu Aug 20, 2009 7:44 am

master121 wrote:I want the bot to repair buy potions after one hour and when it has done that he runs back to the mobs.
But then he goes for repairing again so i have to reset the BotStartTime....
And thanks ;)
OK, understand. I would do it fight based

Code: Select all

	if( player.Fights-player.free_counter1 > 400 ) then
		player.free_counter1 = player.Fights;
		load_paths("xyz_repair");
	end
The RoM Bot Online Wiki needs your help!

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#25 Post by d003232 » Thu Aug 20, 2009 9:39 am

Administrator wrote:People don't even bother reading what's already right in front of them. I don't think a wiki would be that much more useful except for those very few who actually bother.
I personaly like wikis. It's more easy to read and navigate as different forum posts. And sometimes I read even the micromacro wiki. So in my optinion it would be nice to have a wiki for the bot. That would also make the process of documentation more easy because more people could write on that at the same time.

EDIT: lol. I just clicked the micromacro wiki and detect RoM Bot wiki. Is that the official start of the wiki?
The RoM Bot Online Wiki needs your help!

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#26 Post by Administrator » Thu Aug 20, 2009 12:28 pm

d003232 wrote: EDIT: lol. I just clicked the micromacro wiki and detect RoM Bot wiki. Is that the official start of the wiki?
I didn't start it, but people are free to contribute to it.

j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#27 Post by j_schlott » Mon Aug 24, 2009 7:07 pm

Anyways, showWindow() has it's limitations. It can only force that window to the foreground if 1) MicroMacro created the window 2) MicroMacro created the process that created the window 3) MicroMacro is in the foreground. This largely makes showWindow() useless when dealing with multiple instances.
is there any way around this problem?

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#28 Post by Administrator » Mon Aug 24, 2009 8:39 pm

No. It is an issue with the Windows operating system.

ToDoWaldi
Posts: 6
Joined: Fri Jan 02, 2009 5:36 am

Re: How to: using waypoint files (Examples: DQ running, multi )

#29 Post by ToDoWaldi » Mon Aug 31, 2009 1:52 pm

Hello. Why this does not work?

Code: Select all

<waypoints>
	<!-- # 1 --><waypoint x="-3982" z="9004"></waypoint>
	<!-- # 2 --><waypoint x="-4119" z="9207"></waypoint>
	<!-- # 3 --><waypoint x="-4206" z="9481"></waypoint>
	<!-- # 4 --><waypoint x="-4024" z="9679"></waypoint>
	<!-- # 5 --><waypoint x="-4109" z="9856"></waypoint>
	<!-- # 6 --><waypoint x="-4260" z="10208"></waypoint>
	<!-- # 7 --><waypoint x="-4431" z="10446">__WPL:reverse();</waypoint>
</waypoints>
When he gets to #7, he should go to #6, but he directly wants to go to #1 (x="-3982" z="9004")

What have i done wrong?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#30 Post by d003232 » Mon Aug 31, 2009 3:01 pm

ToDoWaldi wrote:Hello. Why this does not work?
When he gets to #7, he should go to #6, but he directly wants to go to #1 (x="-3982" z="9004")

What have i done wrong?
In my opinion, everything is right. You could insert a

Code: Select all

printf("direction: %s\n", self.Direction);
before and after to see, that the coding is reached ... or you could change the direction manual directly in the waypoint by using:

Code: Select all

	if( self.Direction == WPT_FORWARD ) then
		self.Direction = WPT_BACKWARD;
	else
		self.Direction = WPT_FORWARD;
	end;
just to see, that everything is ok. Perhaps that will help to come a little closer to the problem you have.
The RoM Bot Online Wiki needs your help!

copenhagen69
Posts: 58
Joined: Mon Jul 27, 2009 8:04 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#31 Post by copenhagen69 » Mon Sep 21, 2009 1:05 pm

Would i put:

Code: Select all

 if( player.Level > 4 ) then
         load_paths("l5_goto_6.xml");
        end;
under the last waypoint in the file?
and if i wanted to add more than one ... say for instance:

Code: Select all

 if( player.Level > 4 ) then
         load_paths("path1.xml");
        end;

 if( player.Level > 7 ) then
         load_paths("path2.xml");
        end;

 if( player.Level > 11 ) then
         load_paths("path3.xml");
        end;
would that be the correct way to do it? or would that even work?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#32 Post by d003232 » Mon Sep 21, 2009 1:12 pm

copenhagen69 wrote:Would i put:

Code: Select all

 if( player.Level > 4 ) then
         load_paths("l5_goto_6.xml");
        end;
under the last waypoint in the file?
and if i wanted to add more than one ... say for instance:

Code: Select all

 if( player.Level > 4 ) then
         load_paths("path1.xml");
        end;

 if( player.Level > 7 ) then
         load_paths("path2.xml");
        end;

 if( player.Level > 11 ) then
         load_paths("path3.xml");
        end;
would that be the correct way to do it? or would that even work?
No it would not. You write the load statement within a waypoint tag. And the bot will leave that waypoint file after he loads the new file. If you want to choose between different files to load, you could do that in the onLoad event in your profile? Depending from what you want to do.
The RoM Bot Online Wiki needs your help!

copenhagen69
Posts: 58
Joined: Mon Jul 27, 2009 8:04 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#33 Post by copenhagen69 » Mon Sep 21, 2009 1:17 pm

hmmm well i was trying to do ....

Code: Select all

<waypoints type="NORMAL" >
   <!-- # 1 --><waypoint x="-2206" z="-9648"></waypoint>
   <!-- # 2 --><waypoint x="-2133" z="-9796">player:restrnd(20, 1, 10);</waypoint>
   <!-- # 3 --><waypoint x="-2224" z="-9882">player:restrnd(20, 1, 10);</waypoint>
   ...
   <!-- # 7 --><waypoint x="-2391" z="-9639">
      if( player.Level > 4 ) then
         load_paths("l5_goto_6.xml");
        end;
   </waypoint>
</waypoints>
where i level and he will move paths ... but i wanted to add at least 2 new paths so if he leveled faster than i think he will be fighting the right stuff instead of the lower level things ...

if i can only add that 1 path at the end of a waypoint file that is fine i am just trying to see what all i can do with it :)


a thought .... what if i put ...

Code: Select all

<waypoints type="NORMAL" >
   <!-- # 1 --><waypoint x="-2206" z="-9648"></waypoint>
   <!-- # 2 --><waypoint x="-2133" z="-9796">player:restrnd(20, 1, 10);</waypoint>
   <!-- # 3 --><waypoint x="-2224" z="-9882">player:restrnd(20, 1, 10);</waypoint>
   ...
   <!-- # 7 --><waypoint x="-2391" z="-9639">
      if( player.Level > 4 ) then
         load_paths("Path1.xml");
        end;
   </waypoint>
</waypoints>

then in the path1 file have ...

Code: Select all

<waypoints type="NORMAL" >
   <!-- # 1 --><waypoint x="-2206" z="-9648"></waypoint>
   <!-- # 2 --><waypoint x="-2133" z="-9796">player:restrnd(20, 1, 10);</waypoint>
   <!-- # 3 --><waypoint x="-2224" z="-9882">player:restrnd(20, 1, 10);</waypoint>
   ...
   <!-- # 7 --><waypoint x="-2391" z="-9639">
      if( player.Level > 8 ) then
         load_paths("Path2.xml");
        end;
   </waypoint>
</waypoints>
soooooo with that thinking it would keep switching paths whenever he hit that certain level that i choose for him

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#34 Post by d003232 » Mon Sep 21, 2009 1:39 pm

copenhagen69 wrote:soooooo with that thinking it would keep switching paths whenever he hit that certain level that i choose for him
If you level faster, then your character will change the path faster. Thats the best way. I don't think you want to do three diffenrent waypointfile, all starting from the same point? If you really want to do that, you could do

Code: Select all

      if( player.Level > 6 ) then
         load_paths("l6_goto_6.xml");
      elseif( player.Level > 5 ) then
         load_paths("l5_goto_5.xml");
      elseif( player.Level > 3 ) then
         load_paths("l4_goto_4.xml");
        end;
The RoM Bot Online Wiki needs your help!

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#35 Post by d003232 » Mon Sep 21, 2009 1:41 pm

You can look at the folder '\waypoints\1-10Pioneers' for examples.
The RoM Bot Online Wiki needs your help!

copenhagen69
Posts: 58
Joined: Mon Jul 27, 2009 8:04 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#36 Post by copenhagen69 » Mon Sep 21, 2009 2:32 pm

ok i looked at that folder to see how they were set up ...

this is how my WPs look now ...

Code: Select all

<waypoints>
	<waypoint x="800" z="-226" />
	<waypoint x="726" z="-141" />
	<waypoint x="639" z="-79" />
	<waypoint x="436" z="8" />
	<waypoint x="309" z="107" />
	<waypoint x="256" z="114" />
	<waypoint x="229" z="158" />
	<waypoint x="197" z="254" />
	<waypoint x="205" z="368" />
	<waypoint x="213" z="433" />
	<waypoint x="183" z="476" />
	<waypoint x="54" z="500" />
	<waypoint x="-154" z="607" />

if( player.Level > 12 ) then
         load_paths("path2.xml");
        end;

	<waypoint x="-147" z="536" />
	<waypoint x="-162" z="494" />
	<waypoint x="-140" z="472" />
	<waypoint x="-185" z="330" />
	<waypoint x="-241" z="255" />
	<waypoint x="-218" z="95" />
	<waypoint x="-42" z="196" />
	<waypoint x="71" z="141" />
	<waypoint x="390" z="-21" />
	<waypoint x="476" z="-185" />
	<waypoint x="475" z="-409" />
	<waypoint x="600" z="-722" />
	<waypoint x="706" z="-717" />

if( player.Level > 12 ) then
         load_paths("path2.xml");
        end;

	<waypoint x="914" z="-737" />
	<waypoint x="950" z="-608" />
	<waypoint x="1000" z="-458" />
	<waypoint x="1061" z="-364" />
	<waypoint x="1134" z="-242" />
	<waypoint x="1053" z="-129" />
	<waypoint x="923" z="-144" />
	<waypoint x="789" z="-195" />
</waypoints>
then ....

Code: Select all

<waypoints>
	<waypoint x="4702" z="4177" />
	<waypoint x="4577" z="3989" />
	<waypoint x="4453" z="3740" />
	<waypoint x="4094" z="3137" />
	<waypoint x="3534" z="2758" />
	<waypoint x="3319" z="2635" />
	<waypoint x="2998" z="2580" />
	<waypoint x="2998" z="2580" />

if( player.Level > 15 ) then
         load_paths("path3.xml");
        end;

	<waypoint x="2516" z="3177" />
	<waypoint x="2581" z="3209" />
	<waypoint x="3023" z="3312" />
	<waypoint x="3160" z="3358" />
	<waypoint x="3287" z="3387" />
	<waypoint x="3564" z="3459" />
	<waypoint x="3879" z="3459" />
	<waypoint x="4479" z="3682" />
	<waypoint x="4708" z="4157" />
	<waypoint x="4655" z="4173" />
</waypoints>
so if i keep this going in the files then that should work and have them just keep on leveling and changing paths every time they hit that level requirement.... correct?

for instance ....

i have path 1 to lvl 5 then path 2 to lvl 12 path 3 to lvl 15 .... if i keep updating my WPs files like i did above .... IN THEORY ... my guy will just keep going to the different paths when he hits those levels and never stop ... right?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#37 Post by d003232 » Mon Sep 21, 2009 2:49 pm

copenhagen69 wrote:IN THEORY ... my guy will just keep going to the different paths when he hits those levels and never stop ... right?
Yes that's it. On higher level you have perhaps to go to a merchant, repair, clear your bag. But a least from LvL 1-10 it goes without problem in one hour.
The RoM Bot Online Wiki needs your help!

copenhagen69
Posts: 58
Joined: Mon Jul 27, 2009 8:04 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#38 Post by copenhagen69 » Mon Sep 21, 2009 2:56 pm

d003232 wrote:
copenhagen69 wrote:IN THEORY ... my guy will just keep going to the different paths when he hits those levels and never stop ... right?
Yes that's it. On higher level you have perhaps to go to a merchant, repair, clear your bag. But a least from LvL 1-10 it goes without problem in one hour.

heh, ya i am reading up on the go to merchant and all that stuff now .... hopefully i wont have tooooo much problems setting that up :)

copenhagen69
Posts: 58
Joined: Mon Jul 27, 2009 8:04 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#39 Post by copenhagen69 » Mon Sep 21, 2009 4:58 pm

what the ....

Code: Select all

<waypoints>
   <waypoint x="4702" z="4177" />
   <waypoint x="4577" z="3989" />
   <waypoint x="4453" z="3740" />
   <waypoint x="4094" z="3137" />
   <waypoint x="3534" z="2758" />
   <waypoint x="3319" z="2635" />
   <waypoint x="2998" z="2580" />
   <waypoint x="2998" z="2580" />

if( player.Level > 15 ) then
         load_paths("path3.xml");
        end;

   <waypoint x="2516" z="3177" />
   <waypoint x="2581" z="3209" />
   <waypoint x="3023" z="3312" />
   <waypoint x="3160" z="3358" />
   <waypoint x="3287" z="3387" />
   <waypoint x="3564" z="3459" />
   <waypoint x="3879" z="3459" />
   <waypoint x="4479" z="3682" />
   <waypoint x="4708" z="4157" />
   <waypoint x="4655" z="4173" />
</waypoints>
i am now 16 but it still had not loaded the new path ... am i missing something here?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How to: using waypoint files (Examples: DQ running, multi )

#40 Post by d003232 » Mon Sep 21, 2009 5:00 pm

copenhagen69 wrote:what the ....

Code: Select all

   <waypoint x="2998" z="2580" />

if( player.Level > 15 ) then
         load_paths("path3.xml");
        end;
i am now 16 but it still had not loaded the new path ... am i missing something here?
You are missing the closing tag.

Code: Select all

	<!-- #22 --><waypoint x="-646" z="-8070">
		if( player.Level > 3 ) then
			loadPaths("1-10Pioneers/l4t_logar");
	  	end
	</waypoint>
means a '</waypoint>' after every opening '<waypoint ...>'
The RoM Bot Online Wiki needs your help!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 29 guests