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 


auto record edit Value in lua

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 121

PostPosted: Fri Mar 18, 2022 10:44 am    Post subject: auto record edit Value in lua Reply with quote

Hello, I need a help.
Right now, I have a address as 1DD4E9E4, I make Description is gold1 which equal value is 0 and address equal 02AF8E80, I make Description is gold2 which equal value is 1.
In the game process works, gold1 works continually by the time and value will be raised.
That’s my idea, I make a CEEdit and a CEButton, this’s I set up 5 in CEEdit, is there any way in the game process when gold1 is raised 5, gold2’s value will return 0.
Thanks for everyone's help Question
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1522

PostPosted: Fri Mar 18, 2022 1:29 pm    Post subject: Reply with quote

Code:
if goldTmr then goldTmr.Destroy() goldTmr=nil end
goldTmr=createTimer() goldTmr.Interval=100 goldTmr.Enabled=false

goldTmr.OnTimer=function()
al = getAddressList()
gold1=addresslist_getMemoryRecordByDescription(al, "gold1")
gold2=addresslist_getMemoryRecordByDescription(al, "gold2")

 if gold1.value==tonumber(UDF1.CEEdit1.Text) then
  gold2.value=0
 end
end

UDF1.CEButton1.OnClick=function()
 if goldTmr.Enabled==false then
  goldTmr.Enabled=true
  else
  goldTmr.Enabled=false
 end
end


Does this require a change for every 5 increments?

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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