Wow base address ... just a hint.
Wow base address ... just a hint.
Thanks for the hint, all set. +rep for you! (If I can even give it out that is!)
I had been assuming that since the the BlackMagic instance opened the process that it was already taking the base address into account.
Code:Process pWoW = Process.GetProcessById(wow.ProcessId); IntPtr baseWoW = pWoW.MainModule.BaseAddress; string playername = wow.ReadASCIIString((uint)baseWoW + 0x8B3FB0, 255); //player name
Last edited by Xelper; 11-28-2010 at 08:00 PM.
I wasn't very interested about this stuff a few seconds ago, but I read the tutorial out of boredome and now I'm VERY interested...
Is it completely safe to memory read and not write? There are supposedly no 4.0 servers and I don't want to get banned on retail...
Also does Visual C# 2010 work?
Last edited by Plaguesnow; 11-27-2010 at 11:10 PM.
I've been trying to get this to work for about 2 hours now... I changed all sorts of stuff relative to the last few posts but eventually I screwed it up and got errors on everything that didn't have errors before... So I started over and the problem is:
ReadUID failed... Do I need later offsets? If so where do I get them in hex form... :S I'm very confused.
*Awaits the generic "Section isn't for beginners" response.*
Just wanted to say thanks again, for those that are having issues getting started all of the answers you need are already answered in this thread. Using just this thread and the info dump thread for the current patch (to get offsets/descriptors) I was able to come up with this in less than 24 hours after never doing any memory reading at all (clicky):
Time to figure out how the object manager works then figure out how to reverse some LUA functions.![]()
Im fairly new to C# having done other languages prior to this but I havent ever had to dump data to get offsets before. I have read through the majority of this but couldn't see the new offsets so I was wondering if anyone could post the new offset used in the tutorial or if they could point me in the right direction so I could get them myself.
Thanks
Lewie
In my humble opinion, the example given is not the most successful ways to move your character. If you move your bot in this way is 100% get banned. For the safe movement of BOT should be recorded in the CTM domain of memory.
Question to the guruCode:#region offset ctm enum CTM_offset { orient = 0, turn = 4, after = 8, distance = 24, action = 28, //<< here we write the new action taget_guid = 32, move_to_X = 160, // << here we write the new position of BOT (Vector3) point_pos_X = 148 } public enum Action : byte { LeftClick = 1, Face = 2, Stop_ThrowsException = 3, GoTo = 4, InteractWithNpc = 5, Loot = 6, ... }
Is it safe to turn the BOT, writing directly to WowObject.Offset +0 x8A8? Does anyone realties such a method for turning in my BOT?
Hi All, wanted to post this here as to not clutter the forum...
I've been working on a radar since I picked up memory reading a few days ago, and for the most part it has gone well. I'm trying to figure out this one bug though.
Any players using accented characters in their names are returning some garbage in place of the accented letter, every other standard alphanumeric character (Aa-Zz, 0-9) based name looks fine... see the screenshot below. Any quick thoughts on what I should look at to resolve this? Don't want any code just a hint would be nice.
I'm currently reading from the playerName offset using BlackMagic's ReadASCIIString, which I thought might be the issue.
EDIT: Thanks for the tip miceiken, I wasn't sure how to make BlackMagic's ReadUnicodeString work... kept returning gibberish, so I did this:
Code:public string ProcessUnicode(string UnicodeString) // Remove any extra bytes that were read. { return UnicodeString.Remove(UnicodeString.IndexOf("\0")); } Use: string unicodeString = Encoding.UTF8.GetString((bWoW.ReadBytes(memoryAddress, 30))); unicodeString = ProcessUnicode(unicodeString);
Last edited by Xelper; 12-03-2010 at 01:10 PM.
Read it as UTF-8?
Hi guys,
Not sure if this thread is still active but I was trying to update the source for the demo to compile and run with version 4.3 but I keep getting an error.
Its is probably obvious for the most experienced of you but I have ran out of the ideas. The offsets are correct as far as I can see.
Am I missing a base somewhere or something stupider than that?
I attached my code below.
using System;
using Magic;
using System.Diagnostics;
namespace Memory_Editing_Tutorial__Console_App
{
class Program
{
#region WoW 4.3.0.15005 Constants
public enum WoW430
{
CurMgrPointer = 0x009BE678, // ObjectManager.CurMgrPointer
CurMgrOffset = 0x463C, // ObjectManager.CurMgrOffset
NextObject = 0x3C, // ObjectManager.NextObject
FirstObject = 0xC0, // ObjectManager.FirstObject
LocalGUID = 0xC8, // ObjectManager.LocalGUID
STATIC_PLAYERNAME = 0x9BE6B8,
OBJECT_FIELD_GUID = 0x00, // WowObjectFields.OBJECT_FIELD_GUID
X = 0x790, // WowObject.X
Y = X + 0x4, // WowObject.Y
Z = X + 0x8, // WowObject.Z
RotationOffset = X + 0x10,
UNIT_FIELD_HEALTH = 0x20 + 0x48, // WowUnitFields.UNIT_FIELD_HEALTH
UNIT_FIELD_LEVEL = 0x20 + 0xA0, // WowUnitFields.UNIT_FIELD_LEVEL
CTM_Base = 0x9D6050, // ClickToMove
CTM_Distance = CTM_Base + 0x0C,
CTM_Action = CTM_Base + 0x1C,
CTM_X = CTM_Base + 0x8C,
CTM_Y = CTM_Base + 0x90,
CTM_Z = CTM_Base + 0x94
}
#endregion
#region Global Variables
static BlackMagic wow = null;
static IntPtr BaseAddress = IntPtr.Zero;
static uint CurrentManager = 0;
#endregion
static void Main(string[] args)
{
////////////////////////////////////////////////////////
// Initialize memory access.
var proc = Process.GetProcessesByName("Wow");
if (proc[0] == null)
{
Console.WriteLine("World of Warcraft process could not be found.");
return;
}
wow = new BlackMagic(proc[0].Id);
BaseAddress = proc[0].MainModule.BaseAddress;
CurrentManager = wow.ReadUInt(wow.ReadUInt((uint)BaseAddress + (uint)WoW430.CurMgrPointer) + (uint)WoW430.CurMgrOffset);
ulong PlayerGUID = wow.ReadUInt64(CurrentManager + (uint)WoW430.LocalGUID);
////////////////////////////////////////////////////////
// Display some simple player static data.
string PlayerName = wow.ReadASCIIString((uint)BaseAddress + (uint)WoW430.STATIC_PLAYERNAME, 60);
Console.WriteLine("Player Name is: " + PlayerName);
// Alternative way...
//uint playerbase = wow.ReadUInt(wow.ReadUInt(wow.ReadUInt(0x00A70AE0) + 0x3+ 0x24); //this is the player base
//uint level = wow.ReadUInt(wow.ReadUInt(playerbase + 0x+ ((uint)WoW401.UNIT_FIELD_LEVEL * 4)); // Reads players level
////////////////////////////////////////////////////////
// Display some simple player data from the palyer GUID.
// Find the object for the local player.
uint PlayerPtr = FindObjectPtr(PlayerGUID);
if (PlayerPtr == 0)
return;
uint Level = wow.ReadUInt(wow.ReadUInt(PlayerPtr + 0x+ ((uint)WoW430.UNIT_FIELD_LEVEL * 4)); // Reads players level
uint Health = wow.ReadUInt(wow.ReadUInt(PlayerPtr + 0x+ ((uint)WoW430.UNIT_FIELD_HEALTH * 4)); // Reads players health
Console.WriteLine("Player level is:" + Level); //writes to console to tell player level
Console.WriteLine("Player health is:" + Health); //writes to console to tell player health
float playerx = wow.ReadFloat(PlayerPtr + (uint)WoW430.X); // Read players xlocation
float playery = wow.ReadFloat(PlayerPtr + (uint)WoW430.Y); // Read players ylocation
float playerz = wow.ReadFloat(PlayerPtr + (uint)WoW430.Z); // Read players zlocation
Console.WriteLine("Player X cord is:" + playerx); //writes to console to tell players x cordinate
Console.WriteLine("Player Y cord is:" + playery); //writes to console to tell players y cordinate
Console.WriteLine("Player Z cord is:" + playerz); //writes to console to tell players z cordinate
////////////////////////////////////////////////////////
// ClickToMove CTM_...
float MoveToX = playerx + 10; // Position to move to (add offset from current location).
float MoveToY = playery + 5;
wow.WriteFloat((uint)BaseAddress + (uint)WoW430.CTM_X, MoveToX); // x destination pos
wow.WriteFloat((uint)BaseAddress + (uint)WoW430.CTM_Y, MoveToY); // y destination pos
wow.WriteInt((uint)BaseAddress + (uint)WoW430.CTM_Action, 4); // Makes character walk. !!! MUST HAVE CTM ENABLED IN USER INTERFACE !!!.
}
#region Support Functions
/// <summary>
/// Step through all objects to find the object with the specificed GUID.
/// </summary>
/// <param name="GUID"></param>
/// <returns></returns>
static uint FindObjectPtr(ulong GUID)
{
uint ObjectPtr = 0;
uint CurrentObjectPtr = wow.ReadUInt(CurrentManager + (uint)WoW430.FirstObject);
while (CurrentObjectPtr != 0 && (CurrentObjectPtr & 1) == 0)
{
ulong ObjGUID = wow.ReadUInt64(wow.ReadUInt(CurrentObjectPtr + 0x+ (uint)WoW430.OBJECT_FIELD_GUID * 4);
if (ObjGUID == GUID)
{
ObjectPtr = CurrentObjectPtr;
break;
}
CurrentObjectPtr = wow.ReadUInt(CurrentObjectPtr + (uint)WoW430.NextObject);
}
if (ObjectPtr == 0)
Console.WriteLine("Error: GUID could not be found.");
return ObjectPtr;
}
#endregion
}
}
No, you didn't attach your code, you attached your wall of text. Use the code bbtag. And how about giving us the actual error? Noone is gonna put extra effort into understanding your code and figuring out the error for themselves.