吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 852|回复: 0
收起左侧

[讨论] Cheat Engine教程:对步骤2教程的脚本另类写法

[复制链接]
losemao 发表于 2023-6-27 09:19
如何找关键代码就不说了,网上太多了,这里写了2个小脚本供大家消遣一下:
  脚本1:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
{$luacode playerbase=ebx testparam=eax}
printf("Tutorial hit me called.  testparam=%d",testparam)
writeInteger(playerbase+0x4AC,1000)
{$asm}
jmp returnhere
originalcode:


exit:
jmp returnhere

"Tutorial-i386.exe"+2578F:
jmp newmem
nop
returnhere:




[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Tutorial-i386.exe"+2578F:
db 29 83 AC 04 00 00
//sub [ebx+000004AC],eax

脚本2:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
{$CCODE playerbase=ebx newhealth=eax}
*(int*)(playerbase+0x4AC)=1000;
  newhealth=0;
{$ASM}
originalcode:
sub [ebx+000004AC],eax

exit:
jmp returnhere

"Tutorial-i386.exe"+2578F:
jmp newmem
nop
returnhere:




[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Tutorial-i386.exe"+2578F:
db 29 83 AC 04 00 00
//sub [ebx+000004AC],eax

代码很简单,一个用lua,一个用c,具体就不解释了。

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-22 13:47

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表