[LUA] - Distance between player and unit. menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    Synnoid's Avatar Member
    Reputation
    1
    Join Date
    Jan 2010
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA] - Distance between player and unit.

    Is there any way to calculate distance between a player and a unit protected or otherwise?
    I've been getting by with CheckInteractDistance() but I'm working on an advanced MoP warlock rotation that will require more accurate distance checking.

    Thanks!

    [LUA] - Distance between player and unit.
  2. #2
    eggsampler's Avatar Contributor
    Reputation
    208
    Join Date
    Jan 2008
    Posts
    106
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You cannot check a units range directly with lua, but this may be useful: IsSpellInRange - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons
    (EDIT: Judging by that other weirdly laid out thread that may not be accurate for mop, just check in the framexml code for references to IsSpellInRange and see how blizzard code uses it to find out more)

    DBM and other such addons estimate to a fair degree of accuracy unit range by how far apart unit map positions are from each other, however this requires also knowing a "zoom" level to get an accurate range and also only works on group members (so not offensive targets).

    I don't believe there are any other ways, protected or not, to tell unit distance unless someone has figured out something with the minimap tracking icons, haven't looked recently.
    Last edited by eggsampler; 09-08-2012 at 09:04 AM.

Similar Threads

  1. Replies: 0
    Last Post: 09-08-2016, 07:16 AM
  2. how to check Distance between pet and target ? GetAreaMapInfo got error
    By wowmacro in forum WoW Bots Questions & Requests
    Replies: 3
    Last Post: 11-10-2014, 06:56 PM
  3. Replies: 21
    Last Post: 08-08-2007, 08:39 PM
  4. The diffrence between EU and US scam policy..
    By Wagstorm in forum World of Warcraft General
    Replies: 8
    Last Post: 01-24-2007, 05:39 PM
  5. Transfer gold and items between horde and alliance
    By Coolness in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 11-04-2006, 03:46 PM
All times are GMT -5. The time now is 10:08 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search