Check it out: thread title: [3.1.1] Movement with simple memory writes
"Har Har Har" people can do it properly by calling the actual function. Or they can follow the... following if they don't feel like using code injection:
Required Memlocs:
-------------------------------
All text in quotes is a type of what you all call "patterns". The substring before the first "," is a Regex pattern to match before a number of bytes. The substring after the first "," is a pattern to match after a number of bytes. If there is a second ",", the integer after it represents how many bytes in between the two patterns there are. Otherwise, four bytes are assumed.
I also included the results that these patterns would yield in 3.1.3.
Code:
InterfaceOptionsMouse_Pointer = "75-25-A1,39-50-XX-74" //3.1.3: 0x11D40C0
InterfaceOptionsMouse_ClickToMove_Offset = "75-XX-A1-XX-XX-XX-XX-39-50,74-XX-D9-EE,1" //3.1.3: 0x30
ClickToMoveUnk1 = "D9-5D-XX-57-D9-05,D8-4D-XX-DD-05" //3.1.3: 0x11180A4
ClickToMoveTightness = "75-64-83-F8-04-D9-05,D9-55-XX-75-XX-8B-8E" //3.1.3: 0x11180AC
ClickToMoveX = "8B-06-A3,89-0D-XX-XX-XX-XX-8B-4E" //3.1.3: 0x111812C
ClickToMoveGUID = "8B-06-A3-XX-XX-XX-XX-89-0D,8B-4E-XX-89-0D" //3.1.3: 0x11D3F68
ClickToMoveGoType = "8B-4D-XX-89-0D,E8-XX-XX-XX-XX-8B-13" //3.1.3: 0x11180BC
Required Code: (or similar)
-------------------------------
Code:
public void DoClickToMove(Location location, ClickToMoveType ctmType)
{
//retrieve required memory locations
//required to enable ctm
int ctmOptionAddr = wow.memlocs.GetMemloc("InterfaceOptionsMouse_Pointer");
int ctmOptionOffset = wow.memlocs.GetMemloc("InterfaceOptionsMouse_ClickToMove_Offset");
ctmOptionAddr = wow.memory.ReadInt(ctmOptionAddr) + ctmOptionOffset;
//required to perform ctm
int ctmXAddr = wow.memlocs.GetMemloc("ClickToMoveX");
int ctmTypeAddr = wow.memlocs.GetMemloc("ClickToMoveGoType");
int ctmGUIDAddr = wow.memlocs.GetMemloc("ClickToMoveGUID");
int ctmUnk1Addr = wow.memlocs.GetMemloc("ClickToMoveUnk1");
int ctmTightnessAddr = wow.memlocs.GetMemloc("ClickToMoveTightness");
//write enable ctm
wow.memory.WriteInt(ctmOptionAddr, 1);
//write location info
wow.memory.WriteFloat(ctmXAddr, location.X);
wow.memory.WriteFloat(ctmXAddr + 0x4, location.Y);
wow.memory.WriteFloat(ctmXAddr + 0x8, location.Z);
//write guid info
wow.memory.WriteLong(ctmGUIDAddr, wow.memory.ReadLong(wow.memlocs.GetMemloc("CurrentTargetGUID")));
//write other required info
wow.memory.WriteFloat(ctmUnk1Addr, 14.0f); //this seems to work...
wow.memory.WriteFloat(ctmUnk1Addr + 0x4, 0.25f); // normal scale turn radius
wow.memory.WriteFloat(ctmTightnessAddr, 0.5f); // set to stop if distance from xyz is 0.5 or less
//write ctm "go" type/bit
wow.memory.WriteInt(ctmTypeAddr, (int)ctmType);
}