return path keeps looping

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

return path keeps looping

#1 Post by j_schlott » Fri Aug 28, 2009 8:43 pm

i have my macro set up to load _return path and run to town every 300fights, but when hes at the end of the _return path,

Code: Select all

        load_paths("macro.xml"); <!-- macro path --> 
and i want it to load macro path again, MM says:
"Loaded waypoint path macro.xml
Return path found with default naming: macro_return.xml
Loaded return path macro_return.xml
We are coming from a return_path. So we will going on using the returnpath macro_return.xml"
and keeps looping my return path over and over

macro path:

Code: Select all

<waypoints>
	<!-- # 1 --><waypoint x="0000" z="0000">
	if( player.Fights-player.free_counter1 > 300 ) then  <!--300 -->
        player.free_counter1 = player.Fights;
	player:rest(1);
	load_paths("macro_return.xml");
        end;
	</waypoint>
	<!-- # 2 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 3 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 4 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 5 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 6 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 7 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 8 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 9 --><waypoint x="0000" z="0000"></waypoint>
	<!-- #10 --><waypoint x="0000" z="0000"></waypoint>
	<!-- #11 --><waypoint x="0000" z="0000"></waypoint>
</waypoints>
macro_return.xml:

Code: Select all

<waypoints>
	<!-- # 1 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 2 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 3 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 4 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 5 --><waypoint x="0000" z="0000"></waypoint>
	<!-- # 9 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #10 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #11 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #12 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #13 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #14 --><waypoint x="0000" z="0000" type="RUN" >
	player:rest(2);
	player:target_NPC("Merchant");
	player:rest(1)
        keyboardPress(key.VK_5); <!-- ingame macro to sell/buy -->
	player:rest(5)
	</waypoint>
	<!-- #15 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #16 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #17 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #18 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #19 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #20 --><waypoint x="0000" z="0000" type="RUN" ></waypoint>
	<!-- #21 --><waypoint x="0000" z="0000" ></waypoint>
	<!-- #22 --><waypoint x="0000" z="0000" ></waypoint>
	<!-- #23 --><waypoint x="0000" z="0000" ></waypoint>
	<!-- #24 --><waypoint x="0000" z="0000" >
        load_paths("macro.xml"); <!-- macro path --> 
	</waypoint>
</waypoints>
i also tried

Code: Select all

	<!-- #24 --><waypoint x="0000" z="0000" >
        load_paths("macro.xml", "macro_return.xml"); <!-- macro path --> 
but if does same thing
Last edited by j_schlott on Fri Aug 28, 2009 9:30 pm, edited 1 time in total.

Glopo
Posts: 29
Joined: Tue Aug 11, 2009 9:52 pm

Re: return path keeps looping

#2 Post by Glopo » Fri Aug 28, 2009 9:21 pm

hi,

try to change :

Code: Select all

<option name="RETURNPATH" value="macro_return.xml" />
in your porfile

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

Re: return path keeps looping

#3 Post by j_schlott » Fri Aug 28, 2009 9:29 pm

it already is =(

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

Re: return path keeps looping

#4 Post by j_schlott » Fri Aug 28, 2009 9:42 pm

Code: Select all

 
   <!-- #24 --><waypoint x="0000" z="0000" >
        load_paths("macro.xml", "macro_return.xml"); <!-- macro path --> 

Code: Select all

 
   <!-- #24 --><waypoint x="0000" z="0000" >
        load_paths("macro.xml", "macrorepair.xml"); <!-- macro path --> 

Code: Select all

   <!-- #24 --><waypoint x="0000" z="0000" >
        load_paths("macro.xml"); <!--return named macro_return.xml but not loaded--> 
Loaded waypoint path macro.xml
Return path found with default naming: macro_return.xml
Loaded return path macro_return.xml
We are coming from a return_path. So we will going on using the returnpath macro_return.xml
with it set those 3 different ways it runs through my return/repair path and loops back to the return/repair again, instead of loading into macro.xml

but this way works:

Code: Select all

 
   <!-- #24 --><waypoint x="0000" z="0000" >
        load_paths("macro.xml"); <!-- return path named macrorepair.xml --> 
it runs through macrorepair.xml then loads macro.xml, but if i die with it set like that, theres no return path

Glopo
Posts: 29
Joined: Tue Aug 11, 2009 9:52 pm

Re: return path keeps looping

#5 Post by Glopo » Fri Aug 28, 2009 9:59 pm

i use a path for pex a path for go repair my stuff a path for return to pex and a last path for return from rez spot


pex->gorep->pnj->gopex->pex

if die

return->pnj->gopex

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

Re: return path keeps looping

#6 Post by Administrator » Fri Aug 28, 2009 11:53 pm

I suspect it might be because load_paths() is selecting the closer path of the two (which is your return path). Try loading them manually instead of using load_paths():

Code: Select all

__WPL:load(getExecutionPath() .. "/waypoints/macro.xml");
__RPL:load(getExecutionPath() .. "/waypoints/macro_return.xml");

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

Re: return path keeps looping

#7 Post by j_schlott » Sat Aug 29, 2009 12:56 am

hm, i tried that, im getting the same thing,

i have 3 waypoints for my macro

i have macro.xml and macro_return.xml set in profile
when i log on from after a death, i start macro and it starts in the secondary macro_return.xml path because its closer

my return path runs me toward my repair path and loads ("macro_repair.xml","macro_return.xml")
but its sending me to the secondary/return path macro_return.xml , and not even the closest waypoint, the farthest one across the map

i think somewhere in the code somethings sending me to secondary/return path if you are already on a secondary/return path

its working the opposite too, if i am on a primary path ("macro_repair.xml","macro_return.xml") and load ("macro.xml","macro_return.xml"), while im on macro.xml and die it will resurrect
and load macro.xml as i was on primary, so it loaded primary, instead of loading macro_return.xml path

i think this MM output sums it up:
We are coming from a return_path. So we will going on using the returnpath macro_return.xml
why is it only loading return paths from return paths

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

Re: return path keeps looping

#8 Post by j_schlott » Sat Aug 29, 2009 11:38 am

using the same code, and same waypoints

i flipped the paths in this code:

Code: Select all

load_paths("macroreturn.xml", "macro.xml");
Loaded waypoint path macroreturn.xml
Loaded return path macro.xml
We are coming from a return_path. So we will going on using the returnpath macro.xml
if it was using the closest waypoint switching those 2 waypoints files up in the code shouldnt matter
but the MM output still says trying to send me to a return path, which is now set as my macro.xml in the code

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

Re: return path keeps looping

#9 Post by d003232 » Sat Aug 29, 2009 1:46 pm

j_schlott wrote:using the same code, and same waypoints

i flipped the paths in this code:

Code: Select all

load_paths("macroreturn.xml", "macro.xml");
Loaded waypoint path macroreturn.xml
Loaded return path macro.xml
We are coming from a return_path. So we will going on using the returnpath macro.xml
if it was using the closest waypoint switching those 2 waypoints files up in the code shouldnt matter
but the MM output still says trying to send me to a return path, which is now set as my macro.xml in the code
I will later take a look at that. It is right, if you die or start, the bot will look, with path is closer ... take perhaps the returnpath. But the returnpath should lead you to your normal path. I'm just wondering, that in your first post in your macro.xml you have

Code: Select all

<waypoints>
   <!-- # 1 --><waypoint x="0000" z="0000">
   if( player.Fights-player.free_counter1 > 300 ) then  <!--300 -->
        player.free_counter1 = player.Fights;
   player:rest(1);
   load_paths("macro_return.xml"); <<<<<<<<HERE
        end;
   </waypoint>
   <!-- # 2 --><waypoint x="0000" z="0000"></waypoint>
That means you load manualy 'macro_return.xm' as waypoint path. But I have to look a little deeper what path's you are using and at the moment I'm short in time.
The RoM Bot Online Wiki needs your help!

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

Re: return path keeps looping

#10 Post by d003232 » Sat Aug 29, 2009 2:27 pm

There are two waypoint objects. Let us agree to a naming to made it more clear:

Code: Select all

botting.xml
Thats the waypointfile for the botting place. Thats the WPL object.

Code: Select all

botting_return.xml
That's the returnpath to come back to the botting place. That the RPL object. after you died.

Code: Select all

botting_repair.xml
Thats the path to go to the repair NPC from the bottings place.

Code: Select all

botting_repair_back.
That's the path to walk back from the repair NPC to the botting place. Or we could use 'botting_repair.xml' and reverse the waypoints to find the way back. But I would suggest to hold it simple and use 'botting_repair_back' to find back to the botting place.

'So, if you walk to the repair NPC ( with botting_repair.xml) that file is loaded as waypoint file (WPL object) and you perhaps will have no extra returnpath (RPL object) to that file. Same for the way back. Means if you die, while you are on the way from the repair, you would have a problem. Or you would need to define a separate returnpath for that: botting_repair_return.xml

That stuff with

Code: Select all

We are coming from a return_path. So we will going on using the returnpath macro_return.xml
Would come if you load a set of new path while you are on the walk back after youe died. Means you are allready using the '_return' path and within that, you are loading a new path. I'm not really sure, if we need that. It is really special. Perhaps we should delete that? If we delete that, it would us also allow to load a new normal waypoint file (WPL object) from the returnpath, and by doing that use the _return path multiple ( as RPL object back from spawnpont, as WPL object back from the repair NPC, ...).

I suppose the fault is, that you load a new path in your return path. And that return path is used if you die. Normaly the return path should lead your charater after dieing from the spawnpoint back to your boting place (to the normal waypoint file).
The RoM Bot Online Wiki needs your help!

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

Re: return path keeps looping

#11 Post by d003232 » Sat Aug 29, 2009 2:54 pm

One point more.

If you use your path botting_return.xml as returnpath after you die, the bot will automaticly switch back after completing that path to you normal waypoint file.

But if you load the same file as walk back file from the NPC (because it is nearly the same way), then you need to load the normal waypoint file at the end of the return walk. So you should use a coding like that

Code: Select all

	<!-- #24 --><waypoint x="-19813" z="8624">
	if( not player.Returning ) then
		load_paths("botting");
	end
	</waypoint>
The RoM Bot Online Wiki needs your help!

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

Re: return path keeps looping

#12 Post by j_schlott » Sun Aug 30, 2009 12:34 am

i had wanted it to repair after each death so i combined the return path into repair path, i can just make both paths repair and break them up

i think i was just being lazy hehe

i took your advice, reworked my waypoints a little and have it set up like this now:

botting.xml
botting_return.xml

and at 300 monsters i load:
repair.xml
repair_return.xml

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

Re: return path keeps looping

#13 Post by d003232 » Sun Aug 30, 2009 1:07 am

j_schlott wrote:i had wanted it to repair after each death so i combined the return path into repair path, i can just make both paths repair and break them up
That would be possible. You would just within your _return path, after resurrect, walk to the NPC, repair and go on to your botting place. Perhaps you would set back your counter.

j_schlott wrote:i took your advice, reworked my waypoints a little and have it set up like this now:

botting.xml
botting_return.xml

and at 300 monsters i load:
repair.xml
repair_return.xml
To avoid to mix something: 'botting_return.xml' is a real return path, loaded as RPL object.

repair.xml ist a normal waypoint path, loaded as WPL, without returnpath.
repair_return.xml is also a normal waypoint path, without returnpath. It is just the walk back from the NPC to the botting place. Depending where your paths are, it could be ok, to load 'botting_return.xml' for all three paths as real return path (RPL object). If you then die while running repair.xmp, your 'botting_return.xml' will bring you back to the begin of your 'repair.xml' and you will again try to run to the repair NPC.
The RoM Bot Online Wiki needs your help!

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests