Problem with auto repairing fight based

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
tomerr90
Posts: 17
Joined: Wed Oct 07, 2009 4:21 pm

Problem with auto repairing fight based

#1 Post by tomerr90 » Sat Jan 09, 2010 5:43 pm

<!-- # 30 --><waypoint x="-16961" z="-1192">
if( player.Fights-player.free_counter1 > 1 ) then
player.free_counter1 = player.Fights;
load_paths("ret.xml");
end
</waypoint>
thats what i wrote but when it gets to waypoint #30 its just treats it as a regular waypoint and doesnt check and doesnt load ret.xml although it should because the fight number is 2 or higher, please help
thank you.

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

Re: Problem with auto repairing fight based

#2 Post by Administrator » Sat Jan 09, 2010 7:16 pm

Add this above the conditional:

Code: Select all

printf("fights: %d, counter: %d\n", player.Fights, player.free_counter1);
Now run it and see what it outputs.

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

Re: Problem with auto repairing fight based

#3 Post by j_schlott » Mon Jan 11, 2010 8:04 pm

you are using an old load paths function

try this

Code: Select all

        loadPaths("ret.xml");

tomerr90
Posts: 17
Joined: Wed Oct 07, 2009 4:21 pm

Re: Problem with auto repairing fight based

#4 Post by tomerr90 » Thu Jan 14, 2010 10:47 am

it doesnt print anything and it still doesnt work, even with the loadPath command

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

Re: Problem with auto repairing fight based

#5 Post by Administrator » Thu Jan 14, 2010 11:29 am

If it doesn't print anything and you placed that code above the condition (not inside) like I asked, then I have no way of finding out what's wrong. You'll have to provide more information.

tomerr90
Posts: 17
Joined: Wed Oct 07, 2009 4:21 pm

Re: Problem with auto repairing fight based

#6 Post by tomerr90 » Thu Jan 14, 2010 11:57 am

its weird i told him to use ret after 1 fight and yet it only printed the line and used the ret.xml file after 307 fights....
a problem with the waypoints? maybe it skips it for some reason? and how do i make the counter reset everytime i use the ret file?
and for some reason it doesnt got back to using the first waypoint file it just sticks with the ret

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

Re: Problem with auto repairing fight based

#7 Post by Administrator » Thu Jan 14, 2010 4:59 pm

After calling loadPaths(), you could set the counter to 0. Just provide the code so I can see what you're even doing.

tomerr90
Posts: 17
Joined: Wed Oct 07, 2009 4:21 pm

Re: Problem with auto repairing fight based

#8 Post by tomerr90 » Fri Jan 15, 2010 3:52 am

Code: Select all

	<!-- # 30 --><waypoint x="-16961" z="-1192">
		if( player.Fights-player.free_counter1 > 1400 ) then 
		printf("fights: %d, counter: %d\n", player.Fights, player.free_counter1);
		player.free_counter1 = player.Fights;
		loadPaths("ret.xml");
	end
	</waypoint>

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

Re: Problem with auto repairing fight based

#9 Post by Administrator » Fri Jan 15, 2010 1:38 pm

You put the print statement inside the conditional. You weren't supposed to.

tomerr90
Posts: 17
Joined: Wed Oct 07, 2009 4:21 pm

Re: Problem with auto repairing fight based

#10 Post by tomerr90 » Sat Jan 16, 2010 5:07 pm

i've also placed it above the conditional and it didnt work either

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 29 guests