How to activate CTM in code?[C#] menu

User Tag List

Results 1 to 12 of 12
  1. #1
    avizer's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to activate CTM in code?[C#]

    Hi all.
    I looked at a lot of messages, but did not find the answer:
    how to activate the CTM in the code? CTM works correctly when I activate this feature in the game. Version wow 3.3.5. My code:
    Code:
    public enum ClickToMovex
            {
                CGPlayer_C__ClickToMove = 0x00727400,       // 3.3.5a 12340
                GetClickToMoveStruct = 0x00715CF0,          // 3.3.5a 12340
                CTM_Activate_Pointer = 0xBD08F4,            // 3.3.5a 12340
                CTM_Activate_Offset = 0x30,                 // 3.3.5a 12340
    
                CTM_Base = 0x00CA11D8,                      // 3.3.5a 12340
                CTM_X = 0x8C,                               // 3.3.5a 12340
                CTM_Y = 0x90,                               // 3.3.5a 12340
                CTM_Z = 0x94,                               // 3.3.5a 12340
                CTM_TurnSpeed = 0x4,                        // 3.3.5a 12340
                CTM_Distance = 0xC,                         // 3.3.5a 12340
                CTM_Action = 0x1C,                          // 3.3.5a 12340
                CTM_GUID = 0x20,                            // 3.3.5a 12340
            }
    
    wow.WriteFloat(((uint)Offsets.ClickToMovex.CTM_X + (uint)Offsets.ClickToMovex.CTM_Base), X);     
    wow.WriteFloat(((uint)Offsets.ClickToMovex.CTM_Y + (uint)Offsets.ClickToMovex.CTM_Base), Y);     
    wow.WriteFloat(((uint)Offsets.ClickToMovex.CTM_Z + (uint)Offsets.ClickToMovex.CTM_Base), Z);    
    wow.WriteInt(((uint)Offsets.ClickToMovex.CTM_Action + (uint)Offsets.ClickToMovex.CTM_Base), 4);

    How to activate CTM in code?[C#]
  2. #2
    kosacid's Avatar Active Member
    Reputation
    19
    Join Date
    May 2009
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CTM_Activate_Pointer = 0xBD08F4, // 3.3.5a 12340
    CTM_Activate_Offset = 0x30,
    by using that
    but there a problem i found CTM dont seem to work right till you have done a CTM in game, dont ask my why ive never been able to work it out
    its like it`s not setup right till its used once in game

  3. #3
    Vandra's Avatar Contributor
    Reputation
    288
    Join Date
    Mar 2008
    Posts
    471
    Thanks G/R
    26/26
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    String[] ASM = new String[]
                {
     
     
                    "mov edx, [" + (uint)ClickToMove.CTM_Activate_Pointer + "]",
                    "add edx, " + (uint)ClickToMove.CTM_Activate_Offset,
                    "mov ecx, 1",
                    "mov [edx], ecx",
                    "@out:",
                    "retn",
     
                };
                InjectAndExecute(ASM);
    This is how i used to do it
    "If it compiles, it works."

  4. #4
    avizer's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    InjectAndExecute(ASM);

    Blackmagic library has similar functions?

  5. #5
    Vandra's Avatar Contributor
    Reputation
    288
    Join Date
    Mar 2008
    Posts
    471
    Thanks G/R
    26/26
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I used my own lib but fasm_managed should do the job
    "If it compiles, it works."

  6. #6
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use
    Code:
    WowMem.Write(WowMem.Rebased(4 + MemEnums.CTM.CTM), 0x60000000);
    Last edited by Frosttall; 03-17-2013 at 09:59 AM.

  7. #7
    avizer's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, CTM starts, but once you have to manually press the right mouse button, the character started to run on koardinatam.

  8. #8
    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)
    Because you don't set all value correctly in the CTM, or you can just call the function, cleaner, easier.

  9. #9
    avizer's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried to do this:
    LuaDoString(Hook, "SetCVar(\"Autointeract\", 1)");
    The same result.

  10. #10
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by JuJuBoSc View Post
    Because you don't set all value correctly in the CTM, or you can just call the function, cleaner, easier.
    I've called the function directly in the past, but it seems to create something like a "sliced" move. The movement results in a slight curve and that's not that kind of good if you move along calculated paths.

    Originally Posted by avizer View Post
    I tried to do this:
    LuaDoString(Hook, "SetCVar(\"Autointeract\", 1)");
    The same result.
    I think he means the way you do the CTM-call/write rather than the enabling CTM.

    A thing I've noticed is that you're not writing into the required field 'distance' at CTM + 0xC. A value of 0.5f should be enough.

  11. #11
    guizmows's Avatar Banned
    Reputation
    57
    Join Date
    Feb 2008
    Posts
    414
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, CTM starts, but once you have to manually press the right mouse button, the character started to run on koardinatam.
    Start wow, Attach your debugger to CTM struct base.
    Do a right click on Wow (use CTM)
    Read value from your debugger (Int32 or Int64 I don't remember)
    tweak this value a bit in order to remove useless datas (like CMT coordinates if you read them)
    Use this value like Frosttall explained.

    Edit :
    Oups sorry to troll this post. I read "3 days old", but it was "3 weeks".
    Time to sleep for me.

  12. #12
    avizer's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx, I will try today

Similar Threads

  1. [QUESTION] How to export CTM weapons to WLK client ?
    By jinsoft in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 01-01-2011, 11:34 PM
  2. how to add a c++ code / patch to trinity??
    By rb2crens in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 01-04-2010, 12:31 PM
  3. how do i add PHP code to a flash website?
    By darkmagishin in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 12-29-2008, 07:47 PM
  4. [Question] How to compile WarpNPC source code?
    By Shaak in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 05-14-2008, 02:40 PM
  5. [GUIDE] How to activate LUA scripts
    By ~SaiLyn~ in forum WoW EMU Guides & Tutorials
    Replies: 3
    Last Post: 12-25-2007, 11:52 AM
All times are GMT -5. The time now is 04:10 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