|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
kentpachi1 Newbie cheater Reputation: 0
Joined: 16 Jun 2014 Posts: 15
|
Posted: Fri Apr 19, 2024 2:42 am Post subject: box button that target process bug, keypress script bug |
|
|
Good day everyone, I pray anyone could help me on my simple problem.
I currently have 2 issues regarding lua script and cant find solution for this
first, the auto select process script is not working if there is a number on the process name
first this is the code
Code: |
if getOpenedProcessID() then openProcess(getOpenedProcessID()) end
dbk_writesIgnoreWriteProtection(true)
function AOBRep(search, change)
local aob = AOBScan(search)
if aob then
for i=0,aob.Count-1 do
autoAssemble(aob[i]..':\ndb '..change)
end
aob.Destroy()
end
end
EmuForm = createForm(true)
EmuForm.Caption = 'Select Emulator'
EmuForm.Width = 300
EmuForm.Height = 60
EmuForm.Left = 170
function ld9player()
emu= "Ld9BoxHeadless"
startmenu()
end
EmuButton1 = createButton(EmuForm)
EmuButton1.Left = 10
EmuButton1.Top = 10
EmuButton1.Width = 110
EmuButton1.Height = 40
EmuButton1.onClick = ld9player
EmuButton1.Caption = 'ldplayer'
function startmenu()
local p = io.popen('tasklist /fi "IMAGENAME eq '..emu..'.exe" /fi "MEMUSAGE gt 30000" /nh', 'r');
local procInfo = p:read('*a');
local pid = procInfo:match('%d+');
pid = tonumber(pid);
if(pid == nil)then
messageDialog("You Must Start The Game First!", mtWarning, mbOK)
closeCE()
else
openProcess(pid)
|
theres a 1 button and if you press it, CE will attach on that process, it will work for example, if the name is pure words but in my case, its Ld9boxheadless, and it wont attached at all.
second issue lua script
I ahve an AoB changing, instead of pressing the button, i decide to set it on a key to activate but if if my script have 2 or more keys set, it wont work at all.
example code
Code: |
function oten()
searchV = '?? ?? ?? ?? EC 51 A8 3D 00 C0 10 3F'
replaceV = '?? ?? ?? ?? 00 00 00 40 00 00 00 3F'
AOBRep(searchV,replaceV)
if drnkey then drnkey.Destroy() drnkey=nil end
drnkey = createHotkey(oten, VK_F1)
function bilat()
searchV = '?? ?? ?? ?? 00 00 D8 42 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 00 40 00 0B D4 23 1E'
replaceV = '?? ?? ?? ?? ?? ?? ?? ?? f4 fd 54 3c ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 25 06 81 3d'
AOBRep(searchV,replaceV)
end
if drnkey then drnkey.Destroy() drnkey=nil end
drnkey = createHotkey(bilat, VK_F2)
|
in this example i have 2 AoB script
F1 and F2 but when i play the game and click F2, it doesnt activate at all, only the F1 script works.
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 33
Joined: 16 Feb 2017 Posts: 1307
|
Posted: Fri Apr 19, 2024 5:30 am Post subject: |
|
|
Check this out:
Code: | if getOpenedProcessID() then openProcess(getOpenedProcessID()) end
dbk_writesIgnoreWriteProtection(true)
function AOBRep(search, change)
local aob = AOBScan(search)
if aob then
for i=0,aob.Count-1 do
autoAssemble(aob[i]..':\ndb '..change)
end
aob.Destroy()
end
end
if EmuForm then EmuForm.Destroy() end
EmuForm = createForm(true)
EmuForm.Caption = 'Select Emulator'
EmuForm.Width = 300
EmuForm.Height = 60
EmuForm.Left = 170
--function ld9player()
emu = "cheatengine-x86_64"
--startmenu()
--end
EmuButton1 = createButton(EmuForm)
EmuButton1.Left = 10
EmuButton1.Top = 10
EmuButton1.Width = 110
EmuButton1.Height = 40
EmuButton1.Caption = 'ldplayer'
function startmenu()
local p = io.popen('tasklist.exe /fi "IMAGENAME eq '..emu..'.exe" /fi "MEMUSAGE gt 30000" /nh', 'r');
local procInfo = p:read('*a');
local pid = procInfo:match(' (%d+) ');
pid = tonumber(pid);
if(pid == nil)then
messageDialog("You Must Start The Game First!", mtWarning, mbOK)
--closeCE()
else
openProcess(pid)
end
end
EmuButton1.onClick = startmenu |
and keys
Code: | if drnkey1 then drnkey1.Destroy() drnkey1=nil end
drnkey1 = createHotkey(oten, VK_F1)
if drnkey2 then drnkey2.Destroy() drnkey2=nil end
drnkey2 = createHotkey(bilat, VK_F2)
if drnkey3 then drnkey3.Destroy() drnkey3=nil end
drnkey3 = createHotkey(whatewer, VK_F3) |
_________________
|
|
Back to top |
|
|
kentpachi1 Newbie cheater Reputation: 0
Joined: 16 Jun 2014 Posts: 15
|
Posted: Fri Apr 19, 2024 7:41 am Post subject: |
|
|
AylinCE wrote: | Check this out:
Code: | if getOpenedProcessID() then openProcess(getOpenedProcessID()) end
dbk_writesIgnoreWriteProtection(true)
function AOBRep(search, change)
local aob = AOBScan(search)
if aob then
for i=0,aob.Count-1 do
autoAssemble(aob[i]..':\ndb '..change)
end
aob.Destroy()
end
end
if EmuForm then EmuForm.Destroy() end
EmuForm = createForm(true)
EmuForm.Caption = 'Select Emulator'
EmuForm.Width = 300
EmuForm.Height = 60
EmuForm.Left = 170
--function ld9player()
emu = "cheatengine-x86_64"
--startmenu()
--end
EmuButton1 = createButton(EmuForm)
EmuButton1.Left = 10
EmuButton1.Top = 10
EmuButton1.Width = 110
EmuButton1.Height = 40
EmuButton1.Caption = 'ldplayer'
function startmenu()
local p = io.popen('tasklist.exe /fi "IMAGENAME eq '..emu..'.exe" /fi "MEMUSAGE gt 30000" /nh', 'r');
local procInfo = p:read('*a');
local pid = procInfo:match(' (%d+) ');
pid = tonumber(pid);
if(pid == nil)then
messageDialog("You Must Start The Game First!", mtWarning, mbOK)
--closeCE()
else
openProcess(pid)
end
end
EmuButton1.onClick = startmenu |
and keys
Code: | if drnkey1 then drnkey1.Destroy() drnkey1=nil end
drnkey1 = createHotkey(oten, VK_F1)
if drnkey2 then drnkey2.Destroy() drnkey2=nil end
drnkey2 = createHotkey(bilat, VK_F2)
if drnkey3 then drnkey3.Destroy() drnkey3=nil end
drnkey3 = createHotkey(whatewer, VK_F3) |
|
well done all working perfectly, thank you
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|