View previous topic :: View next topic |
Author |
Message |
Faloop How do I cheat? Reputation: 0
Joined: 07 Jul 2021 Posts: 7 Location: EUA
|
Posted: Mon Aug 07, 2023 8:43 pm Post subject: How can I increase instead of decrease in this function |
|
|
this function is decreasing the player's HP, where the player has 100 hp and this hp will zero in the period of 60 seconds.
How can I make it increase instead of decreasing it?
Code: |
mov [esp+04],ebx//Time in seconds 0x3E8 = 1000
fild dword ptr [esp+04]
test ebx,ebx
jnl _01
fadd dword ptr [appstart.exe+48E12]
_01:
mov [esp+04],ebp//Time in seconds 0x3E8 = 1000
fild dword ptr [esp+04]
test ebp,ebp
jnl _02
fadd dword ptr [appstart.exe+48E12]
_02:
fdivp st(1),st(0)
fstp dword ptr [esp+04]
fld dword ptr [esp+04]
fmul qword ptr [appstart.exe+17BA70]//Player HP Double = 100.00
fstp dword ptr [esp+04]
fld dword ptr [esp+04]
call appstart.exe+5394A
push eax//result of decrementing hp from 100 to 0, at cast time
|
|
|
Back to top |
|
|
atom0s Moderator Reputation: 202
Joined: 25 Jan 2006 Posts: 8552 Location: 127.0.0.1
|
Posted: Tue Aug 08, 2023 2:43 pm Post subject: |
|
|
Given your comments on the above code:
Code: |
call appstart.exe+5394A
push eax//result of decrementing hp from 100 to 0, at cast time
|
It would appear as though this function call is responsible for the actual math and handling of the health value if 'EAX' is holding the value for it, which is likely the return from that call.
You would need to share what is happening in that call (call appstart.exe+5394A).
_________________
- Retired. |
|
Back to top |
|
|
Faloop How do I cheat? Reputation: 0
Joined: 07 Jul 2021 Posts: 7 Location: EUA
|
Posted: Wed Aug 09, 2023 12:36 am Post subject: |
|
|
atom0s wrote: | Given your comments on the above code:
Code: |
call appstart.exe+5394A
push eax//result of decrementing hp from 100 to 0, at cast time
|
It would appear as though this function call is responsible for the actual math and handling of the health value if 'EAX' is holding the value for it, which is likely the return from that call.
You would need to share what is happening in that call (call appstart.exe+5394A). |
I can solve it in the following way.
Code: | mov edx,64
sub edx,eax//Result decrement |
as it decreases, it increases in edx
|
|
Back to top |
|
|
|