I'm adding one more script to the "one hit kill code" which should get rid of any armor some enemies have. Before I could just one shot people without armor and the armor needed to be depleted normally, this time I can directly pulverise the target, but there's a catch.
I am using a onehitkill flag which, when set to 1, makes my script jump to the section where the code zeroes the armor, otherwise it just behaves normally, however the script, once activated, just sets the armor to 0, ignoring the flag I added.
The opcode has been obtained by moving by +2E from the initial AOBScan, as that specific opcode doesn't have an unique AOB and therefore I played it safe by landing on the beginning of the instruction and then changing offset.
Code: Select all
Armor_Data_mem:
cmp [OneHitKill],1
je code_onehit_armor
jmp code_armor
code_onehit_armor:
push eax
mov eax,(float)0
cvtsi2ss xmm0,eax
pop eax
jmp code_armor
code_armor:
movss [rcx+20],xmm0
mov [target_armor_health],rcx
jmp return_armor
Armor_Data_AOB+2E:
jmp Armor_Data_mem
return_armor:
Instruction before jumping
Instruction after jumping
The opcode I'm altering is this:
Code: Select all
Soulstice.exe+F0020E - F3 0F11 41 20 - movss [rcx+20],xmm0
Thank you very much for your help, looking forward to your reply.