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 


Script not working one aob scans but multiples value to take

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
paindubreak
Newbie cheater
Reputation: 0

Joined: 06 Jan 2023
Posts: 11

PostPosted: Thu Mar 21, 2024 8:34 am    Post subject: Script not working one aob scans but multiples value to take Reply with quote

I just want testacde2 to take the address with a value of 300 and testacde3 to take the address with a value of 600. When I launch my script, my game crashes. Knowing that there are several other values that I need to find, there is many value in one opcode.

Code:

[ENABLE]

aobscanmodule(testacde,godfather2.exe,D9 86 50 01 00 00 33) // should be unique
alloc(newmem,$1000)
alloc(newmem2,$1000)
label(code)
label(return)
label(testacde2)
label(testacde3)
newmem:
  cmp [esi+00000150],(float)300
  jne code
  mov [testacde2],esi
  add [testacde2],00000150

newmem2:
  cmp [esi+00000150],(float)600
  jne code
  mov [testacde3],esi
  add [testacde3],00000150


code:
  fld dword ptr [esi+00000150]
  jmp return
testacde2:
  dd 0
testacde3:
  dd 0
testacde:
  jmp newmem
  nop
return:
registersymbol(testacde)
registersymbol(testacde2)
registersymbol(testacde3)
[DISABLE]

testacde:
  db D9 86 50 01 00 00
unregistersymbol(testacde3)
unregistersymbol(testacde2)
unregistersymbol(testacde)
dealloc(newmem)
dealloc(newmem2)
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Thu Mar 21, 2024 10:30 am    Post subject: Reply with quote

There's no return from the cave in newmem, hence the crash.
Your code in newmem2 is never invoked.
Just remove newmem2 and the labels associated with it, and it should work.
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