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 


Need help with a script .

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
omoe
Grandmaster Cheater
Reputation: 8

Joined: 11 Jun 2013
Posts: 547

PostPosted: Sat Sep 14, 2013 3:37 am    Post subject: Need help with a script . Reply with quote

Game The King Of Fighters XIII , I don't usually do this kind of scripts format i make everything separate but i thought i should try it anyway.
When i run the script the game crashes .

Edit , I fixed the crash thing but now energy doesn't work .



Code:

newmem:
////////////////////////////////Inf.Health Player/////////////////////////////
health1:
cmp [esi+b8],0
jne health2
cmp [healthE1],1
jne originalcode
mov [esi+50],(int)1000
push 11
jmp returnhere
//////////////////////////////// Enemy 1 hit /////////////////////////////////
health2:
cmp [healthE2],1
jne originalcode
sub [esi+50],(int)1000
push 11
jmp returnhere
///////////////////////////////// Health Original//////////////////////////////
originalcode:
mov [esi+50],eax
push 11
jmp returnhere
//////////////////Energy///////////////////////////////////////
energy1:
cmp [edi+1c],0
jne energy2
cmp [energyE1],1
jne originalcode1
fld dword ptr [edi+000000D8]
mov [edi+D8],(float)1000
jmp returnhere1

////////////////////Enemy////////////////////////////////////////
energy2:
cmp [energyE2],1
jne originalcode1
fld dword ptr [edi+000000D8]
mov [edi+D8],(float)0
jmp returnhere1
////////////////////Original Energy//////////////////////////////////
originalcode1:
fld dword ptr [edi+000000D8]
jmp returnhere1


////////////////////////////////////////////////////////////////////////
healthE1:
dd 0
healthE2:
dd 0
energyE1:
dd 0
energyE2:
dd 0

//////////////////////////////////////////////////////////////////////////////
s_hh:
jmp health1
returnhere:

s_ee:
jmp energy1
returnhere1:



Last edited by omoe on Sat Sep 14, 2013 5:59 am; edited 2 times in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25838
Location: The netherlands

PostPosted: Sat Sep 14, 2013 4:36 am    Post subject: Reply with quote

You have set EnergyE1 and EnergyE2 to 1 after executing the script ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
omoe
Grandmaster Cheater
Reputation: 8

Joined: 11 Jun 2013
Posts: 547

PostPosted: Sat Sep 14, 2013 4:39 am    Post subject: Reply with quote

Dark Byte wrote:
You have set EnergyE1 and EnergyE2 to 1 after executing the script ?

The problem was with the aob scan it was writing to another address , I fixed it and now its back to crashing :/ .
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25838
Location: The netherlands

PostPosted: Sat Sep 14, 2013 4:50 am    Post subject: Reply with quote

Only weird thing I can see is that you first read the original value into the FPU (fld) and then write the new value. Which would seem to me that if the fpu value gets written back eventually, it'll overwrite your new value

As for the crash, no idea. Try cutting out pieces of code (e.g get rid of health) and see if you can eventually pinpoint where it goes wrong

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
omoe
Grandmaster Cheater
Reputation: 8

Joined: 11 Jun 2013
Posts: 547

PostPosted: Sat Sep 14, 2013 5:54 am    Post subject: Reply with quote

Dark Byte wrote:
Only weird thing I can see is that you first read the original value into the FPU (fld) and then write the new value. Which would seem to me that if the fpu value gets written back eventually, it'll overwrite your new value

As for the crash, no idea. Try cutting out pieces of code (e.g get rid of health) and see if you can eventually pinpoint where it goes wrong


HOLY FUCKING SHIT , It was crashing because i forgot a nop lol
,I never thought forgetting a nop would crash the whole game ,It should look like this

Quote:
s_ee:
jmp energy1
nop
returnhere1:

[/quote]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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