I am trying to display my characters HP to a label but I'm having a little trouble.
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;
namespace BlackMagic1
{
public partial class Form1 : Form
{
BlackMagic mem = new BlackMagic();
public Form1()
{
InitializeComponent();
toolStripStatusLabel.Text = "mainform loaded successfully.";
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private bool GetProcess(string pName)
{
return mem.OpenProcessAndThread(SProcess.GetProcessFromProcessName(pName));
}
private void button1_Click(object sender, EventArgs e)
{
uint hpoffset = 0x1F * 4;
uint playerAddress = 0x010BD5F4;
test.Text = "Are we attached to wow? " + GetProcess("wow").ToString();
//mem.ReadUInt(mem.ReadUInt(playerAddress) + 0x34);
uint playerBase = mem.ReadUInt(mem.ReadUInt(mem.ReadUInt(playerAddress) + 0x34) + 0x24);
button1.Text = "Bot Started";
uint playerHp = mem.ReadUInt(mem.ReadUInt(mem.ReadUInt(playerBase) + 0x8) + hpoffset);
characterhp.Text = playerHp.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
}
}
}
I keep getting the same value back as 3880 something, I'm using blackmagic as you can see. Was wondering if any one could tell me what I have messed up on.