September 19, 201411 yr Ok so I saw at least 1 thread, maybe 2 I can't remember, other threads about this. Basically the solution was using an LUA code that used to work. What I want to do is make the first battle pet in my party use 1 ability then swap it out right after and have it use my other 2 battle pets to kill the wild ones i'm against. But it seems to be too slow for the bot now. It clicks the swap pet button but then it doesn't register in game and uses another ability instead of swapping. Any chance someone could either rewrite a working LUA code or something? Now i've been using this: local minHealthPercent = 50; local PetAlly = 1; local PetEnemy = 2; local activePetEnemy = C_PetBattles.GetActivePet(PetEnemy); local typePetEnemy = C_PetBattles.GetPetType(PetEnemy, activePetEnemy); local activePetAlly = C_PetBattles.GetActivePet(PetAlly); local typePetAlly = C_PetBattles.GetPetType(PetAlly, activePetAlly); if C_PetBattles.GetHealth(PetAlly, activePetAlly) * 100 / C_PetBattles.GetMaxHealth(PetAlly, activePetAlly) <= minHealthPercent then for i = 1, NUM_BATTLE_PETS_IN_BATTLE do if C_PetBattles.GetHealth(PetAlly, i) * 100 / C_PetBattles.GetMaxHealth(PetAlly, i) > minHealthPercent and not (i == activePetAlly) then C_PetBattles.ChangePet(i); break; end end end
September 21, 201411 yr Hello, This script is for change the pet if your current pet has less than 50% of health. To change pet after the first hit you need to use this script:
September 21, 201411 yr Author After using that it seems that it randomly swaps between using 1 ability and using 2 on the pet i'm power leveling.
September 23, 201411 yr Author So after using the LUA script all day on multiple different pets (10+) it uses 2 abilities then swaps the pet out. Is there just a number i can swap out in the code to make it only use a single ability or something?
September 24, 201411 yr This script change the pet if: - Current pet is in slot 1 - The target has lost health The first ability apply damages at enemy?
Create an account or sign in to comment