Hy6axa How do I cheat?
Reputation: 0
Joined: 28 Jul 2015 Posts: 1
|
Posted: Thu Jul 30, 2015 5:37 pm Post subject: activate script on checkbox |
|
|
Hi, I have a problem with chekbox (cheat component) in lua trainer. I watched many topicks on this forum but still can't do it. How to make this script activated on checkbox? When i use it got error "Error:Invalid class object"
I use this code:
| Code: | function CECheckbox1Change(sender)
if (checkbox_getState(CETrainer.CECheckbox1) == 1) then
CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
memoryrecord_freeze(CheatEntry)
else
CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
memoryrecord_unfreeze(CheatEntry)
end
end |
and this script:
| Code: | [ENABLE]
aobscan(INJECT,8B B6 10 03 00 00 8B) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
mov dword ptr [esi+00000310],186A0
fild dword ptr [esi+00000310]
jmp return
INJECT:
jmp code
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 8B B6 10 03 00 00
unregistersymbol(INJECT)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: 0E4FC2D6
0E4FC29F: 89 8D E4 FD FF FF - mov [ebp-0000021C],ecx
0E4FC2A5: A1 88 58 39 00 - mov eax,[00395888]
0E4FC2AA: 05 E0 FC FF FF - add eax,FFFFFCE0
0E4FC2AF: A3 BC 59 39 00 - mov [003959BC],eax
0E4FC2B4: C7 05 C4 59 39 00 00 00 A0 41 - mov [003959C4],41A00000
0E4FC2BE: A1 00 3D C7 04 - mov eax,[04C73D00]
0E4FC2C3: 8B 15 C4 58 39 00 - mov edx,[003958C4]
0E4FC2C9: 3B 50 04 - cmp edx,[eax+04]
0E4FC2CC: 0F 83 81 1B 00 00 - jae 0E4FDE53
0E4FC2D2: 8B 74 90 0C - mov esi,[eax+edx*4+0C]
// ---------- INJECTING HERE ----------
0E4FC2D6: 8B B6 10 03 00 00 - mov esi,[esi+00000310]
// ---------- DONE INJECTING ----------
0E4FC2DC: 8B C6 - mov eax,esi
0E4FC2DE: BF 14 00 00 00 - mov edi,00000014
0E4FC2E3: 99 - cdq
0E4FC2E4: F7 FF - idiv edi
0E4FC2E6: 8B F8 - mov edi,eax
0E4FC2E8: 8D 86 70 FE FF FF - lea eax,[esi-00000190]
0E4FC2EE: B9 05 00 00 00 - mov ecx,00000005
0E4FC2F3: 99 - cdq
0E4FC2F4: F7 F9 - idiv ecx
0E4FC2F6: 89 45 F0 - mov [ebp-10],eax
} | - it's from terraria, working good but idk what to do with that error
p.s. sorry for my bad english
Last edited by Hy6axa on Thu Jul 30, 2015 7:59 pm; edited 5 times in total |
|