Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    Corporal fish2k's Avatar
    Reputation
    5
    Join Date
    Nov 2008
    Posts
    21
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    50
    Trade Feedback
    0 (0%)

    SetFacing with memory writes

    Hi and sorry for another SetFacing thread...

    I'm currently changing my players angle for navigation. The problem is that it seems that there has to be some other indicator that the angle actually changed because I get some really strange looking moves :S
    Sample:
    Character looks in the correct direction but "walks" in another direction.

    I've read the other threads about setting the facing angle but most of them call the "SetFacing" function. But I'm looking for something which works with memory-writes only. Whatever there was something about a movement flag which (seems) to be set after the angle changed. There was no address but I found something at [[player] + 7CC]. Has this something to do with my problem?

    Thanks

  2. #2
    Corporal peterwurst's Avatar
    Reputation
    11
    Join Date
    Jul 2006
    Posts
    31
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    You can either write a movementflag to the memory or you just tap a movement key, after you wrote your new facing.

    (Pseudo)
    WriteNewFacing(5.0f);
    PressKey(TurnLeft);

  3. #3
    Contributor Mr.Zunz's Avatar
    Reputation
    92
    Join Date
    Mar 2007
    Location
    Helios.exe
    Posts
    393
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    26
    Trade Feedback
    0 (0%)
    Why dont you set facing with CTM?
    Click To Move - WoW.Dev Wiki

    Code:
    Memory.WriteInt(0x01281854, 1);
    You need to write the XYZ or the GUID to it aswell and then the status, it's in the dump topic.


  4. #4
    Contributor Tanaris4's Avatar
    Reputation
    141
    Join Date
    Oct 2008
    Posts
    647
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    107
    Trade Feedback
    0 (0%)
    Quote Originally Posted by peterwurst View Post
    You can either write a movementflag to the memory or you just tap a movement key, after you wrote your new facing.

    (Pseudo)
    WriteNewFacing(5.0f);
    PressKey(TurnLeft);
    Can you provide info on writing the movement flag? I'm assuming that's:
    Code:
        BaseField_MovementFlags             = 0x7C0,  // 3.0.9: 0x7F0
        // 0x80000001 - move forward
        // 0x80000002 - move backward
        // 0x80000004 - strafe left
        // 0x80000008 - strafe right
        
        // 0x80000010 - turn left
        // 0x80000020 - turn left
        
        // 0x80001000 - jumping
        
        // 0x80200000 - swimming
        
        // 0x81000000 - air mounted, on the ground
        // 0x83000400 - air mounted, in the air
        // 0x83400400 - air mounted, going up (spacebar)
        // 0x83800400 - air mounted, going down (sit key)
        // among others...
    I always get insta-d/ced when I try this - thoughts?

  5. #5
    Field Marshal Nesox's Avatar
    Reputation
    1279
    Join Date
    Mar 2007
    Location
    Managed Heap
    Posts
    1,255
    Thanks (Given)
    0
    Thanks (Received)
    2
    CoreCoins
    99
    Trade Feedback
    0 (0%)
    Wow uses radians, using the 'pulsed' ctm struct for setting you facing is pretty nice or if you find wrapper that does all the writes for you. Soon the warden Guy wakes up and starts to check that section of .text :drool: thats what i believe atleast

  6. #6
    Contributor luciferc's Avatar
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    24
    Trade Feedback
    0 (0%)
    btw for those who never took calc/geo or any math class its as such

    Pi = 180 Degrees
    2 Pi = 360 Degrees

    Pi = A Radian

  7. #7
    Corporal fish2k's Avatar
    Reputation
    5
    Join Date
    Nov 2008
    Posts
    21
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    50
    Trade Feedback
    0 (0%)
    Thanks for all your replies.
    I can't use CTM because I need more control over the movement.

    @Tanaris4:
    That's what i've tried. Also hat problems with DCs

    @peterwurst
    The SendKey thing looks pretty dirty to me. I'm more interested in the movement-flag method because I can't get it to work =(

    Thanks
    Last edited by fish2k; 09-21-2009 at 06:21 PM.

  8. #8
    Field Marshal Nesox's Avatar
    Reputation
    1279
    Join Date
    Mar 2007
    Location
    Managed Heap
    Posts
    1,255
    Thanks (Given)
    0
    Thanks (Received)
    2
    CoreCoins
    99
    Trade Feedback
    0 (0%)
    Just call CInputControl__SetFacing(float* pAngle) thats probablly the most accurate way unless you do it like apoc o.o

  9. #9
    Angry Penguin CoreCoins User Apoc's Avatar
    Reputation
    1370
    Join Date
    Jan 2008
    Posts
    2,754
    Thanks (Given)
    0
    Thanks (Received)
    5
    CoreCoins
    3165
    Trade Feedback
    0 (0%)
    Quote Originally Posted by Nesox View Post
    Just call CInputControl__SetFacing(float* pAngle) thats probablly the most accurate way unless you do it like apoc o.o
    Pffft. Less offsets to maintain, and an *always working* approach > yours.

  10. #10
    Corporal fish2k's Avatar
    Reputation
    5
    Join Date
    Nov 2008
    Posts
    21
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    50
    Trade Feedback
    0 (0%)
    Quote Originally Posted by Nesox View Post
    Just call CInputControl__SetFacing(float* pAngle) thats probablly the most accurate way unless you do it like apoc o.o
    Hm, yeah I tried to avoid that but maybe I should just inject my code.
    Do I have to know what Apoc's approach was? Tell me! O_o

  11. #11
    Angry Penguin CoreCoins User Apoc's Avatar
    Reputation
    1370
    Join Date
    Jan 2008
    Posts
    2,754
    Thanks (Given)
    0
    Thanks (Received)
    5
    CoreCoins
    3165
    Trade Feedback
    0 (0%)
    Quote Originally Posted by fish2k View Post
    Hm, yeah I tried to avoid that but maybe I should just inject my code.
    Do I have to know what Apoc's approach was? Tell me! O_o
    Not really my approach. Was actually ISXWoW/Greyman's (kudos to them, also kudos to jjaa for porting it to work in Onyx :P)

    Now that I think about it... it's not really my approach at all!

  12. #12
    Corporal fish2k's Avatar
    Reputation
    5
    Join Date
    Nov 2008
    Posts
    21
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    50
    Trade Feedback
    0 (0%)
    Quote Originally Posted by Apoc View Post
    Not really my approach. Was actually ISXWoW/Greyman's (kudos to them, also kudos to jjaa for porting it to work in Onyx :P)

    Now that I think about it... it's not really my approach at all!
    Okay doesn't really tell anything about any approach but was still funny to read

  13. #13
    Corporal grosfilsdepute's Avatar
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    26
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    CTM FaceTarget works well!

    Code:
    Memory.Instance.WriteUInt64(Memory.Instance.MemoryReader.ProcessHandle, 0x01281838 + 0x20,
                                m_ObjMgr.TargetObject.GetGUID());
    
    Memory.Instance.WriteInt(Memory.Instance.MemoryReader.ProcessHandle, 0x01281854,
                                1);
    Thread.Sleep(100);
    Memory.Instance.WriteUInt64(Memory.Instance.MemoryReader.ProcessHandle, 0x01281838 + 0x20,
                                0);
    Memory.Instance.WriteInt(Memory.Instance.MemoryReader.ProcessHandle, 0x01281854,
                                3);

  14. #14
    Sergeant Major adaephon's Avatar
    Reputation
    76
    Join Date
    May 2009
    Posts
    167
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    Quote Originally Posted by luciferc View Post
    btw for those who never took calc/geo or any math class its as such

    Pi = 180 Degrees
    2 Pi = 360 Degrees

    Pi = A Radian
    And for those who have forgotten some maths, Pi != a radian ;-)

    Quote Originally Posted by wikipedia
    One radian is the angle subtended at the center of a circle by an arc that is equal in length to the radius of the circle.
    Pi radians = 180 degrees (i.e. 3.14ish radians = 180 degrees)

  15. #15
    Master Sergeant xzidez's Avatar
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    134
    Thanks (Given)
    0
    Thanks (Received)
    0
    CoreCoins
    47
    Trade Feedback
    0 (0%)
    Eh.. I thought I would give this a try instead of they "keypress and wait" method.
    But I still cant seem to get it working. This is what I got.

    Code:
    Address   Hex dump          Command                                  Comments
    00949C50  /$  55            PUSH EBP                                 ; Wow.00949C50(guessed Arg1)
    00949C51  |.  8BEC          MOV EBP,ESP
    00949C53  |.  D945 08       FLD DWORD PTR SS:[ARG.1]
    00949C56  |.  56            PUSH ESI
    00949C57  |.  D9C0          FLD ST
    00949C59  |.  8BF1          MOV ESI,ECX
    00949C5B  |.  D866 20       FSUB DWORD PTR DS:[ESI+20]
    00949C5E  |.  D9E1          FABS
    00949C60  |.  D81D 64CB9A00 FCOMP DWORD PTR DS:[9ACB64]              ; FLOAT 9.536743e-07
    00949C66  |.  DFE0          FSTSW AX
    00949C68  |.  F6C4 05       TEST AH,05
    00949C6B  |.  7B 1C         JPO SHORT 00949C89
    00949C6D  |.  F746 44 00100 TEST DWORD PTR DS:[ESI+44],00001000
    00949C74  |.  D95E 20       FSTP DWORD PTR DS:[ESI+20]
    00949C77  |.  75 12         JNE SHORT 00949C8B
    00949C79  |.  6A 00         PUSH 0                                   ; /Arg1 = 0
    00949C7B  |.  E8 60E4FFFF   CALL 009480E0                            ; \Wow.009480E0
    00949C80  |.  8366 44 CF    AND DWORD PTR DS:[ESI+44],FFFFFFCF
    00949C84  |.  5E            POP ESI
    00949C85  |.  5D            POP EBP
    00949C86  |.  C2 0400       RETN 4
    00949C89  |>  DDD8          FSTP ST
    00949C8B  |>  8366 44 CF    AND DWORD PTR DS:[ESI+44],FFFFFFCF
    00949C8F  |.  5E            POP ESI
    00949C90  |.  5D            POP EBP
    00949C91  \.  C2 0400       RETN 4
    Seems like we have an StdCall with 1 param as returnValue? Looking at RETN 4.
    so..
    Code:
            [UnmanagedFunctionPointer(CallingConvention.StdCall)]
            private unsafe delegate int SetFacing(float floatPtr);
    Not sure about the float floatPtr. But ive tried almost everything as argument, pointer to the float value.. etc etc Everything crashes wow. :/

    I really suck at ASM.. sigh..

 

 
Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -4. The time now is 10:04 AM. Powered by vBulletin® Version 4.2.2
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved. Feedback Buttons provided by Advanced Post Thanks / Like v3.3.2 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search