This is my code for money:
The Script crashes my game instantly, I wanted to ask is my Script wrong? Or could it be that everything is accessing the same instruction such like in Shadow Warrior 2 so I need to use String to make a Script here?
Code:
[ENABLE]
aobscan(aobMoney,DD 5E 20 8B 05 78 8F 88 06)
alloc(newmem,$100)
label(code)
label(return)
alloc(Money,4)
newmem:
Money:
dq (double)9999999
code:
fld qword ptr [Money]
fstp qword ptr [esi+20]
mov eax,[06888F78]
jmp return
aobMoney:
jmp newmem
nop
nop
nop
nop
return:
registersymbol(aobMoney)
[DISABLE]
aobMoney:
db DD 5E 20 8B 05 78 8F 88 06
unregistersymbol(aobMoney)
dealloc(newmem)
dealloc(Money)
{
// ORIGINAL CODE - INJECTION POINT: 46A0319C
""+46A03167: 8B 75 08 - mov esi,[ebp+08]
""+46A0316A: C7 45 CC 00 00 00 00 - mov [ebp-34],00000000
""+46A03171: C7 45 D0 00 00 00 00 - mov [ebp-30],00000000
""+46A03178: C7 45 D4 00 00 00 00 - mov [ebp-2C],00000000
""+46A0317F: C7 45 D8 00 00 00 00 - mov [ebp-28],00000000
""+46A03186: C7 45 DC 00 00 00 00 - mov [ebp-24],00000000
""+46A0318D: C7 45 E0 00 00 00 00 - mov [ebp-20],00000000
""+46A03194: DD 46 20 - fld qword ptr [esi+20]
""+46A03197: DD 45 0C - fld qword ptr [ebp+0C]
""+46A0319A: DE C1 - faddp
// ---------- INJECTING HERE ----------
""+46A0319C: DD 5E 20 - fstp qword ptr [esi+20]
""+46A0319F: 8B 05 78 8F 88 06 - mov eax,[06888F78]
// ---------- DONE INJECTING ----------
""+46A031A5: 0F B6 80 D8 00 00 00 - movzx eax,byte ptr [eax+000000D8]
""+46A031AC: 85 C0 - test eax,eax
""+46A031AE: 0F 85 BB 00 00 00 - jne 46A0326F
""+46A031B4: 8D 46 40 - lea eax,[esi+40]
""+46A031B7: 8B 08 - mov ecx,[eax]
""+46A031B9: 89 4D CC - mov [ebp-34],ecx
""+46A031BC: 8B 40 04 - mov eax,[eax+04]
""+46A031BF: 89 45 D0 - mov [ebp-30],eax
""+46A031C2: 0F B6 45 D0 - movzx eax,byte ptr [ebp-30]
""+46A031C6: 85 C0 - test eax,eax
}
The Script crashes my game instantly, I wanted to ask is my Script wrong? Or could it be that everything is accessing the same instruction such like in Shadow Warrior 2 so I need to use String to make a Script here?