Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Change Targets

Featured Replies

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)

  • 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 ^^

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 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"

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")

  • 9 months later...
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 ?

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.

  • 5 months later...
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

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.