Page 1 of 1

Compiling error + questions

Posted: Sun Jan 30, 2011 7:29 pm
by heinzk
Hi,
im pretty new to this...who can help me with my code....,

Code: Select all

<!-- # 23 --><waypoint x="2270" z="31906" y="69">
	
nameTable = {"characters"}
	                player:target_Object("Briefkasten",2000);
			while (30 > inventory:itemTotalCount(0), bag2) do
			UMM_SendInventoryItem(nameTable[player.free_counter1], (91+counter))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (92+counter))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (93+counter))	
			UMM_SendInventoryItem(nameTable[player.free_counter1], (94+counter))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (95+counter))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (96+counter))		
			RoMScript("UseSkill(1,2);");
		        waitForLoadingScreen();		
			loadPaths("t4_buy_randoms");
			UMM_SendInventoryItem(nameTable[player.free_counter1], (91))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (92))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (93))	
			UMM_SendInventoryItem(nameTable[player.free_counter1], (94))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (95))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (96))
                        
			inventory:update()
		
	               counter = counter + 6;
			  if (counter > 24) then
			  counter = 0;
			  end
			player.free_counter1 = player.free_counter1 + 1;
			    if (player.free_counter1 == 17) then
			    player.free_counter1 = 1;
			    end		
			end			
	</waypoint>
In Profile

Code: Select all

<onLoad><![CDATA[
      counter = 0;
      player.free_counter1 = 1;
	]]></onLoad>
--------------------------------------------------------------------------------------------------------------
Questions

Code: Select all

   RoMScript("UseSkill(1,2);");
		        waitForLoadingScreen();		
			loadPaths("t4_buy_randoms");
Well here it makes no sense anymore...anyone knows a code how i can check if the skill is on cd.... ?????
Is it even possible to use "" loadPaths("t4_buy_randoms") "" in a loop ???????

Other problem:
Sometimes i get stuck in front of a wall because behind there are 2 mobs.
So my char is switching target all the time , till a patrol spawns.....He would go back to waypoint when i could change an option?
Thanks :)

Re: Compiling error + questions

Posted: Mon Jan 31, 2011 1:36 am
by rock5
First problem I see is bag2 is supposed to be a string ie

Code: Select all

       while (30 > inventory:itemTotalCount(0), "bag2") do
Why do you do a 'recall' in the middle of sending stuff?

I'm not sure what you are trying to do but you need to know that it wont load a new waypoint file until all the code for that waypoint is finished. When you use loadPaths, all it's doing is setting the path it will use once it has finished with the current waypoint.

Re: Compiling error + questions

Posted: Mon Jan 31, 2011 5:37 am
by heinzk
rock5 wrote:First problem I see is bag2 is supposed to be a string ie

Code: Select all

       while (30 > inventory:itemTotalCount(0), "bag2") do
Done.
rock5 wrote:Why do you do a 'recall' in the middle of sending stuff?
My character farms dirty/clean t4's and when the bag2 is full, he should send the items to some characters.
Each character still needs the same number of random fusionstones, so i say :
after 6 items are sent , go and buy 6 randoms fusionstones and send them to the same character.

Well the recall thing is stupid but i was tired.....i think im going to change the whole code.
Nevertheless i still get compiling error @waypoint #24

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
	<!-- #  1 --><waypoint x="5208" z="34762" y="-38">
		player:mount();
</waypoint>
	<!-- #  2 --><waypoint x="5095" z="34680" y="-30">	</waypoint>
	<!-- #  3 --><waypoint x="4973" z="34627" y="-28">	</waypoint>
	<!-- #  4 --><waypoint x="4778" z="34574" y="-31">	</waypoint>
	<!-- #  5 --><waypoint x="4571" z="34643" y="-31">	</waypoint>
	<!-- #  6 --><waypoint x="4550" z="34771" y="-31">	</waypoint>
	<!-- #  7 --><waypoint x="4523" z="34893" y="-30">	</waypoint>
	<!-- #  8 --><waypoint x="4455" z="34920" y="-30">	</waypoint>
	<!-- #  9 --><waypoint x="4275" z="34925" y="-39">	</waypoint>
	<!-- # 10 --><waypoint x="4024" z="35085" y="-47">	</waypoint>
	<!-- # 11 --><waypoint x="3946" z="35174" y="-23">	</waypoint>
	<!-- # 12 --><waypoint x="3833" z="35259" y="-28">	</waypoint>
	<!-- # 13 --><waypoint x="3646" z="34986" y="-31">	</waypoint>
	<!-- # 14 --><waypoint x="3552" z="34770" y="-49">	</waypoint>
	<!-- # 15 --><waypoint x="2981" z="33757" y="-42">	</waypoint>
	<!-- # 16 --><waypoint x="2742" z="33441" y="15">	</waypoint>
	<!-- # 17 --><waypoint x="2485" z="33001" y="27">	</waypoint>
	<!-- # 18 --><waypoint x="2320" z="32547" y="40">	</waypoint>
	<!-- # 19 --><waypoint x="2284" z="32414" y="68">	</waypoint>
	<!-- # 20 --><waypoint x="2304" z="32219" y="70">	</waypoint>
	<!-- # 21 --><waypoint x="2318" z="32035" y="69">	</waypoint>
	<!-- # 22 --><waypoint x="2335" z="31953" y="66">	</waypoint>
	<!-- # 23 --><waypoint x="2270" z="31906" y="69">
		
nameTable = {"characters"}
	player:target_Object("Briefkasten",2000);
			
			
	                
			while (30 > inventory:itemTotalCount(0), "bag2") do
			UMM_SendInventoryItem(nameTable[player.free_counter1], (91+counter))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (92+counter))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (93+counter))	
			UMM_SendInventoryItem(nameTable[player.free_counter1], (94+counter))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (95+counter))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (96+counter))		
			RoMScript("UseSkill(1,2);");
		        waitForLoadingScreen();		
			loadPaths("t4_buy_randoms");
			UMM_SendInventoryItem(nameTable[player.free_counter1], (91))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (92))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (93))	
			UMM_SendInventoryItem(nameTable[player.free_counter1], (94))
			UMM_SendInventoryItem(nameTable[player.free_counter1], (95))	   
			UMM_SendInventoryItem(nameTable[player.free_counter1], (96))
                        
			inventory:update()
			
			counter = counter + 6;
			  if (counter > 24) then
			  counter = 0;
			  end
			player.free_counter1 = player.free_counter1 + 1;
			    if (player.free_counter1 == 17) then
			    player.free_counter1 = 1;
			    end		
			end			
	</waypoint>
	<!-- # 24 --><waypoint x="2335" z="31953" y="66">	</waypoint>
	<!-- # 25 --><waypoint x="2318" z="32035" y="69">	</waypoint>
	<!-- # 26 --><waypoint x="2304" z="32219" y="70">	</waypoint>
	<!-- # 27 --><waypoint x="2284" z="32414" y="68">	</waypoint>
	<!-- # 28 --><waypoint x="2320" z="32547" y="40">	</waypoint>	
	<!-- # 29 --><waypoint x="2485" z="33001" y="27">	</waypoint>
	<!-- # 30 --><waypoint x="2742" z="33441" y="15">	</waypoint>
	<!-- # 31 --><waypoint x="2981" z="33757" y="-42">	</waypoint>
	<!-- # 32 --><waypoint x="3552" z="34770" y="-49">	</waypoint>
	<!-- # 33 --><waypoint x="3646" z="34986" y="-31">	</waypoint>
	<!-- # 34 --><waypoint x="3833" z="35259" y="-28">	</waypoint>
	<!-- # 35 --><waypoint x="3946" z="35174" y="-23">	</waypoint>	
	<!-- # 36 --><waypoint x="4024" z="35085" y="-47">	</waypoint>
	<!-- # 37 --><waypoint x="4275" z="34925" y="-39">	</waypoint>
	<!-- # 38 --><waypoint x="4455" z="34920" y="-30">	</waypoint>
	<!-- # 39 --><waypoint x="4523" z="34893" y="-30">	</waypoint>
	<!-- # 40 --><waypoint x="4550" z="34771" y="-31">	</waypoint>
	<!-- # 41 --><waypoint x="4571" z="34643" y="-31">	</waypoint>
	<!-- # 42 --><waypoint x="4778" z="34574" y="-31">	</waypoint>
	<!-- # 43 --><waypoint x="4973" z="34627" y="-28">	</waypoint>
	<!-- # 44 --><waypoint x="5095" z="34680" y="-30">	</waypoint>
	<!-- # 45 --><waypoint x="5208" z="34762" y="-38">
	loadPaths("t4_start");
	</waypoint>

</waypoints>

Re: Compiling error + questions

Posted: Mon Jan 31, 2011 7:49 am
by rock5
This is probably causing the compile error,

Code: Select all

         while (30 > inventory:itemTotalCount(0), "bag2") do
It should be

Code: Select all

         while (30 > inventory:itemTotalCount(0, "bag2") do
Also these mail functions use slot numbers that start at 1. So bag2 starts with 31.

But still that code wont work because loadPaths doesn't work the way you think. Also there are a few logical errors I think. All in all I'd say it's a bit more complex than you thought.

Re: Compiling error + questions

Posted: Mon Jan 31, 2011 8:26 am
by heinzk
thx for ur effort !
Mail functions do work for me.

Code: Select all

 RoMScript("UseSkill(1,2);");
              waitForLoadingScreen();      
         loadPaths("t4_buy_randoms");
Thats what not worked.....but i replaced it with all the other waypoints.........still compiling error so it must be a problem with

Code: Select all

 RoMScript("UseSkill(1,2);");
              waitForLoadingScreen();   

next ill try with if and not while ( ... if (30 > inventory:itemTotalCount(0, "bag2"))...)

Re: Compiling error + questions

Posted: Mon Jan 31, 2011 8:34 am
by rock5
heinzk wrote:so it must be a problem with

Code: Select all

 RoMScript("UseSkill(1,2);");
              waitForLoadingScreen();   
I think there used to be an issue with having a ";" in the RoMScript command but I tested RoMScript("UseSkill(1,1);"); and it worked. I guess you could try this just to be sure

Code: Select all

 RoMScript("UseSkill(1,2)");

Re: Compiling error + questions

Posted: Mon Jan 31, 2011 9:19 am
by heinzk
thx for the tipp again....after i added line by line, they both seem to work too.....
now i have to go to school ......ill post when i get an error again