Hi,
Anyone would be so kind to provide description for CTM function ? i remember there was discussion but coudn't find it anymore. What are parameters to that call (4 parameters).
thanks
Hi,
Anyone would be so kind to provide description for CTM function ? i remember there was discussion but coudn't find it anymore. What are parameters to that call (4 parameters).
thanks
private const uint ctmBase = 0x01281838;
private const uint ctmTurnScale = ctmBase + 0x04;
private const uint ctmDistance = ctmBase + 0x0c;
private const uint ctmAction = ctmBase + 0x1c;
private const uint ctmTarget = ctmBase + 0x20;
private const uint ctmDestinationX = ctmBase + 0x8C;
private const uint ctmDestinationY = ctmDestinationX + 0x4;
private const uint ctmDestinationZ = ctmDestinationY + 0x4;
CtmAction :
FaceTarget = 1,
FaceDestination = 2,
Walk = 4,
InteractNpc = 5,
Loot = 6,
InteractItem = 7,
Attack = 10,
Idle = 13
http://www.mmowned.com/forums/wow-me...ck-move-2.html
Unkowned has a full Documentation if you want to go to his wiki.
But the above is correct.
Basic Use ( Psuedo - Code )
SET X FLOAT
SET Y FLOAT
[[Optional]]
SET Z FLOAT --Only for Flying Mounts
Set Dist (How close to the location) FLOAT << Mess around with this for interaction (there is a Dist that lets you interact w/o moving)
Set TurnScale (How fast you turn only applys if over 180 deg) FLOAT
[[/Optional]]
Set CTM Action to 4 INT
Your done!
Last edited by luciferc; 09-16-2009 at 03:06 PM.
here's function i'm using
and here are some consts that you may needint WalkToCoords (float x, float y, float z)
{
int go=4;
WriteProcessMemory(hProc,(LPVOID)(BASEADDR+CTM_X),&x,sizeof(x),NULL);
WriteProcessMemory(hProc,(LPVOID)(BASEADDR+CTM_Y),&y,sizeof(y),NULL);
WriteProcessMemory(hProc,(LPVOID)(BASEADDR+CTM_Z),&z,sizeof(z),NULL);
WriteProcessMemory(hProc,(LPVOID)(BASEADDR+CTM_STATUS),&go,sizeof(int),NULL);
return 0;
}
#define BASEADDR 0x1281838
#define CTM_X 0x8C
#define CTM_Y 0x90
#define CTM_Z 0x94
Other actions:
enum ctmActionType{
ctmFaceTarget = 0x1,
ctmFaceDestination = 0x2,
ctmStop = 0x3,
ctmWalkTo = 0x4,
ctmInteractNpc = 0x5,
ctmLoot = 0x6,
ctmInteractObject = 0x7,
ctmFaceOther = 0x8,
ctmSkin = 0x9,
ctmAttack = 0x10,
ctmIdle = 0x13,
ctmAttackPos = 0xA,
ctmAttackGuid = 0xB,
ctmWalkAndRotate = 0xC,
ctmNone = 0xD
};
Last edited by Tanaris4; 09-16-2009 at 03:52 PM.
Sweet,
appreciate it everyone. hmm... wasn't there something related to GUID as well (or i just dont remember it ) ? like in case of ctmInteractObject/Npc...
What is url for Unkowned's wiki ?![]()
Last edited by ostapus; 09-16-2009 at 04:14 PM.
Can anyone confirm CTM offsets (well, i saw offsets in 3.2.2 topic but just in case)
ctmBase = 0x01297920;
ctmTurnScale = ctmBase + 0x04;
ctmAnotherDistanceLike = ctmBase + 0x08; -- ClickToMove use it
ctmDistance = ctmBase + 0x0C;
ctmAction = ctmBase + 0x1c;
ctmTarget = ctmBase + 0x20;
ctmDestinationX = ctmBase + 0x8C;
ctmDestinationY = ctmDestinationX + 0x90;
ctmDestinationZ = ctmDestinationY + 0x94;
for some reason, Action 4 - WalkTo behave strange for me with following "code"
_writeDouble(ctmDestinationX, x) ; _writeDouble(ctmDestinationY, y) ; _writeDouble(ctmDestinationZ, z)
_writeDouble(ctmTurnScale, 3.14) ; -- default like
_writeDouble(ctmDistance, distance) ;
_writeDword(ctmAction, 4)
just want to make sure it works for other so i will dig it out...
BLEH ME! once i posted - i found what is wrong )
Heres what I use
And to use CTM i useCode:Const $ClickToMove = 0x01297920 ;Updated Const $ClickToMove_Xpos = 0x012979ac;Updated const $ClickToMove_Ypos =0x012979b0;Updated Const $ClickToMove_Zpos = 0x012979b4;Updated Const $ClickToMove_InteractDistance = 0x0129792c;Updated Const $ClickToMove_Target = 0x01297940;Updated Const $ClickToMove_State = 0x0129793c;Updated
Code:_BMWriteFloat($handle, $ClickToMove_Xpos, $XCoord) _BMWriteFloat($handle, $ClickToMove_Ypos, $YCoord) _BMWriteFloat($handle, $ClickToMove_Zpos, $ZCoord) _BMWriteInt($handle, $ClickToMove_State, "4")
Wow you guys are funny. You do realize that the CTM stuff is stored as a struct in memory right? And that struct's layout hasn't changed since as long as I can remember...
Code:[StructLayout(LayoutKind.Sequential)] public struct ClickToMoveInfoStruct { public float Unknown1F; public float TurnScale; public float Unknown2F; /// <summary> /// This can be left alone. There is no need to write to it!! /// </summary> public float InteractionDistance; public float Unknown3F; public float Unknown4F; public uint Unknown5U; /// <summary> /// As per the ClickToMoveAction enum members. /// </summary> public uint ActionType; public ulong InteractGuid; /// <summary> /// Check == 2 (This might be some sort of flag?) /// Always 2 when using some form of CTM action. 0 otherwise. /// </summary> public uint IsClickToMoving; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 21)] public uint[] Unknown6U; /// <summary> /// This will change in memory as WoW figures out where exactly we're going to stop. (Also the actual end location) /// </summary> public Point Dest; /// <summary> /// This is wherever we actually 'clicked' in game. /// </summary> public Point Click; /// <summary> /// Returns the fully qualified type name of this instance. /// </summary> /// <returns> /// A <see cref="T:System.String"/> containing a fully qualified type name. /// </returns> /// <filterpriority>2</filterpriority> public override string ToString() { string tmp = ""; for (int i = 0; i < Unknown6U.Length; i++) { tmp += "Unknown6U_" + i + ": " + Unknown6U[i].ToString("X") + ", "; } return string.Format( "TurnScale: {0}, InteractionDistance: {1}, ActionType: {2}, InteractGuid: {3}, IsClickToMoving: {4}, ClickX: {5}, ClickY: {6}, ClickZ: {7}, DestX: {8}, DestY: {9}, DestZ: {10}, Unk4f: {12}, UNK: {11}", TurnScale, InteractionDistance, (ClickToMoveType) ActionType, InteractGuid.ToString("X"), IsClickToMoving == 2, Click.X, Click.Y, Click.Z, Dest.X, Dest.Y, Dest.Z, tmp, Unknown4F); } }
Well, i dont think so. everywhere in wow (well, where i saw operations with ctm "structure") wow operates on absolute addresses, not "structure offsets". i assume it is global variables in source code.
thanks for info anywayas little contribution (useless one though : ) )
Unknown2F will hold "interact" distance returned from here
0069E8E3 call myf_ctmGetInteractDistanceOfAction
myf_ctmGetInteractDistanceOfAction takes action as parameter and returns appropriate distance or displays error like "too far" etc...
later square root of that distance will be used as InteractionDistance in CGPlayer_C__ClickToMove, code:
.text:0069E99A fld myv_ctmAnotherDistanceLike
.text:0069E9A0 fsqrt
.text:0069E9A2 fstp myv_mmow_ptrClickToMove_InteractDistance
myv_ctmAnotherDistanceLike = Unknown2F (referring to Apoc's info)
The CTM addresses you guys keep barking about, is a global struct. (Not a pointer!!)
So yes, I do think so.
mmm, i see.. so, if we have
global struct
{
a, b
} mystruct ;
in binary that will be
mov eax, <absolute address> [a]
mov eax, <absolute address> [b]
is that correct ? not something like
mov edx, <absolute address> mystruct
mov eax, [edx+4] // as a
mov edx, [esdx+8] // as b
? lazy to check it myself )
Deleted by author. (I was being mean, woke up in a bad mood.)
Last edited by EmilyStrange; 09-26-2009 at 03:01 PM.