how to range check 5 yard? menu

User Tag List

Results 1 to 10 of 10
  1. #1
    bynike's Avatar Member
    Reputation
    10
    Join Date
    Mar 2010
    Posts
    50
    Thanks G/R
    26/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to range check 5 yard?

    Any idea about how to make it work?

    how to range check 5 yard?
  2. #2
    dealerx's Avatar Member
    Reputation
    9
    Join Date
    May 2016
    Posts
    124
    Thanks G/R
    14/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best thing I found was
    Code:
    inRange = CheckInteractDistance("unit", distIndex)
    distIndex
    Number - A value from 1 to 4:
    1 = Inspect, 28 yards
    2 = Trade, 11.11 yards
    3 = Duel, 9.9 yards
    4 = Follow, 28 yards

    Would be nice to have a custom yard check, instead of only those 4. Maybe theres a command that I'm missing who knows!

  3. #3
    bynike's Avatar Member
    Reputation
    10
    Join Date
    Mar 2010
    Posts
    50
    Thanks G/R
    26/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i know this, but need more closer range check for caster. 0-5 yards will be good. anyway thanks

  4. #4
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For 0-5 yards. simply check to see if melee attack is in range. Melee attack range is precisely 5 yards. Use API IsSpellInRange. Another API to approximate distance is CheckInteractDistance.
    For more range check indicators, use known spells to check distance.

  5. #5
    dealerx's Avatar Member
    Reputation
    9
    Join Date
    May 2016
    Posts
    124
    Thanks G/R
    14/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Numba1stunna1 View Post
    For 0-5 yards. simply check to see if melee attack is in range. Melee attack range is precisely 5 yards. Use API IsSpellInRange. Another API to approximate distance is CheckInteractDistance.
    For more range check indicators, use known spells to check distance.
    Not working, I already tried time ago but I tested again just to be sure:

    Code:
    if IsSpellInRange("Auto Attack","target") == 1
    then
    print("Im in melee range")
    else
    print("Im out of range")
    end
    Tried replacing "Auto Attack" with any other spell and it worked perfectly. Maybe Auto Attack is not considered a spell? I don't know.

    About the "CheckInteractDistance" I already replied: it works but it's limitated to 4 fixed yards, and if you are caster you don't need it at all, since all caster's abilities are ranged.and u can simply use the IsSpellInRange.

  6. #6
    dealerx's Avatar Member
    Reputation
    9
    Join Date
    May 2016
    Posts
    124
    Thanks G/R
    14/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also: I found this macro:

    Code:
    /run local f=CreateFrame("Frame","f") f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") f:SetScript("OnEvent", function(self, event, ...) local a,b=select(9, ...) if(b) then c=format("%.4X",a) ChatFrame1:AddMessage(b.."--"..a.."--"..c) end end)
    You press it and every cast/spell you do, it prints on the chat the name of the spell and its ID.

    For example you will read "Drain Life - 47857" when u cast Drain Life.

    I tried both autoattacking with right click of mouse, and clicking the "Auto Attack" spell from the spellbook, and the macro prints only numbers, not "Auto Attack - 123456", it prints like, for example, "124 - 873".
    So I said ok "123" is the name of Auto Attack and "873" is the ID. Well, the "weird" part is everytime you melee swing, both "name" and "id" change. You can test it yourself you can spam drain life 50 times it will always print out "Drain Life - 47857", but autoattack will change everytime.

    Now I don't know why this happens but this was my last resource to get the melee range as caster.

    I was thinking also about the "IsItemInRange" with some in-game object that requires melee. My question is... what item could it be? And if we found one, will the function work even if we don't have the item in bag?

    The answer is here: [Request] WA for Distance to Target

  7. #7
    bynike's Avatar Member
    Reputation
    10
    Join Date
    Mar 2010
    Posts
    50
    Thanks G/R
    26/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice macro to find spellID, xD
    for the iteminrange yes u need item in baG to work.

    how to use libRangeCheck-2.0 ?
    Last edited by bynike; 11-22-2016 at 08:13 PM.

  8. #8
    Quesadilla's Avatar Sergeant
    Reputation
    9
    Join Date
    Apr 2013
    Posts
    56
    Thanks G/R
    2/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    since this post is tagged PQR, Why not try PQR_UnitDistance("Player","Target") <= 5

  9. #9
    dealerx's Avatar Member
    Reputation
    9
    Join Date
    May 2016
    Posts
    124
    Thanks G/R
    14/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Quesadilla View Post
    since this post is tagged PQR, Why not try PQR_UnitDistance("Player","Target") <= 5
    Not sure, but isn't one of those command that don't work and plus it make fps drop? Like "PQR_IsOutOfSight" for example..always returning false..

  10. #10
    bynike's Avatar Member
    Reputation
    10
    Join Date
    Mar 2010
    Posts
    50
    Thanks G/R
    26/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PQR_UnitDistance not for PQR111.

Similar Threads

  1. LUA, How Can i check for a nil value?
    By controlsx2 in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 06-21-2009, 08:32 PM
  2. Replies: 17
    Last Post: 12-23-2008, 12:56 PM
  3. How do I Check gm Logs?
    By Jardiare in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 05-11-2008, 06:55 PM
  4. How do I check infractions/warning/ect?
    By Cryt in forum World of Warcraft General
    Replies: 3
    Last Post: 01-08-2008, 06:01 PM
All times are GMT -5. The time now is 07:04 AM. 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