CTM Issue menu

Shout-Out

User Tag List

Thread: CTM Issue

Results 1 to 7 of 7
  1. #1
    wag321's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CTM Issue

    I've just got into wow memory, and this forum is the best resource I've found, I just started a bot, and had a lot of success OOP, but have decided to try injected / memory writes. I can get simple function like CGPlayer_C::AcceptQuest to work fine but can't get CTM for the life of me.

    My code atm is
    Code:
            public static void CGPlayer_C__ClickToMove(float x, float y, float z, float precision = 2.5f, Int32 clickType = 0x4)
            {
                UInt32 clickPos_P = Memory.AllocateMemory(0x4 * 3);
                UInt32 interactGuid_P = Memory.AllocateMemory(0x8);
    
                Memory.Write<UInt64>(interactGuid_P, 0);
    
                Memory.Write<float>(clickPos_P, x);
                Memory.Write<float>(clickPos_P + 0x4, y);
                Memory.Write<float>(clickPos_P + 0x8, z);
                string[] asm = new string[]
                {
                    "push, " + precision,
                    "push, " + clickPos_P,
                    "push, " + interactGuid_P,
                    "push, " + clickType,
                    "mov ecx, " + ObjectManager.Me.getPointer(),
                    "call " + (uint)Offsets.CTM.CGPlayer_C__ClickToMove,
                    "retn",
                };
    
                Hook.InjectAndExecute(asm);
    
                Memory.FreeMemory(clickPos_P);
                Memory.FreeMemory(interactGuid_P);
            }
    Where CGPlayer_C__ClickToMove = 0x001B7D20

    Can anyone help?
    Thanks.

    CTM Issue
  2. #2
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by wag321 View Post
    I've just got into wow memory, and this forum is the best resource I've found, I just started a bot, and had a lot of success OOP, but have decided to try injected / memory writes. I can get simple function like CGPlayer_C::AcceptQuest to work fine but can't get CTM for the life of me.

    My code atm is
    Code:
            public static void CGPlayer_C__ClickToMove(float x, float y, float z, float precision = 2.5f, Int32 clickType = 0x4)
            {
                UInt32 clickPos_P = Memory.AllocateMemory(0x4 * 3);
                UInt32 interactGuid_P = Memory.AllocateMemory(0x8);
    
                Memory.Write<UInt64>(interactGuid_P, 0);
    
                Memory.Write<float>(clickPos_P, x);
                Memory.Write<float>(clickPos_P + 0x4, y);
                Memory.Write<float>(clickPos_P + 0x8, z);
                string[] asm = new string[]
                {
                    "push, " + precision,
                    "push, " + clickPos_P,
                    "push, " + interactGuid_P,
                    "push, " + clickType,
                    "mov ecx, " + ObjectManager.Me.getPointer(),
                    "call " + (uint)Offsets.CTM.CGPlayer_C__ClickToMove,
                    "retn",
                };
    
                Hook.InjectAndExecute(asm);
    
                Memory.FreeMemory(clickPos_P);
                Memory.FreeMemory(interactGuid_P);
            }
    Where CGPlayer_C__ClickToMove = 0x001B7D20

    Can anyone help?
    Thanks.
    Add base address

  3. #3
    wag321's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just came back to post that I figured it out although for a while I was doing

    Offsets.CTM.CGPlayer_C__ClickToMove + Memory.BaseAddress

    without casting to uint :/

    Thanks though :-)

  4. #4
    EmilyStrange's Avatar Active Member
    Reputation
    34
    Join Date
    Jul 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by wag321 View Post
    I just came back to post that I figured it out although for a while I was doing

    Offsets.CTM.CGPlayer_C__ClickToMove + Memory.BaseAddress

    without casting to uint :/

    Thanks though :-)
    If you embed your offsets into one class or structure, and your absolute addresses in to another class or structure, and write a utility function (or even a static class function) that will determine whether it is an offset or absolute address based on type, and adjust the address accordingly, you can avoid many of these mistakes. No more "baseAddress+someOtherAddress" sprinkled throughout your code.

    A strong naming convetion of "Address" and "Offset" to distinguish the two can alleviate some of these problems too.

  5. #5
    wag321's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by EmilyStrange View Post
    If you embed your offsets into one class or structure, and your absolute addresses in to another class or structure, and write a utility function (or even a static class function) that will determine whether it is an offset or absolute address based on type, and adjust the address accordingly, you can avoid many of these mistakes. No more "baseAddress+someOtherAddress" sprinkled throughout your code.

    A strong naming convetion of "Address" and "Offset" to distinguish the two can alleviate some of these problems too.
    That's a great idea, Thanks!

  6. #6
    EmilyStrange's Avatar Active Member
    Reputation
    34
    Join Date
    Jul 2009
    Posts
    125
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As an additional thought, and this is serious overkill, but was done on a completely unrelated project to hacking Warcraft, you can create a custom attribute which decorates the address/offset class or structure to ensure that anytime you use the class or structure data members the compiler will generate an error if you do not either a) explicitly add the base address of the game client to the used data member or b) decorate the line of code using the data member with an attribute that acknowledges the use of the data member in an unedited form. Probably more work than you actually want to do, or is even worth doing, but doable nonetheless.

  7. #7
    wag321's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's an interesting thought though, what is this called so I can look it up?

Similar Threads

  1. Vanilla CTM Issue
    By Achilees in forum WoW Memory Editing
    Replies: 3
    Last Post: 09-16-2013, 12:13 AM
  2. CTM Issue.. Same Coordinates / different actions?
    By hesi in forum WoW Memory Editing
    Replies: 3
    Last Post: 02-27-2012, 12:26 PM
  3. [Solved] CTM - Interact Issue
    By weber7655 in forum WoW Memory Editing
    Replies: 29
    Last Post: 12-23-2009, 10:41 PM
  4. [Solved] CTM issue
    By Thongs in forum WoW Memory Editing
    Replies: 5
    Last Post: 12-12-2009, 07:38 PM
  5. [Patch 1.11] - Known Issues (6-20-06)
    By Cypher in forum World of Warcraft General
    Replies: 1
    Last Post: 06-24-2006, 12:42 AM
All times are GMT -5. The time now is 01:00 PM. 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