| View previous topic :: View next topic |
| Author |
Message |
Y.A.K.E Advanced Cheater
Reputation: 0
Joined: 15 Jul 2019 Posts: 56
|
Posted: Sun Oct 01, 2023 12:23 am Post subject: [Solved]Update tcheat components |
|
|
trainer cannot update the tchat component in real time.
cheat0 F1 Init (--option : moDeactivateChildrenAsWell)
cheat1 F2 inf. HP
cheat2 F3 inf. MP
I have activated all of them.
When I press F1 to deactivate 'Init'.
All memory records are deactivated.
But the trainer has not been updated.
test table:
| Code: |
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>0</ID>
<Description>"Init (--option : moDeactivateChildrenAsWell) "</Description>
<Options moDeactivateChildrenAsWell="1"/>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
[ENABLE]
_G['init']=1
[DISABLE]
_G['init']=0
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>112</Key>
</Keys>
<ID>0</ID>
<ActivateSound>Activate</ActivateSound>
<DeactivateSound>Deactivate</DeactivateSound>
</Hotkey>
</Hotkeys>
<CheatEntries>
<CheatEntry>
<ID>1</ID>
<Description>"Inf. HP"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
[ENABLE]
print('+ inf. hp')
[DISABLE]
print('- inf. hp')
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>113</Key>
</Keys>
<ID>0</ID>
<ActivateSound>Activate</ActivateSound>
<DeactivateSound>Deactivate</DeactivateSound>
</Hotkey>
</Hotkeys>
</CheatEntry>
<CheatEntry>
<ID>2</ID>
<Description>"Inf. MP"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
[ENABLE]
print('+ inf. mp')
[DISABLE]
print('- inf. mp')
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>114</Key>
</Keys>
<ID>0</ID>
<ActivateSound>Activate</ActivateSound>
<DeactivateSound>Deactivate</DeactivateSound>
</Hotkey>
</Hotkeys>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatTable>
|
I try usee the timer component, but it not working.
| Code: |
function CETrainer_CETimer1Timer(sender)
addresslist=getAddressList()
local t_index = 0
for i = 0, addresslist.getCount()-1 do
local tmp_mem = addresslist.getMemoryRecord(i)
local tmp_key = tmp_mem.getHotkeyByID(0) -- how to get getHotkeyByID(1) getHotkeyByID(n)
if tmp_key ~= nil then
local cheat= CETrainer.findComponentByName("CHEAT" .. t_index)
cheat.setActive(tmp_mem.Active)
t_index = t_index + 1
end
end
end
|
| Description: |
|
| Filesize: |
39.54 KB |
| Viewed: |
2393 Time(s) |

|
| Description: |
|
| Filesize: |
24.98 KB |
| Viewed: |
2393 Time(s) |

|
Last edited by Y.A.K.E on Wed Oct 11, 2023 12:06 pm; edited 1 time in total |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25827 Location: The netherlands
|
Posted: Sun Oct 01, 2023 12:49 am Post subject: |
|
|
instead of tcheat it's better to use 2 labels and adjust the color manually on activate/deactovate
anyhow, does the timer even run and what interval? (try adding some prints to see if it works)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
lontongmalam Newbie cheater
Reputation: 0
Joined: 13 Apr 2022 Posts: 17
|
Posted: Thu Oct 12, 2023 10:42 am Post subject: |
|
|
Try this
| Code: |
function createCustomTimer(callback)
local t = createTimer()
t.Interval = 200
t.onTimer = function()
if readInteger(process) == nil then -- destroy if no process
if t ~= nil then
t.Enabled = false
t.destroy()
t = nil
end
getAddressList().disableAllWithoutExecute()
process = nil
return
end
if callback ~= nil then
callback()
t.Interval = 500 -- slow down
end
end
t.Enabled = true
end
function CETrainer_CETimer1Timer(sender)
for i = 0, getAddressList().getCount()-1 do
local mr = getAddressList().getMemoryRecord(i)
local hk = mr.getHotkeyByID(0) -- how to get getHotkeyByID(1) getHotkeyByID(n)
if hk ~= nil then
local cheat = CETrainer.findComponentByName("CHEAT" .. mr.Index)
if cheat ~= nil then
cheat.setActive(mr.Active)
end
end
end
end
-- Use Auto Attach or manual execution
createCustomTimer(CETrainer_CETimer1Timer)
|
Or this
| Code: |
function createRecordCustomAction(mr)
if mr == nil then return end
local hk = mr.getHotkeyByID(0) -- how to get getHotkeyByID(1) getHotkeyByID(n)
if hk ~= nil then
local cheat = CETrainer.findComponentByName("CHEAT" .. mr.Index)
if cheat ~= nil then
mr.OnActivate = function(mr,before,currentstate)
cheat.setActive(mr.Active)
return true
end
mr.OnDeactivate = function(mr,before,currentstate)
cheat.setActive(mr.Active)
return true
end
end
end
end
function CETrainer_CETimer1Timer(sender)
for i = 0, getAddressList().getCount()-1 do
local mr = getAddressList().getMemoryRecord(i)
createRecordCustomAction(mr)
end
end
-- Use Auto Attach or manual execution
CETrainer_CETimer1Timer()
|
|
|
| Back to top |
|
 |
|