Page 1 of 1

Trouble with repair path loading

Posted: Mon Aug 30, 2010 2:06 pm
by roflmaoromgold
Since this is my first post I would like to start by saying thank you to the programmers here for helping us noobs. You guys and gals really are a great bunch.

Now on to my issue. I am completely retarded when it comes to programming. I have tried to use the following waypoint code from rock5 to get my bot to repair.

Code: Select all

local dura = inventory:getMainHandDurability();
   printf("Durability:%s\n", dura);
   if( dura < 0.9 ) then
      loadPaths("your_repair_path.xml");
   end
The bot checks the durability and then moves on without loading the repair path. The low dura is properly returned in the MM window and I am receiving no other errors.

I have added the code between the <waypoint x= y=> CODE HERE </waypoint> in my Main waypoint file and have edited the "your_repair_path.xml" to "49-50-DDC/49-50-DDC.xml" .

Is there a function I need to add into my profile? If not then what should I do differently? All of my gear is under 50% dura and still nothing happens.

Thank you in advance.

Re: Trouble with repair path loading

Posted: Mon Aug 30, 2010 7:55 pm
by MiesterMan
Could you copy and paste what you see in micromacro window?

Re: Trouble with repair path loading

Posted: Tue Aug 31, 2010 12:13 am
by rock5
I believe getMainHandDurability now returns a value between 0 and 100 so try,

Code: Select all

   if( dura < 90 ) then

Re: Trouble with repair path loading

Posted: Tue Aug 31, 2010 12:49 am
by roflmaoromgold
Rock5's suggestion worked perfectly, thank you.