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

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
copenhagen69
Posts: 58
Joined: Mon Jul 27, 2009 8:04 pm

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

#41 Post by copenhagen69 » Mon Sep 21, 2009 10:09 pm

ok so i put it like this ....

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("path1.xml");
        end;
 </waypoint>

	<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("path1.xml");
        end;
 </waypoint>

	<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>
and i get an error and wont even run now ...

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

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

#42 Post by d003232 » Tue Sep 22, 2009 12:49 am

copenhagen69 wrote:ok so i put it like this ....

Code: Select all

<waypoints>
	<waypoint x="-154" z="607" />

if( player.Level > 12 ) then
         load_paths("path1.xml");
        end;
 </waypoint>

	<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("path1.xml");
        end;
 </waypoint>

	<waypoint x="914" z="-737" />
</waypoints>
and i get an error and wont even run now ...
'An error' is not a very exact description of the error. :-) Please compare your waypoint file with that one from the folder '\waypoints\1-10Pioneers. I suppose you have to delete the '/' at least from that tag where you use the closing tag. The new 'createpath.lua' will allways write opening and closing tags.
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 )

#43 Post by copenhagen69 » Tue Sep 22, 2009 1:17 am

ok ill check the other and get back to you on it

thanks for all the help so far d00 :)

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

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

#44 Post by copenhagen69 » Tue Sep 22, 2009 10:50 am

ok this is my code ...

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("path1.xml");
        end;
</waypoint>

   <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("path1.xml");
        end;
</waypoint>

   <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>

pioneer folder WP

Code: Select all

<waypoints type="NORMAL" >
	<!-- # 1 --><waypoint x="-791" z="-8322"></waypoint>
	<!-- # 2 --><waypoint x="-737" z="-8155"></waypoint>
	<!-- # 3 --><waypoint x="-552" z="-8251">player:restrnd(15, 1, 10);</waypoint>
	<!-- # 4 --><waypoint x="-540" z="-8412"></waypoint>
	<!-- # 5 --><waypoint x="-321" z="-8583">player:restrnd(15, 1, 10);</waypoint>
	<!-- # 6 --><waypoint x="-128" z="-8708">
		if( player.Level > 3 ) then
			loadPaths("1-10Pioneers/l4t_logar");
	  	end
	</waypoint>
	<!-- # 7 --><waypoint x="79" z="-8490"></waypoint>
	<!-- # 8 --><waypoint x="271" z="-8409">player:restrnd(15, 1, 10);</waypoint>
	<!-- # 9 --><waypoint x="297" z="-8225"></waypoint>
	<!-- #10 --><waypoint x="232" z="-7986">player:restrnd(15, 1, 10);</waypoint>
	<!-- #11 --><waypoint x="212" z="-7852"></waypoint>
	<!-- #12 --><waypoint x="56" z="-7650">player:restrnd(15, 1, 10);</waypoint>
	<!-- #13 --><waypoint x="-27" z="-7385">
		if( player.Level > 3 ) then
			loadPaths("1-10Pioneers/l4t_logar");
	  	end
	</waypoint>
	<!-- #14 --><waypoint x="-123" z="-7052">player:restrnd(15, 1, 10);</waypoint>
	<!-- #15 --><waypoint x="-184" z="-6929"></waypoint>
	<!-- #16 --><waypoint x="-331" z="-6879">player:restrnd(15, 1, 10);</waypoint>
	<!-- #17 --><waypoint x="-464" z="-7088">player:restrnd(15, 1, 10);</waypoint>
	<!-- #18 --><waypoint x="-522" z="-7205"></waypoint>
	<!-- #19 --><waypoint x="-480" z="-7427">player:restrnd(15, 1, 10);</waypoint>
	<!-- #20 --><waypoint x="-496" z="-7605"></waypoint>
	<!-- #21 --><waypoint x="-539" z="-7818">player:restrnd(15, 1, 10);</waypoint>
	<!-- #22 --><waypoint x="-646" z="-8070">
		if( player.Level > 3 ) then
			loadPaths("1-10Pioneers/l4t_logar");
	  	end
	</waypoint>
</waypoints>

im going to try a couple things today ... but do you see anything between that 2 that are different?
all i see is mine had end; and the pioneer code has end (with no ; after it) so i will mess with it and see what i come up with but is there anything else?

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

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

#45 Post by d003232 » Tue Sep 22, 2009 11:05 am

copenhagen69 wrote:im going to try a couple things today ... but do you see anything between that 2 that are different?
all i see is mine had end; and the pioneer code has end (with no ; after it) so i will mess with it and see what i come up with but is there anything else?
You are writing it the way

Code: Select all

<waypoint x="-154" z="607" />

if( player.Level > 12 ) then
         load_paths("path1.xml");
        end;
</waypoint>
I don't know enough about the XMP parser. But I would suppose a

Code: Select all

<waypoint x="-154" z="607" />
Means a tag including a end tag. Because auf the '/' at the end. I suppose that is a short form. Not sure. So your code would be outside the tags and by that not recognized. You should write:

Code: Select all

<waypoint x="-154" z="607" >

if( player.Level > 12 ) then
         load_paths("path1.xml");
        end;
</waypoint>
without that '/' in the first tag. Like in the demo files.
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 )

#46 Post by copenhagen69 » Tue Sep 22, 2009 11:17 am

oooooh nice i did not even notice that ... i will go test that out and see what happens

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

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

#47 Post by copenhagen69 » Tue Sep 22, 2009 3:23 pm

ya the "/" of the waypoint above where you post the code needs to be taken off and then it works like its suppose to :D

ToreDeLoro
Posts: 12
Joined: Thu Sep 24, 2009 7:18 pm

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

#48 Post by ToreDeLoro » Thu Sep 24, 2009 8:23 pm

hello

i use the code

Code: Select all

<!-- # 14 --><waypoint x="797" z="19989">
		if( os.difftime(os.time(), player.BotStartTime) > 3600 ) then
   			load_paths("repair.xml","reparr.xml");
		end;
</waypoint>
but when im reach the waypoint and the hour pased i get an error


what im doing wrong?
Attachments
this is the error report
this is the error report

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

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

#49 Post by Administrator » Thu Sep 24, 2009 9:58 pm

Try using loadPaths() instead of load_paths().

ToreDeLoro
Posts: 12
Joined: Thu Sep 24, 2009 7:18 pm

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

#50 Post by ToreDeLoro » Fri Sep 25, 2009 6:16 am

yeah :)
now works fine

i use this

Code: Select all

		local durab , durabmax = RoMScript("GetInventoryItemDurable('player', 15);");
		a = durab/durabmax
		if( a >= 0.51 ) then
         
		else
     			loadPaths("repair.xml");
		end	
to run the repair rute and

Code: Select all

		
                sendMacro("SetCameraPosition(420,-712,21143);");
		player:scan_for_NPC("Het Klochi");
		sendMacro("ChoiceOption(1);");		
		keyboardPress(key.VK_B);		
		local durab , durabmax = RoMScript("GetInventoryItemDurable('player', 15);");
		a = durab/durabmax
		if( a >= 0.51 ) then
     			loadPaths("harvest.xml");
		end	
to get back to the original
thank you

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

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

#51 Post by wizzyslo » Sun Nov 01, 2009 6:24 pm

Hi everybody i have little problem with take and finish quest. Some time he accept quest some time he don't and he never finish it. I made script for daily quest sea of snow wich i have litle problems.

Code: Select all

<waypoints type="RUN">
	<!-- #  1 --><waypoint x="-14404" z="-379">
	camera:setRotation(3,141);
	player:rest(2);
	player:mouseclickL(619, 446, 1280, 968);
	player:rest(2);	
	sendMacro("OnClick_QuestListButton(1,1)");	yrest(1000);
	player:rest(2);	
	sendMacro("AcceptQuest();");			yrest(1000);
	player:rest(2);	
	<!-- # 2 --><waypoint x="-14415" z="-377">	</waypoint>
	<!-- # 3 --><waypoint x="-14376" z="-358">	</waypoint>
	<!-- # 4 --><waypoint x="-14292" z="-399">	</waypoint>
	<!-- # 5 --><waypoint x="-14224" z="-512">	</waypoint>
	<!-- # 6 --><waypoint x="-14177" z="-604">	</waypoint>
	<!-- # 7 --><waypoint x="-14121" z="-699">	</waypoint>
	<!-- # 8--><waypoint x="-13915" z="-861">	</waypoint>
	<!-- # 9 --><waypoint x="-13671" z="-1126">	</waypoint>
	<!-- # 10 --><waypoint x="-13571" z="-1412">	</waypoint>
	<!-- # 11 --><waypoint x="-13673" z="-1547">	</waypoint>
	<!-- # 12 --><waypoint x="-13776" z="-1670">	</waypoint>
	<!-- # 13 --><waypoint x="-13669" z="-1915">	</waypoint>
	<!-- # 14 --><waypoint x="-13523" z="-2223">	</waypoint>
	<!-- # 15 --><waypoint x="-13362" z="-2468">	</waypoint>
	<!-- # 16 --><waypoint x="-13263" z="-2727">	</waypoint>
	<!-- # 17 --><waypoint x="-13373" z="-3046">	</waypoint>
	<!-- # 18 --><waypoint x="-13559" z="-3205">	</waypoint>
	
	<!-- # 19 --><waypoint x="-13887" z="-3331">
		player:rest(4);
		player:target_NPC("Siping");
		player:rest(4);
		sendMacro("OnClick_QuestListButton(3,1)");
		player:rest(4);
		sendMacro("CompleteQuest();"); yrest(1000);	
	</waypoint>
	<!-- # 20 --><waypoint x="-13863" z="-3237">	</waypoint>
	<!-- # 21 --><waypoint x="-13769" z="-2962">	</waypoint>
	<!-- # 22 --><waypoint x="-13753" z="-2669">	</waypoint>
	<!-- # 23 --><waypoint x="-13726" z="-2352">	</waypoint>
	<!-- # 24 --><waypoint x="-13679" z="-2065">	</waypoint>
	<!-- # 25--><waypoint x="-13504" z="-1738">	</waypoint>
	<!-- # 26--><waypoint x="-13535" z="-1488">	</waypoint>
	<!-- # 27--><waypoint x="-13716" z="-1084">	</waypoint>
	<!-- # 28--><waypoint x="-13906" z="-865">	</waypoint>
	<!-- # 29--><waypoint x="-14130" z="-687">	</waypoint>
	<!-- # 30--><waypoint x="-14224" z="-512">	</waypoint>
	<!-- # 31--><waypoint x="-14292" z="-399">	</waypoint>
	<!-- # 32--><waypoint x="-14376" z="-358">	</waypoint>
	<!-- # 33--><waypoint x="-14415" z="-377">	</waypoint>
</waypoints>
For accept quest i think i can fix it but for finis i don't have idea. Do you have any idea what is wrong :?:

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

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

#52 Post by d003232 » Mon Nov 02, 2009 2:12 am

wizzyslo wrote:For accept quest i think i can fix it but for finis i don't have idea. Do you have any idea what is wrong :?:
I suppose the only way is to use a mouseclick ... or find out a new solution with one of the RoM API function. I don't know a way.
The RoM Bot Online Wiki needs your help!

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

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

#53 Post by wizzyslo » Mon Nov 02, 2009 4:41 pm

Friend gave to me good idea. If you go in game and change key bindings->Nearest Ally-> to some new key then look next code:

Code: Select all

<!-- # 19 --><waypoint x="-13887" z="-3331">						
		keyboardPress( key.VK_J ); yrest(1000);    
		player:rest(2);
		player:target_NPC("Siping");
		player:rest(2);
		sendMacro("CompleteQuest();"); yrest(1000);	
	</waypoint>
But i have still 1 question. Is this micromacro support If code like this:

Code: Select all

<!-- # 19 --><waypoint x="-13887" z="-3331">						
		keyboardPress( key.VK_J ); yrest(1000);
		player:rest(2);
		If target_NPC("Siping")
			keyboardPress( key.VK_1 ); yrest(1000);   --attack button--
		else keyboardPress( key.VK_J ); yrest(1000);	--and so on--
                endIf
		player:rest(2);
		sendMacro("CompleteQuest();"); yrest(1000);	
	</waypoint>
First code works fine but have little problem. I didn't have time to test it at all conditions. Can somebody test it if is onother player near NPC if bot target NPC or player. :D

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

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

#54 Post by d003232 » Mon Nov 02, 2009 5:00 pm

wizzyslo wrote:First code works fine but have little problem. I didn't have time to test it at all conditions. Can somebody test it if is onother player near NPC if bot target NPC or player. :D
I suppose you didn't test it at all?

Code: Select all

player:target_NPC("Siping");
is allready searching and targeting the right NPC, press the attack key to move closer/open the dialog.

And the problem are not the easy quest NPC's with only one single Q. Every NPC which is supported from Streamline addon could also be handled by the bot. The problem are that one, where you have to load more then one quest detail page.
The RoM Bot Online Wiki needs your help!

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

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

#55 Post by wizzyslo » Tue Nov 03, 2009 8:32 am

I know for this code but I had little problem with targeted NPC. Always has come to the NPC and go forward. Bot never toked reword.

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

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

#56 Post by d003232 » Tue Nov 03, 2009 8:50 am

wizzyslo wrote:I know for this code but I had little problem with targeted NPC. Always has come to the NPC and go forward. Bot never toked reword.
You don't need to use

Code: Select all

    keyboardPress( key.VK_J ); yrest(1000);
...
         keyboardPress( key.VK_1 ); yrest(1000);   --attack button--
if you use that function. That's supported by the function. Any further more interaction with the NPC have to be done by yourself.
The RoM Bot Online Wiki needs your help!

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

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

#57 Post by wizzyslo » Tue Nov 03, 2009 11:00 am

I didn't find code for change primary class with secondary class. Is this code exist?

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

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

#58 Post by d003232 » Tue Nov 03, 2009 11:07 am

wizzyslo wrote:I didn't find code for change primary class with secondary class. Is this code exist?
No.
The RoM Bot Online Wiki needs your help!

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

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

#59 Post by j_schlott » Wed Nov 04, 2009 7:34 pm

the addon streamline does a quick change when you click change classes at house

found the function:

Code: Select all

ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS);
would look something like this:

Code: Select all

player:rest(1)
player:target_NPC("HouseMaids Name")
player:rest(1)
RoMScript("ChoiceOption(#)")
player:rest(1)
RoMScript("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)")
and if you didnt know you can switch classes at the maid outside your house now!

djonas
Posts: 2
Joined: Wed Apr 21, 2010 9:31 pm

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

#60 Post by djonas » Tue Apr 27, 2010 2:14 am

why my bot always says unsticking player....at position xxxx,xxxx trial 1 maximal 10
they keep running in circle
thanx

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest