| View previous topic :: View next topic |
| Author |
Message |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat Oct 11, 2008 10:57 am Post subject: [Question] getting address value every X seconds |
|
|
i want to get my Attack Counter's value every few seconds or milliseconds (MapleStory),
so i wrote the following code to transfer it to variable
| Code: |
DWORD *dwAtkCount = (DWORD*)0x00000000; // a random address that represent the attacks counter
__declspec(naked) void UA()
{
__asm
{
push eax
mov eax,[dwAtkCounter]
mov [dwCount],eax
pop eax
}
}
|
after that's done i use a thread to get the value into dwCount
and my question is it possible to transfer the value like that?
(can't check it cuz i have no ms on that computer and i won't be home for couple of days). _________________
Stylo |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sat Oct 11, 2008 11:12 am Post subject: |
|
|
| Wouldn't it be easier to hook the attack function and everytime you attack get the attack counter's value? |
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Sat Oct 11, 2008 11:40 am Post subject: |
|
|
| Code: |
unsigned ptr = *(DWORD*)0x94A805; //ptr
ptr+=4; //offset
char attcount = *(char*)ptr;
|
The address and offset its not correct ofc. _________________
Gone |
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat Oct 11, 2008 11:50 am Post subject: |
|
|
i said that this is just a random address that i wrote for example because i don't know the real address of the attacks
just asked if the following code will do the job that i want, and if it doesn't how can i change it so it will o: _________________
Stylo |
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Sat Oct 11, 2008 12:21 pm Post subject: |
|
|
wtf are you doing? Why hook hop?
This is for a dll only
| Code: | | int value = *((DWORD*)Base) + Offset; |
_________________
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Sat Oct 11, 2008 12:50 pm Post subject: |
|
|
| kitterz wrote: | wtf are you doing? Why hook hop?
This is for a dll only
| Code: | | int value = *((DWORD*)Base) + Offset; |
|
He is not using hook hop? He just used an asm function. _________________
Gone |
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat Oct 11, 2008 12:51 pm Post subject: |
|
|
okay so i guess that the code will be like that now:
| Code: |
int dwAtkCounte = *((DWORD*)Base) + Offset;
__declspec(naked) void UA()
{
__asm
{
push eax
mov eax,[dwAtkCounter]
mov [dwCount],eax
pop eax
}
}
|
still, the inline asm will do the job i want it to do ?
will dwCount store the number of attacks? _________________
Stylo
Last edited by Stylo on Sat Oct 11, 2008 12:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Sat Oct 11, 2008 12:51 pm Post subject: |
|
|
| GMZorita wrote: | | kitterz wrote: | wtf are you doing? Why hook hop?
This is for a dll only
| Code: | | int value = *((DWORD*)Base) + Offset; |
|
He is not using hook hop? He just used an asm function. |
oops you are right. I just looked at it and it looked like hook hop. Did not read it
my bad  _________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sat Oct 11, 2008 2:07 pm Post subject: |
|
|
Just loop with a Sleep of the seconds you want.
He CAN use a function that uses inline asm if he wishes, it will still work.
DWORD dwAtkCount = *((DWORD*)Base)+Offset;
or
mov eax, dword ptr [Base]
mov eax, dword ptr [eax+Offset]
mov dword ptr [dwAtkCount], eax _________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat Oct 11, 2008 2:33 pm Post subject: |
|
|
Great :], thank you very much. _________________
Stylo |
|
| Back to top |
|
 |
|