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 me finish my listview please
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Sun Feb 24, 2013 9:50 pm    Post subject: Reply with quote

Dark Byte wrote:
1: Check that the code you wish to have global and executed each time to be outside of a function and the code you wish to only execute when at specific times to be inside a function

What do you mean by "each time"? Each time the table is opened? If you take some time to look at the three functions, they are almost identical, with some different numbering. But two give add the items twice and one gives 8 occurrences. I guess I'm asking how can this be with nearly identical codes and I'm referring to the to the addlevelitems functions. This doesn't make sense to me why this is happening. If you have access to the game--Dragon Warrior II played with FCE Ultra 0.98.12, I'd send the table to you.

Dark Byte wrote:
I have no idea what you're talking about though as I see no listview in your form. If you use the listview as a database in the background don't. Use a table {} instead


Actually there are three listviews all hidden because they are different and I wanted only the one selected to show. Look at the radioGroup function
Code:

function CERadioGroup1Click(sender)
--print("Index ", radiogroup_getItemIndex(CheatPanel_CERadioGroup1))
indexname = radiogroup_getItemIndex(CheatPanel_CERadioGroup1)
h = radiogroup_getItems(CheatPanel_CERadioGroup1)
heroname = strings_getString(h, indexname)
--print(heroname)
  if heroname == "Hero 1" then
    form_show(CheatPanel_CEListView1)
  elseif heroname == "Hero 2" then
    form_show(CheatPanel_CEListView2)
  elseif heroname == "Hero 3" then
    form_show(CheatPanel_CEListView3)
  else
  end
if expvalue ~= nil and goldvalue ~= nil and heroname ~= nil then
--RecalculateAddresses()
end
end
After a line is selected the list is hidden again.

Dark Byte wrote:
2: Only start the timer when all the data is correct

I tried the timer in the FormCreate and nothing happened, except an access error when I tried to enable it in the Recalculate function. So I moved it to FormShow with the enable being false and then enabled it later in the Recalculate function. All works well with the timer.
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Mon Mar 04, 2013 8:42 am    Post subject: Reply with quote

Dark Byte wrote:
1: ... If you use the listview as a database in the background don't. Use a table {} instead...

What are the codes for entry and use of a table in the form of:
Hero 1:Hero2:Hero 3:...etc
Level 1, Exp:Level 1, Exp:Level 1 Exp...etc these exp number are different for each Hero and may approach 10MM.

The logic would be to:
1. Select Hero
2. Select Param (like profession)
3. Use the selected Hero/Param to load or read the values and then be able to use those values to write into memory with either a wrie or set command.
I looked at the plethora of table commands, but not sure which are used.
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25291
Location: The netherlands

PostPosted: Mon Mar 04, 2013 10:51 am    Post subject: Reply with quote

Something like this (untested)

Code:

t={}
t["hero1"]={}
t["hero2"]={}
t["hero3"]={}

t["hero1"][1]=exphero1lvl1
t["hero2"][2]=exphero1lvl2
...
Expforlvl23forhero1=t["hero1"][23]

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25291
Location: The netherlands

PostPosted: Mon Mar 04, 2013 10:51 am    Post subject: Reply with quote

Something like this (untested)

Code:

t={}
t["hero1"]={}
t["hero2"]={}
t["hero3"]={}

t["hero1"][1]=exphero1lvl1
t["hero2"][2]=exphero1lvl2
...
Expforlvl23forhero1=t["hero1"][23]

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message 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
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
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