how to check Distance between pet and target ? GetAreaMapInfo got error menu

User Tag List

Results 1 to 4 of 4
  1. #1
    wowmacro's Avatar Member
    Reputation
    7
    Join Date
    Oct 2013
    Posts
    93
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to check Distance between pet and target ? GetAreaMapInfo got error

    now Im try to write a BM hunter profile.

    I want to know the distance between pet and target, so I reference PQR_UnitDistance function code

    The problem is when I try to GetAreaMapInfo(GetCurrentMapAreaID()) in Arena, I got following error msg:

    Message: Interface\AddOns\MYBM\MYBM.lua:483: attempt to perform arithmetic on local 'd' (a nil value)

    any idea to fix this ? plz help.

    or any new way to check distance ?

    how to check Distance between pet and target ? GetAreaMapInfo got error
  2. #2
    WWF's Avatar Active Member
    Reputation
    31
    Join Date
    Jul 2010
    Posts
    215
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried it too. I do not know of new methods of checks, but my BM perfectly works with IsSpellInRange("name", "unit")
    to check if pet in melee range of target or not:
    PetBasicAttacks = { 17253, -- Bite
    16827, -- Claw
    49966, -- Smack
    }
    function PetInRange(unit)
    if UnitExists(unit) and UnitExists("pet") then
    for i = 1, #PetBasicAttacks do if IsSpellInRange(GetSpellInfo(PetBasicAttacks[i]),unit) == 1 then return true end end
    end
    end

  3. #3
    wowmacro's Avatar Member
    Reputation
    7
    Join Date
    Oct 2013
    Posts
    93
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by WWF View Post
    I tried it too. I do not know of new methods of checks, but my BM perfectly works with IsSpellInRange("name", "unit")
    to check if pet in melee range of target or not:
    PetBasicAttacks = { 17253, -- Bite
    16827, -- Claw
    49966, -- Smack
    }
    function PetInRange(unit)
    if UnitExists(unit) and UnitExists("pet") then
    for i = 1, #PetBasicAttacks do if IsSpellInRange(GetSpellInfo(PetBasicAttacks[i]),unit) == 1 then return true end end
    end
    end
    thanks

    melee range is too small...but kill commond has 25 yard far...

  4. #4
    WWF's Avatar Active Member
    Reputation
    31
    Join Date
    Jul 2010
    Posts
    215
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by wowmacro View Post
    thanks

    melee range is too small...but kill commond has 25 yard far...
    use Blink Strikes and don't worry about 10-25 yard range...

Similar Threads

  1. [LUA] - Distance between player and unit.
    By Synnoid in forum WoW UI, Macros and Talent Specs
    Replies: 1
    Last Post: 09-08-2012, 09:01 AM
  2. How does Blizz tell difference between Powerleveling and hackers?
    By Marodox in forum World of Warcraft General
    Replies: 5
    Last Post: 04-22-2012, 07:24 PM
  3. [PvP] [Druid] Optimize the way how you CC your enemys and targetting your mates
    By Classicclean in forum World of Warcraft Guides
    Replies: 6
    Last Post: 02-10-2011, 03:08 PM
  4. How To see rogues and target other types better.....
    By Dianetix in forum World of Warcraft Exploits
    Replies: 22
    Last Post: 06-09-2008, 03:57 AM
  5. How to trade money between hacked accounts and your Main
    By jarza in forum WoW Scam Prevention
    Replies: 11
    Last Post: 04-22-2008, 12:42 AM
All times are GMT -5. The time now is 01:12 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search