Page 1 of 1

quick help needed - bot healing groupmember - only in battle

Posted: Sun Jan 09, 2011 3:43 pm
by top1
Hi there

I want to repeat targeting one member of the group and quick heal him until the "in battle" flag of the priest dissapears.
Pretty easy, even a noob in scripting like me should manage that, I thought...
Im getting crazy with this!!! Spend hours and it still wont work!!

Code: Select all

repeat
      sendMacro('TargetUnit("party1")');
      player:cast("PRIEST_URGENT_HEAL");
      yrest(1030);
until  -- and here should be the "player not in battle"
I tried various things without any sucess :(

until
self.InBattle ~= true;
player.Battling ~= true;
GetPlayerCombatState() ~= true;

always the same problem of getting nil values (when not in battle) and so aborting the script :(


makes me crazy

Re: quick help needed - bot healing groupmember - only in ba

Posted: Sun Jan 09, 2011 6:55 pm
by rock5
'player.Battling' is the one you want. It's probably not working because you aren't updating the player. Just add a 'player:update()'. That should work.

Re: quick help needed - bot healing groupmember - only in ba

Posted: Sun Jan 09, 2011 7:35 pm
by top1
thx!!!!!!!

this fixed it !!!!!!