Finding nearest enemy menu

User Tag List

Results 1 to 15 of 15
  1. #1
    overture2112's Avatar Sergeant
    Reputation
    27
    Join Date
    Aug 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Finding nearest enemy

    Does anyone know how to determine whether an actor is attackable? Finding the nearest non-player with >0 hitpoints works when in certain locations but I'd like to make my selection process more robust.

    These ads disappear when you log in.

  2. #2
    Midi12's Avatar Contributor
    Reputation
    90
    Join Date
    Sep 2012
    Posts
    182
    Thanks G/R
    6/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unit->getType() ?

  3. #3
    overture2112's Avatar Sergeant
    Reputation
    27
    Join Date
    Aug 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Midi12 View Post
    Unit->getType() ?
    That doesn't really help. Enemy creatures and guards of your faction share the same type (0).

  4. #4
    Mrfo's Avatar Private
    Reputation
    9
    Join Date
    Dec 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Theres a LUA function GetDispositionTo that returns if its Hostile, Neutral or Friendly. You'd need to run it on the player unit and pass in the target unit. Theres an Enum with the Hostile/Neutral/Friendly integer status as well.

    GameLib.GetPlayerUnit():GetDispositionTo(GameLib.GetTargetUnit())

    Not sure how easy it is to access the actual functions in memory, but this should give you a starting point.

  5. #5
    overture2112's Avatar Sergeant
    Reputation
    27
    Join Date
    Aug 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Mrfo View Post
    Theres a LUA function GetDispositionTo that returns if its Hostile, Neutral or Friendly. You'd need to run it on the player unit and pass in the target unit. Theres an Enum with the Hostile/Neutral/Friendly integer status as well.

    GameLib.GetPlayerUnit():GetDispositionTo(GameLib.GetTargetUnit())

    Not sure how easy it is to access the actual functions in memory, but this should give you a starting point.
    I hadn't looked at the lua stuff much yet, but clearly I should...

    Thanks!

  6. #6
    JuceMMOCrawler's Avatar Sergeant
    Reputation
    45
    Join Date
    Mar 2014
    Posts
    45
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by overture2112 View Post
    I hadn't looked at the lua stuff much yet, but clearly I should...

    Thanks!
    Internal function accepts TargetPtr..
    -> int __thiscall GetDispositionTo(int this, int a2)
    55 8B EC 83 EC 08 57 8B F9 83 BF ? ? ? ? ? 75 0C

  7. #7
    Midi12's Avatar Contributor
    Reputation
    90
    Join Date
    Sep 2012
    Posts
    182
    Thanks G/R
    6/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    		enum class UnitDisposition
    		{
    			Hostile = 0,
    			Neutral = 1,
    			Friendly = 2,
    			Unknown = 3
    		};

  8. #8
    teufel123's Avatar Active Member
    Reputation
    30
    Join Date
    Feb 2008
    Posts
    114
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Midi12 View Post
    Code:
    		enum class UnitDisposition
    		{
    			Hostile = 0,
    			Neutral = 1,
    			Friendly = 2,
    			Unknown = 3
    		};
    Is there an offset in the unit class that holds the UnitDisposition or is it neccessary to call the internal function?

  9. #9
    Midi12's Avatar Contributor
    Reputation
    90
    Join Date
    Sep 2012
    Posts
    182
    Thanks G/R
    6/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe player + 0xB4 = target disposition, not confirmed.

    (I know this doesn't answer your question directly, but it's the only offset I know that's refer to the subject, so currently calling the internal function is the way to get disposition)
    Last edited by Midi12; 06-16-2014 at 05:30 AM.

  10. #10
    overture2112's Avatar Sergeant
    Reputation
    27
    Join Date
    Aug 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Midi12 View Post
    Maybe player + 0xB4 = target disposition, not confirmed.

    (I know this doesn't answer your question directly, but it's the only offset I know that's refer to the subject, so currently calling the internal function is the way to get disposition)
    I had a bit of trouble reversing the internal function, but it does certainly look at 0xB4 for /something/, so I like your theory. Haven't had time to inspect in game yet though.

  11. #11
    fusspawn's Avatar Sergeant
    Reputation
    5
    Join Date
    May 2008
    Posts
    50
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did some testing with Unit + 0xB4 (Note Unit not only LocalPlayer).

    It returns Hostile when the unit is in the process of attacking you.
    Neutral Otherwise. Havent found one tagged friendly yet.

    Now. Im not sure if this is the units target disposition. or it to the local player. As currently Im always the target when Its hostile (Im attacking it..) im not sure how to test it (I cant run alt clients and setup a nice situation with an alt my pc can barely manage the single wildstar instance)

    Note I was only checking objects where
    Code:
     Unit->Type == UnitType.NonPlayer

  12. #12
    overture2112's Avatar Sergeant
    Reputation
    27
    Join Date
    Aug 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by fusspawn View Post
    im not sure how to test it (I cant run alt clients and setup a nice situation with an alt my pc can barely manage the single wildstar instance)
    Try Innerspace/isboxer? You can easily set cpu priorities and fps limits, which helps with running multiple clients.

  13. #13
    fusspawn's Avatar Sergeant
    Reputation
    5
    Join Date
    May 2008
    Posts
    50
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AMD Athlon 64 X2 5000+ / 4.5gb Ram / GTX 460.

    Wont help. my processor is just terrible. Its overclocked to buggery and still only just makes wildstar playable on v-low.

  14. #14
    Midi12's Avatar Contributor
    Reputation
    90
    Join Date
    Sep 2012
    Posts
    182
    Thanks G/R
    6/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by fusspawn View Post
    It returns Hostile when the unit is in the process of attacking you.
    Neutral Otherwise. Havent found one tagged friendly yet.
    Unit + 0xB4 is unit target disposition not unit disposition

  15. #15
    fusspawn's Avatar Sergeant
    Reputation
    5
    Join Date
    May 2008
    Posts
    50
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for clearing that up.

Similar Threads

  1. Finding pointer that holds enemies in MMOs?
    By jimjonesOC in forum MMO Exploits|Hacks
    Replies: 3
    Last Post: 10-07-2015, 02:45 AM
  2. Find the nearest player
    By avizer in forum WoW Memory Editing
    Replies: 4
    Last Post: 03-27-2013, 01:06 PM
  3. friendly/neutral/enemy Player or Units? How to find out?
    By deadbeef in forum WoW Memory Editing
    Replies: 3
    Last Post: 01-08-2009, 04:44 PM
  4. [Tip/Miniguide] Finding enemy flag carrier in WSG
    By sockzor in forum World of Warcraft Exploits
    Replies: 3
    Last Post: 01-01-2008, 12:30 AM
  5. Mount in Enemy Base in WSG
    By Matt in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 08-09-2006, 11:26 PM
All times are GMT -5. The time now is 01:06 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search