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 


Please help me to resolve a script

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

Joined: 30 Aug 2016
Posts: 8

PostPosted: Wed Aug 10, 2022 3:34 am    Post subject: Please help me to resolve a script Reply with quote

Hi! I want to make a script for a game (one hit kill) and let's show you the code:

Code:
ENABLE]

aobscanmodule(onehit,duke3d.exe,66 29 B2 2A 48 DC 00)
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  sub [edx+duke3d.sprite+2A],#999999
  jmp return

onehit:
  jmp newmem
  nop 2
return:
registersymbol(onehit)

[DISABLE]

onehit:
  db 66 29 B2 2A 48 DC 00

unregistersymbol(onehit)
dealloc(newmem)


The problem is that the game all the time is changing the last two group of bytes.. DC 00 can be E9 01 or something else..

Of course, i can replace the aobscan from the script with:

Code:
aobscanmodule(onehit,duke3d.exe,66 29 B2 2A 48 ?? ??)


and all is working fine until i disable the script (the game crashes).

My question how to copy the results of the aobscanmodule's search and to replace in DISABLE section to avoid the game being crash.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Wed Aug 10, 2022 12:19 pm    Post subject: Reply with quote

Use readmem
Code:
...
label(originalbytes)
registersymbol(originalbytes)

newmem:

code:
  sub [edx+duke3d.sprite+2A],#999999
  jmp return

originalbytes:
  readmem(onehit,7)

...

[DISABLE]
onehit:
  readmem(originalbytes,7)
...

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Loveness
How do I cheat?
Reputation: 0

Joined: 30 Aug 2016
Posts: 8

PostPosted: Mon Aug 15, 2022 6:11 am    Post subject: Reply with quote

ParkourPenguin wrote:
Use readmem
Code:
...
onehit:
  readmem(originalbytes,7)
...


Thank you very much! Smile
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