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.

How Can I Find Game Object Distance?

Featured Replies

I know how to find distance in the sense of 

if (ObjectManager.Me.Position.DistanceTo2D(new Vector3(1006.06f, -6288.57f, 98.98875f)) > 30)

How can I check for the distance of a game object using an ID? I found the ID's by dumping it with the quest tools like I would for a gather quest. I even noticed that it shows the distance when it dumps all of them.

Doodad_VR_Elevator_Lift02: 190118 (1680.11 ; -5824.42 ; -72.76543 ; "None", 87.21676y)
Doodad_VR_Elevator_Gate01: 186452 (1680.11 ; -5824.42 ; 161.518 ; "None", 150.929y)
Doodad_VR_Elevator_Pulley01: 190119 (1680.11 ; -5824.42 ; 396.1238 ; "None", 384.6783y)
Zeppelin, Horde (Cloudkisser): 181689 (1997.203 ; -6089.13 ; 85.60023 ; "None", 399.3795y)
Doodad_VR_Elevator_Lift02: 190118 (951.884 ; -6071.91 ; -50.43643 ; "None", 781.5993y)
Doodad_VR_Elevator_Gate01: 186452 (951.884 ; -6071.91 ; 183.847 ; "None", 797.8301y)
Doodad_VR_Elevator_Pulley01: 190119 (951.884 ; -6071.91 ; 418.4529 ; "None", 878.7535y)

 

 

This is about all I was able to come across after searching rigorously and I can't seem to figure out how to make it work correctly.

wManager.Wow.ObjectManager.WoWObject.GetDistance(186452) < 75;

 

If anyone has any input I would be beyond grateful. This forum has been amazing to me so far thanks guys.

3 hours ago, ad3t0 said:

I know how to find distance in the sense of 


if (ObjectManager.Me.Position.DistanceTo2D(new Vector3(1006.06f, -6288.57f, 98.98875f)) > 30)

How can I check for the distance of a game object using an ID? I found the ID's by dumping it with the quest tools like I would for a gather quest. I even noticed that it shows the distance when it dumps all of them.


Doodad_VR_Elevator_Lift02: 190118 (1680.11 ; -5824.42 ; -72.76543 ; "None", 87.21676y)
Doodad_VR_Elevator_Gate01: 186452 (1680.11 ; -5824.42 ; 161.518 ; "None", 150.929y)
Doodad_VR_Elevator_Pulley01: 190119 (1680.11 ; -5824.42 ; 396.1238 ; "None", 384.6783y)
Zeppelin, Horde (Cloudkisser): 181689 (1997.203 ; -6089.13 ; 85.60023 ; "None", 399.3795y)
Doodad_VR_Elevator_Lift02: 190118 (951.884 ; -6071.91 ; -50.43643 ; "None", 781.5993y)
Doodad_VR_Elevator_Gate01: 186452 (951.884 ; -6071.91 ; 183.847 ; "None", 797.8301y)
Doodad_VR_Elevator_Pulley01: 190119 (951.884 ; -6071.91 ; 418.4529 ; "None", 878.7535y)

 

 

This is about all I was able to come across after searching rigorously and I can't seem to figure out how to make it work correctly.


wManager.Wow.ObjectManager.WoWObject.GetDistance(186452) < 75;

 

If anyone has any input I would be beyond grateful. This forum has been amazing to me so far thanks guys.

It depend at what kind ID you want to use. If you want to use the mob id this could be something for you.
 

ObjectManager.GetWoWGameObjectByyId(1234).FirstOrDefault()?.GetDistance < 75

 

  • Author

Cool thank you! I haven't tried it yet but I will when I get home. 

 

Edit: Dang I couldn't get it to work I tried

if (ObjectManager.GetWoWGameObjectByyId(190118).FirstOrDefault()?.GetDistance < 75)
{
	wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(1006.06f, -6288.57f, 98.98875f));
}

and I get errors. Thanks so much for any help.

23 hours ago, ad3t0 said:

Cool thank you! I haven't tried it yet but I will when I get home. 

 

Edit: Dang I couldn't get it to work I tried


if (ObjectManager.GetWoWGameObjectByyId(190118).FirstOrDefault()?.GetDistance < 75)
{
	wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(1006.06f, -6288.57f, 98.98875f));
}

and I get errors. Thanks so much for any help.

I bet you get a null exception

 

// Do we need to move?
if (ObjectManager.GetWoWGameObjectByyId(190118).FirstOrDefault()?.GetDistance < 75 ?? false)
{
    // Move
    wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(1006.06f, -6288.57f, 98.98875f));
}

This should remove the error if i'm not wrong.

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.