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 


I am missing something :\

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

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Fri Apr 29, 2016 7:38 am    Post subject: I am missing something :\ Reply with quote

ok so I am trying to make a combo box where if you select "lock" then it will auto assemble a script that will lock your current money and wont let it increase nor decrease. 1st. you might be asking "why a combo box? why not a checkbox or something?" because in the box I will have: lock, lock 1M, lock 5M, lock 10M, lock 50M, lock 100M and I really want to try it with a combo box because I have never tried it before. 2nd. is this possible? . 3rd. if it is possible then what am I doing wrong?

Code:
function CEComboBox1Change(sender)
if(CETrainer.CEComboBox1,"Text", ('Select Lock')) then
autoAssemble([[
TURNS OFF THE CHEAT AND LETS MONEY INCREASE/DECREASE
]])
end
end
if(CETrainer.CEComboBox1,"Text", ('Lock')) then
autoAssemble([[
LOCK CURRENT AMOUNT
]])
end
end
if(CETrainer.CEComboBox1,"Text", ('Lock 1M')) then
autoAssemble([[
SETS + LOCKS MONEY ON 1,000,000
]])
end
end


I am 99.7% sure that there is something MEGA wrong with this
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Apr 29, 2016 3:58 pm    Post subject: Reply with quote

First check if the combo box value is "Disabled" or whatever your off state is.
If not, then enable your script to freeze the current value.
Modify that script to register a custom symbol and set its initial value equal to your current money.
Have your injection continuously update the game address with your variable.
Then check the value of the combo box to determine what number to set your variable too, instead of the default.
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