Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How can I increase instead of decrease in this function

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Faloop
How do I cheat?
Reputation: 0

Joined: 07 Jul 2021
Posts: 7
Location: EUA

PostPosted: Mon Aug 07, 2023 8:43 pm    Post subject: How can I increase instead of decrease in this function Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
atom0s
Moderator
Reputation: 200

Joined: 25 Jan 2006
Posts: 8525
Location: 127.0.0.1

PostPosted: Tue Aug 08, 2023 2:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Faloop
How do I cheat?
Reputation: 0

Joined: 07 Jul 2021
Posts: 7
Location: EUA

PostPosted: Wed Aug 09, 2023 12:36 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites