The picture of the new MrAoz

Feel free to talk about anything here.
Post Reply
User avatar
Jinzoh
Programmer
Posts: 517
Joined: Tue Mar 22, 2005 5:29 pm
Location: Kujuta

Okies here is the picture of the new MrAoz beta program i'm writing. It's not quit finished yet(75% done), but here is a preview of what it will look like (not final). The program can handle multiple mobs and to add just click on the NPC Scanner Column. For speed NPC Scanner doesn't loop and Current info is optional. i'm kinda thinking about not showing distance because it slows things down. Plz post some suggestions of things to add / features you want to see.

and btw, i'm not going to support warping to mob and if you have any info on memory things / the targeting function that would be usefull.
i haven't figured out the targeting function in C# yet =(
You do not have the required permissions to view the files attached to this post.
Last edited by Jinzoh on Sun Aug 13, 2006 9:39 pm, edited 1 time in total.
User avatar
Jinzoh
Programmer
Posts: 517
Joined: Tue Mar 22, 2005 5:29 pm
Location: Kujuta

If you know C++ and can convert that to C#, i need to know

Code: Select all

void DisableInitCode(DWORD dwModbase, HANDLE hMemory)
{
	BYTE program[0x30] = {0};
	ReadProcessMemory(hMemory, (LPVOID)(dwModbase+OFFSET_INITCODE), program, 0x30, NULL);
	memset(program+0x0F, 0x90, 8);
	WriteProcessMemory(hMemory, (LPVOID)(dwModbase+OFFSET_INITCODE), program, 0x30, NULL);
}
My guese was

Code: Select all

                    byte[] program = initcode_one.GetByteArray(30);
                    int addr = BitConverter.ToInt32(program, 0);
                    Memory disable_init = new Memory(pol, addr + 0x0F);
                    Console.WriteLine(disable_init.GetInt64());
                    Memory disable_init_ = new Memory(pol, addr);
                    disable_init.SetInt64(0x90);
                    initcode_one.SetByteArray(program);
GetInt64 (memory.cs)

Code: Select all

        public Int64 GetInt64()
        {
            byte[] bytes = new byte[8];

            WindowsAPI.Peek(this.mProcess, this.mAddress, bytes);

            return BitConverter.ToInt64(bytes, 0);
        }	
SetInt64(memory.cs)

Code: Select all

        public void SetInt64(Int64 val)
        {
            byte[] bytes = BitConverter.GetBytes(val);
            WindowsAPI.Poke(this.mProcess, this.mAddress, bytes);
        }
GetByteArray (memory.cs)

Code: Select all

        public byte[] GetByteArray(int num)
		{
			byte[] bytes = new byte[num];
			WindowsAPI.Peek(this.mProcess, this.mAddress, bytes);

			return bytes;
		}
SetByteArray (memory.cs)

Code: Select all

        public void SetByteArray(byte[] val)
        {
            WindowsAPI.Poke(this.mProcess, this.mAddress, val);
        }
WindowsAPI.cs

Code: Select all

using System;
using System.Runtime.InteropServices;

namespace MrAoz
{
    /// <summary>
	/// Wrapper for Windows API external calls
	/// </summary>
	public class WindowsAPI
	{
		private WindowsAPI() {}
        
		[DllImport("kernel32.dll")]
		private static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress,
			[Out] byte [] lpBuffer, UIntPtr nSize, IntPtr lpNumberOfBytesRead);

		[DllImport("kernel32.dll")]
		private static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress,
			byte [] lpBuffer, UIntPtr nSize, out IntPtr lpNumberOfBytesWritten);

		public static bool Peek(System.Diagnostics.Process proc, int target, byte[] data)
		{
			return ReadProcessMemory(proc.Handle, new IntPtr(target), data, new UIntPtr((uint)data.Length), new IntPtr(0));
		}
		
		public static bool Poke(System.Diagnostics.Process proc, int target, byte[] data)
		{
			IntPtr bytesWritten = new IntPtr(0);
			return WriteProcessMemory(proc.Handle, new IntPtr(target), data, new UIntPtr((uint)data.Length), out bytesWritten);
		}		

	}
}
User avatar
Jinzoh
Programmer
Posts: 517
Joined: Tue Mar 22, 2005 5:29 pm
Location: Kujuta

Also, about 90% sure i have this right but if you knew the C# equivalent of this, that would be cool

void SetTarget(DWORD dwCharObj, DWORD dwModbase, HANDLE hMemory)
{
DWORD dwAddr = NULL;
ReadProcessMemory(hMemory, (LPVOID)(dwModbase+OFFSET_TARGETINFO), &dwAddr, 0x04, NULL);

TARGETINFO target;
ReadProcessMemory(hMemory, (LPVOID)(dwCharObj+0x64), target.dwCode, 0x08, NULL);
target.dwCharPtr = dwCharObj;
WriteProcessMemory(hMemory, (LPVOID)dwAddr, &target, sizeof(TARGETINFO), NULL);
}

not sure about red stuff
evildr
!MAXIMUM RANK!
Posts: 1441
Joined: Wed Jan 19, 2005 6:32 pm
Location: comics
Contact:

sorry I have done C++ but not C#. Although as far as the targeting bit I know Atti worked through it all before and he uses C# so you might talk to him. I know a bunch of mem stuff but not sure if it's what you need.
Post Reply

Return to “Lounge”