Drwolftech 25 Posted September 9, 2016 Share Posted September 9, 2016 How do i make the fight class change targets? Like, get the nearest target or get the target with lowest health. Link to comment https://wrobot.eu/forums/topic/3811-change-targets/ Share on other sites More sharing options...
iMod 99 Posted September 9, 2016 Share Posted September 9, 2016 2 hours ago, Drwolftech said: How do i make the fight class change targets? Like, get the nearest target or get the target with lowest health. XML: no clue C#: // Get unit in range and lowest health float distance = 10; WoWUnit unit = ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= distance); // Any unit? if (unit != null && unit.IsValid) { // Interact Interact.InteractGameObject(unit.GetBaseAddress); } This will target and interact with a target that is in range of 10 and has the lowest health. (untestet) Drwolftech 1 Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-17804 Share on other sites More sharing options...
Drwolftech 25 Posted September 12, 2016 Author Share Posted September 12, 2016 On 09/09/2016 at 6:39 PM, iMod said: XML: no clue C#: // Get unit in range and lowest health float distance = 10; WoWUnit unit = ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= distance); // Any unit? if (unit != null && unit.IsValid) { // Interact Interact.InteractGameObject(unit.GetBaseAddress); } This will target and interact with a target that is in range of 10 and has the lowest health. (untestet) Would be Nice if @Droidz incorporate this into the fight class editor ^^ Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-17861 Share on other sites More sharing options...
Droidz 2738 Posted September 12, 2016 Share Posted September 12, 2016 (edited) You can launch it is xml fightclass, Add conditon "C Sharp code" like: ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= 10) != null And in instead of spell name, put // Get unit in range and lowest health float distance = 10; WoWUnit unit = ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= distance); // Any unit? if (unit != null && unit.IsValid) { // Interact Interact.InteractGameObject(unit.GetBaseAddress); } and activate spell setting 'No spell, is C# code'. Edited September 13, 2016 by Droidz replace "ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= distance) != null" by "ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= 10) != null" Drwolftech 1 Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-17863 Share on other sites More sharing options...
Drwolftech 25 Posted September 13, 2016 Author Share Posted September 13, 2016 I got an error Saying that the "Name distance dont exist on the actual context" Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-17877 Share on other sites More sharing options...
Droidz 2738 Posted September 13, 2016 Share Posted September 13, 2016 I have edited my last post: http://wrobot.eu/forums/topic/3811-change-targets/?do=findComment&comment=17863 (replace "ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= distance) != null" by "ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= 10) != null") Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-17878 Share on other sites More sharing options...
tray 0 Posted July 3, 2017 Share Posted July 3, 2017 On 13.09.2016 at 8:27 PM, Droidz said: I have edited my last post: http://wrobot.eu/forums/topic/3811-change-targets/?do=findComment&comment=17863 (replace "ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= distance) != null" by "ObjectManager.GetWoWUnitHostile().OrderBy(u => u.HealthPercent).FirstOrDefault(u => u.GetDistance <= 10) != null") It's can work for classic version wow ? Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-28766 Share on other sites More sharing options...
Bear T.O.E. 63 Posted July 4, 2017 Share Posted July 4, 2017 do we have conformation this code in fact works yet? I would like to add this to my fight class accept edited to attack the target with the most health. in order to pull Top DPS and or HPS. The more health a Target has the more Damage can be done to it. Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-28854 Share on other sites More sharing options...
Alex007 2 Posted December 12, 2017 Share Posted December 12, 2017 Quote // Get unit in range and lowest health It is possible to make first target healer and after target with lowest health? For battleground this very important Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-36530 Share on other sites More sharing options...
kergudu 2 Posted December 13, 2017 Share Posted December 13, 2017 On 12.12.2017 at 11:17 AM, Alex007 said: It is possible to make first target healer and after target with lowest health? For battleground this very important maybe GetTalentTabInfo / GetSpecializationRole will help? But it requres to inspect player Link to comment https://wrobot.eu/forums/topic/3811-change-targets/#findComment-36620 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