_InCombat() menu

User Tag List

Thread: _InCombat()

Results 1 to 8 of 8
  1. #1
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    _InCombat()

    Hello,

    Another member of my team as asked mt to post this:

    Code:
    $TOTAL_UNIT_FIELDS = 0x59
    Func _InCombat($handle, $pBase)
    	$incombat = _MemoryRead($pBase + ($TOTAL_UNIT_FIELDS*4),$handle,'int')
    	If $incombat > 8 AND $incombat <> 33554440 Then
    		return 1
    	Else
    		return 0
    	EndIf
    EndFunc
    It seems that they are doing something wrong.

    My guess is that "If $incombat > 8 AND $incombat <> 33554440 Then" is wrong, however I dont know.

    Im sure they would appreciate any form of help.

    Thanks in advance.


    _______________________________________--

    EDIT: Would this work?


    Code:
    $OBJECT_END = 0x18
    $UNIT_FIELD_FLAGS = $OBJECT_END + 0xD0
    
    UNIT_FLAG_IN_COMBAT = 0x00080000 ; Dont know how to use this
    
    _WoWGetKnownField($Handle, $pBase, $UNIT_FIELD_FLAGS)
    Func _WoWGetKnownField($Handle, $ObjectBase, $FieldIndex, $Type = "dword")
    	Return _BMReadMemory($Handle, (_BMReadUint($Handle, ($ObjectBase + $ObjDescriptorOffset)) + ($FieldIndex * 4)), $Type)
    EndFunc   ;==>_WoWGetKnownField
    Last edited by -Ryuk-; 11-25-2009 at 02:12 PM.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

    _InCombat()
  2. #2
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    _MemoryRead($pBase + ($TOTAL_UNIT_FIELDS*4),$handle,'int')
    Whatehaezrjezr vlkzebdsf BLAAAAARGH

    Sorry just had an internal BSOD. You and "your team" have absolutely no clue what the **** you are doing.

    Constructive part of this post starts here:
    - Take a look at UnitAffectingCombat() and the UNIT_FIELD_FLAGS descriptor.
    - Copypasta is BAD FOR YOU.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  3. #3
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Whatehaezrjezr vlkzebdsf BLAAAAARGH

    Sorry just had an internal BSOD. You and "your team" have absolutely no clue what the **** you are doing.

    Constructive part of this post starts here:
    - Take a look at UnitAffectingCombat() and the UNIT_FIELD_FLAGS descriptor.
    - Copypasta is BAD FOR YOU.
    Sorry, were very new and still learning.

    UNIT_FIELD_FLAGS descriptors:
    Code:
    Const $UNIT_FIELD_FLAGS = 0xD0
    Const $UNIT_FIELD_FLAGS_2 = 0xD4
    Ill take a look at UnitAffectingCombat() now.

    EDIT: I understand you frustration, however everyone has to start somewhere.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  4. #4
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Whatehaezrjezr vlkzebdsf BLAAAAARGH

    Sorry just had an internal BSOD. You and "your team" have absolutely no clue what the **** you are doing.

    Constructive part of this post starts here:
    - Take a look at UnitAffectingCombat() and the UNIT_FIELD_FLAGS descriptor.
    - Copypasta is BAD FOR YOU.
    /sign .....

  5. #5
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by XAutomation View Post
    everyone has to start somewhere.
    I started here WoW Memory Editing - Page 43 - MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides , Work your way to the front.

    There's just no justification for $pBase + ($TOTAL_UNIT_FIELDS*4). Do you even read what you write - Scratch that - paste?

    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  6. #6
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    I started here WoW Memory Editing - Page 43 - MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides , Work your way to the front.

    There's just no justification for $pBase + ($TOTAL_UNIT_FIELDS*4). Do you even read what you write - Scratch that - paste?


    Sorry =/
    I didnt check the code as I didnt write it.
    I will read through the old posts. However it would be nice to know if the descriptors are correct:

    Const $UNIT_FIELD_FLAGS = 0xD0
    Const $UNIT_FIELD_FLAGS_2 = 0xD4

    and do we add these together like this ($UNIT_FIELD_FLAGS + $UNIT_FIELD_FLAGS_2 *4 )
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  7. #7
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by XAutomation View Post
    and do we add these together like this ($UNIT_FIELD_FLAGS + $UNIT_FIELD_FLAGS_2 *4 )


    Code:
            UNIT_FIELD_FLAGS = 0x3A,
            UNIT_FIELD_FLAGS_2 = 0x3B,
    (Index)
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  8. #8
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by XAutomation View Post
    Sorry =/
    I didnt check the code as I didnt write it.
    I will read through the old posts. However it would be nice to know if the descriptors are correct:

    Const $UNIT_FIELD_FLAGS = 0xD0
    Const $UNIT_FIELD_FLAGS_2 = 0xD4

    and do we add these together like this ($UNIT_FIELD_FLAGS + $UNIT_FIELD_FLAGS_2 *4 )
    All that info is already available in the info dump thread. The next time you fail to search; or copy/paste some code for us to bugfix, you'll be on a 2 week vacation. End of story.

All times are GMT -5. The time now is 01:01 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