Player SetFacing menu

These ads disappear when you log in.

Results 1 to 8 of 8
  1. #1
    saimoth's Avatar Member
    Reputation
    1
    Join Date
    Oct 2013
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)

    Player SetFacing

    Gents,

    Have been successful with progressing several bots but have never found a successful way of setting my players rotation. Is there a way of using SetFacing(), or another method, to directly set my characters rotation so that it is also updated server side?

    As an example. Say Iím facing away from an enemy, can I set my rotation so that the server has updated my new rotation angle and allows me to cast without saying I am facing the wrong way? This is the only issue I have always struggled with.

    Any suggestions would be much appreciated.

    I write for 1.12, 2.4.3 and 3.3.5 clients.

    Thanks

    These ads disappear when you log in.

  2. #2
    ejt's Avatar Contributor CoreCoins User
    Reputation
    105
    Join Date
    Mar 2008
    Posts
    67
    Thanks G/R
    1/43
    Trade Feedback
    0 (0%)
    What you could do is set a BP on the local players rotation and see what functions modify/read the value.
    Just a thought.

  3. #3
    Saridormi's Avatar Contributor CoreCoins User
    Reputation
    303
    Join Date
    Mar 2007
    Posts
    555
    Thanks G/R
    19/13
    Trade Feedback
    1 (100%)
    As far as I'm aware, there is no "face XYZ and update the server" function. There's a function that will send movement updates to the server if necessary, but I never bothered reversing it far enough to find out what triggers an update.

    Here is how I do SetFacing in 1.12:

    Code:
    /* Movement */
    #define A_Movement_F_SetFacing 0x7c6f30
    #define A_Movement_F_SendMovementUpdate 0x600a30
    
    /* Opcodes */
    #define A_Opcode_MSG_MOVE_SET_FACING 0xda
    
    typedef void (__thiscall *WoWFunc_SetFacing)(uintptr_t thisUnit, float angle);
    typedef void (__thiscall *WoWFunc_SendMovementUpdate)(uintptr_t thisUnit, int currentTick, int opcode, int unk1,
                                                                  int unk2);
    
        void LocalMovement::SetFacing(const float angle)
        {
            const auto local_player = WoWObjectManager::GetLocalPlayer();
            if (local_player == 0)
                return;
    
            WoWPlayer player(local_player);
    
            WoWFunc_SetFacing(A_Movement_F_SetFacing)(player.GetMovementBase(), angle);
            WoWFunc_SendMovementUpdate(A_Movement_F_SendMovementUpdate)(local_player, WoWFunctions::GetCurrentTick(),
                                                                        A_Opcode_MSG_MOVE_SET_FACING, 0x0, 0x0);
        }


  4. #4
    vegoo's Avatar Contributor
    CoreCoins User Authenticator enabled
    Reputation
    270
    Join Date
    Dec 2011
    Posts
    700
    Thanks G/R
    8/22
    Trade Feedback
    110 (100%)
    I am doing it this way:
    1. Get player and target cords
    2. Calculate atan2
    3. Write float to player rotation offset

    Also keep in mind rotation in WoW is between 0 and 6.28, so if atan2 result is lower than 0 you have to add 2 * PI to it.
    Last edited by vegoo; 08-12-2018 at 08:42 PM.
    WoW TGC Loot & WoW Items
    Selling EU & US WoW Gold
    Buying EU & US WoW Gold

  5. Thanks Picasopaya (1 members gave Thanks to vegoo for this useful post)
  6. #5
    DarkLinux's Avatar ★ Elder ★ CoreCoins User Authenticator enabled
    Reputation
    1387
    Join Date
    May 2010
    Posts
    1,595
    Thanks G/R
    118/399
    Trade Feedback
    13 (100%)
    Originally Posted by vegoo View Post
    3. Write float to player rotation offset
    You still need to call update or move, or the server will not know.

  7. #6
    saimoth's Avatar Member
    Reputation
    1
    Join Date
    Oct 2013
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Great, thanks for the response guys! Will try the SendMovementUpdate function. I’m guessing I could skip the SetFacing and just write my rotation to my player offset and then call the SendMovementUpdate. Also, I guess the SendMovementUpdate is thread safe? Called from the main thread?

  8. #7
    vegoo's Avatar Contributor
    CoreCoins User Authenticator enabled
    Reputation
    270
    Join Date
    Dec 2011
    Posts
    700
    Thanks G/R
    8/22
    Trade Feedback
    110 (100%)
    Originally Posted by DarkLinux View Post
    You still need to call update or move, or the server will not know.
    Yea I am using it to move around, don't know how it works if you only set it and then try to cast something without moving.
    Last edited by vegoo; 08-13-2018 at 03:01 AM.
    WoW TGC Loot & WoW Items
    Selling EU & US WoW Gold
    Buying EU & US WoW Gold

  9. #8
    Saridormi's Avatar Contributor CoreCoins User
    Reputation
    303
    Join Date
    Mar 2007
    Posts
    555
    Thanks G/R
    19/13
    Trade Feedback
    1 (100%)
    Originally Posted by vegoo View Post
    don't know how it works if you only set it and then try to cast something without moving.
    It doesn't.


Similar Threads

  1. Scam stupid players for a few gold
    By Matt in forum WoW Scam Prevention
    Replies: 23
    Last Post: 12-16-2006, 11:25 PM
  2. [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
  3. [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
  4. Player Killing in Cenarion Hold
    By Matt in forum World of Warcraft Exploits
    Replies: 1
    Last Post: 05-10-2006, 06:05 PM
  5. 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 02:12 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search