ronny 0 Posted April 25, 2017 Share Posted April 25, 2017 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. Link to comment Share on other sites More sharing options...
Droidz 2733 Posted April 27, 2017 Share Posted April 27, 2017 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; Link to comment Share on other sites More sharing options...
dafuqlol 2 Posted May 2, 2017 Share Posted May 2, 2017 thank you man Link to comment Share on other sites More sharing options...
ronny 0 Posted May 3, 2017 Author Share Posted May 3, 2017 thank you,Hope to out API documentation Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now