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 


Form and script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

PostPosted: Tue Oct 26, 2021 9:13 am    Post subject: Form and script Reply with quote

I found an address and a pointer to this address.I want to write the address in the form, the address is constantly changing and the form does not work, what should I do?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 26, 2021 9:48 am    Post subject: Reply with quote

If it's a pointer it doesn't matter that the address changes. You should be able to change the value of a pointer with no problem.
Back to top
View user's profile Send private message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

PostPosted: Tue Oct 26, 2021 9:53 am    Post subject: Reply with quote

Look
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 26, 2021 10:04 am    Post subject: Reply with quote

A pointer that holds another address is just a level within the pointer. All it can do is reference an address. Not the value. If it's the address that holds the value you want to change then it's not a pointer, it's an address.
Back to top
View user's profile Send private message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

PostPosted: Tue Oct 26, 2021 10:07 am    Post subject: Reply with quote

What am I supposed to do now?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 26, 2021 10:09 am    Post subject: Reply with quote

I suppose it depends on the purpose of what you're trying to achieve. If you want to read the value held at an address then you can do that with one of the following:
Code:

readShortInteger(address) / readByte(address) : Reads a 8-bit integer from the specified address
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


If you want to write a value to an address you can use one of the following:
Code:

writeShortInteger(address,value) / writeByte(address,value) : Writes a 16-bit integer to the specified address. Returns true on success
writeSmallInteger(address,value) : Writes a 16-bit integer to the specified address. Returns true on success
writeInteger(address,value) : Writes a 32-bit integer to the specified address. Returns true on success
writeQword(address, value): Write a 64-bit integer to the specified address. Returns true on success
writePointer(address,value)
writeFloat(address,value) : Writes a single precision floating point to the specified address. Returns true on success
writeDouble(address,value) : Writes a double precision floating point to the specified address. Returns true on success
writeString(address,text, widechar OPTIONAL) : Write a string to the specified address. Returns true on success
Back to top
View user's profile Send private message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

PostPosted: Tue Oct 26, 2021 10:15 am    Post subject: Reply with quote

I want to write down the address or something else in the form itself because the address is constantly changing and I don't want to constantly change it in the form when the game starts again. how to make sure that, despite the address change, the form in which it is specified works
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 26, 2021 10:18 am    Post subject: Reply with quote

Set a timer and have the timer read the address and update the value in the form.
Back to top
View user's profile Send private message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

PostPosted: Tue Oct 26, 2021 10:21 am    Post subject: Reply with quote

Hiw make it?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 26, 2021 10:35 am    Post subject: Reply with quote

Add a timer, set the properties. Enable it. In the timer function use one of the aforemetioned functions to read the address.
Back to top
View user's profile Send private message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

PostPosted: Tue Oct 26, 2021 10:41 am    Post subject: Reply with quote

?????I only have "enabled" "interval" "Name" "Tag" in my properties
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 26, 2021 10:46 am    Post subject: Reply with quote

Now in the timer events, set the function for OnTimer. The function will be something you have to create. You need to be able to tell the timer what to do with each interval.
Back to top
View user's profile Send private message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

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

and how do I write it down so that it reads what I have added to the list (there is only 1 line that needs to be read and edited)
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 4

Joined: 02 Sep 2011
Posts: 516
Location: 0x90

PostPosted: Tue Oct 26, 2021 12:57 pm    Post subject: Reply with quote

Reference the address list, then reference the memory record. Ensure that the entry exists before making any modifications. Lua is an easy language to learn and there are a ton of functions provided by DB for interfacing with Cheat Engine via Lua.

celua.txt
Back to top
View user's profile Send private message
Starter_But
Newbie cheater
Reputation: 0

Joined: 26 Oct 2021
Posts: 16

PostPosted: Tue Oct 26, 2021 1:00 pm    Post subject: Reply with quote

How make it plz tell
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
Goto page 1, 2  Next
Page 1 of 2

 
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