Player IsInCombat? menu

User Tag List

Results 1 to 14 of 14
  1. #1
    xLeo123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Player IsInCombat?

    Is there an address/offset to check if our player is currently in combat?
    Apart from going through all objects and checking if the target is equal to our GUID is there any way to just read a memory location to see if our current player is in combat?

    I've tried reversing some lua functions such as IsAffectingCombat, and InCombatLockdown, none have been any help to me..
    I've also tried reading from (PlayerBase+UNIT_OFFSET_FIELDS)+0x30, actually i've tried literally every offset from UNIT_OFFSET_FIELDS and none change when im in combat. and +0x30 & 0x80000 returns true even when im not in combat, was that method changed recently?

    Thanks,
    Leo

    Player IsInCombat?
  2. #2
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    int __cdecl lua_UnitAffectingCombat(int pLuaState)
    {
      int result; // eax@2
      int v2; // ST10_4@2
      int pUnit; // eax@3
      char *pUnitName; // eax@3
    
      if ( FrameScript__IsString(pLuaState, 1) )
      {
        pUnitName = FrameScript_ToLString(pLuaState, 1, 0);
        pUnit = GetUnitFromName(pUnitName);
        if ( pUnit && (*(_DWORD *)(*(_DWORD *)(pUnit + 208) + 208) >> 19) & 1 )
        {
          FrameScript_PushNumber(pLuaState, 1.0);
          result = 1;
        }
        else
        {
          FrameScript_pushnil(pLuaState);
          result = 1;
        }
      }
      else
      {
        FrameScript_DisplayError(pLuaState, "Usage: UnitAffectingCombat(\"unit\")", v2);
        result = 0;
      }
      return result;
    }

  3. #3
    xLeo123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, by the way how did you get Hex Rays to look so nice?
    Mine gives me hard-to-read output such as:
    Code:
     v4 = (char *)sub_826B90(a1, 1, 0);
        v3 = sub_5A2670(v4);
        if ( v3 && (*(_DWORD *)(*(_DWORD *)(v3 + 208) + 208) >> 19) & 1 )
    (and yes, the wrong offset in this case.. any idea why?)

  4. #4
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use "rename" and "set type" button when you find out what variable or function does And wich wrong offsets do you mean? [ [ unitBase + 208 ] + 208 ] is correct offset for flags and ( flags >> 19 ) & 1 is correct flag for combat.

  5. #5
    xLeo123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, strange, [[UnitBase+52]+208] also works for me o.o :P

  6. #6
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by xLeo123 View Post
    Thanks, by the way how did you get Hex Rays to look so nice?
    You can make it even nicer:
    Code:
    signed int __cdecl Lua_UnitAffectingCombat(int luaState)
    {
      signed int result; // eax@2
      int v2; // ST10_4@2
      CGUnit_C *pUnit; // eax@3
      char *unitName; // eax@3
    
      if ( FrameScript__IsString(luaState, 1) )
      {
          unitName = FrameScript_ToLString(luaState, 1, 0);
          pUnit = GetUnitFromName(unitName);
          if ( pUnit && (pUnit->unitFields->UNIT_FIELD_FLAGS >> 19) & 1 )
          {
              FrameScript_PushNumber(luaState, 1.0);
              result = 1;
          }
          else
          {
              FrameScript_pushnil(luaState);
              result = 1;
          }
      }
      else
      {
          FrameScript_DisplayError(luaState, "Usage: UnitAffectingCombat(\"unit\")", v2);
          result = 0;
      }
      return result;
    }

    Originally Posted by xLeo123 View Post
    Yup, strange, [[UnitBase+52]+208] also works for me o.o :P
    208/4=52 o_O
    Last edited by TOM_RUS; 01-13-2010 at 09:10 AM.

  7. #7
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TOM_RUS, did you buy the latest HexRays with fpu-support?
    God, I am still hoping to win money or finally finding a cracked version, reversing functions making much use of fpu-instructions is messed up with HexRays 1.0 and it is just too expensive for me...
    Too bad I got used to the fast reversing speed with HexRays, reading large amounts of "raw" ASM is just time-ineffective compared to HexRays :/
    Hey, it compiles! Ship it!

  8. #8
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by flo8464 View Post
    TOM_RUS, did you buy the latest HexRays with fpu-support?
    God, I am still hoping to win money or finally finding a cracked version, reversing functions making much use of fpu-instructions is messed up with HexRays 1.0 and it is just too expensive for me...
    Too bad I got used to the fast reversing speed with HexRays, reading large amounts of "raw" ASM is just time-ineffective compared to HexRays :/
    There's latest IDA with latest Hex-rays available for free on internet. Click here to find one :P
    Last edited by TOM_RUS; 01-13-2010 at 08:58 PM.

  9. #9
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TOM_RUS View Post
    There's latest IDA with latest Hex-rays available for free on internet. Click here to find one :P
    Actually the latest is 5.6.

  10. #10
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Actually the latest is 5.6.
    Hmm, yes, released 2 weeks ago. I haven't noticed that.

  11. #11
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TOM_RUS View Post
    Hmm, yes, released 2 weeks ago. I haven't noticed that.
    Probably because you pirated it so you don't get the email notifications.
    Last edited by Cypher; 01-14-2010 at 06:49 AM.

  12. #12
    MiKE41's Avatar Active Member
    Reputation
    16
    Join Date
    Aug 2006
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  13. #13
    WannaBeProgrammer's Avatar Member
    Reputation
    2
    Join Date
    Feb 2009
    Posts
    156
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    InCombatLockdown()

    Notes

    * This function starts to return 1 after event "PLAYER_REGEN_DISABLED" has been fired.
    * Returns nil once again once event "PLAYER_REGEN_ENABLED" has been fired.


    You can also read PLAYER_REGEN_ENABLED & PLAYER_REGEN_DISABLED.
    Last edited by WannaBeProgrammer; 01-15-2010 at 11:48 AM. Reason: coloring:P

  14. #14
    bballer12's Avatar Member
    Reputation
    20
    Join Date
    Sep 2009
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could also use the search function. there are 3 other threads about it :S

Similar Threads

  1. [Exploit] Find out if an opposite faction player is online
    By Matt in forum World of Warcraft Exploits
    Replies: 7
    Last Post: 11-04-2006, 09:22 AM
  2. [Macro] Trick players to think your going a different way..
    By janzi9 in forum World of Warcraft Exploits
    Replies: 40
    Last Post: 08-14-2006, 03:46 PM
  3. Player Killing in Cenarion Hold
    By Matt in forum World of Warcraft Exploits
    Replies: 1
    Last Post: 05-10-2006, 06:05 PM
  4. AQ40 Disconnect lazy players
    By Matt in forum World of Warcraft Exploits
    Replies: 0
    Last Post: 05-02-2006, 01:13 PM
All times are GMT -5. The time now is 08:30 AM. 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