Warcraft III's useful offsets - Always Updated

This is a discussion on Warcraft III's useful offsets - Always Updated within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; Originally Posted by YourName You don't need to cast those values around. Hmmm, you have anything to propose? Any working ...

Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 44
  1. #21
    koyfo is offline Member
    Array
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    1
    Quote Originally Posted by YourName View Post
    You don't need to cast those values around.
    Hmmm, you have anything to propose? Any working idea?


  2. #22
    YourName's Avatar
    YourName is offline THE ONE AND ONLY DARK KNIGHTY


    Array
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    1,553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    16
    Reputation
    1088
    How 'bout trying
    (IntPtr)(gameDll.BaseAddress + 0xACF660)
    I'm pretty sure it works as I've done this myself aswell.
    Providing you with foolish stuff since 2007.

  3. #23
    koyfo is offline Member
    Array
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    1
    Quote Originally Posted by YourName View Post
    How 'bout trying
    (IntPtr)(gameDll.BaseAddress + 0xACF660)
    I'm pretty sure it works as I've done this myself aswell.
    00000000000000000000000000


  4. #24
    YourName's Avatar
    YourName is offline THE ONE AND ONLY DARK KNIGHTY


    Array
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    1,553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    16
    Reputation
    1088
    The following works fine for me. My guess is your problem was you used the return value which indicates whether the action was successfull or not (can't say for sure because I don't know if you did any parsing of the original ReadProcessMemory in your function).

    Code:
    using System;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Windows.Forms;
    
    namespace Test
    {
        static class Program
        {
            [DllImport("Kernel32.dll")]
            private static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, uint length, [Out] IntPtr lpNumberOfBytesRead);
    
            static void Main()
            {
                Process[] processes = Process.GetProcesses();
                Process pWar = null;
    
                foreach (Process process in processes)
                {
                    if (process.ProcessName == "war3")
                    {
                        pWar = process;
                        break;
                    }
                }
    
                if (pWar == null)
                {
                    MessageBox.Show("Couldn't find Warcraft 3.");
                    return;
                }
    
                ProcessModuleCollection modules = pWar.Modules;
                ProcessModule mGameDLL = null;
    
                foreach (ProcessModule module in modules)
                {
                    if (module.ModuleName == "Game.dll")
                    {
                        mGameDLL = module;
                        break;
                    }
                }
    
                if (mGameDLL == null)
                {
                    MessageBox.Show("Couldn't find Game.dll.");
                    return;
                }
    
                byte[] buffer = new byte[4];
                IntPtr bytesRead = new IntPtr();
    
                ReadProcessMemory(pWar.Handle, (IntPtr)(mGameDLL.BaseAddress + 0xACF660), buffer, 4, bytesRead);
    
                //You could also use BitConverter here. I used this because I felt like it.
                StringBuilder builder = new StringBuilder();
                foreach (byte b in buffer)
                    builder.Insert(0, b.ToString());
                MessageBox.Show(builder.ToString());
                //You can also parse it into an int by using int.Parse(builder.ToString())
            }
        }
    }
    Last edited by YourName; 11-06-2011 at 09:35 AM.
    Providing you with foolish stuff since 2007.

  5. #25
    koyfo is offline Member
    Array
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    1
    Many thanks YourName. It works fine! I didn't use directly the ReadProcessMemory from kernel32.dll, but an API. Give it a try if you have some free time, just to learn what was the mistake.

    ProcessMemoryReader.rar

    Many thanks again.

  6. #26
    YourName's Avatar
    YourName is offline THE ONE AND ONLY DARK KNIGHTY


    Array
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    1,553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    16
    Reputation
    1088
    Couldn't really spot the mistake lol, just flew over it. Anyway good thing it works for you now. Glad I could help.
    Providing you with foolish stuff since 2007.

  7. #27
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    Good job koyfo, i'm reading your code and i'm trying to learn C#. Thanks and GL.

  8. #28
    lol6k is offline Wannabe Member
    Array
    Join Date
    Mar 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    3
    Hey GoDLike.0N3

    How do you find the packets ?!

  9. #29
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    What packets ? I can't understand you.

  10. #30
    koyfo is offline Member
    Array
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    1
    Quote Originally Posted by GoDLiKe.ON3 View Post
    What packets ? I can't understand you.
    Maybe he means the offsets. How do you find the offsets...

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 08-17-2011, 09:32 PM
  2. Detected offsets in Warcraft III 1.23
    By TyranO in forum Development
    Replies: 11
    Last Post: 01-25-2010, 08:29 PM
  3. Detected offsets in Warcraft III 1.24
    By forgotmylogin in forum Warcraft 3 Hacks, bots and tools
    Replies: 3
    Last Post: 08-16-2009, 03:10 PM
  4. Warcraft 3 Offsets 1.22
    By Bendik in forum Development
    Replies: 17
    Last Post: 06-03-2009, 07:04 PM
  5. Detected Warcraft 3 Offsets
    By rolle in forum Warcraft 3 forum
    Replies: 6
    Last Post: 12-08-2008, 02:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •