-
Notifications
You must be signed in to change notification settings - Fork 0
/
The Swords of Ditto.lua
55 lines (46 loc) · 1.87 KB
/
The Swords of Ditto.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--shellExecute([["C:\DATA\Games\The_Swords_of_Ditto.exe"]]); --open the game
getAutoAttachList().add('The_Swords_of_Ditto.exe') --ce will now watch the process
function onOpenProcess(pid)
local t=createTimer()
t.OnInterval=7000 --wait 7 seconds to let the game load (change this accordingly. If it's a cheat that needs to be activated after loading a game, set it to a minute or two)
t.OnTimer=function(x)
local al=getAddressList()
al.getMemoryRecordByDescription('Enable').Active=true
al.getMemoryRecordByDescription('Scripts').Active=true
al.getMemoryRecordByDescription('Stop Timer').Active=true
x.destroy() --the timer is not needed anymore
end
end
local t=createTimer(MainForm)
t.Interval=1000
t.OnTimer=function()
if getOpenedProcessID()~=0 and readInteger(process)==nil then
t.destroy()
closeCE()
end
end --check every second if the game is running, if not, close CE
--CETrainer.hide()
--TRAINERGENERATORSTART--
--This is autogenerated code. Changing code in this block will
--get erased and rewritten if you regenerate the trainer code
--Uncomment the following line if this is a Cheat Table format trainer and you don't want CE to show (Tip, save as .CETRAINER alternatively)
--hideAllCEWindows()
--RequiredCEVersion=7.3
--if (getCEVersion==nil) or (getCEVersion()<RequiredCEVersion) then
--messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
--closeCE()
--end
getAutoAttachList().add("The_Swords_of_Ditto.exe")
gPlaySoundOnAction=false
--CETrainer.fixDPI() --remove this if you have already taken care of DPI issues yourself
--CETrainer.show()
function AboutClick()
showMessage(gAboutText)
end
gAboutText=[[]]
function CloseClick()
--called by the close button onClick event, and when closing the form
closeCE()
return caFree --onClick doesn't care, but onClose would like a result
end
--TRAINERGENERATORSTOP--