[Help] Basic Memory Functions menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    Jackedy129's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] Basic Memory Functions

    After glider went down, I thought I would give it a go at creating my own bot, for my own personal use, if it worked well enough perhaps even release it here.

    However im having some trouble reading the memory and thought i would come here and see if anyone has any pointers, any help would be most gratefully received.

    Here is my code thus far, yes i appreciate its a little messy and may seem illogical but its the start of a bigger picture and the way i see it working at the moment

    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Magic;
    using System.Diagnostics;
    using System.Threading;
    
    namespace Icherus
    {
        public partial class MainForm : Form
        {
            static public BlackMagic Memory;
            private List<int> dwProcesses;
            private int dwProcessId;
    
            //Offsets
            uint PlayerBase = 0;
            uint UnitField = 0;
            uint XMemValue = 0x7D0;
            uint YMemValue = 0x7D4;
            uint ZMemValue = 0x7D8;
            float XValue = 0;
            float YValue = 0;
            float ZValue = 0;
          
            
            public MainForm()
            {
                InitializeComponent();
            }
    
            private void MainForm_Load(object sender, EventArgs e)
            {
                LogBox.Items.Add("Icherus Loaded...");
               
                
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                LogBox.Items.Add("Now looking for the wow process");
                dwProcessId = getProcesses()[0];
                LogBox.Items.Add("Attempting to hook into wow");
                attachToProcess();
    
                
            }
    
            private List<int> getProcesses()
            {
                dwProcesses = new List<int>();
                int num = 0;
                // cmbProcess.Items.Clear();
                foreach (Process process in Process.GetProcessesByName("Wow"))
                {
                    dwProcesses.Add(process.Id);                             
                    LogBox.Items.Add("WOW Found: Process ID: " + process.Id + " Window Title: " + process.MainWindowTitle);
                    num++;
                    
                }
                if (dwProcesses.Count == 0)
                {
                    dwProcesses.Add(0);
                   LogBox.Items.Add("Now WoW process found, make sure WOW is running");
                }
                return dwProcesses;
            }
    
            private void attachToProcess()
            {
                if (dwProcessId != 0)
                {
                    Memory = new BlackMagic();
                    Memory.OpenProcessAndThread(dwProcessId);
                    LogBox.Items.Add("Hooked into wow...");
                    LogBox.Items.Add("Getting character information...");
                    getcharinfo();
                 }
                else
                {
                    LogBox.Items.Add("Could not hook into wow, has the process been closed?");
                }
               
            }
    
            private void getcharinfo()
        {
          
            getxyz();
                
        }
    
            private void getxyz()
            {
             PlayerBase = Memory.ReadUInt(Memory.ReadUInt(Memory.ReadUInt(0x010B65F4) + 0x30) + 0x28);
             XValue = Memory.ReadFloat(PlayerBase + XMemValue);
             LogBox.Items.Add("XPos: " + XValue);
             YValue = Memory.ReadFloat(PlayerBase + YMemValue);
             LogBox.Items.Add("YPos: " + YValue);
             ZValue = Memory.ReadFloat(PlayerBase + ZMemValue);
             LogBox.Items.Add("ZPos: " + ZValue);
            }
        }
    }
    However, its throwing an error up at
    [code]PlayerBase = Memory.ReadUInt(Memory.ReadUInt(Memory.ReadUInt(0x010B65F4) + 0x30) + 0x2;[/quote]

    saying it cant read the Uint.

    Any help would be greatly appreciated....

    [Help] Basic Memory Functions
  2. #2
    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)
    Provide the error please.

  3. #3
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And unnest your function calls.

  4. #4
    notme13's Avatar Member
    Reputation
    -4
    Join Date
    Mar 2008
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From what I have read on these forums your PlayerBase offsets are wrong. Should be PlayerBase = [0x010B65F4 + 0x34] + 0x24

  5. #5
    Jackedy129's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ive linked an image as its not giving a copy + paste error


  6. #6
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    UInt32 dwPlayerBase = Memory.ReadUInt(Memory.ReadUInt(Memory.ReadUInt(0x010B65F4) + 0x34) + 0x24); // [[[0x010B65F4]+0x34]+0x24]

    What you did: [[[0x010B65F4+0x34+0x24]]]

  7. #7
    Jackedy129's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by SKU View Post
    UInt32 dwPlayerBase = Memory.ReadUInt(Memory.ReadUInt(Memory.ReadUInt(0x010B65F4) + 0x34) + 0x24); // [[[0x010B65F4]+0x34]+0x24]

    What you did: [[[0x010B65F4+0x34+0x24]]]
    good go how did i manage that...

    thanks however +rep

  8. #8
    spawnfestis's Avatar Contributor
    Reputation
    85
    Join Date
    May 2009
    Posts
    261
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do not make a new instance of BlackMagic upon each new function call, instead make it a global object.
    If you persist to have it like you have it now, which creates a new instance of bm each time it loads the function - you'll have nice memory pumping right there considering the size of the dll and if you call it twice you'll have twice as much as you would essentially need to fulfill the purpose.

    Fix it! :|

  9. #9
    Jackedy129's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by spawnfestis View Post
    Do not make a new instance of BlackMagic upon each new function call, instead make it a global object.
    If you persist to have it like you have it now, which creates a new instance of bm each time it loads the function - you'll have nice memory pumping right there considering the size of the dll and if you call it twice you'll have twice as much as you would essentially need to fulfill the purpose.

    Fix it! :|
    thank you for pointing this out, however i noticed that earlier and fixed it :P thanks though

Similar Threads

  1. Need help reading Memory, Writing too memory
    By Neer in forum Programming
    Replies: 0
    Last Post: 08-17-2009, 12:11 PM
  2. Help w/ bot function
    By Fenryr in forum Programming
    Replies: 7
    Last Post: 07-10-2009, 08:27 AM
  3. [Help] Accessing a function Out of Process
    By cenron in forum WoW Memory Editing
    Replies: 18
    Last Post: 10-14-2008, 05:49 AM
  4. [Guide] Basic Memory Editing in TSearch
    By Dragon[Sky] in forum WoW Memory Editing
    Replies: 2
    Last Post: 12-07-2007, 12:20 AM
  5. [Guide]Basic Memory Editing
    By Dragon[Sky] in forum World of Warcraft Bots and Programs
    Replies: 25
    Last Post: 11-27-2007, 11:47 AM
All times are GMT -5. The time now is 03:20 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