September 9, 20169 yr How do i make the fight class change targets? Like, get the nearest target or get the target with lowest health.
September 9, 20169 yr 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)
September 12, 20169 yr Author 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 ^^
September 12, 20169 yr 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, 20169 yr 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"
September 13, 20169 yr Author I got an error Saying that the "Name distance dont exist on the actual context"
September 13, 20169 yr 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")
July 3, 20178 yr 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 ?
July 4, 20178 yr 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.
December 12, 20178 yr 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
December 13, 20178 yr 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
Create an account or sign in to comment