 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Reclaimer Shawn Advanced Cheater
Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Fri Jul 08, 2016 1:17 am Post subject: Need help with making Combo boxes in Cheat Engine |
|
|
Hello guys. I'm making a trainer for Resident Evil 5 Gold Edition, and I wanted to implement and inventory editor function. I want the game to write a value to an address depending on what item is selected, and whenever an item matches one on the list, based on the value, will have what item it is in that box. I have 122 indexes. Thanks in advanced
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Jul 08, 2016 6:15 am Post subject: |
|
|
Normally there is a game instruction that executes as soon as you mouse over an item.
Hook into that instruction to receive the "currently selected item" base address.
Setup all your script and hotkeys to utilize that base address.
|
|
Back to top |
|
 |
panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 958
|
Posted: Fri Jul 08, 2016 12:05 pm Post subject: |
|
|
This Lua function combox should work like Memory Record's dropdown list.
Code: |
combox(cb,kvTbl,writeValueFn,readValueFn,readInterval,fmt)
-- cb , the target ComboBox
-- kvTbl, a Lua table setup so that the Key is string of name/desc, and Value is something associate to that Key, both Key and Value should be unique, check 'test' script ;
-- writeValueFn, if defined, will be call when manually changed the ComboBox entry with a known value in kvTable, not call if Value cannot be found in kvTable;
-- readValueFn, if defined, will be called and get the Value by a Timer to update the selected item in the ComboBox, if the Value cannot be found, an Unknown Text (ItemIndex=0) is displayed;
-- readInterval, how fast the timer to update, default is 100 = 0.1 sec
-- fmt, how to format the text displayed by the ComboBox, there is a default one;
## the Timer pause update when mouse is move into the ComboBox ;
## the Tag field of the ComboBox is used to recall a Timer, if the Tag has another use, it may disable the other functionality, or just rise an error.
## adapt the parameters for your use.
|
bye~
Description: |
may need copy function 'combox' into your script |
|
 Download |
Filename: |
_combox.CT |
Filesize: |
3.61 KB |
Downloaded: |
370 Time(s) |
_________________
- Retarded. |
|
Back to top |
|
 |
|
|
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
|
|