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 


Determining values between party and enemy

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

Joined: 22 Sep 2013
Posts: 4

PostPosted: Sat Dec 06, 2014 12:17 am    Post subject: Determining values between party and enemy Reply with quote

Currently I am learning how to make these scripts using Epic Battle Fantasy 4 (Steam version) as my practice game. I figured I would start with something somewhat simple-Health. Now I am certain this has been answered but a quick search didn't give me any reliable results, but the problem is even though the script works as it should it makes my enemies invulnerable as well.
Here is my code:
Code:

[ENABLE]
alloc(newmem,100)
label(returnhere)
label(exit)
label(_matthealth)
registersymbol(_matthealth)
aobscan(matthealth, 89 47 14 8b 47 10 85 C0)

newmem:
db 90 90 90

exit:
jmp returnhere

matthealth:
_matthealth:
jmp newmem
nop
returnhere:


[DISABLE]
dealloc(newmem)
_matthealth:
db 89 47 14 8b 47 10 85 C0
unregistersymbol(_matthealth)

I guess the above is pretty basic.
Can anyone either instruct me in my stupidity or direct me to somewhere that this has been answered already, please?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Dec 06, 2014 6:21 am    Post subject: Reply with quote

Try step 9 of the tutorial. It describes this situation
In short, use data dissect to compare the player and enemy structures and figure out a way to distinguish between them (e.g a team number, or a pointer to the ai controller filled in, etc...)

_________________
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
kurashi
How do I cheat?
Reputation: 0

Joined: 22 Sep 2013
Posts: 4

PostPosted: Sat Dec 06, 2014 4:17 pm    Post subject: Reply with quote

Dark Byte wrote:
Try step 9 of the tutorial. It describes this situation
In short, use data dissect to compare the player and enemy structures and figure out a way to distinguish between them (e.g a team number, or a pointer to the ai controller filled in, etc...)
Well the tutorial didn't really help me much in terms of making the script however I watched some videos and came up with this script
Code:

[ENABLE]
alloc(newmem,100)
label(returnhere)
label(originalcode)
label(teamhealth)
label(exit)
aobscan(damagecode, 89 47 14 8b 47 10 85 C0)
label(_damagecode)
registersymbol(_damagecode)

newmem: //this is allocated memory, you have read,write,execute access
cmp [edi+10],00000001
je teamhealth
jmp originalcode

teamhealth:
mov edi+14,[edi+18]
mov eax,[edi+10]

originalcode:
mov [edi+14],eax
mov eax,[edi+10]

exit:
jmp returnhere

damagecode:
_damagecode:
jmp newmem
nop
returnhere:

[DISABLE]
dealloc(newmem)
_damagecode:
db 89 47 14 8b 47 10 85 C0
unregistersymbol(_damagecode)


0x14 is the current health.
0x18 is the max health.
0x10 seems to always be 1 for party and 0 for enemies.
I think that I did this right with the aobscan and dissection however there must be something wrong/ not possible because I get the message "Not all code is Injectable" when I try to save. And of course the script doesn't even activate
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Dec 06, 2014 8:50 pm    Post subject: Reply with quote

For starters...

Code:
////////////////code above

teamhealth:
mov edi+14,[edi+18]  //////////////don't do this, instead, see new code
mov eax,[edi+10]
jmp returnhere   ////////////////add this
 
originalcode:
mov [edi+14],eax
mov eax,[edi+10]

exit:
jmp returnhere

////////////////code below


New code:
Code:
teamhealth:
push edx
mov edx,[edi+18]
mov [edi+14],edx
pop edx
mov eax,[edi+10]
jmp returnhere
Back to top
View user's profile Send private message
DeaconGlen
How do I cheat?
Reputation: 0

Joined: 10 Dec 2014
Posts: 5

PostPosted: Wed Dec 10, 2014 1:28 pm    Post subject: Reply with quote

So, Is it working?
Can we have an update table please?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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