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 


can't disable aob injection script after changing values

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

Joined: 22 Aug 2024
Posts: 7

PostPosted: Mon Aug 26, 2024 1:11 am    Post subject: can't disable aob injection script after changing values Reply with quote

I'm trying to lock the pitch and yaw values from changing due to mouse input in tomb raider 2013. the yaw script works perfectly but the pitch script won't disable if I change the value of the pitch as doing so changes the array of bytes

pitch script:


Code:


{ Game   : TombRaider.exe
  Version:
  Date   : 2024-08-26
  Author :

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(INJECT,TombRaider.exe,28 D9 57 04 D9 1F) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  fst st(0)
  fstp dword ptr [edi]
  jmp return

INJECT+01:
  jmp newmem
return:
registersymbol(INJECT)

[DISABLE]

INJECT+01:
  db D9 57 04 D9 1F

unregistersymbol(INJECT)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: TombRaider.exe+4D2F57

TombRaider.exe+4D2F36: D9 9E 50 0D 00 00  - fstp dword ptr [esi+00000D50]
TombRaider.exe+4D2F3C: 5E                 - pop esi
TombRaider.exe+4D2F3D: 83 C4 1C           - add esp,1C
TombRaider.exe+4D2F40: C2 04 00           - ret 0004
TombRaider.exe+4D2F43: DD 5C 24 1C        - fstp qword ptr [esp+1C]
TombRaider.exe+4D2F47: FF D2              - call edx
TombRaider.exe+4D2F49: DC 6C 24 1C        - fsubr qword ptr [esp+1C]
TombRaider.exe+4D2F4D: B0 01              - mov al,01
TombRaider.exe+4D2F4F: D9 5C 24 28        - fstp dword ptr [esp+28]
TombRaider.exe+4D2F53: D9 44 24 28        - fld dword ptr [esp+28]
// ---------- INJECTING HERE ----------
TombRaider.exe+4D2F57: D9 57 04           - fst dword ptr [edi+04]
// ---------- DONE INJECTING  ----------
TombRaider.exe+4D2F5A: D9 1F              - fstp dword ptr [edi]
TombRaider.exe+4D2F5C: D9 E8              - fld1
TombRaider.exe+4D2F5E: D9 5F 0C           - fstp dword ptr [edi+0C]
TombRaider.exe+4D2F61: D9 EE              - fldz
TombRaider.exe+4D2F63: D9 57 14           - fst dword ptr [edi+14]
TombRaider.exe+4D2F66: D9 5F 10           - fstp dword ptr [edi+10]
TombRaider.exe+4D2F69: 5F                 - pop edi
TombRaider.exe+4D2F6A: 5E                 - pop esi
TombRaider.exe+4D2F6B: 83 C4 1C           - add esp,1C
TombRaider.exe+4D2F6E: C2 04 00           - ret 0004
}


before changing the pitch, value these are the bytes:

TombRaider.exe+4D2F53: D9 44 24 28 - fld dword ptr [esp+28]
// ---------- INJECTING HERE ----------
TombRaider.exe+4D2F57: D9 57 04 - fst dword ptr [edi+04]
// ---------- DONE INJECTING ----------
TombRaider.exe+4D2F5A: D9 1F - fstp dword ptr [edi]

after changing the pitch value: (the image attached)

How do I fix this?



pitch script.jpg
 Description:
 Filesize:  32.29 KB
 Viewed:  2502 Time(s)

pitch script.jpg


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Mon Aug 26, 2024 1:32 am    Post subject: Reply with quote

Registered symbols are global, not script-local. Use a more unique symbol name than "INJECT" for each script
_________________
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
boringperson69
How do I cheat?
Reputation: 0

Joined: 22 Aug 2024
Posts: 7

PostPosted: Mon Aug 26, 2024 8:58 am    Post subject: Reply with quote

I'll do that thanks
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