April 25, 20179 yr I want to cast spells based on a condition with lua programing ,example: If the enemy pet HP > 500 than cast first spell If the enemy pet HP < 500 and spell is cooldown than cast third spell else cast first spell.
April 27, 20179 yr You need good wow lua API and C# knowbase To get health: int enemyHealth = PetBattles.GetHealth(PetBattles.PetFaction.Enemy, PetBattles.GetActivePet(PetBattles.PetFaction.Enemy)); int enemyMaxHealth = PetBattles.GetMaxHealth(PetBattles.PetFaction.Enemy, PetBattles.GetActivePet(PetBattles.PetFaction.Enemy)); int enemyMaxPercent = enemyHealth * 100 / enemyMaxHealth;
Create an account or sign in to comment