Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How can I automate this?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
johnzin
How do I cheat?
Reputation: 0

Joined: 05 Oct 2021
Posts: 1

PostPosted: Tue Oct 05, 2021 4:47 pm    Post subject: How can I automate this? Reply with quote

I want every time I press F2 it will do a first scan with string 1032055116 it will get all the results and edit all values to 32055116, anyone can help me with this?
Back to top
View user's profile Send private message
DxKE
How do I cheat?
Reputation: 0

Joined: 30 Sep 2021
Posts: 7

PostPosted: Tue Oct 12, 2021 3:29 pm    Post subject: Reply with quote

Code:
function dxkebinary(x, y)
    if
    local scan = createMemScan(true)
    scan.setOnlyOneResult(false)
    scan.firstScan(
        soExactValue,
        vtBinary,
        rtRounded,
        x,
        nil,
        0,
        0xffffffffffffffff,
        "",
        fsmNotAligned,
        nil,
        false,
        true,
        false,
        false
    )
    scan.waitTillDone()

    --Fetch result
    local FoundList = createFoundList(scan)
    FoundList.initialize()

    --Overwite
    for i = 0, FoundList.Count - 1 do
        --print(FoundList.Address[i]);
        writeInteger(FoundList.Address[i], y)
    end
    return true
end



You can use this as a base and convert it to scan for string instead of binary. Check celua.txt .
Then call this function with a hotkey like this
Code:

createHotkey(
  function(sender)
  dxkebinary(x,y)
end, VK_F2)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites