Page 1 of 1

plz help

Posted: March 19th, 2017, 9:34 am
by wezburke
need macro to heal 2 pets with bandages

Re: plz help

Posted: March 19th, 2017, 11:04 am
by Supercreep
I use this, and it works perfectly.

I actually found on this forum somewhere.

I will try and find it.

Here:

http://www.uogdemise.com/community/view ... ets#p13624

Code: Select all

// Author: Di
// Description: search for damaged pets and heal most needed
if not listexists 'pets'
  createlist 'pets'
  // Add your pet serials here
  pushlist 'pets' 0xe79fd
  pushlist 'pets' 0xdbf31
endif
if not targetexists and not waitingfortarget
  @unsetalias 'pet'
  for 0 to 'pets'
    if not @findobject 'pets[]'
      continue
    endif
    if not poisoned 'pets[]'
      if @yellowhits 'pets[]' or @hits 'pets[]' == maxhits 'pets[]'
        continue
      endif
    endif
    if @findobject 'pet' and @hits 'pet' < hits 'pets[]'
      continue
    endif
    @setalias 'pet' 'pets[]'
  endfor
  if @inrange 'pet' 2 and usequeue == 0
    if @usetype! 0xe21 'any' 'backpack'
      waitfortarget 1000
      if targetexists 'beneficial'
        target! 'pet'
        pause 3000
      endif
    else
      sysmsg 'Out of bandages!' 22
      stop
    endif
  endif
endif