View previous topic :: View next topic |
Author |
Message |
Derpicus Newbie cheater Reputation: 1
Joined: 30 Mar 2016 Posts: 15
|
Posted: Wed Mar 30, 2016 8:49 pm Post subject: CT Script -> Trainer Checkbox |
|
|
I've manually designed a trainer and have working scripts; the question is how to assign the scripts to a checkbox OnChange event.
Code: |
[Enable]
alloc(skill_id_hook,128)
label(skill_id_return)
alloc(delay,4)
define(skill_id, #142120030)
delay:
dw 0
016FE8B7:
db 90 90 90 90 90 90
016FE8C3:
db 90 90 90 90 90 90
016FE91B:
db 90 E9
016FEA10:
jmp skill_id_hook
nop
skill_id_return:
skill_id_hook:
inc [delay]
cmp dword ptr [delay], #1
jne skill_id_return
mov [delay], 0
mov edx,skill_id
jmp skill_id_return
016FEAAA:
db 90 90 90 90 90 90
016FEAB7:
jmp 016FEAEB
dw 9090
[Disable]
016FE8B7:
db 0F 84 DE 02 00 00
016FE8C3:
db 0F 88 D2 02 00 00
016FE91B:
db 0F 84 CB 00 00 00
016FEA10:
mov edx,[esi+0000D264]
016FEAAA:
db 0F 87 E3 00 00 00
016FEAB7:
jmp dword ptr [ecx*4+016FEBA4]
dealloc(skill_id_hook) |
Hotkeys are not acceptable for this trainer; is there a way to use the CT scripts from a checkbox in a trainer? I've looked up guides on converting scripts to LUA and couldn't find anything substantial, aside from 2-3 line basics. If you can point me in the right direction or convert this ... all of my other scripts use the above lines. I'm really wanting to learn, so please point me in the right direction. Thanks And if there's a way to just use the scripts from the CT without converting them ... that's even better!
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Mar 30, 2016 9:37 pm Post subject: |
|
|
Code: | function CheckBoxOnChange(sender)
getAddressList().getMemoryRecordByDescription("Script Description").Active = sender.Checked
end |
|
|
Back to top |
|
|
Derpicus Newbie cheater Reputation: 1
Joined: 30 Mar 2016 Posts: 15
|
Posted: Wed Mar 30, 2016 9:48 pm Post subject: |
|
|
Zanzer wrote: | Code: | function CheckBoxOnChange(sender)
getAddressList().getMemoryRecordByDescription("Script Description").Active = sender.Checked
end |
|
You are a literal saint; thank you SO much for your help! Do you have any suggestions for me to learn to convert things like this to Lua? Even though I have a resolution, thanks to you, I'd love to learn to convert things like this. Much love, though, man; you have no idea how happy I am rn.
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Mar 30, 2016 10:43 pm Post subject: |
|
|
Code: |
enable_mycheat = [[
alloc(skill_id_hook,128)
label(skill_id_return)
alloc(delay,4)
define(skill_id, #142120030)
delay:
dw 0
016FE8B7:
db 90 90 90 90 90 90
016FE8C3:
db 90 90 90 90 90 90
016FE91B:
db 90 E9
016FEA10:
jmp skill_id_hook
nop
skill_id_return:
skill_id_hook:
inc [delay]
cmp dword ptr [delay], #1
jne skill_id_return
mov [delay], 0
mov edx,skill_id
jmp skill_id_return
016FEAAA:
db 90 90 90 90 90 90
016FEAB7:
jmp 016FEAEB
dw 9090
]]
disable_mycheat = [[
016FE8B7:
db 0F 84 DE 02 00 00
016FE8C3:
db 0F 88 D2 02 00 00
016FE91B:
db 0F 84 CB 00 00 00
016FEA10:
mov edx,[esi+0000D264]
016FEAAA:
db 0F 87 E3 00 00 00
016FEAB7:
jmp dword ptr [ecx*4+016FEBA4]
dealloc(skill_id_hook)
]]
function CheckBoxOnChange(sender)
if sender.Checked then
autoAssemble(enable_mycheat)
else
autoAssemble(diasble_mycheat)
end
end |
|
|
Back to top |
|
|
|