Page 1 of 1

Problem with auto repairing fight based

Posted: Sat Jan 09, 2010 5:43 pm
by tomerr90
<!-- # 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.

Re: Problem with auto repairing fight based

Posted: Sat Jan 09, 2010 7:16 pm
by Administrator
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.

Re: Problem with auto repairing fight based

Posted: Mon Jan 11, 2010 8:04 pm
by j_schlott
you are using an old load paths function

try this

Code: Select all

        loadPaths("ret.xml");

Re: Problem with auto repairing fight based

Posted: Thu Jan 14, 2010 10:47 am
by tomerr90
it doesnt print anything and it still doesnt work, even with the loadPath command

Re: Problem with auto repairing fight based

Posted: Thu Jan 14, 2010 11:29 am
by Administrator
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.

Re: Problem with auto repairing fight based

Posted: Thu Jan 14, 2010 11:57 am
by tomerr90
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

Re: Problem with auto repairing fight based

Posted: Thu Jan 14, 2010 4:59 pm
by Administrator
After calling loadPaths(), you could set the counter to 0. Just provide the code so I can see what you're even doing.

Re: Problem with auto repairing fight based

Posted: Fri Jan 15, 2010 3:52 am
by tomerr90

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>

Re: Problem with auto repairing fight based

Posted: Fri Jan 15, 2010 1:38 pm
by Administrator
You put the print statement inside the conditional. You weren't supposed to.

Re: Problem with auto repairing fight based

Posted: Sat Jan 16, 2010 5:07 pm
by tomerr90
i've also placed it above the conditional and it didnt work either