|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Detrimantix How do I cheat? Reputation: 0
Joined: 16 Sep 2016 Posts: 3
|
Posted: Wed Sep 16, 2020 4:04 pm Post subject: Looping a script. And reversing changes on disable. |
|
|
So basically I want to loop this script so that it constantly replaces bytes if found. At the moment it replaces them but only once, if new instances are created I have to re-enable the script. I tried adding a timer but I couldn't figure out how to loop it properly. Can anyone who is more versed in lua help?
Code: |
{$lua}
if syntaxcheck then return end
[ENABLE]
resultList = AOBScan(" ")
if not resultList then error("Failed to find AOB") end
lngt = resultList.getCount()
bytes = {}
for x=0, lngt-1 do
bytes[x] = readBytes(resultList[x], 10, true)
writeBytes(resultList[x], 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
end
[DISABLE]
for x=0, lngt-1, 1 do
writeBytes(resultList[x], bytes[x])
end
resultList.Destroy()
|
|
|
Back to top |
|
|
ProB1 Advanced Cheater Reputation: 0
Joined: 20 Jul 2019 Posts: 77 Location: At Home
|
Posted: Wed Sep 23, 2020 10:05 pm Post subject: |
|
|
i did make like getAddressList().getMemoryRecordByDescription
but i think you can make like same loop
Code: |
{$lua}
[ENABLE]
if syntaxCheck then return end
(lol) = createThread(function(Thread)
while true do
if Thread.Terminated then break end -- breaks loops and allows function to end
sleep() -- interval
memrec = getAddressList().getMemoryRecordByDescription
memrec(" ").Value =
sleep( )
memrec = getAddressList().getMemoryRecordByDescription
memrec(" ").Value =
end
end)
[DISABLE]
(lol).terminate()
|
_________________
Hitler Hey im Back
Discord: ProB1#0100 |
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Thu Sep 24, 2020 12:52 am Post subject: |
|
|
Why I am fell ever seen this same topic somewhere before?
Add flags (i.e: "+W*X-C"), example:
Code: | resultList = AOBScan("00 FF 00 FF", "+W*X-C")
if (resultList) then
lngt = resultList.getCount()
for x=0, lngt-1, 1 do
writeBytes(resultList[x], 0x90, 0x90, 0x90, 0x90)
end
resultList.Destroy()
resultList = nil
end |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
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
|
|