Player name: what am I doing wrong? menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Require's Avatar Sergeant
    Reputation
    2
    Join Date
    Dec 2011
    Posts
    40
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Player name: what am I doing wrong?

    Hello everyone,

    I'm very new at memory editting and I know you guys get lots of people like me.
    My intentions are different though. I noticed a lack of (updated) tutorials for really newbies with memory editting (like me) and I decided to document everything I learned and create a very sleek tutorial for all the newbies.

    My plan is to write everything down during my process of learning this stuff. I will also make some demo applications with it and I'll try to make it as clear as possible for other people to understand.

    To the point, my problem:
    I did read a lot around here, but most of the tutorials are using BlackMagic and I noticed GreyMagic was released, so I decided to use that one.
    First of all what I wanted to do is read the players name. And after reading a few posts I learned that in order to retrieve the name I needed to get the base address of the current process and add this with the playerNameOffset.

    I did this, but I'm not getting a playername back, so I'm wondering what I'm doing wrong. Could anyone explain me what I'm missing out on?

    My code:
    Code:
            private static IntPtr PlayerNameOffset = (IntPtr)0xDC92D8;
    
            private static void Main(string[] args)
            {
                Process[] process = Process.GetProcessesByName("Wow");
    
                if (!process.Any())
                {
                    Console.WriteLine("You must run WoW first!");
                    Console.ReadLine();
                    return;
                }
    
                var reader = new ExternalProcessReader(process.First());
                IntPtr baseAddress = Process.GetCurrentProcess().MainModule.BaseAddress;
    
                string playerName = reader.ReadString(baseAddress + (int)PlayerNameOffset, System.Text.Encoding.ASCII, 256);
                Console.WriteLine(playerName);
                Console.ReadKey();
            }

    Player name: what am I doing wrong?
  2. #2
    l0l1dk's Avatar Elite User

    Reputation
    499
    Join Date
    Sep 2010
    Posts
    342
    Thanks G/R
    1/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your player name offset is wrong. You're using the one from 5.0.4 (16016). The correct one for 5.0.5 (16048) is 0xDC95D8.

    Also, I'm not completely sure (I'm not very experienced with C#), but it looks like you're using the base address from the local process and not the WoW process (I'm guessing that you're not in-process because you're using "ExternalProcessReader").
    Last edited by l0l1dk; 10-03-2012 at 02:50 PM.

  3. #3
    Require's Avatar Sergeant
    Reputation
    2
    Join Date
    Dec 2011
    Posts
    40
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by l0l1dk View Post
    Your player name offset is wrong. You're using the one from 5.0.4 (16016). The correct one for 5.0.5 (1604 is 0xDC95D8.

    Also, I'm not completely sure (I'm not very experienced with C#), but it looks like you're using the base address from the local process and not the WoW process (I'm guessing that you're not in-process because you're using "ExternalProcessReader").
    Ahh you are right on both ends. I'm also not in-process. But how am I able to get the Wow Base address? Do I add the client connection offset to the base address?

  4. #4
    l0l1dk's Avatar Elite User

    Reputation
    499
    Join Date
    Sep 2010
    Posts
    342
    Thanks G/R
    1/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Require View Post
    Ahh you are right on both ends. I'm also not in-process. But how am I able to get the Wow Base address? Do I add the client connection offset to the base address?
    ExternalProcessReader.GetModule (string sModuleName) looks like it'll return the ProcessModule of a module when called with its name. I assume it'll have a property like "BaseAddress" which will be the module's base address.

    You don't need to add the client connection offset to it. That's usually only used for reading WoW's object manager AFAIK.

  5. #5
    Require's Avatar Sergeant
    Reputation
    2
    Join Date
    Dec 2011
    Posts
    40
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by l0l1dk View Post
    ExternalProcessReader.GetModule (string sModuleName) looks like it'll return the ProcessModule of a module when called with its name. I assume it'll have a property like "BaseAddress" which will be the module's base address.

    You don't need to add the client connection offset to it. That's usually only used for reading WoW's object manager AFAIK.
    Thanks I appreciate your help. You were right (again)
    This works like a charm:

    var reader = new ExternalProcessReader(process.First());
    var baseAddress = reader.GetModule("Wow.exe").BaseAddress;
    string playerName = reader.ReadString(baseAddress + (int)PlayerNameOffset, System.Text.Encoding.ASCII, 256);

    I wanted to thank you personally, but your inbox is full. So thanks a lot for your help.. Appreciate it!
    Last edited by Require; 10-03-2012 at 03:06 PM.

Similar Threads

  1. What am i doing wrong this time?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 01-01-2008, 10:49 AM
  2. What am I doing wrong WoW.exe does not appear on WPE.
    By Eliteplague in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 10-30-2007, 04:21 AM
  3. [Question] errr what am i doing wrong?
    By Demonshade in forum WoW ME Questions and Requests
    Replies: 9
    Last Post: 10-10-2007, 04:22 AM
  4. DynDNS help. What am I doing wrong?
    By xxtennisdudexx in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 09-23-2007, 05:23 PM
  5. what am i doing wrong...
    By tiliqua in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 09-16-2007, 01:18 AM
All times are GMT -5. The time now is 07:57 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