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 


Make a lua trainer to see the value of addresses

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

Joined: 28 Feb 2021
Posts: 7
Location: Brazil

PostPosted: Mon May 03, 2021 11:23 am    Post subject: Make a lua trainer to see the value of addresses Reply with quote

im trying to make mods for my server
and I wanna make a trainer what put the value of a address in the mainform
so I need help
the values are in a header btw
idk if this change anything
Back to top
View user's profile Send private message
mg_01
Cheater
Reputation: 0

Joined: 28 Jan 2018
Posts: 41

PostPosted: Fri May 28, 2021 7:14 pm    Post subject: Reply with quote

Something like this, maybe? It updates the values every time a Total-Frame counter changes.

Code:

addresslist = getAddressList()
myform= createForm()
myform.width = 800
myform.height = 400

label1= createLabel(myform)
label2= createLabel(myform)

value1 = nil
value2 = nil

description1=[[Frame_Counter]]
local memrec1=addresslist_getMemoryRecordByDescription(addresslist, description1)

description2=[[P1_A_Health_Big]]
local memrec2=addresslist_getMemoryRecordByDescription(addresslist, description2)

local t=createTimer(nil)
-- function changing()
function changing()

value1=description1..":  "..memoryrecord_getValue(memrec1)
control_setPosition(label1, 10,10)
control_setCaption(label1,value1)

value2=description2..":  "..memoryrecord_getValue(memrec2)
control_setPosition(label2, 10,30)
control_setCaption(label2,value2)

return true
end

function start(memoryrecord, before, currentstate)
  timer_onTimer(t, changing)
  timer_setInterval(t,100)
  timer_setEnabled(t, true)
return true
end

memoryrecord_onActivate(memrec1, start)
memoryrecord_onActivate(memrec2, start)

button1 = createButton(myform)
button1.setName( "Stop" )

function toggle()
timer_setEnabled(t,not timer_getEnabled(t))
end
control_onClick(button1, toggle)
control_setPosition(button1, 800-75,0) -- minus 75 from the width
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