| View previous topic :: View next topic |
| Author |
Message |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Mon Sep 03, 2007 4:30 pm Post subject: Loading a pointer? [C++] |
|
|
This is for a bot I'm making.
I'm doing- if HP value < 15%, send potion key.
How do I do that?
For buffing, it was easy, since the buff count address is static.
| Code: | if(*(DWORD*)BuffCountAdr == 0)
//send buff key |
But I don't know what to do when offsets come into play (there are more than one).
Noz (and The_Undead) said:
| Code: | | *(DWORD*)(Base+Offset1+Offset2...) |
That didn't work for me, but it could be something else that I did wrong. I want to hear what you all have to say. _________________
armed with this small butterfly net
i will face the world alone
& never be lonely.
Last edited by Cx on Mon Sep 03, 2007 4:49 pm; edited 1 time in total |
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Sep 03, 2007 4:34 pm Post subject: |
|
|
| Not enough information, we don't know what type "base", "offset1", and "offset2" are. Post a direct snippet, please. |
|
| Back to top |
|
 |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Mon Sep 03, 2007 4:43 pm Post subject: |
|
|
What?
Base would be the base address of the pointer.
Offset 1 would be the first offset, offset 2 would be the second offset.
Base is a DWORD, others are just small offsets. _________________
armed with this small butterfly net
i will face the world alone
& never be lonely. |
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Sep 03, 2007 4:52 pm Post subject: |
|
|
| You're still being vague. "not working for me" = what. Compiler errors? Run-time errors? Did you debug? |
|
| Back to top |
|
 |
Programmer Cheater
Reputation: 0
Joined: 02 Sep 2007 Posts: 48
|
Posted: Mon Sep 03, 2007 5:07 pm Post subject: |
|
|
| appalsap wrote: | | You're still being vague. "not working for me" = what. Compiler errors? Run-time errors? Did you debug? |
Don't be dim, you know what he means. Base address = 0x12345678, Offset1 = 0xFFA... etc. _________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Sep 03, 2007 5:09 pm Post subject: |
|
|
| Programmer wrote: | | appalsap wrote: | | You're still being vague. "not working for me" = what. Compiler errors? Run-time errors? Did you debug? |
Don't be dim, you know what he means. Base address = 0x12345678, Offset1 = 0xFFA... etc. |
Those are poor assumptions to make, and your reply doesn't have anything to do with my post you quoted. |
|
| Back to top |
|
 |
Programmer Cheater
Reputation: 0
Joined: 02 Sep 2007 Posts: 48
|
Posted: Mon Sep 03, 2007 5:12 pm Post subject: |
|
|
| appalsap wrote: | | Programmer wrote: | | appalsap wrote: | | You're still being vague. "not working for me" = what. Compiler errors? Run-time errors? Did you debug? |
Don't be dim, you know what he means. Base address = 0x12345678, Offset1 = 0xFFA... etc. |
Those are poor assumptions to make, and your reply doesn't have anything to do with my post you quoted. |
You said "You're still being vague.". Anyway, it isnt an assumption! And if you don't have enough information you SHOULD make assumptions or your going to get no where. _________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Sep 03, 2007 5:14 pm Post subject: |
|
|
| Programmer wrote: | | You said "You're still being vague.". |
Read what I said after that, "it doesn't work" is being vague.
| Programmer wrote: | | Anyway, it isnt an assumption! |
He's hiding essential information, probably because he's using "private addresses"; if he's going to be difficult why make it easier for him
| Programmer wrote: | | And if you don't have enough information you SHOULD make assumptions or your going to get no where. |
In this case you have a good chance of being wrong, and it's very easy to ask. |
|
| Back to top |
|
 |
gamesguru Grandmaster Cheater
Reputation: 0
Joined: 22 Mar 2006 Posts: 926 Location: detroit
|
Posted: Mon Sep 03, 2007 5:22 pm Post subject: |
|
|
OK, pointers are basically memory locations for the real address, that means:
base address's value+offset=pointer address.
So to do this, it'll look something like this:
| Code: | int Value = BitConverter.ToInt32(ReadProcessMemory(
mapleHandle,
pointerBase,
buffer, //buffer is the value of the pointerBase in byte[] value
4, //if it's a 4 byte value that is.
out IntPtr lpNumberOfBytesRead //just any IntPtr variable
));
Value+=0x00 //make that the offset
ReadProcessMemory(Value); //you know what to do from here, i hope. |
_________________
Last edited by gamesguru on Mon Sep 03, 2007 5:24 pm; edited 2 times in total |
|
| Back to top |
|
 |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Mon Sep 03, 2007 5:22 pm Post subject: |
|
|
| appalsap wrote: | | Programmer wrote: | | You said "You're still being vague.". |
Read what I said after that, "it doesn't work" is being vague. |
It compiles fine, but when I try it, autopot doesn't work.
Didn't do any tests, but autobuff works fine (just a static address).
| appalsap wrote: | | Programmer wrote: | | Anyway, it isnt an assumption! |
He's hiding essential information, probably because he's using "private addresses"; if he's going to be difficult why make it easier for him  |
They're just addresses I don't want to give out.
They make no difference though! At all!
I could have easily just given random numbers, like Programmer did.
| appalsap wrote: | | Programmer wrote: | | And if you don't have enough information you SHOULD make assumptions or your going to get no where. |
In this case you have a good chance of being wrong, and it's very easy to ask. |
He happened to be correct.
gamesguru: I was hoping to not have to do that.
Besides I'm inside the process, it's a .DLL. _________________
armed with this small butterfly net
i will face the world alone
& never be lonely.
Last edited by Cx on Mon Sep 03, 2007 5:23 pm; edited 1 time in total |
|
| Back to top |
|
 |
Programmer Cheater
Reputation: 0
Joined: 02 Sep 2007 Posts: 48
|
Posted: Mon Sep 03, 2007 5:23 pm Post subject: |
|
|
I understood what he meant straight away. It works FYI, i've tried it before. _________________
|
|
| Back to top |
|
 |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Mon Sep 03, 2007 5:24 pm Post subject: |
|
|
| Programmer wrote: | | I understood what he meant straight away. It works FYI, i've tried it before. |
Crap. _________________
armed with this small butterfly net
i will face the world alone
& never be lonely. |
|
| Back to top |
|
 |
Programmer Cheater
Reputation: 0
Joined: 02 Sep 2007 Posts: 48
|
Posted: Mon Sep 03, 2007 5:28 pm Post subject: |
|
|
| Cx wrote: | | Programmer wrote: | | I understood what he meant straight away. It works FYI, i've tried it before. |
Crap. |
Lol? _________________
|
|
| Back to top |
|
 |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Mon Sep 03, 2007 5:30 pm Post subject: |
|
|
| Programmer wrote: | | Cx wrote: | | Programmer wrote: | | I understood what he meant straight away. It works FYI, i've tried it before. |
Crap. |
Lol? |
Meaning something else is wrong. D: _________________
armed with this small butterfly net
i will face the world alone
& never be lonely. |
|
| Back to top |
|
 |
Programmer Cheater
Reputation: 0
Joined: 02 Sep 2007 Posts: 48
|
Posted: Mon Sep 03, 2007 6:33 pm Post subject: |
|
|
| Cx wrote: | | Programmer wrote: | | Cx wrote: | | Programmer wrote: | | I understood what he meant straight away. It works FYI, i've tried it before. |
Crap. |
Lol? |
Meaning something else is wrong. D: |
And that is? _________________
|
|
| Back to top |
|
 |
|