Posted: Mon Aug 02, 2021 8:31 am Post subject: En/disable script and set address freeze status with script
I have a cheat table with Lua scripts and was wondering if there was a way I could enable or disable these scripts with another script to create defaults and profiles which quickly set and freeze values and enable scripts while still allowing me to manually go through and hand pick what I want.
function toggleScript(x)
if x ~= nil then
x.Active = not x.Active
if x.Active == true then
x.Color = 0x00AA00
else
x.Color = 0x0000AA
end
end
end
function getMemRec(s)
local al = getAddressList()
local s = al.getMemoryRecordByDescription(s)
if s ~= nil then
return s
else
error(showMessage("Couldn't find the script :("))
end
end
autoAssemble(script1,true)
autoAssemble(script2,true)
end
function allOnHack()
onHack1()
--onHack2()
--onHack3()
end
or Lua Script onHack AddressList;
Code:
local activeIndx=0
function onHack1()
hack1=getAddressList().getMemoryRecordByDescription("YouHackDesc")
hack2=getAddressList().getMemoryRecordByDescription("YouHackDesc")
if activeIndx==0 then
hack1.Active=true
hack2.Active=true
--print(activeIndx)
activeIndx=1
else
hack1.Active=false
hack2.Active=false
--print(activeIndx)
activeIndx=0
end
end
To activate and deactivate all commands in the Address List;
Right click on the Address List and create a group and collect all addresses into that group.
Of course, right-click on the group name and choose what it should do.
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