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 


Help with scripting dropdown list options in trainer

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

Joined: 12 Jun 2020
Posts: 4

PostPosted: Fri Jun 12, 2020 9:07 am    Post subject: Help with scripting dropdown list options in trainer Reply with quote

Hi guys,

Couldnt put the full title in the subject, so i'll put it here:
Help with scripting dropdown list options in trainer to correspond with the "value" field dropdown list in the cheat table

So i'm trying to make a trainer and i have most of the things done, a checkbox that activates the cheat as well as 2 dropdown boxes that only appears after the checkbox is active. Basically just been following guides and adjusting things to my needs to get those things done.

However i got stuck when trying to make each dropdown list selection input different values to the selected cheat (the actual values themselves are pretty long AOBs, that's why i'm hoping i can access the cheat table dropdown list via the trainer. However, if it isnt possible, a lua code that can set a specific AOB value to the cheat record when a corresponding dropdown value in the trainer is selected, would suffice too.)

Really hoping someone can assist me in completing what i want to do Very Happy

This is what i got so far (I commented at the point in the code i got stuck):
Code:
isEnabled = 0
function CECheckbox1Click(sender)
 local script = getAddressList()
 script = script.getMemoryRecordByDescription("wol")
  if (isEnabled == 0 ) then
  CETrainer_CEComboBox1.Visible = true
  CETrainer_CEComboBox2.Visible = true
  script.Active = true
  isEnabled = 1
   else
   CETrainer_CEComboBox1.Visible = false
   CETrainer_CEComboBox2.Visible = false
   script.Active = false
   isEnabled = 0
end
function ComboHacks ()
 index = combobox_getItemIndex(CETrainer_CEComboBox1);
 if index == 0 then return end;

 if index == 1 then
  local script = getAddressList()
  script = script.getMemoryRecordByDescription("WoL HP 1")

             --)Not sure what to do from here onwards.
             --)I want it to go to "WoL HP 1" in the addresslist (Screenshot attached)
             --)and change the value to what is in the first dropdown value in the cheat table. (Also in screenshot)[/b]

 elseif index == 2 then
  local script = getAddressList()
  script = script.getMemoryRecordByDescription("WoL HP 1")

 elseif index == 3 then
  local script = getAddressList()
  script = script.getMemoryRecordByDescription("WoL HP 1")

 elseif index == 4 then
  local script = getAddressList()
  script = script.getMemoryRecordByDescription("WoL HP 1")

 elseif index == 5 then
  local script = getAddressList()
  script = script.getMemoryRecordByDescription("WoL HP 1")
 end
end
end



Capture.JPG
 Description:
 Filesize:  127.31 KB
 Viewed:  1633 Time(s)

Capture.JPG


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