Click to Move - Explained menu

User Tag List

Page 3 of 3 FirstFirst 123
Results 31 to 34 of 34
  1. #31
    Azzie2k8's Avatar Member
    Reputation
    11
    Join Date
    Apr 2009
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have been trying to use this for a couple of days now and have encountered a problem.
    I honestly don't want to open a new thread for this since this seems to fit in here.

    Whenever I try to use this function I get the "Tried to read/write protected Memory. Memory is corrupt." exception.

    Code:
            [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
            public delegate bool CGPlayer_C__ClickToMove(IntPtr pObject, int ClickToMoveType, IntPtr pGuid, IntPtr pClickPosition, float Precision);
            public static CGPlayer_C__ClickToMove _ClickToMove;
    [code]
    function looks like this

    Code:
            public static void ClickToMove(Helper.WoWClickToMoveType Type, ulong tGuid, Helper.WoWPoint tPosition, float Precision)
            {
                if (ObjectManager.Me.ObjectPointer == IntPtr.Zero)
                    throw new NullReferenceException("ClickToMove invoked from an invalid Object");
    
                if (Hooks._ClickToMove == null)
                    Hooks._ClickToMove = EntryPoint.Memory.RegisterDelegate<Hooks.CGPlayer_C__ClickToMove>(Statics.ClickToMoveAdress);
    
                IntPtr pGuid = IntPtr.Zero;
                IntPtr pPosition = IntPtr.Zero;
    
                try
                {
                    if (tGuid != 0)
                    {
                        pGuid = Marshal.AllocHGlobal(0x4 * 2);
                        EntryPoint.Memory.Write<ulong>(pGuid, tGuid);
                    }
    
                    if (!(tPosition.X == 0 && tPosition.Y == 0 && tPosition.Z == 0))
                    {
                        pPosition = Marshal.AllocHGlobal(0x4 * 3);
                        EntryPoint.Memory.Write<float>((uint)pPosition + 0x0, tPosition.X);
                        EntryPoint.Memory.Write<float>((uint)pPosition + 0x4, tPosition.Y);
                        EntryPoint.Memory.Write<float>((uint)pPosition + 0x8, tPosition.Z);
                    }
    
                    Hooks._ClickToMove(ObjectManager.Me.ObjectPointer, (int)Type, pGuid, pPosition, Precision);
                }
                finally
                {
                    if (pGuid != IntPtr.Zero)
                    {
                        Marshal.FreeHGlobal(pGuid);
                    }
                    if (pPosition != IntPtr.Zero)
                    {
                        Marshal.FreeHGlobal(pPosition);
                    }
                }
            }
    and I am using 0x006BA610 as Address.

    by registering it like this

    Code:
     _ClickToMove = EntryPoint.Memory.RegisterDelegate<CGPlayer_C__ClickToMove>((uint)Statics.ClickToMoveAdress);
    I have been trying with some help to fix this issue but it stays the same all the time.
    My Dostring Hook works so I assume since it works kinda the same way that my ClickToMove Hook works too. I also checked the ObjPtr which is correct too.

    If anyone sees where I am going wrong please let me know.

    I am also ready to get flamed

    Click to Move - Explained
  2. #32
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're in process you can properly set up the delegate (since it looks like you are, as you're using my library)

    Code:
    [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
            private delegate byte CPlayerC_ClickToMove(IntPtr thisObj, int clickType, ref ulong guid, ref Point clickPos, float precision);

  3. #33
    Azzie2k8's Avatar Member
    Reputation
    11
    Join Date
    Apr 2009
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    If you're in process you can properly set up the delegate (since it looks like you are, as you're using my library)

    Code:
    [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
            private delegate byte CPlayerC_ClickToMove(IntPtr thisObj, int clickType, ref ulong guid, ref Point clickPos, float precision);
    Yes I am using your library.

    With the help of Robske I found out that it will only throw the exception if the TargetGuid passed is 0. Atm I am by-passing this by passing my own guid if I am just walking somewhere.

  4. #34
    Scorpiona's Avatar Active Member
    Reputation
    17
    Join Date
    Mar 2009
    Posts
    42
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Azzie2k8 View Post
    Yes I am using your library.

    With the help of Robske I found out that it will only throw the exception if the TargetGuid passed is 0. Atm I am by-passing this by passing my own guid if I am just walking somewhere.
    Pass a pointer to a ulong of 0, don't just pass 0.

  5. Thanks Jirno (1 members gave Thanks to Scorpiona for this useful post)
Page 3 of 3 FirstFirst 123

Similar Threads

  1. [Hack] Guardians CTM Teleporter (Click to move)
    By The-Guardian in forum WoW EMU Programs
    Replies: 95
    Last Post: 06-09-2020, 02:50 PM
  2. InProcess Click To Move Call
    By Harland in forum WoW Memory Editing
    Replies: 5
    Last Post: 01-11-2010, 06:11 PM
  3. [3.2] Click To Move
    By Kamuuk in forum WoW Memory Editing
    Replies: 25
    Last Post: 08-22-2009, 10:59 AM
  4. Click to move?
    By ashleyww in forum WoW Memory Editing
    Replies: 32
    Last Post: 07-18-2009, 08:48 PM
  5. Click to Move Problem
    By Rival-Fr in forum WoW Memory Editing
    Replies: 5
    Last Post: 07-03-2009, 09:27 AM
All times are GMT -5. The time now is 05:04 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