i need help with this LUA script

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
bachou
Expert Cheater
Expert Cheater
Posts: 160
Joined: Wed Mar 08, 2017 3:18 pm
Reputation: 1

i need help with this LUA script

Post by bachou »

i have tried to contact the author but looks like he's been away for some time so i have to seek help here, pls take a look at this script

[ENABLE]

aobscanmodule(INJECT,srw30.exe,49 89 7C DD 08) // should be unique
alloc(newmem,$100,INJECT)

label(code)
label(return)

newmem:
cmp [rax+30],22D
jne code
mov [rax+30],3DF

code:
mov [r13+rbx*8+08],rdi
jmp return

INJECT:
jmp newmem
return:
registersymbol(INJECT)

[DISABLE]

INJECT:
db 49 89 7C DD 08

unregistersymbol(INJECT)
dealloc(newmem)

this replace 22D with 3DF, however i want this script to replace more than that, for example 253 replaced with 21E (along with 22D / 3DF)

could anyone show me how to do that ? i have tried create a second script then put 253 / 21E in but of course it didn't work, i couldn't enable the script

User avatar
Messy6666
Table Makers
Table Makers
Posts: 728
Joined: Fri Sep 25, 2020 5:45 pm
Reputation: 745

Re: i need help with this LUA script

Post by Messy6666 »

Code: Select all

newmem:
  cmp [rax+30], 22D
  jne @f
  mov [rax+30], 3DF
  jmp SHORT code
@@:
  cmp [rax+30],  253 
  jne code
  mov [rax+30],  21E

code:

ps. this ain't LUA

for a great assembly guide i borrowed this link from LeFiXER
[Link]

regards

bachou
Expert Cheater
Expert Cheater
Posts: 160
Joined: Wed Mar 08, 2017 3:18 pm
Reputation: 1

Re: i need help with this LUA script

Post by bachou »

thanks a lot it's working :wub:

bachou
Expert Cheater
Expert Cheater
Posts: 160
Joined: Wed Mar 08, 2017 3:18 pm
Reputation: 1

Re: i need help with this LUA script

Post by bachou »

i want to add more replacement, could you extend it ? 018 replace with 29F , 072 replaced with 12F
i tried to copy paste the later part but it doesn't work

User avatar
Messy6666
Table Makers
Table Makers
Posts: 728
Joined: Fri Sep 25, 2020 5:45 pm
Reputation: 745

Re: i need help with this LUA script

Post by Messy6666 »

i really suggest you try to first understand what is actually happening in the code.
ie. learn x86/x64 assembly.

so instead of doing it for you i will give an example on how to add more comparisons

try to analyze it so you will be able to add more yourself in the future

Image

gl & regards

Post Reply

Who is online

Users browsing this forum: No registered users