View previous topic :: View next topic |
Author |
Message |
sambushme How do I cheat? Reputation: 0
Joined: 12 Mar 2017 Posts: 4
|
Posted: Tue Mar 14, 2017 12:34 pm Post subject: How to read a value and update a Label |
|
|
I am having a hard time finding solid resources on Lua code that works with Cheat Engine. So if anyone has the solid reference link please let me know.
Anyway... I am looking for help with a simple concept. I have a label, named Label1. I would like Label1 to show the value of an address that I have, address = 7FF6104486E3.
If something like a label cant be used in a situation like this then thats fine but I would like the label value to refresh whenever the address value changes.
Can someone please help?
|
|
Back to top |
|
|
akumakuja28 Master Cheater Reputation: 16
Joined: 28 Jun 2015 Posts: 432
|
Posted: Tue Mar 14, 2017 12:49 pm Post subject: |
|
|
Code: |
--[[
readSmallInteger(address) : Reads a 16-bit integer from the specified address
readInteger(address) : Reads a 32-bit integer from the specified address
readQword(address): Reads a 64-bit integer from the specified address
readPointer(address): In a 64-bit target this equals readQword, in a 32-bit target readInteger()
readFloat(address) : Reads a single precision floating point value from the specified address
readDouble(address) : Reads a double precision floating point value from the specified address
readString(address, maxlength, widechar OPTIONAL) : Reads a string till it encounters a 0-terminator. Maxlength is just so you won't freeze for too long, set to 6000 if you don't care too much. Set WideChar to true if it is encoded using a widechar formatting
writeSmallInteger(address,value) : Writes a 16-bit integer to the specified address. Returns true on success
]]
address = '00150038' --- change this
f = createForm()
Label1 = createLabel(f)
function ReadAddress()
Label1.Caption = readInteger(address)
end
ReadTimer = createTimer(f)
ReadTimer.Interval = 500 --0.5 seconds
ReadTimer.OnTimer = ReadAddress |
_________________
|
|
Back to top |
|
|
sambushme How do I cheat? Reputation: 0
Joined: 12 Mar 2017 Posts: 4
|
Posted: Tue Mar 14, 2017 1:10 pm Post subject: Now we are talking! |
|
|
OK so i got the address with your script but it opened a different window with the number.
So i through for now Ill try this(see below). However this isnt working at all. I know I said i wanted it to update automatically but just for me troubleshooting I thought it would be easier to make it an onclick event
function CEButton2Click(sender)
address = '7FF6104486E2' --- changed this
Label1.Caption = readQword(address)
end
**My end game here is to create an error that I will be able to copy and paste some stats similar to what you see below. Please let me know if you think this is the best way to go about this.
Highlight-able Output:
Player 1: 82
Player 2: 11
Player 3: 32
Player 4: 55
|
|
Back to top |
|
|
rowhyung How do I cheat? Reputation: 0
Joined: 09 Feb 2021 Posts: 3
|
Posted: Tue Feb 09, 2021 5:51 pm Post subject: how do I choose a form and label that I already have made? |
|
|
I want to use the code but I choose the form and the label that I am going to use and then change the positions, the font, the size and other things from the form designer, I tried to modify the code on my own but it seems to be made to be something temporary that is created at the moment and when I want to execute the script as an exe or if I execute it even from the cheat engine after closing the table without closing the cheat engine the values stop changing and when I check the timer from the form designer everything is in white
|
|
Back to top |
|
|
|