[Question][C#][ASM] CTM menu

Shout-Out

User Tag List

Results 1 to 13 of 13
  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)

    [Question][C#][ASM] CTM

    Hello

    I have made a CTM function using asm using many other old threads I can get it to move my character, but not where I want it to move to.

    here is my code:

    Code:
     
            public static void CTM(float precision, float Xloc, float Yloc, float Zloc, ulong interactGuid, int ClickType)
            {
                // Allocate memory for commands
                uint Me = WoW.EndScene.BlackMagic.AllocateMemory(0x4);
                uint interactactionGuid = WoW.EndScene.BlackMagic.AllocateMemory(0x8);
                uint ClickedPos = WoW.EndScene.BlackMagic.AllocateMemory(0x2000); // Not sure how much, so alot ^^
                // Write commands in the allocated memory
                WoW.Memory.WriteUInt(Me, Player.Base);
                WoW.Memory.WriteUInt64(interactactionGuid, interactGuid);
                WoW.Memory.WriteObject(ClickedPos, Xloc + "," + Yloc + "," + Zloc);
    
                WoW.EndScene.Hook_AsmAddLine("push " + precision); // Distance
                WoW.EndScene.Hook_AsmAddLine("push " + ClickedPos); // XYZ location
                WoW.EndScene.Hook_AsmAddLine("push " + interactactionGuid); // GUID
                WoW.EndScene.Hook_AsmAddLine("push "+(uint)ClickType);
                WoW.EndScene.Hook_AsmAddLine("mov ecx, [" + Me + "]");
                WoW.EndScene.Hook_AsmAddLine("call " + Offsets.LUA.CTMOffset);
                WoW.EndScene.Hook_AsmAddLine("retn");
                
                //Inject
                WoW.EndScene.Hook_AsmInject();
    
                // Free memory allocated for command
                WoW.EndScene.BlackMagic.FreeMemory(Me);
                WoW.EndScene.BlackMagic.FreeMemory(interactactionGuid);
                WoW.EndScene.BlackMagic.FreeMemory(ClickedPos);
            }
    I call it with:

    Code:
    LUA.CTM(2.5f, XLoc, YLox, Xloc, 0, 0x4);
    My player moves but not to my desired cords.

    Any help?
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

    [Question][C#][ASM] CTM
  2. #2
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WoW.Memory.WriteObject(ClickedPos, Xloc + "," + Yloc + "," + Zloc);

    Not sure what exactly your WriteObject method does, but it looks like you're trying to write a string to memory (instead of 3 floats).

  3. #3
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    WoW.EndScene.BlackMagic.AllocateMemory(0x2000); // Not sure how much, so alot ^^
    ->
    Code:
    struct WoWPos {
        float x;
        float y;
        float z;
        float facing;
    };
    And what SKU said.

  4. #4
    -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 eLaps View Post
    Code:
    WoW.EndScene.BlackMagic.AllocateMemory(0x2000); // Not sure how much, so alot ^^
    ->
    Code:
    struct WoWPos {
        float x;
        float y;
        float z;
        float facing;
    };
    And what SKU said.
    How excatly do I set the xyz tho?
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  5. #5
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    uint ClickedPos = WoW.EndScene.BlackMagic.AllocateMemory(0x10); // Don't actually know the func, but if you need to pass the described WoWPos struct, then go this way.
    
    ...
    
    WoW.Memory.WriteFloat(ClickedPos, Xloc);
    WoW.Memory.WriteFloat(ClickedPos + 0x4, Yloc);
    WoW.Memory.WriteFloat(ClickedPos + 0x8, Zloc);
    WoW.Memory.WriteFloat(ClickedPos + 0xC, faceWhatYouWant);
    
    ...
    I actually don't know the function and have only written to the global CTM struct so far, but if you really need to pass a WoWPos struct, then you have to go this way.

  6. #6
    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)
    here's a better one, this is pretty much 'pseudo' but i guess it could be usefull

    Code:
    namespace UberHaxx
    {
        public static class WoWMovement
        {
            public ClickToMoveInfo Info { get { return Memory.Read<ClickToMoveInfoStruct>((uint)SomeEnum.ClickToMoveBase); } set { Memory.Write((uint)SomeEnum.ClickToMoveBase, value); } }
    
            public static void ClickToMove(ClickToMoveType clickToMoveType, ulong guid, WoWPoint clickPos, float precision)
            {
                var info = new ClickToMoveInfo { X = clickPos.X, Y = clickPos.Y, Z = clickPos.Z, Guid = guid, Type = clickToMoveType };
                Info = info;
            }
        }  
    }

  7. #7
    -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 Nesox View Post
    here's a better one, this is pretty much 'pseudo' but i guess it could be usefull

    Code:
    namespace UberHaxx
    {
        public static class WoWMovement
        {
            public ClickToMoveInfo Info { get { return Memory.Read<ClickToMoveInfoStruct>((uint)SomeEnum.ClickToMoveBase); } set { Memory.Write((uint)SomeEnum.ClickToMoveBase, value); } }
    
            public static void ClickToMove(ClickToMoveType clickToMoveType, ulong guid, WoWPoint clickPos, float precision)
            {
                var info = new ClickToMoveInfo { X = clickPos.X, Y = clickPos.Y, Z = clickPos.Z, Guid = guid, Type = clickToMoveType };
                Info = info;
            }
        }  
    }

    Thanks! It was very useful.

    2-3 mins editing it and it worked
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  8. #8
    -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)
    I cant use this to interact, I get "Target is to far away" =/
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  9. #9
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe because your target is really too far away.
    There is a maximum distance to use interact with CTM (~60yrds I think)

  10. #10
    -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 eLaps View Post
    Maybe because your target is really too far away.
    There is a maximum distance to use interact with CTM (~60yrds I think)
    Nope, im next to it
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  11. #11
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try activating CTM (Interface/Mouse/CTM checkbox)?

    ps:
    CTM activation flag is at [[0xC4EC8C] + 0x30]
    Code:
        if (*(uint32_t*)0xC4EC8C &&  *(uint32_t*)(*(uint32_t*)0xC4EC8C + 0x30) & 1)
            std::cout << "CTM on\n";
        else
            std::cout << "CTM off\n";
    Last edited by eLaps; 05-09-2010 at 06:55 AM.

  12. #12
    -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 eLaps View Post
    Try activating CTM (Interface/Mouse/CTM checkbox)?

    ps:
    CTM activation flag is at [[0xC4EC8C] + 0x30]
    Code:
        if (*(uint32_t*)0xC4EC8C &&  *(uint32_t*)(*(uint32_t*)0xC4EC8C + 0x30) & 1)
            std::cout << "CTM on\n";
        else
            std::cout << "CTM off\n";
    Yeah I already did that.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  13. #13
    bballer12's Avatar Member
    Reputation
    20
    Join Date
    Sep 2009
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    perhaps your values for x,y and z are 0. Try to post the creatures position and guid.

Similar Threads

  1. [question] basic asm injection
    By abuckau907 in forum WoW Memory Editing
    Replies: 12
    Last Post: 03-07-2012, 05:38 AM
  2. About CTM via asm injection
    By N1ghtmaree in forum WoW Memory Editing
    Replies: 11
    Last Post: 08-08-2010, 10:57 AM
  3. [Question] CTM... Memory Editing vs. ASM?
    By -Ryuk- in forum WoW Memory Editing
    Replies: 9
    Last Post: 07-14-2010, 12:44 PM
  4. [Question][C#][ASM] Object -> Interact (VMT 38)
    By -Ryuk- in forum WoW Memory Editing
    Replies: 5
    Last Post: 05-10-2010, 06:05 PM
  5. ASM Question ($)
    By Smarter in forum WoW Memory Editing
    Replies: 20
    Last Post: 03-29-2009, 06:50 AM
All times are GMT -5. The time now is 12:53 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