Problem about combat state menu

Shout-Out

User Tag List

Results 1 to 14 of 14
  1. #1
    phthegreat's Avatar Corporal
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem about combat state

    Hi,
    It is strange that sometimes my bot can't get out of combat state even if the monsters have gone far. So I try to update the combat flag like this :
    Code:
    CGPlayer *pLocal=GetLocalPlayer();
    DWORD dwObjectStorage=*(DWORD *)((DWORD)pLocal+8);
    *(DWORD *)(dwObjectStorage+0xec)=*(DWORD *)(dwObjectStorage+0xec)&0x00000008;
    but this seems not to work.
    I can't find the reason why this happened.
    Can anyone give me a hand?
    Thanks!
    Last edited by phthegreat; 03-06-2011 at 01:51 AM.

    Problem about combat state
  2. #2
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use Lua, it's easy.

    Code:
    public bool InCombat
    {
              get 
              {
                    return Boolean.Parse(Lua.Execute("UnitAffectingCombat(\"player\")")[0]) == true;
              }
    }
    Or have it update once per frame since it could (possible) be called multiple times per frame.

    On another note, why use class pointers if you're not going to use their constructs to help you with descriptor access, VFT's, etc, anyways?
    Last edited by lanman92; 03-05-2011 at 04:27 PM.

  3. #3
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Are you trying to force your bot out of combat? That won't work.

  4. #4
    GameAssist's Avatar Banned CoreCoins Purchaser Authenticator enabled
    Reputation
    98
    Join Date
    Apr 2010
    Posts
    349
    Thanks G/R
    55/83
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Code:
     foreach (Unit unit in UnitCollection)
                
           if (unit .TargetGUI == BOT.GUI) 
                     BOT.combat state = true;

  5. #5
    Chinchy's Avatar Active Member
    Reputation
    21
    Join Date
    Mar 2009
    Posts
    71
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by wlastas View Post
    Code:
     foreach (Unit unit in UnitCollection)
                
           if (unit .TargetGUI == BOT.GUI) 
                     BOT.combat state = true;
    Really?

    Code:
    public static bool InCombat
            {
                get
                {
                    return Convert.ToBoolean(ObjectManager.Me.FieldFlags & 0x0080000);
                }
            }

  6. #6
    Syltex's Avatar Sergeant Major
    Reputation
    23
    Join Date
    Jul 2010
    Posts
    174
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Chinchy View Post
    Really?

    Code:
    public static bool InCombat
            {
                get
                {
                    return Convert.ToBoolean(ObjectManager.Me.FieldFlags & 0x0080000);
                }
            }
    I´ve have recently tried that method but some reson the Unit_Field_Flag data changes to random values, but never to 80000


    EDIT1:
    Reserved the function in IDA 5.5 pro:
    Code:
    v3 = GetUnitFromName(v4);
     v3 && (*(_DWORD *)(*(_DWORD *)(v3 + 248) + 276) >> 19) & 1 //Returns false or true if unit is incombat
    But i dont really see:
    UNIT_FIELD_FLAGS = 0x134 or dec "308"
    Last edited by Syltex; 03-05-2011 at 06:21 PM.

  7. #7
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Syltex View Post
    I´ve have recently tried that method but some reson the Unit_Field_Flag data changes to random values, but never to 80000
    Bitwise AND Operator: & (C++)

  8. #8
    caytchen's Avatar Contributor
    Reputation
    138
    Join Date
    Apr 2007
    Posts
    162
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Syltex View Post
    Reserved the function in IDA 5.5 pro:
    Code:
    v3 = GetUnitFromName(v4);
     v3 && (*(_DWORD *)(*(_DWORD *)(v3 + 248) + 276) >> 19) & 1 //Returns false or true if unit is incombat
    Cool, you can steal IDA, find a LUA function and make yourself look like an utter moron on the internet.

    0x114 = 276 = UNIT_FIELD_FLAGS
    0x134 = 308 = sizeof(ObjectFields) + UNIT_FIELD_FLAGS
    0x0080000 = 1 << 19 = 2^19

  9. #9
    phthegreat's Avatar Corporal
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by namreeb View Post
    Are you trying to force your bot out of combat? That won't work.
    In fact my bot has got rid of the monsters. But something affects my combat state. My bot can't drink or eat, and the durability level of equipped items keep going down.
    So I figure out maybe updating the Unit_Field_Flag may help. But this never happen.

  10. #10
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by phthegreat View Post
    In fact my bot has got rid of the monsters. But something affects my combat state. My bot can't drink or eat, and the durability level of equipped items keep going down.
    So I figure out maybe updating the Unit_Field_Flag may help. But this never happen.
    I think there are situations where the server glitches like that. If a mob is still agro'd to you but stuck or something. Or if it evaded and reset. Regardless of the reason, the best you'll be able to accomplish is to make the client *think* you're out of combat. Even if you do this, the server will still not allow you to drink, stealth, etc..

  11. #11
    phthegreat's Avatar Corporal
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for replying so quickly!
    If this is a serverside bug, how does my bot trigger it? or it is an unsolved case?

  12. #12
    Syltex's Avatar Sergeant Major
    Reputation
    23
    Join Date
    Jul 2010
    Posts
    174
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Mike View Post
    Oh snap, thought "&" ment "compare to" in a boolean conversion
    PS. Not using c# as programing language.

    Originally Posted by caytchen View Post
    Cool, you can steal IDA, find a LUA function and make yourself look like an utter moron on the internet.

    0x114 = 276 = UNIT_FIELD_FLAGS
    0x134 = 308 = sizeof(ObjectFields) + UNIT_FIELD_FLAGS
    0x0080000 = 1 << 19 = 2^19
    True, thx for help anyway

  13. #13
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by phthegreat View Post
    Thank you for replying so quickly!
    If this is a serverside bug, how does my bot trigger it? or it is an unsolved case?
    I don't have enough information to answer that. Does your bot behave differently than a normal player? Do you use noclip or fly hacking or anything like that? When you see it happen, I would check to see if there are any nearby mobs that have you targeted.

  14. #14
    phthegreat's Avatar Corporal
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your advice!
    no hacking like that just call functions like setfacing. However I will check my AI logic

Similar Threads

  1. Replies: 1
    Last Post: 07-13-2010, 05:06 PM
  2. [New Model] about Conversion model problem(Tigurius come here)
    By ZWTA in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 06-20-2010, 08:38 AM
  3. [Repack] Problem about localhost
    By fstenbergp in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 06-09-2010, 06:39 AM
  4. about bone problem(Great tigurius come on)
    By ZWTA in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 08-09-2009, 08:20 PM
  5. About several navicat and mysql problems
    By Ryuk in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 10-12-2007, 04:31 PM
All times are GMT -5. The time now is 07:20 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