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.

I'm looking for Distance of target

Featured Replies

hi,

It's me agin, I'm doing some quest profile and i've got an issue At Redridge Mountains.

For the quest where I need to control an Ettin called "Saving Foreman Oslow".

As i've to do 2 task : UseItemOn and FollowPath i can't use the predifined class to do it.

So, I've add Some line of code.

 

1. RunMacroLua > /tar Canyon Ettin

2. IF > ObjectManager.Target.Entry == 43094 && ObjectManager.Target.IsValid && ObjectManager.Target.IsAlive

3. RunCode > ItemsManager.UseItem(58895);

4. endIf >

 

That works but I need to get closer to the target and as is write here that doesn't check the distance of target.

if you can help me to find a solution.

I need something like that : ObjectManager.Target.Distance <= 5

if Object.Manager.Target.Distance > 5 : Move to target or Attack Him

 

  • Author

I have finaly found how to check the distance of target with lua.

But i need one more data to be sure to go to the next step.

When I use item on the Ettin, he dissapear and a new one appear and this one is friendly.

So, how can i detect is this unit exist ?

Distance check:

ObjectManager.Me.TargetObject.GetDistance

Unit check:

//Exists?
if (ObjectManager.GetWoWUnitHostile().Where(u => u.Entry == 12345).Any())
{
     // Do something
}

You can easy extent the conditions for example "&& u.Distance < 40" ect.

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.