| View previous topic :: View next topic |
| Author |
Message |
Kunn How do I cheat?
Reputation: 0
Joined: 05 Dec 2006 Posts: 9
|
Posted: Tue Apr 29, 2014 9:17 am Post subject: Base address + Pointer calculating help pls |
|
|
How do I calculate with calc.exe?
For example I have "game.exe" + 00050A68 pointing at 0038F51C
How do I get those two into one Hex? I've tried 400000 + 50A68 in calculator, but in my C# program it shows up as a completely different value than in cheat engine.. Help please
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
Kunn How do I cheat?
Reputation: 0
Joined: 05 Dec 2006 Posts: 9
|
Posted: Wed Apr 30, 2014 8:22 am Post subject: |
|
|
| Thanks now i get the base address, but it's not correct.. Cheat engine says its 00400000 but my program says its 964016 or something
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Apr 30, 2014 2:32 pm Post subject: |
|
|
| Kunn wrote: | | Thanks now i get the base address, but it's not correct.. Cheat engine says its 00400000 but my program says its 964016 or something |
Show the code you are using otherwise there is not much we can do to help you.
_________________
- Retired. |
|
| Back to top |
|
 |
Kunn How do I cheat?
Reputation: 0
Joined: 05 Dec 2006 Posts: 9
|
Posted: Wed Apr 30, 2014 4:04 pm Post subject: |
|
|
| Code: | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace Bot.Addresses
{
public class Version
{
public static void SetAddresses()
{
Process[] Clients = Process.GetProcessesByName("Tibianic");
Process SelectedClient = Clients[0];
//UInt32 BaseAddress = (UInt32)SelectedClient.MainModule.BaseAddress.ToInt32();
uint BaseAddress = Convert.ToUInt32(SelectedClient.MainModule.BaseAddress.ToInt32());
Player.Id = 0x05C684C + BaseAddress; |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Apr 30, 2014 6:28 pm Post subject: |
|
|
| Quote: | | uint BaseAddress = Convert.ToUInt32(SelectedClient.MainModule.BaseAddress.ToInt32()); |
You do not need to do all that conversion. You just need to convert it once to an int unless your code uses IntPtrs which wouldn't hurt if it did.
Anyway, you just need:
| Code: |
var baseAddress = SelectedClient.MainModule.BaseAddress.ToInt32();
var address = baseAddress + 0x00050A68; |
From your first post you said this was pointing to something so you will need to read the value of it first if it is a pointer.
As for this line:
| Code: | | Player.Id = 0x05C684C + BaseAddress; |
Not sure what you are trying to do here, but that is not how to read or write memory.
_________________
- Retired. |
|
| Back to top |
|
 |
Kunn How do I cheat?
Reputation: 0
Joined: 05 Dec 2006 Posts: 9
|
Posted: Wed Apr 30, 2014 7:25 pm Post subject: |
|
|
| Okay thats interesting. It returns the baseaddress as hex 905A4D which is actually what tibianic.exe points at in cheat engine. But when I do baseAddress + 0x00050A68 it again gets me the hex address of where it points to not the value.. It's hard to explain here but baseAddress + 0x00050A68 should equal to 168 which is the HEALTH value im looking for but instead it gives baseAddress + 0x00050A68 = 7DF51C which is the health address
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Apr 30, 2014 8:34 pm Post subject: |
|
|
You need to read the address to obtain its value. Doing the base+value is just going to give you the address to read, not the value.
_________________
- Retired. |
|
| Back to top |
|
 |
Kunn How do I cheat?
Reputation: 0
Joined: 05 Dec 2006 Posts: 9
|
Posted: Wed Apr 30, 2014 8:59 pm Post subject: |
|
|
| im reading it, somehow because its a pointer it acts differently, it works with static addreses with tibianic.exe + xxxxx now, but not with pointers
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Apr 30, 2014 11:44 pm Post subject: |
|
|
The code you showed above is not reading anything. You are just setting some random object to a value that is not reading/writing anything to memory.
_________________
- Retired. |
|
| Back to top |
|
 |
Kunn How do I cheat?
Reputation: 0
Joined: 05 Dec 2006 Posts: 9
|
Posted: Thu May 01, 2014 6:57 am Post subject: |
|
|
yes thats because i've got a lot of code, wasn't posting that all here..
Now this code is returning a true value:
| Code: |
public int Mana
{
get { return Memory.ReadInt(Addresses.Player.Mana); }
}
//
private void label9_Click(object sender, EventArgs e)
{
label9.Text = Memory.ReadInt(Addresses.Player.Mana).ToString();
}
//
And this is where I have declared the mana address(the place you said is wrong)
Player.Mana = baseAddress + 0x01C6828;
|
Now this code works and returns the real value, but if the address was changed to Player.Health = baseAddress + 0x00050A68; which is a pointer it reads back the hex address of where its pointing
|
|
| Back to top |
|
 |
|