 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
sandsmaster Newbie cheater
Reputation: 1
Joined: 21 Jan 2021 Posts: 24
|
Posted: Sun Jul 25, 2021 7:36 am Post subject: Can't enable script with external symbols |
|
|
Hi everyone.
I'm trying to use a flag-symbol to set a one-hit-kill cheat, but I need to use the symbol in 2 separate scripts (because the enemies have shields and HP). I tried this:
Code: | alloc(newmem,$100,INJECTShield)
label(code)
label(return)
label(me)
newmem:
code:
mulss xmm1,[rbx+000000F0]
//new code
cmp [rax+C4],0
je me
pushf
cmp [ohk_flag],0
je code+12
mov [rbx+F0],0
popf
jmp return
me:
cmp [shield_flag],0
je return
mov [rbx+F0],(float)125
jmp return
|
and are defined in another script, just for that:
Code: | [ENABLE]
alloc(symb_mem,$10)
label(hp_flag)
label(shield_flag)
label(ohk_flag)
registersymbol(hp_flag)
registersymbol(shield_flag)
registersymbol(ohk_flag)
symb_mem:
hp_flag:
dd #0
shield_flag:
dd #0
ohk_flag:
dd #0
[DISABLE]
unregistersymbol(hp_flag)
unregistersymbol(shield_flag)
unregistersymbol(ohk_flag)
dealloc(symb_mem) |
The problem is, when I try to enable both scripts, the symbols' script works, but the main shield's cheat doesn't work. It's probably something really simple, but any help would be appreciated.
Thanks beforehand.
EDIT: Everything works without the symbols in the script. The first one is just a crop. Inserting them prevents the script from activating. _________________
I don't post too much. yet. |
|
Back to top |
|
 |
TheyCallMeTim13 Wiki Contributor
Reputation: 51
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jul 25, 2021 8:00 am Post subject: |
|
|
Why not put these in the same script? But to keep them seperate you would need to enable the one that declares them first then the script that uses them. _________________
|
|
Back to top |
|
 |
Birdi Expert Cheater
Reputation: 0
Joined: 08 Jun 2020 Posts: 124 Location: Migrating
|
Posted: Sun Jul 25, 2021 12:57 pm Post subject: |
|
|
Combining them would be easiest, as Tim said.
If you share the full original script I can help more directly.
For now, here's an example script:
Code: |
[ENABLE]
aobscanmodule(GodMode,xgameFinal.exe,F3 0F 11 87 A0 03 00 00 BA)
alloc(newmem,$1000,GodMode)
registersymbol(OHKO_toggle) //define a toggle
registersymbol(killShot) //you can also just use Define if you don't care about editing this value later,or hardcode a mov m32/xmm,0
label(code)
label(return)
newmem:
cmp dword ptr [rdi+8C],1 //Player Check
jne code
movss xmm0,[rdi+000003A0]
movss [rdi+000003A0],xmm0 //HP doesn't move, but updates because xmm register is expected to hold a similar value for rest of function..
jmp return
code:
cmp [OHKO_toggle],1 //Enemy Section: OHKO or not
jne @f
movss xmm0,[killShot] //Sets HP to 0 if toggled on
@@:
movss [rdi+000003A0],xmm0 //Updates HP of enemy
jmp return
OHKO_toggle: //A single byte, 0 or 1 boolean for Off/On
db 0
killShot: //Again, can just be Define() if you don't want to edit this
dd (float)0.0
GodMode:
jmp newmem
nop 3
return:
registersymbol(GodMode)
[DISABLE]
GodMode:
db F3 0F 11 87 A0 03 00 00
unregistersymbol(OHKO_toggle)
unregistersymbol(killShot)
unregistersymbol(GodMode)
dealloc(newmem)
|
With this, you can add the Toggle symbol to your table and give it a DropDownList with values you want...
Code: |
0:OHKO Off
1:OHKO On
|
This can be useful if you want to do a bunch of different options to modify damage or something...
Code: |
{
0:Normal Enemies, Normal Players
1:Normal Enemies, Multiplier on Players
2:Normal Enemies, Chip-Damage Players
3:Normal Enemies, Godmode Players
4:OHKO Enemies, Normal Players
5:OHKO Enemies, Multiplier on Players
6:OHKO Enemies, Chip-Damage Players
7:OHKO Enemies, Godmode Players
8:Multiplier on Enemies, Normal Players
9:Multiplier on Enemies, Multiplier on Players
10:Multiplier on Enemies, Chip-Damage Players
11:Multiplier on Enemies, Godmode Players
12:Heal Everything
}
newmem:
cmp [toggle_on],0 {0: Normal Enemies, Normal Players}
je do_NN
cmp [toggle_on],1 {1: Normal Enemies, Multiplier on Players}
je do_NH
cmp [toggle_on],2 {2: Normal Enemies, Chip-Damage Players}
je do_NC
cmp [toggle_on],3 {3: Normal Enemies, Godmode Players}
je do_NG
cmp [toggle_on],4 {4: OHKO Enemies, Normal Players}
je do_ON
cmp [toggle_on],5 {5: OHKO Enemies, Multiplier on Players}
je do_OH
cmp [toggle_on],6 {6: OHKO Enemies, Chip-Damage Players}
je do_OC
cmp [toggle_on],7 {7: OHKO Enemies, Godmode Players}
je do_OG
cmp [toggle_on],8 {8: Multiplier on Enemies, Normal Players}
je do_MN
cmp [toggle_on],9 {9: Multiplier on Enemies, Multiplier on Players}
je do_MH
cmp [toggle_on],A {A (10): Multiplier on Enemies, Chip-Damage Players}
je do_MC
cmp [toggle_on],B {B (11): Multiplier on Enemies, Godmode Players}
je do_MG
jmp do_fullheal {C (12)+: Heal Everything} |
...or you can simply toggle it on or off using a Lua subscript (hidden when primary is disabled):
Code: |
[ENABLE]
{$LUA}
writeInteger("OHKO_toggle",1)
{$ASM}
[DISABLE]
{$LUA}
writeInteger("OHKO_toggle",0)
{$ASM}
|
|
|
Back to top |
|
 |
|
|
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
|
|