Page 32 of 32 FirstFirst ... 222829303132
Results 466 to 466 of 466
  1. #466
    Member CoreCoins User RobertoSageto's Avatar
    Reputation
    2
    Join Date
    May 2014
    Posts
    8
    Thanks G/R
    0/1
    CoreCoins
    1013
    Trade Feedback
    0 (0%)
    Quote Originally Posted by djanius View Post
    Guys, tell me please, how to check whether player is in combat? In advance many thanks!
    You're going to want to use the "Search Thread" on this thread feature for better answers than mine but briefly:
    1. Get your unit's base address from object manager
    2. Combat status can be checked via movement flags or unit flags, but unit flags are what I will use for this example.
    3. Unit Flags are a descriptor, so we will now break our code down into the following steps:

    PHP Code:
    <?
    // this is pseudo-code
    // where $wow_unit_base_address is the base address of the unit whose combat status we are checking...

    // wow unit offset to descriptor ptr
    $descriptor_offset 0x8
    // offset to unit flags from descriptor base address
    $unit_field_unit_flags_offset 0xB8

    // we will compare this combat flag using a bitwise operation to the value we read from the unit flags descriptor
    $in_combat_flag_mask 0x80000

    $descriptor_base_address 
    MemoryRead($wow_unit_base_address $descriptor_offset"dword")
    $unit_flags MemoryRead($descriptor_base_address $unit_field_unit_flags_offset"dword")

    // $unit_flags will now contain the unit's flag data in a mask format, eg. 0x00080038
    // 0x00080038 as an example is a hunter pet in combat, 0x30 = hunter pet, 0x8 = player or pet, 0x80000 = in combat

    // bitwise comparison to see the combat flag exists
    If BitAnd($unit_flags$in_combat_flag_mask) = $in_combat_flag_mask{
        
    // unit is in combat
        // do action
        //
    } else {
        
    // unit is not in combat
        // do action
        //
    }

  2. The Following 1 Members Gave Thanks To RobertoSageto For This Useful Post:

    djanius
 

 
Page 32 of 32 FirstFirst ... 222829303132

Similar Threads

  1. [WoW][3.3.5.12340] Info Dump Thread
    By Nesox in forum WoW Memory Editing
    Replies: 82
    Last Post: 11-02-2014, 04:11 PM
  2. [WoW][4.0.3.13329] Info Dump Thread
    By TOM_RUS in forum WoW Memory Editing
    Replies: 73
    Last Post: 02-06-2011, 05:37 AM
  3. [WoW][4.0.1.13164] Info Dump Thread
    By Seifer in forum WoW Memory Editing
    Replies: 29
    Last Post: 01-18-2011, 08:14 AM
  4. [WoW][4.0.1.13205] Info Dump Thread
    By DrGonzo in forum WoW Memory Editing
    Replies: 12
    Last Post: 11-11-2010, 01:34 PM
  5. [WoW][3.3.3.11723] Info Dump Thread
    By miceiken in forum WoW Memory Editing
    Replies: 2
    Last Post: 03-27-2010, 03:42 PM
All times are GMT -5. The time now is 03:22 PM. Powered by vBulletin® Version 4.2.2
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search