Page 1 of 1

[Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Thu Aug 06, 2020 2:44 pm
by Evoked100
How to enable/disable script using lua?

exemple o mark checkbox set value float "10000"

disable set value float "50"

Image

i have sarch this code not working:

Code: Select all

function fov() --increase distance view
  if main.fov.checked==true then
    writeFloat("[trove.exe+0106FBB8]+4",10000)
  end
end

function float() --increase distance view
    writeFloat("[trove.exe+0106FBB8]+4",50)
end
and for OAB Script? how to Enable/Disable?

my code script :

Code: Select all

[ENABLE]

aobscanmodule(jumper,trove.exe,FF 46 3C 68) // should be unique
alloc(newmem,$1000)

label(code)

newmem:

code:
  inc [esi+3C]
  push trove.exe+C2080C

jumper:
 dec [esi+3C]
 return:
registersymbol(jumper)

[DISABLE]

jumper:
  db FF 46

unregistersymbol(jumper)
dealloc(newmem)

Re: [Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Thu Aug 06, 2020 2:45 pm
by Evoked100
thanks for read and help-me!!

Re: [Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Sun May 28, 2023 7:18 am
by Pitronic
how to write this code with these commands in lua?

CETrainer.CECheckbox1
enableInfiniteHealthCheat()
disableInfiniteHealthCheat()


CETrainer.CECheckbox2
enableInfiniteAmoCheat()
disableInfiniteAmoCheat()

Re: [Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Mon May 29, 2023 7:31 pm
by tdg6661
Hmm, wrong section. You should post it in here: viewforum.php?f=14

Anyway,

Code: Select all

main.fov.OnChange = function(sender)
	local addr = getAddressSafe("[trove.exe+0106FBB8]+4")
	if addr == nil then return end

	if sender.checked then
		writeFloat(addr,10000)
	else
		writeFloat(addr,50)
	end
end

Re: [Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Mon May 29, 2023 7:34 pm
by tdg6661
Pitronic wrote:
Sun May 28, 2023 7:18 am
how to write this code with these commands in lua?

CETrainer.CECheckbox1
enableInfiniteHealthCheat()
disableInfiniteHealthCheat()


CETrainer.CECheckbox2
enableInfiniteAmoCheat()
disableInfiniteAmoCheat()

Code: Select all

CETrainer.CECheckbox1.OnChange = function(sender)
	if sender.checked then
		enableInfiniteHealthCheat()
	else
		disableInfiniteHealthCheat()
	end
end
And so on..

Re: [Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Tue Jun 06, 2023 7:23 am
by Pitronic
tdg6661 wrote:
Mon May 29, 2023 7:34 pm
Pitronic wrote:
Sun May 28, 2023 7:18 am
how to write this code with these commands in lua?

CETrainer.CECheckbox1
enableInfiniteHealthCheat()
disableInfiniteHealthCheat()


CETrainer.CECheckbox2
enableInfiniteAmoCheat()
disableInfiniteAmoCheat()

Code: Select all

CETrainer.CECheckbox1.OnChange = function(sender)
	if sender.checked then
		enableInfiniteHealthCheat()
	else
		disableInfiniteHealthCheat()
	end
end
And so on..
Eror
[Link]
table [Link]

Re: [Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Tue Jun 06, 2023 8:53 am
by tdg6661
Pitronic wrote:
Tue Jun 06, 2023 7:23 am

Eror
[Link]
table [Link]
Yes. Because the function enableInfiniteHealthCheat() was not defined. Make it first then you can use that code above.

Code: Select all

function enableInfiniteHealthCheat()
	-- Your script is here
end
Here, like this

Code: Select all

CETrainer.CECheckbox1.OnChange = function(sender)
	local mr = getAddressList().getMemoryRecordByID(1)
	if mr == nil then return end

	if sender.checked then
		mr.Active = true
	else
		mr.Active = false
	end
end

Re: [Help] CheckBox Lua Cheat Engine Enable/Disable

Posted: Tue Jun 06, 2023 9:23 am
by Pitronic
tdg6661 wrote:
Tue Jun 06, 2023 8:53 am
Pitronic wrote:
Tue Jun 06, 2023 7:23 am

Eror
[Link]
table [Link]
Yes. Because the function enableInfiniteHealthCheat() was not defined. Make it first then you can use that code above.

Code: Select all

function enableInfiniteHealthCheat()
	-- Your script is here
end
Here, like this

Code: Select all

CETrainer.CECheckbox1.OnChange = function(sender)
	local mr = getAddressList().getMemoryRecordByID(1)
	if mr == nil then return end

	if sender.checked then
		mr.Active = true
	else

		mr.Active = false
		
	end
end
function enable Infinite Health Cheat()
-- Your script is here
end
I don't need the code for enable Infinite Health Cheat() I need the code for this command here is the source [Link] ... oassemble/
In other words, you need to execute two commands. If the check mark is on the checkbox, execute the command
enable Infinite Health Cheat()
CETrainer.CHEAT 0.SetActive(true)
if the check mark is not on the checkbox, execute the command
disable Infinite Health Cheat()
CETrainer.CHEAT 0.SetActive(false)