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 


Making CE trainer with 4 byte value boxes that can be edited

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

Joined: 27 Apr 2020
Posts: 1

PostPosted: Mon Apr 27, 2020 11:58 am    Post subject: Making CE trainer with 4 byte value boxes that can be edited Reply with quote

Basically I have a CE table with addresses that take 4 byte values. I need to make a CE trainer that basically has boxes where these current values are being displayed and can be changed by the user and locked, or typed in and changed on a click of a button. In total I have 16 addresses with values and i need to have the values displayed in the box and changed by typing in another value. I don't really orient in this Lua stuff so any help would be appreciated.
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Tue Apr 28, 2020 5:02 pm    Post subject: Reply with quote

A lazy example:

Code:
local addressList = getAddressList()

if addressList.Count >= 1 then
 UDF1.CELabel1.Caption = addressList.getMemoryRecordByDescription('Record 1').Address
 UDF1.CELabel2.Caption = addressList.getMemoryRecordByDescription('Record 2').Address
 -- and so on until 16 records

 UDF1.CEEdit1.Text = addressList.getMemoryRecordByDescription('Record 1').Value
 UDF1.CEEdit3.Text = addressList.getMemoryRecordByDescription('Record 2').Value
 -- and so on until 16 records

end

function changeValue()

 -- To be better if give conditional check for new values
 local rec1val = UDF1.CEEdit2.Text
 local rec2val = UDF1.CEEdit4.Text


 local mr1 = addressList.getMemoryRecordByDescription("Record 1")
 local mr2 = addressList.getMemoryRecordByDescription("Record 2")
 -- and so on until 16 records

 mr1.Value = rec1val
 mr2.Value = rec2val
 -- and so on until 16 records

 mr1.Active = true
 mr2.Active = true
 -- and so on until 16 records

end

UDF1.Show()
UDF1.CEButton1.OnClick = changeValue



Capture.JPG
 Description:
 Filesize:  85.06 KB
 Viewed:  1128 Time(s)

Capture.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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