 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Thu Feb 17, 2022 10:44 am Post subject: RadioGroup and ListView selection |
|
|
I have several listviews hiddenby default at the same location within a CheatPanel, They are:
CheatPanel_CEListView1
CheatPanel_CEListView2
CheatPanel_CEListView3
etc.
CheatPanel_CEListView14--the last one. All of them have data set at the beginning of the code and I'll show only a partial first to keep this brief'
I then have a RaioGroup that has 7 "Items"
"No One"
1st
2nd
3rd
4th
5th
6th
Only 6 characters each with a profession and the profession dictates which ListView is appropriate.
The idea is to display the values when a button is selected. Currently I receive an error message INVALID CLASS OBJECT.
Code: |
function FormShow(sender)
function addLevelItem1(level, exp)
local lvitems1 = listview_getItems(CheatPanel_CEListView1)
local item1 = listitems_add(lvitems1)
local subitems1 = listitem_getSubItems(item1)
listitem_setCaption(item1,level)
strings_add(subitems1, exp)
end
function addLevelItem2(level, exp)
local lvitems2 = listview_getItems(CheatPanel_CEListView2)
local item2 = listitems_add(lvitems2)
local subitems2 = listitem_getSubItems(item2)
listitem_setCaption(item2,level)
strings_add(subitems2, exp)
end
--etc. for all 14, the PARTIAL first list
addLevelItem7(1,1199)--Bard
addLevelItem7(2,2499)
addLevelItem7(3,4999)
addLevelItem7(4,7499)
addLevelItem7(5,9999)
addLevelItem7(6,19999)
addLevelItem7(7,39999)
addLevelItem7(8,79999)
addLevelItem7(9,159999)
addLevelItem7(10,319999)
--etc. down to level 110
--each PROFESSION HAS A LIST ONLY THE FIRST PARTAL IS SHOWN HERE
--Then the table addresses are recaluted
function CEButton1Click(sender)
expvalue = tonumber(control_getCaption(CheatPanel_CEEdit1))
print('Experience = '..expvalue)
if expvalue ~= nil and goldvalue ~= nil and heroname ~= nil then
RecalculateAddresses()
end
end
function CEButton2Click(sender)
goldvalue = tonumber(control_getCaption(CheatPanel_CEEdit2))
print('Gold = '..goldvalue)
if expvalue ~= nil and goldvalue ~= nil and heroname ~= nil then
RecalculateAddresses()
end
end
function CERadioGroup1Click(sender)--this needs to be completed
indexname = radiogroup_getItemIndex(CheatPanel_CERadioGroup1)
h = radiogroup_getItems(CheatPanel_CERadioGroup1)
heroname = strings_getString(h, indexname)
local addresslist = getAddressList()
if recalc == 1 then
if heroname == "1st" then
profession1address = addresslist_getMemoryRecordByDescription(addresslist, "1st Profession")
profession1 = memoryrecord_getValue(profession1address)
profession1 = tonumber(profession1) + 1
whichlist = "CheatPanel_CEListView" .. profession1
form_show(whichlist)
|
recalc is nil until the table addresses are recalculated so the if is bypassed, but after the table addresses are recalculated recalc is set to 1
The images are of the CheatPanel and the ouput after the table has been recalculated.
One can see whichlist is CheatPanel_CEListView11, this is the correct ListView for1st's profession
but the form_show(whichlist) is the error. How may I adjust the code to show the appropriate ListView data?
Description: |
|
Filesize: |
40.73 KB |
Viewed: |
4763 Time(s) |

|
Description: |
|
Filesize: |
29.69 KB |
Viewed: |
4761 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Feb 17, 2022 10:56 am Post subject: |
|
|
instead of
Code: |
form_show(whichlist)
|
try:
Code: |
_G[whichlist].show()
|
_________________
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 |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Thu Feb 17, 2022 11:12 am Post subject: |
|
|
received an error
print(whichlist)
print(heroname)
_G[whichlist].show()
CheatPanel_CEListView11
1st
Error:[string "print(whichlist)
..."]:3: attempt to call a nil value (field 'show')
Script Error
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Feb 17, 2022 11:22 am Post subject: |
|
|
ah right, it's a listview, not form, so it's _G[whichlist].Visible=true
_________________
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 |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Thu Feb 17, 2022 11:31 am Post subject: |
|
|
And that works, thanks DB.
One question for my education what does the _G refer?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Feb 17, 2022 11:38 am Post subject: |
|
|
all global variables are stored in the table _G
if there is a global var named X then _G['X'] returns the same as X
_________________
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 |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Thu Feb 17, 2022 12:38 pm Post subject: |
|
|
ok, thanks
|
|
Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Fri Feb 18, 2022 11:43 am Post subject: |
|
|
New day, same problem.
Yesterday when I got the listview to become visible I was using the debug window to send the code, today when I open up the table and recalculate the addresses, then select one of the roadio buttons, the listview doesn't become visible like yesterday. I even tried through the debug window, but no luck I'll paste code for the first occurrence and see what comments about the code.
Code: |
local addresslist = getAddressList()
if recalc == 1 then
if heroname == "1st" then
profession1address = addresslist_getMemoryRecordByDescription(addresslist, "1st Profession")
profession1 = memoryrecord_getValue(profession1address)
profession1 = tonumber(profession1)
whichlist = "CheatPanel_CEListView" .. profession1
goldtableaddress = addresslist_getMemoryRecordByDescription(addresslist, "1st Gold")
goldtableaddress = memoryrecord_getAddress(goldtableaddress);
print(whichlist)
_G[whichlist].Visible=true
elseif heroname == "2nd" then
|
Duplication of number one button code except the numbers attached to profession are incremented 2-6. I have attached print statements(not hown here, but the whichlist is correct for each button.
Description: |
|
Filesize: |
29.69 KB |
Viewed: |
4696 Time(s) |

|
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1520
|
Posted: Fri Feb 18, 2022 1:20 pm Post subject: |
|
|
Open a separate tab in Lua script and paste this code and try.
RadioGroup clicks were made to open the correct lists.
In case of "No One" there is no list.
Code: | trainer = {
Data = {
Characters = {
[0] = "No One";
[1] = "1st";
[2] = "2nd";
[3] = "3rd";
[4] = "4th";
[5] = "5th";
[6] = "6th";
["No One"] = 0;
["1st"] = 1;
["2nd"] = 2;
["3rd"] = 3;
["4th"] = 4;
["5th"] = 5;
["6th"] = 6;
}}}
Stats = { };
function trainer:start()
self.form = createForm(false);
setProperty(self.form , "BiDiMode", "bdLeftToRight");
self.form.Caption = 'Cheat Panel';
self.form.Width = 450;
self.form.Height = 290;
self.form.Left = 340;
self.form.Top =7;
--
self.value_panel2 = createPanel(self.form);
self.value_panel2.Caption = '';
self.value_panel2.left = 5;
self.value_panel2.top = 7;
self.value_panel2.Height = 40;
self.value_panel2.Width = 93;
--
self.value_panel1 = createPanel(self.form);
self.value_panel1.Caption = '';
self.value_panel1.left = 5;
self.value_panel1.top = 50;
self.value_panel1.Height = 40;
self.value_panel1.Width = 93;
--
self.gold_value = createEdit(self.value_panel2);
self.gold_value.top = 6;
self.gold_value.left = 6;
self.gold_value.Width = 80;
self.gold_value.Height = 23;
setMethodProperty(self.gold_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_gold.onClick(); end return key; end)
--
self.exp_value = createEdit(self.value_panel1);
self.exp_value.top = 6;
self.exp_value.left = 6;
self.exp_value.Width = 80;
self.exp_value.Height = 23;
setMethodProperty(self.exp_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_exp.onClick(); end return key; end)
--
self.set_gold = createButton(self.form);
self.set_gold.Caption = 'Enter Gold';
self.set_gold.height = 35;
self.set_gold.left = 100;
self.set_gold.top = 7;
self.set_gold.width = 150;
self.set_gold.onClick = function (sender)
local value = tonumber(self.gold_value.Caption);
if value then
goldvalue = value;
print("The gold value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.gold_value.Caption = nil
end--function (sender)
--
self.set_exp = createButton(self.form);
self.set_exp.Caption = 'Enter Exp';
self.set_exp.height = 35;
self.set_exp.left = 100;
self.set_exp.top = 52;
self.set_exp.width = 150;
self.set_exp.onClick = function (sender)
local value = tonumber(self.exp_value.Caption);
if value then
expvalue = value;
print("The exp value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.exp_value.Caption = nil
end--function (sender)
--
self.characters_rg = createRadioGroup(self.form)
self.characters_rg.Caption = 'Characters:'
self.characters_rg.AutoSize = true
self.characters_rg.Columns = 1 -- two columns (default is 1)
-- characters_rg.Items.Text = 'Zidane\nVivi\nGarnet\nSteiner\nFreya\nQuina\nEiko\nAmarant\nNo One' -- delimited with \n
self.characters_rg.setItemIndex(-1) -- select first option by default
self.characters_rg.Top = 90
self.characters_rg.Left = 5
for character,_ in pairs(self.Data.Characters) do
if tonumber(character) then
self.characters_rg.getItems().add(_);
end
end--for character,_ in pairs(self.Data.Characters) do
--
for i=0, 6 do
self["listview"..i] = createListView(self.form)
setProperty(self["listview"..i], 'ViewStyle', 'vsReport')
setProperty(self["listview"..i], 'RowSelect', 'True')
setProperty(self["listview"..i], 'ReadOnly', 'True')
setProperty(self["listview"..i], 'HideSelection', 'False')
self["listview"..i].top = 100;
self["listview"..i].width = 140;
self["listview"..i].left = 105;
self["listview"..i].height = 175;
self["listview"..i].colum1 = self["listview"..i].getColumns().add()
self["listview"..i].colum1.Width = 40;
self["listview"..i].colum1.Caption = 'Lvl'..i
self["listview"..i].colum2 = self["listview"..i].getColumns().add()
self["listview"..i].colum2.Width = 80;
self["listview"..i].colum2.Caption = 'Exp'..i
self["listview"..i].visible = false
self["listview"..i].onClick = function (sender)
end
end
self.characters_rg.onClick = function (sender)--Need Character Data Table
local index = strings_getString(sender.getItems(), sender.ItemIndex);
local i = nil;
i = self.Data.Characters[index] + 1; -- If the character does not hold the value,, i remains nil.
if i then
heroname = index;
print("The index selected is:", self.Data.Characters[index]);
print("The hero name is: ", heroname);
if heroname == "No One" then --for _,__table in pairs(self.Data.Stats[i]) do
heroname = nil;
for i=0, 6 do
self["listview"..i].visible = false
end
else
ind=(heroname):sub(1,1)
self["listview"..tonumber(ind)].visible = true
end;
end;--if i then
if expvalue and goldvalue and heroname then
RecalculateAddresses();
end;--if expvalue and goldvalue and heroname then
end;--function (sender)
self.form.show();
end;
--
trainer:start();
|
_________________
|
|
Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Fri Feb 18, 2022 1:31 pm Post subject: |
|
|
That would probably work, but that necessitates installing 110 data points for 13 players. This is an old code from my beginnings
Code: |
addLevelItem0(1,999)--Fighter
addLevelItem0(2,1999)
addLevelItem0(3,3999)
addLevelItem0(4,7999)
addLevelItem0(5,15999)
addLevelItem0(6,31999)
addLevelItem0(7,63999)
addLevelItem0(8,127999)
addLevelItem0(9,255999)
addLevelItem0(10,511999)
addLevelItem0(11,767999)
addLevelItem0(12,1167999)
addLevelItem0(13,1567999)
addLevelItem0(14,1967999)
addLevelItem0(15,2367999)
addLevelItem0(16,2967999)
addLevelItem0(17,3567999)
addLevelItem0(18,4167999)
addLevelItem0(19,4767999)
addLevelItem0(20,5367999)
--etc. for all 13
|
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1520
|
Posted: Fri Feb 18, 2022 2:27 pm Post subject: |
|
|
On which line is this list being refreshed?
After a certain level it drops to minus value!
EDIT:
Code: | 1 > 999
2 > 1999
3 > 3999
4 > 7999
5 > 15999
6 > 31999
7 > 63999
8 > 127999
9 > 255999
10 > 511999 -- +256.000
11 > 767999 -- +400.000
12 > 1167999
13 > 1567999
14 > 1967999
15 > 2367999
16 > 2767999
17 > 3167999
18 > 3567999
19 > 3967999
20 > 4367999
21 > 4767999
22 > 5167999
23 > 5567999
24 > 5967999
25 > 6367999
26 > 6767999
27 > 7167999
28 > 7567999
29 > 7967999
30 > 8367999
31 > 8767999
32 > 9167999
33 > 9567999
34 > 9967999
35 > 10367999
36 > 10767999
37 > 11167999
38 > 11567999
39 > 11967999
40 > 12367999
41 > 12767999
42 > 13167999
43 > 13567999
44 > 13967999
45 > 14367999
46 > 14767999
47 > 15167999
48 > 15567999
49 > 15967999
50 > 16367999
51 > 16767999
52 > 17167999
53 > 17567999
54 > 17967999
55 > 18367999
56 > 18767999
57 > 19167999
58 > 19567999
59 > 19967999
60 > 20367999
61 > 20767999
62 > 21167999
63 > 21567999
64 > 21967999
65 > 22367999
66 > 22767999
67 > 23167999
68 > 23567999
69 > 23967999
70 > 24367999
71 > 24767999
72 > 25167999
73 > 25567999
74 > 25967999
75 > 26367999
76 > 26767999
77 > 27167999
78 > 27567999
79 > 27967999
80 > 28367999
81 > 28767999
82 > 29167999
83 > 29567999
84 > 29967999
85 > 30367999
86 > 30767999
87 > 31167999
88 > 31567999
89 > 31967999
90 > 32367999
91 > 32767999
92 > 33167999
93 > 33567999
94 > 33967999
95 > 34367999
96 > 34767999
97 > 35167999
98 > 35567999
99 > 35967999
100 > 36367999
101 > 36767999
102 > 37167999
103 > 37567999
104 > 37967999
105 > 38367999
106 > 38767999
107 > 39167999
108 > 39567999
109 > 39967999
110 > 40367999 |
_________________
Last edited by AylinCE on Fri Feb 18, 2022 2:45 pm; edited 1 time in total |
|
Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Fri Feb 18, 2022 2:44 pm Post subject: |
|
|
AylinCE wrote: | On which line is this list being refreshed?
After a certain level it drops to minus value!
Code: | 1 > 999
2 > 1999
3 > 3999
4 > 7999
5 > 15999
6 > 31999
7 > 63999
8 > 127999
9 > 255999
10 > 511999
11 > 1023999
12 > 2047999
13 > 4095999
14 > 8191999
15 > 16383999
16 > 32767999
17 > 65535999
18 > 131071999
19 > 262143999
20 > 524287999
21 > 1048575999
22 > 2097151999
23 > 4194303999
24 > 8388607999
25 > 16777215999
26 > 33554431999
27 > 67108863999
28 > 134217727999
29 > 268435455999
30 > 536870911999
31 > 1073741823999
32 > 2147483647999
33 > 4294967295999
34 > 8589934591999
35 > 17179869183999
36 > 34359738367999
37 > 68719476735999
38 > 137438953471999
39 > 274877906943999
40 > 549755813887999
41 > 1099511627775999
42 > 2199023255551999
43 > 4398046511103999
44 > 8796093022207999
45 > 17592186044415999
46 > 35184372088831999
47 > 70368744177663999
48 > 140737488355327999
49 > 281474976710655999
50 > 562949953421311999
51 > 1125899906842623999
52 > 2251799813685247999
53 > 4503599627370495999
54 > 9007199254740991999
55 > -432345564227567617
56 > -864691128455135233
57 > -1729382256910270465
58 > -3458764513820540929
59 > -6917529027641081857
60 > 4611686018427387903
61 > 9223372036854775807
62 > -1
63 > -1
64 > -1
65 > -1
66 > -1
67 > -1
68 > -1
69 > -1
70 > -1
71 > -1
72 > -1
73 > -1
74 > -1
75 > -1
76 > -1
77 > -1
78 > -1
79 > -1
80 > -1
81 > -1
82 > -1
83 > -1
84 > -1
85 > -1
86 > -1
87 > -1
88 > -1
89 > -1
90 > -1
91 > -1
92 > -1
93 > -1
94 > -1
95 > -1
96 > -1
97 > -1
98 > -1
99 > -1
100 > -1
101 > -1
102 > -1
103 > -1
104 > -1
105 > -1
106 > -1
107 > -1
108 > -1
109 > -1
110 > -1 |
|
The values increase by 600000 each level.
ETA: I just checked the spreadsheet and the base values that the strings were dervied end at level 50, so I'll have to update them. Good Eye.
addLevelItem3(49,22875199)
addLevelItem3(50,23475199)
addLevelItem3(51,24075199)
addLevelItem3(52,24675199)
addLevelItem3(53,25275199)
addLevelItem3(54,25875199)
addLevelItem3(55,26475199)
addLevelItem3(56,27075199)
addLevelItem3(57,27675199)
addLevelItem3(58,28275199)
addLevelItem3(59,28875199)
addLevelItem3(60,29475199)
addLevelItem3(61,30075199)
addLevelItem3(62,30675199)
addLevelItem3(63,31275199)
addLevelItem3(64,31875199)
addLevelItem3(65,32475199)
addLevelItem3(66,33075199)
addLevelItem3(67,33675199)
addLevelItem3(68,34275199)
addLevelItem3(69,34875199)
addLevelItem3(70,35475199)
addLevelItem3(71,36075199)
addLevelItem3(72,36675199)
addLevelItem3(73,37275199)
addLevelItem3(74,37875199)
addLevelItem3(75,38475199)
addLevelItem3(76,39075199)
addLevelItem3(77,39675199)
addLevelItem3(78,40275199)
addLevelItem3(79,40875199)
addLevelItem3(80,41475199)
addLevelItem3(81,42075199)
addLevelItem3(82,42675199)
addLevelItem3(83,43275199)
addLevelItem3(84,43875199)
addLevelItem3(85,44475199)
addLevelItem3(86,45075199)
addLevelItem3(87,45675199)
addLevelItem3(88,46275199)
addLevelItem3(89,46875199)
addLevelItem3(90,47475199)
addLevelItem3(91,48075199)
addLevelItem3(92,48675199)
addLevelItem3(93,49275199)
addLevelItem3(94,49875199)
addLevelItem3(95,50475199)
addLevelItem3(96,51075199)
addLevelItem3(97,51675199)
addLevelItem3(98,52275199)
addLevelItem3(99,52875199)
addLevelItem3(100,53475199)
addLevelItem3(101,54075199)
addLevelItem3(102,54675199)
addLevelItem3(103,55275199)
addLevelItem3(104,55875199)
addLevelItem3(105,56475199)
addLevelItem3(106,57075199)
addLevelItem3(107,57675199)
addLevelItem3(108,58275199)
addLevelItem3(109,58875199)
addLevelItem3(110,59475199)
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1520
|
Posted: Fri Feb 18, 2022 2:58 pm Post subject: |
|
|
If there are no other surprises; The loop is refreshing at 10, 11, and 14.
After 14 they all advance +600,000.
Code: | 1 > 999
2 > 1999
3 > 3999
4 > 7999
5 > 15999
6 > 31999
7 > 63999
8 > 127999
9 > 255999
10 > 511999 -- +256.000
11 > 767999 -- +400.000
12 > 1167999
13 > 1567999
14 > 1967999 -- +600.000
15 > 2367999
16 > 2967999
17 > 3567999
18 > 4167999
19 > 4767999
20 > 5367999
21 > 5967999
22 > 6567999
23 > 7167999
24 > 7767999
25 > 8367999
26 > 8967999
27 > 9567999
28 > 10167999
29 > 10767999
30 > 11367999
31 > 11967999
32 > 12567999
33 > 13167999
34 > 13767999
35 > 14367999
36 > 14967999
37 > 15567999
38 > 16167999
39 > 16767999
40 > 17367999
41 > 17967999
42 > 18567999
43 > 19167999
44 > 19767999
45 > 20367999
46 > 20967999
47 > 21567999
48 > 22167999
49 > 22767999
50 > 23367999
51 > 23967999
52 > 24567999
53 > 25167999
54 > 25767999
55 > 26367999
56 > 26967999
57 > 27567999
58 > 28167999
59 > 28767999
60 > 29367999
61 > 29967999
62 > 30567999
63 > 31167999
64 > 31767999
65 > 32367999
66 > 32967999
67 > 33567999
68 > 34167999
69 > 34767999
70 > 35367999
71 > 35967999
72 > 36567999
73 > 37167999
74 > 37767999
75 > 38367999
76 > 38967999
77 > 39567999
78 > 40167999
79 > 40767999
80 > 41367999
81 > 41967999
82 > 42567999
83 > 43167999
84 > 43767999
85 > 44367999
86 > 44967999
87 > 45567999
88 > 46167999
89 > 46767999
90 > 47367999
91 > 47967999
92 > 48567999
93 > 49167999
94 > 49767999
95 > 50367999
96 > 50967999
97 > 51567999
98 > 52167999
99 > 52767999
100 > 53367999
101 > 53967999
102 > 54567999
103 > 55167999
104 > 55767999
105 > 56367999
106 > 56967999
107 > 57567999
108 > 58167999
109 > 58767999
110 > 59367999 |
I'm not sure what you need.
I leave an example that gives the above output in a ready-made old code.
Code: | trainer = {
Data = {
Characters = {
[0] = "No One";
[1] = "1st"; -- We will append the characters to the groupbox using value index.
[2] = "2nd";
[3] = "3rd";
[4] = "4th";
[5] = "5th";
[6] = "6th";
["No One"] = 0;
["1st"] = 1;
["2nd"] = 2;
["3rd"] = 3;
["4th"] = 4;
["5th"] = 5;
["6th"] = 6;
}}}
Stats = { };
function trainer:start()
self.form = createForm(false); -- self = trainer since it's a function inside of a table...
setProperty(self.form , "BiDiMode", "bdLeftToRight");
self.form.Caption = 'Cheat Panel';
self.form.Width = 450;
self.form.Height = 290;
self.form.Left = 340;
self.form.Top =7;
--
self.value_panel2 = createPanel(self.form);
self.value_panel2.Caption = '';
self.value_panel2.left = 5;
self.value_panel2.top = 7;
self.value_panel2.Height = 40;
self.value_panel2.Width = 93;
--
self.value_panel1 = createPanel(self.form);
self.value_panel1.Caption = '';
self.value_panel1.left = 5;
self.value_panel1.top = 50;
self.value_panel1.Height = 40;
self.value_panel1.Width = 93;
--
self.gold_value = createEdit(self.value_panel2);
self.gold_value.top = 6;
self.gold_value.left = 6;
self.gold_value.Width = 80;
self.gold_value.Height = 23;
-- The line below this, allows only numbers or the - number to be entered.
setMethodProperty(self.gold_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_gold.onClick(); end return key; end)
--
self.exp_value = createEdit(self.value_panel1);
self.exp_value.top = 6;
self.exp_value.left = 6;
self.exp_value.Width = 80;
self.exp_value.Height = 23;
-- The line below this, allows only numbers or the - number to be entered.
setMethodProperty(self.exp_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_exp.onClick(); end return key; end)
--
self.set_gold = createButton(self.form);
self.set_gold.Caption = 'Enter Gold';
self.set_gold.height = 35;
self.set_gold.left = 100;
self.set_gold.top = 7;
self.set_gold.width = 150;
self.set_gold.onClick = function (sender)
local value = tonumber(self.gold_value.Caption);
if value then
goldvalue = value;
print("The gold value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.gold_value.Caption = nil
end--function (sender)
--
self.set_exp = createButton(self.form);
self.set_exp.Caption = 'Enter Exp';
self.set_exp.height = 35;
self.set_exp.left = 100;
self.set_exp.top = 52;
self.set_exp.width = 150;
self.set_exp.onClick = function (sender)
local value = tonumber(self.exp_value.Caption);
if value then
expvalue = value;
print("The exp value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.exp_value.Caption = nil
end--function (sender)
--
self.characters_rg = createRadioGroup(self.form)
self.characters_rg.Caption = 'Characters:'
self.characters_rg.AutoSize = true
self.characters_rg.Columns = 1 -- two columns (default is 1)
-- characters_rg.Items.Text = 'Zidane\nVivi\nGarnet\nSteiner\nFreya\nQuina\nEiko\nAmarant\nNo One' -- delimited with \n
self.characters_rg.setItemIndex(-1) -- select first option by default
self.characters_rg.Top = 90
self.characters_rg.Left = 5
for character,_ in pairs(self.Data.Characters) do
if tonumber(character) then
self.characters_rg.getItems().add(_);
end
end--for character,_ in pairs(self.Data.Characters) do
--
for i=0, 6 do
self["listview"..i] = createListView(self.form)
setProperty(self["listview"..i], 'ViewStyle', 'vsReport')
setProperty(self["listview"..i], 'RowSelect', 'True')
setProperty(self["listview"..i], 'ReadOnly', 'True')
setProperty(self["listview"..i], 'HideSelection', 'False')
self["listview"..i].top = 100;
self["listview"..i].width = 140;
self["listview"..i].left = 105;
self["listview"..i].height = 175;
self["listview"..i].colum1 = self["listview"..i].getColumns().add()
self["listview"..i].colum1.Width = 40;
self["listview"..i].colum1.Caption = 'Lvl'..i
self["listview"..i].colum2 = self["listview"..i].getColumns().add()
self["listview"..i].colum2.Width = 80;
self["listview"..i].colum2.Caption = 'Exp'..i
self["listview"..i].visible = false
self["listview"..i].onClick = function (sender)
end
end
self.characters_rg.onClick = function (sender)--Need Character Data Table
local index = strings_getString(sender.getItems(), sender.ItemIndex);
local i = nil;
i = self.Data.Characters[index] + 1; -- If the character does not hold the value,, i remains nil.
if i then
heroname = index;
print("The index selected is:", self.Data.Characters[index]);
print("The hero name is: ", heroname);
if heroname == "No One" then --for _,__table in pairs(self.Data.Stats[i]) do
heroname = nil;
for i=0, 6 do
self["listview"..i].visible = false
end
else
ind=(heroname):sub(1,1)
exp=999
local items = self["listview"..tonumber(ind)].Items
for i=1, 111 -1 do
print(i .. " > " .. exp)
item = items.Add()
item.Caption = i
item.SubItems.Add(exp)
if i<10 then
exp=tonumber(exp) * 2 + 1
else
if i==10 then
exp=tonumber(exp) + 256000
else
if i<15 then
exp=tonumber(exp) + 400000
else
exp=tonumber(exp) + 600000
end
end
end
end
self["listview"..tonumber(ind)].visible = true
end;
end;--if i then
end;--function (sender)
self.form.show();
end;
--
trainer:start(); |
_________________
|
|
Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Fri Feb 18, 2022 3:36 pm Post subject: |
|
|
AylinCE wrote: | If there are no other surprises; The loop is refreshing at 10, 11, and 14.
After 14 they all advance +600,000.
Code: | 1 > 999
2 > 1999
3 > 3999
4 > 7999
5 > 15999
6 > 31999
7 > 63999
8 > 127999
9 > 255999
10 > 511999 -- +256.000
11 > 767999 -- +400.000
12 > 1167999
13 > 1567999
14 > 1967999 -- +600.000
15 > 2367999
16 > 2967999
17 > 3567999
18 > 4167999
19 > 4767999
20 > 5367999
21 > 5967999
22 > 6567999
23 > 7167999
24 > 7767999
25 > 8367999
26 > 8967999
27 > 9567999
28 > 10167999
29 > 10767999
30 > 11367999
31 > 11967999
32 > 12567999
33 > 13167999
34 > 13767999
35 > 14367999
36 > 14967999
37 > 15567999
38 > 16167999
39 > 16767999
40 > 17367999
41 > 17967999
42 > 18567999
43 > 19167999
44 > 19767999
45 > 20367999
46 > 20967999
47 > 21567999
48 > 22167999
49 > 22767999
50 > 23367999
51 > 23967999
52 > 24567999
53 > 25167999
54 > 25767999
55 > 26367999
56 > 26967999
57 > 27567999
58 > 28167999
59 > 28767999
60 > 29367999
61 > 29967999
62 > 30567999
63 > 31167999
64 > 31767999
65 > 32367999
66 > 32967999
67 > 33567999
68 > 34167999
69 > 34767999
70 > 35367999
71 > 35967999
72 > 36567999
73 > 37167999
74 > 37767999
75 > 38367999
76 > 38967999
77 > 39567999
78 > 40167999
79 > 40767999
80 > 41367999
81 > 41967999
82 > 42567999
83 > 43167999
84 > 43767999
85 > 44367999
86 > 44967999
87 > 45567999
88 > 46167999
89 > 46767999
90 > 47367999
91 > 47967999
92 > 48567999
93 > 49167999
94 > 49767999
95 > 50367999
96 > 50967999
97 > 51567999
98 > 52167999
99 > 52767999
100 > 53367999
101 > 53967999
102 > 54567999
103 > 55167999
104 > 55767999
105 > 56367999
106 > 56967999
107 > 57567999
108 > 58167999
109 > 58767999
110 > 59367999 |
I'm not sure what you need.
I leave an example that gives the above output in a ready-made old code.
|
What I need is some code changes to make/allow the listview vales to be visible.
Quote: |
Code: | trainer = {
Data = {
Characters = {
[0] = "No One";
[1] = "1st"; -- We will append the characters to the groupbox using value index.
[2] = "2nd";
[3] = "3rd";
[4] = "4th";
[5] = "5th";
[6] = "6th";
["No One"] = 0;
["1st"] = 1;
["2nd"] = 2;
["3rd"] = 3;
["4th"] = 4;
["5th"] = 5;
["6th"] = 6;
}}}
Stats = { };
function trainer:start()
self.form = createForm(false); -- self = trainer since it's a function inside of a table...
setProperty(self.form , "BiDiMode", "bdLeftToRight");
self.form.Caption = 'Cheat Panel';
self.form.Width = 450;
self.form.Height = 290;
self.form.Left = 340;
self.form.Top =7;
--
self.value_panel2 = createPanel(self.form);
self.value_panel2.Caption = '';
self.value_panel2.left = 5;
self.value_panel2.top = 7;
self.value_panel2.Height = 40;
self.value_panel2.Width = 93;
--
self.value_panel1 = createPanel(self.form);
self.value_panel1.Caption = '';
self.value_panel1.left = 5;
self.value_panel1.top = 50;
self.value_panel1.Height = 40;
self.value_panel1.Width = 93;
--
self.gold_value = createEdit(self.value_panel2);
self.gold_value.top = 6;
self.gold_value.left = 6;
self.gold_value.Width = 80;
self.gold_value.Height = 23;
-- The line below this, allows only numbers or the - number to be entered.
setMethodProperty(self.gold_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_gold.onClick(); end return key; end)
--
self.exp_value = createEdit(self.value_panel1);
self.exp_value.top = 6;
self.exp_value.left = 6;
self.exp_value.Width = 80;
self.exp_value.Height = 23;
-- The line below this, allows only numbers or the - number to be entered.
setMethodProperty(self.exp_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_exp.onClick(); end return key; end)
--
self.set_gold = createButton(self.form);
self.set_gold.Caption = 'Enter Gold';
self.set_gold.height = 35;
self.set_gold.left = 100;
self.set_gold.top = 7;
self.set_gold.width = 150;
self.set_gold.onClick = function (sender)
local value = tonumber(self.gold_value.Caption);
if value then
goldvalue = value;
print("The gold value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.gold_value.Caption = nil
end--function (sender)
--
self.set_exp = createButton(self.form);
self.set_exp.Caption = 'Enter Exp';
self.set_exp.height = 35;
self.set_exp.left = 100;
self.set_exp.top = 52;
self.set_exp.width = 150;
self.set_exp.onClick = function (sender)
local value = tonumber(self.exp_value.Caption);
if value then
expvalue = value;
print("The exp value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.exp_value.Caption = nil
end--function (sender)
--
self.characters_rg = createRadioGroup(self.form)
self.characters_rg.Caption = 'Characters:'
self.characters_rg.AutoSize = true
self.characters_rg.Columns = 1 -- two columns (default is 1)
-- characters_rg.Items.Text = 'Zidane\nVivi\nGarnet\nSteiner\nFreya\nQuina\nEiko\nAmarant\nNo One' -- delimited with \n
self.characters_rg.setItemIndex(-1) -- select first option by default
self.characters_rg.Top = 90
self.characters_rg.Left = 5
for character,_ in pairs(self.Data.Characters) do
if tonumber(character) then
self.characters_rg.getItems().add(_);
end
end--for character,_ in pairs(self.Data.Characters) do
--
for i=0, 6 do
self["listview"..i] = createListView(self.form)
setProperty(self["listview"..i], 'ViewStyle', 'vsReport')
setProperty(self["listview"..i], 'RowSelect', 'True')
setProperty(self["listview"..i], 'ReadOnly', 'True')
setProperty(self["listview"..i], 'HideSelection', 'False')
self["listview"..i].top = 100;
self["listview"..i].width = 140;
self["listview"..i].left = 105;
self["listview"..i].height = 175;
self["listview"..i].colum1 = self["listview"..i].getColumns().add()
self["listview"..i].colum1.Width = 40;
self["listview"..i].colum1.Caption = 'Lvl'..i
self["listview"..i].colum2 = self["listview"..i].getColumns().add()
self["listview"..i].colum2.Width = 80;
self["listview"..i].colum2.Caption = 'Exp'..i
self["listview"..i].visible = false
self["listview"..i].onClick = function (sender)
end
end
self.characters_rg.onClick = function (sender)--Need Character Data Table
local index = strings_getString(sender.getItems(), sender.ItemIndex);
local i = nil;
i = self.Data.Characters[index] + 1; -- If the character does not hold the value,, i remains nil.
if i then
heroname = index;
print("The index selected is:", self.Data.Characters[index]);
print("The hero name is: ", heroname);
if heroname == "No One" then --for _,__table in pairs(self.Data.Stats[i]) do
heroname = nil;
for i=0, 6 do
self["listview"..i].visible = false
end
else
ind=(heroname):sub(1,1)
exp=999
local items = self["listview"..tonumber(ind)].Items
for i=1, 111 -1 do
print(i .. " > " .. exp)
item = items.Add()
item.Caption = i
item.SubItems.Add(exp)
if i<10 then
exp=tonumber(exp) * 2 + 1
else
if i==10 then
exp=tonumber(exp) + 256000
else
if i<15 then
exp=tonumber(exp) + 400000
else
exp=tonumber(exp) + 600000
end
end
end
end
self["listview"..tonumber(ind)].visible = true
end;
end;--if i then
end;--function (sender)
self.form.show();
end;
--
trainer:start(); |
|
I know exactly what you refer this is a code from a much newer table
Code: |
trainer = {
Data = {
Characters = {
[0] = "Hero 1"; -- Table auto selects characters based alphabet order... so we will append the characters to the groupbox using value index.
[1] = "Hero 2";
[2] = "Hero 3";
[3] = "Hero 4";
[4] = "No One";
["Hero 1"] = 0; -- Index of radiogroup
["Hero 2"] = 1;
["Hero 3"] = 2;
["Hero 4"] = 3;
["No One"] = 4;
};
Stats = { -- Exp and level
{{1,28};{2,86};{3,173};{4,303};{5,498};{6,791};{7,1231};{8,1890};{9,2879};{10,4363};{11,6217};{12,8533};{13,11427};{14,15044};{15,19113};{16,23689};{17,28836};{18,34626};{19,41140};{20,48467};{21,56710};{22,65982};{23,76412};{24,88146};{25,101346};{26,116195};{27,132900};{28,151693};{29,172835};{30,196620};{31,223377};{32,253479};{33,287343};{34,325439};{35,368297};{36,416511};{37,470751};{38,531770};{39,600416};{40,677643};{41,764523};{42,862262};{43,960001};{44,1057740};{45,1155479};{46,1253218};{47,1350957};{48,1448696};{49,1546435};{50,1644174};{51,1741913};{52,1839652};{53,1937391};{54,2035130};{55,2132869};{56,2230608};{57,2328347};{58,2426086};{59,2523825};{60,2621564};{61,2719303};{62,2817042};{63,2914781};{64,3012520};{65,3110259};{66,3207998};{67,3305737};{68,3403476};{69,3501215};{70,3598954};{71,3696693};{72,3794432};{73,3892171};{74,3989910};{75,4087649};{76,4185388};{77,4283127};{78,4380866};{79,4478605};{80,4576344};{81,4674083};{82,4771822};{83,4869561};{84,4967300};{85,5065039};{86,5162778};{87,5260517};{88,5358256};{89,5455995};{90,5553734};{91,5651473};{92,5749212};{93,5846951};{94,5944690};{95,6042429};{96,6140168};{97,6237907};{98,6335646};};
{{1,11};{2,35};{3,83};{4,155};{5,263};{6,425};{7,668};{8,1032};{9,1578};{10,2397};{11,3626};{12,5162};{13,7082};{14,9482};{15,12482};{16,16232};{17,20919};{18,26778};{19,34101};{20,42339};{21,51607};{22,62033};{23,73762};{24,86956};{25,101800};{26,118499};{27,137285};{28,158420};{29,182196};{30,208944};{31,239035};{32,272887};{33,310971};{34,353815};{35,402014};{36,456238};{37,517240};{38,585867};{39,663072};{40,749927};{41,847638};{42,945349};{43,1043060};{44,1140771};{45,1238482};{46,1336193};{47,1433904};{48,1531615};{49,1629326};{50,1727037};{51,1824748};{52,1922459};{53,2020170};{54,2117881};{55,2215592};{56,2313303};{57,2411014};{58,2508725};{59,2606436};{60,2704147};{61,2801858};{62,2899569};{63,2997280};{64,3094991};{65,3192702};{66,3290413};{67,3388124};{68,3485835};{69,3583546};{70,3681257};{71,3778968};{72,3876679};{73,3974390};{74,4072101};{75,4169812};{76,4267523};{77,4365234};{78,4462945};{79,4560656};{80,4658367};{81,4756078};{82,4853789};{83,4951500};{84,5049211};{85,5146922};{86,5244633};{87,5342344};{88,5440055};{89,5537766};{90,5635477};{91,5733188};{92,5830899};{93,5928610};{94,6026321};{95,6124032};{96,6221743};{97,6319454};{98,6417165};};
{{1,13};{2,41};{3,97};{4,181};{5,307};{6,496};{7,779};{8,1204};{9,1841};{10,2797};{11,4231};{12,6023};{13,8263};{14,11063};{15,14563};{16,18938};{17,24406};{18,30558};{19,37478};{20,45262};{21,54019};{22,63871};{23,74954};{24,87422};{25,101449};{26,117228};{27,134980};{28,154951};{29,177418};{30,202693};{31,231127};{32,263115};{33,299101};{34,339584};{35,385127};{36,436363};{37,494003};{38,558848};{39,631798};{40,713866};{41,806193};{42,910060};{43,1026911};{44,1143762};{45,1260613};{46,1377464};{47,1494315};{48,1611166};{49,1728017};{50,1844868};{51,1961719};{52,2078570};{53,2195421};{54,2312272};{55,2429123};{56,2545974};{57,2662825};{58,2779676};{59,2896527};{60,3013378};{61,3130229};{62,3247080};{63,3363931};{64,3480782};{65,3597633};{66,3714484};{67,3831335};{68,3948186};{69,4065037};{70,4181888};{71,4298739};{72,4415590};{73,4532441};{74,4649292};{75,4766143};{76,4882994};{77,4999845};{78,5116696};{79,5233547};{80,5350398};{81,5467249};{82,5584100};{83,5700951};{84,5817802};{85,5934653};{86,6051504};{87,6168355};{88,6285206};{89,6402057};{90,6518908};{91,6635759};{92,6752610};{93,6869461};{94,6986312};{95,7103163};{96,7220014};{97,7336865};{98,7453716};};
{{1,19};{2,59};{3,139};{4,259};{5,439};{6,709};{7,1114};{8,1721};{9,2632};{10,3998};{11,6046};{12,8606};{13,11806};{14,15806};{15,20806};{16,27056};{17,34868};{18,43656};{19,53542};{20,64663};{21,77174};{22,91249};{23,107082};{24,124894};{25,144932};{26,167474};{27,192834};{28,221364};{29,253460};{30,289567};{31,330187};{32,375884};{33,427292};{34,485125};{35,550187};{36,623382};{37,705725};{38,798361};{39,902576};{40,1019817};{41,1151713};{42,1300095};{43,1448477};{44,1596859};{45,1745241};{46,1893623};{47,2042005};{48,2190387};{49,2338769};{50,2487151};{51,2635533};{52,2783915};{53,2932297};{54,3080679};{55,3229061};{56,3377443};{57,3525825};{58,3674207};{59,3822589};{60,3970971};{61,4119353};{62,4267735};{63,4416117};{64,4564499};{65,4712881};{66,4861263};{67,5009645};{68,5158027};{69,5306409};{70,5454791};{71,5603173};{72,5751555};{73,5899937};{74,6048319};{75,6196701};{76,6345083};{77,6493465};{78,6641847};{79,6790229};{80,6938611};{81,7086993};{82,7235375};{83,7383757};{84,7532139};{85,7680521};{86,7828903};{87,7977285};{88,8125667};{89,8274049};{90,8422431};{91,8570813};{92,8719195};{93,8867577};{94,9015959};{95,9164341};{96,9312723};{97,9461105};{98,9609487};};
{{1,14};{2,44};{3,104};{4,194};{5,329};{6,531};{7,834};{8,1289};{9,1972};{10,2996};{11,4532};{12,6452};{13,8852};{14,11852};{15,15602};{16,20289};{17,25562};{18,31494};{19,38168};{20,45675};{21,54120};{22,63621};{23,74309};{24,86333};{25,99860};{26,115077};{27,132196};{28,151455};{29,173120};{30,197493};{31,224912};{32,255757};{33,290457};{34,329494};{35,373411};{36,422817};{37,478398};{38,540926};{39,611270};{40,690407};{41,779435};{42,879591};{43,992267};{44,1119027};{45,1245787};{46,1372547};{47,1499307};{48,1626067};{49,1752827};{50,1879587};{51,2006347};{52,2133107};{53,2259867};{54,2386627};{55,2513387};{56,2640147};{57,2766907};{58,2893667};{59,3020427};{60,3147187};{61,3273947};{62,3400707};{63,3527467};{64,3654227};{65,3780987};{66,3907747};{67,4034507};{68,4161267};{69,4288027};{70,4414787};{71,4541547};{72,4668307};{73,4795067};{74,4921827};{75,5048587};{76,5175347};{77,5302107};{78,5428867};{79,5555627};{80,5682387};{81,5809147};{82,5935907};{83,6062667};{84,6189427};{85,6316187};{86,6442947};{87,6569707};{88,6696467};{89,6823227};{90,6949987};{91,7076747};{92,7203507};{93,7330267};{94,7457027};{95,7583787};{96,7710547};{97,7837307};{98,7964067};};
{{1,9};{2,29};{3,69};{4,129};{5,219};{6,354};{7,556};{8,859};{9,1314};{10,1997};{11,3021};{12,4301};{13,5901};{14,7901};{15,10401};{16,13526};{17,17432};{18,22314};{19,27806};{20,33984};{21,40934};{22,48753};{23,57549};{24,67444};{25,78576};{26,91099};{27,105187};{28,121036};{29,138866};{30,158924};{31,181489};{32,206875};{33,235434};{34,267562};{35,303706};{36,344367};{37,390111};{38,441572};{39,499466};{40,564596};{41,637867};{42,720297};{43,813031};{44,905765};{45,998499};{46,1091233};{47,1183967};{48,1276701};{49,1369435};{50,1462169};{51,1554903};{52,1647637};{53,1740371};{54,1833105};{55,1925839};{56,2018573};{57,2111307};{58,2204041};{59,2296775};{60,2389509};{61,2482243};{62,2574977};{63,2667711};{64,2760445};{65,2853179};{66,2945913};{67,3038647};{68,3131381};{69,3224115};{70,3316849};{71,3409583};{72,3502317};{73,3595051};{74,3687785};{75,3780519};{76,3873253};{77,3965987};{78,4058721};{79,4151455};{80,4244189};{81,4336923};{82,4429657};{83,4522391};{84,4615125};{85,4707859};{86,4800593};{87,4893327};{88,4986061};{89,5078795};{90,5171529};{91,5264263};{92,5356997};{93,5449731};{94,5542465};{95,5635199};{96,5727933};{97,5820667};{98,5913401};};
{{1,17};{2,53};{3,125};{4,233};{5,395};{6,638};{7,1002};{8,1548};{9,2368};{10,3597};{11,5440};{12,7744};{13,10624};{14,14224};{15,18724};{16,24349};{17,30677};{18,37796};{19,45804};{20,54813};{21,64948};{22,76349};{23,89175};{24,103604};{25,119836};{26,138097};{27,158640};{28,181750};{29,207748};{30,236995};{31,269897};{32,306911};{33,348551};{34,395396};{35,448096};{36,507383};{37,574080};{38,649114};{39,733527};{40,828491};{41,935325};{42,1055513};{43,1190724};{44,1325935};{45,1461146};{46,1596357};{47,1731568};{48,1866779};{49,2001990};{50,2137201};{51,2272412};{52,2407623};{53,2542834};{54,2678045};{55,2813256};{56,2948467};{57,3083678};{58,3218889};{59,3354100};{60,3489311};{61,3624522};{62,3759733};{63,3894944};{64,4030155};{65,4165366};{66,4300577};{67,4435788};{68,4570999};{69,4706210};{70,4841421};{71,4976632};{72,5111843};{73,5247054};{74,5382265};{75,5517476};{76,5652687};{77,5787898};{78,5923109};{79,6058320};{80,6193531};{81,6328742};{82,6463953};{83,6599164};{84,6734375};{85,6869586};{86,7004797};{87,7140008};{88,7275219};{89,7410430};{90,7545641};{91,7680852};{92,7816063};{93,7951274};{94,8086485};{95,8221696};{96,8356907};{97,8492118};{98,8627329};};
{{1,10};{2,32};{3,76};{4,142};{5,241};{6,389};{7,611};{8,945};{9,1446};{10,2197};{11,3323};{12,4731};{13,6491};{14,8691};{15,11441};{16,14878};{17,19174};{18,24544};{19,31257};{20,38809};{21,47305};{22,56862};{23,67613};{24,79708};{25,93315};{26,108622};{27,125843};{28,145216};{29,167011};{30,191530};{31,219113};{32,250144};{33,285054};{34,324328};{35,368510};{36,418215};{37,474133};{38,537041};{39,607812};{40,687429};{41,776997};{42,877761};{43,991120};{44,1104479};{45,1217838};{46,1331197};{47,1444556};{48,1557915};{49,1671274};{50,1784633};{51,1897992};{52,2011351};{53,2124710};{54,2238069};{55,2351428};{56,2464787};{57,2578146};{58,2691505};{59,2804864};{60,2918223};{61,3031582};{62,3144941};{63,3258300};{64,3371659};{65,3485018};{66,3598377};{67,3711736};{68,3825095};{69,3938454};{70,4051813};{71,4165172};{72,4278531};{73,4391890};{74,4505249};{75,4618608};{76,4731967};{77,4845326};{78,4958685};{79,5072044};{80,5185403};{81,5298762};{82,5412121};{83,5525480};{84,5638839};{85,5752198};{86,5865557};{87,5978916};{88,6092275};{89,6205634};{90,6318993};{91,6432352};{92,6545711};{93,6659070};{94,6772429};{95,6885788};{96,6999147};{97,7112506};{98,7225865};};
};
Profession = {
[0] = "Hero";
[1] = "Soldier";
[2] = "Pilgrim";
[3] = "Sage";
[4] = "Wizard";
[5] = "Merchant";
[6] = "Fighter";
[7] = "Goof Off";
[8] = "None";
};
};--Data
};--Trainer
|
The data entries are what I referred 110 entries for 13 professions. I really hate doing that plus the whole cheatPanel will be dumped and I'll have to program another one. I'm trying to get results without all those changes, I thought DB gave me a great idea yesterday, and it worked yesterday, but today it doesn't function.
ETA: This type of listview display has worked previously but the specific listview was "Named" not a combination of a variable and string to decide which list was brought up, I maneed to go back to my code and spellout each one instead of making a combination.
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1520
|
Posted: Fri Feb 18, 2022 5:57 pm Post subject: |
|
|
A quote from @mgr.inz.Player came to mind: "You don't need to quote the entire post, I don't intend to delete it."
Less is enough.
bknight2602 wrote: |
ETA: This type of listview display has worked previously but the specific listview was "Named" not a combination of a variable and string to decide which list was brought up, I maneed to go back to my code and spellout each one instead of making a combination. |
The following code caught my attention and I propose a fix.
Code: | function findList(lstname)
local addresslist = getAddressList()
profession1address = addresslist_getMemoryRecordByDescription(addresslist, lstname.." Profession")
profession1 = memoryrecord_getValue(profession1address)
profession1 = tonumber(profession1)
whichlist = CheatPanel_CEListView .. profession1 --example: UDF1.CEListView .. profession1
goldtableaddress = addresslist_getMemoryRecordByDescription(addresslist, lstname.." Gold")
goldtableaddress = memoryrecord_getAddress(goldtableaddress);
print(whichlist)
whichlist.Visible=true
end
function findStr(heroname)
if heroname == "1st" then
findList("1st")
elseif heroname == "2nd" then
findList(heroname)
elseif heroname == "3rd" then
findList(heroname)
elseif heroname == "4th" then
findList(heroname)
--etc
end
end
function buttonClick()
indexname = radiogroup_getItemIndex(CheatPanel_CERadioGroup1)
h = radiogroup_getItems(CheatPanel_CERadioGroup1)
heroname = strings_getString(h, indexname)
if recalc == 1 then
findStr(heroname)
end
--etc
end |
I also added the last list you gave to the code I have.
(I didn't include the hero names.)
Code: | trainer = {
Data = {
Characters = {
[0] = "Hero 1"; -- Table auto selects characters based alphabet order... so we will append the characters to the groupbox using value index.
[1] = "Hero 2";
[2] = "Hero 3";
[3] = "Hero 4";
[4] = "No One";
["Hero 1"] = 0; -- Index of radiogroup
["Hero 2"] = 1;
["Hero 3"] = 2;
["Hero 4"] = 3;
["No One"] = 4;
}}}
Stats = { -- Exp and level
{{1,28};{2,86};{3,173};{4,303};{5,498};{6,791};{7,1231};{8,1890};{9,2879};{10,4363};{11,6217};{12,8533};{13,11427};{14,15044};{15,19113};{16,23689};{17,28836};{18,34626};{19,41140};{20,48467};{21,56710};{22,65982};{23,76412};{24,88146};{25,101346};{26,116195};{27,132900};{28,151693};{29,172835};{30,196620};{31,223377};{32,253479};{33,287343};{34,325439};{35,368297};{36,416511};{37,470751};{38,531770};{39,600416};{40,677643};{41,764523};{42,862262};{43,960001};{44,1057740};{45,1155479};{46,1253218};{47,1350957};{48,1448696};{49,1546435};{50,1644174};{51,1741913};{52,1839652};{53,1937391};{54,2035130};{55,2132869};{56,2230608};{57,2328347};{58,2426086};{59,2523825};{60,2621564};{61,2719303};{62,2817042};{63,2914781};{64,3012520};{65,3110259};{66,3207998};{67,3305737};{68,3403476};{69,3501215};{70,3598954};{71,3696693};{72,3794432};{73,3892171};{74,3989910};{75,4087649};{76,4185388};{77,4283127};{78,4380866};{79,4478605};{80,4576344};{81,4674083};{82,4771822};{83,4869561};{84,4967300};{85,5065039};{86,5162778};{87,5260517};{88,5358256};{89,5455995};{90,5553734};{91,5651473};{92,5749212};{93,5846951};{94,5944690};{95,6042429};{96,6140168};{97,6237907};{98,6335646};};
{{1,11};{2,35};{3,83};{4,155};{5,263};{6,425};{7,668};{8,1032};{9,1578};{10,2397};{11,3626};{12,5162};{13,7082};{14,9482};{15,12482};{16,16232};{17,20919};{18,26778};{19,34101};{20,42339};{21,51607};{22,62033};{23,73762};{24,86956};{25,101800};{26,118499};{27,137285};{28,158420};{29,182196};{30,208944};{31,239035};{32,272887};{33,310971};{34,353815};{35,402014};{36,456238};{37,517240};{38,585867};{39,663072};{40,749927};{41,847638};{42,945349};{43,1043060};{44,1140771};{45,1238482};{46,1336193};{47,1433904};{48,1531615};{49,1629326};{50,1727037};{51,1824748};{52,1922459};{53,2020170};{54,2117881};{55,2215592};{56,2313303};{57,2411014};{58,2508725};{59,2606436};{60,2704147};{61,2801858};{62,2899569};{63,2997280};{64,3094991};{65,3192702};{66,3290413};{67,3388124};{68,3485835};{69,3583546};{70,3681257};{71,3778968};{72,3876679};{73,3974390};{74,4072101};{75,4169812};{76,4267523};{77,4365234};{78,4462945};{79,4560656};{80,4658367};{81,4756078};{82,4853789};{83,4951500};{84,5049211};{85,5146922};{86,5244633};{87,5342344};{88,5440055};{89,5537766};{90,5635477};{91,5733188};{92,5830899};{93,5928610};{94,6026321};{95,6124032};{96,6221743};{97,6319454};{98,6417165};};
{{1,13};{2,41};{3,97};{4,181};{5,307};{6,496};{7,779};{8,1204};{9,1841};{10,2797};{11,4231};{12,6023};{13,8263};{14,11063};{15,14563};{16,18938};{17,24406};{18,30558};{19,37478};{20,45262};{21,54019};{22,63871};{23,74954};{24,87422};{25,101449};{26,117228};{27,134980};{28,154951};{29,177418};{30,202693};{31,231127};{32,263115};{33,299101};{34,339584};{35,385127};{36,436363};{37,494003};{38,558848};{39,631798};{40,713866};{41,806193};{42,910060};{43,1026911};{44,1143762};{45,1260613};{46,1377464};{47,1494315};{48,1611166};{49,1728017};{50,1844868};{51,1961719};{52,2078570};{53,2195421};{54,2312272};{55,2429123};{56,2545974};{57,2662825};{58,2779676};{59,2896527};{60,3013378};{61,3130229};{62,3247080};{63,3363931};{64,3480782};{65,3597633};{66,3714484};{67,3831335};{68,3948186};{69,4065037};{70,4181888};{71,4298739};{72,4415590};{73,4532441};{74,4649292};{75,4766143};{76,4882994};{77,4999845};{78,5116696};{79,5233547};{80,5350398};{81,5467249};{82,5584100};{83,5700951};{84,5817802};{85,5934653};{86,6051504};{87,6168355};{88,6285206};{89,6402057};{90,6518908};{91,6635759};{92,6752610};{93,6869461};{94,6986312};{95,7103163};{96,7220014};{97,7336865};{98,7453716};};
{{1,19};{2,59};{3,139};{4,259};{5,439};{6,709};{7,1114};{8,1721};{9,2632};{10,3998};{11,6046};{12,8606};{13,11806};{14,15806};{15,20806};{16,27056};{17,34868};{18,43656};{19,53542};{20,64663};{21,77174};{22,91249};{23,107082};{24,124894};{25,144932};{26,167474};{27,192834};{28,221364};{29,253460};{30,289567};{31,330187};{32,375884};{33,427292};{34,485125};{35,550187};{36,623382};{37,705725};{38,798361};{39,902576};{40,1019817};{41,1151713};{42,1300095};{43,1448477};{44,1596859};{45,1745241};{46,1893623};{47,2042005};{48,2190387};{49,2338769};{50,2487151};{51,2635533};{52,2783915};{53,2932297};{54,3080679};{55,3229061};{56,3377443};{57,3525825};{58,3674207};{59,3822589};{60,3970971};{61,4119353};{62,4267735};{63,4416117};{64,4564499};{65,4712881};{66,4861263};{67,5009645};{68,5158027};{69,5306409};{70,5454791};{71,5603173};{72,5751555};{73,5899937};{74,6048319};{75,6196701};{76,6345083};{77,6493465};{78,6641847};{79,6790229};{80,6938611};{81,7086993};{82,7235375};{83,7383757};{84,7532139};{85,7680521};{86,7828903};{87,7977285};{88,8125667};{89,8274049};{90,8422431};{91,8570813};{92,8719195};{93,8867577};{94,9015959};{95,9164341};{96,9312723};{97,9461105};{98,9609487};};
{{1,14};{2,44};{3,104};{4,194};{5,329};{6,531};{7,834};{8,1289};{9,1972};{10,2996};{11,4532};{12,6452};{13,8852};{14,11852};{15,15602};{16,20289};{17,25562};{18,31494};{19,38168};{20,45675};{21,54120};{22,63621};{23,74309};{24,86333};{25,99860};{26,115077};{27,132196};{28,151455};{29,173120};{30,197493};{31,224912};{32,255757};{33,290457};{34,329494};{35,373411};{36,422817};{37,478398};{38,540926};{39,611270};{40,690407};{41,779435};{42,879591};{43,992267};{44,1119027};{45,1245787};{46,1372547};{47,1499307};{48,1626067};{49,1752827};{50,1879587};{51,2006347};{52,2133107};{53,2259867};{54,2386627};{55,2513387};{56,2640147};{57,2766907};{58,2893667};{59,3020427};{60,3147187};{61,3273947};{62,3400707};{63,3527467};{64,3654227};{65,3780987};{66,3907747};{67,4034507};{68,4161267};{69,4288027};{70,4414787};{71,4541547};{72,4668307};{73,4795067};{74,4921827};{75,5048587};{76,5175347};{77,5302107};{78,5428867};{79,5555627};{80,5682387};{81,5809147};{82,5935907};{83,6062667};{84,6189427};{85,6316187};{86,6442947};{87,6569707};{88,6696467};{89,6823227};{90,6949987};{91,7076747};{92,7203507};{93,7330267};{94,7457027};{95,7583787};{96,7710547};{97,7837307};{98,7964067};};
{{1,9};{2,29};{3,69};{4,129};{5,219};{6,354};{7,556};{8,859};{9,1314};{10,1997};{11,3021};{12,4301};{13,5901};{14,7901};{15,10401};{16,13526};{17,17432};{18,22314};{19,27806};{20,33984};{21,40934};{22,48753};{23,57549};{24,67444};{25,78576};{26,91099};{27,105187};{28,121036};{29,138866};{30,158924};{31,181489};{32,206875};{33,235434};{34,267562};{35,303706};{36,344367};{37,390111};{38,441572};{39,499466};{40,564596};{41,637867};{42,720297};{43,813031};{44,905765};{45,998499};{46,1091233};{47,1183967};{48,1276701};{49,1369435};{50,1462169};{51,1554903};{52,1647637};{53,1740371};{54,1833105};{55,1925839};{56,2018573};{57,2111307};{58,2204041};{59,2296775};{60,2389509};{61,2482243};{62,2574977};{63,2667711};{64,2760445};{65,2853179};{66,2945913};{67,3038647};{68,3131381};{69,3224115};{70,3316849};{71,3409583};{72,3502317};{73,3595051};{74,3687785};{75,3780519};{76,3873253};{77,3965987};{78,4058721};{79,4151455};{80,4244189};{81,4336923};{82,4429657};{83,4522391};{84,4615125};{85,4707859};{86,4800593};{87,4893327};{88,4986061};{89,5078795};{90,5171529};{91,5264263};{92,5356997};{93,5449731};{94,5542465};{95,5635199};{96,5727933};{97,5820667};{98,5913401};};
{{1,17};{2,53};{3,125};{4,233};{5,395};{6,638};{7,1002};{8,1548};{9,2368};{10,3597};{11,5440};{12,7744};{13,10624};{14,14224};{15,18724};{16,24349};{17,30677};{18,37796};{19,45804};{20,54813};{21,64948};{22,76349};{23,89175};{24,103604};{25,119836};{26,138097};{27,158640};{28,181750};{29,207748};{30,236995};{31,269897};{32,306911};{33,348551};{34,395396};{35,448096};{36,507383};{37,574080};{38,649114};{39,733527};{40,828491};{41,935325};{42,1055513};{43,1190724};{44,1325935};{45,1461146};{46,1596357};{47,1731568};{48,1866779};{49,2001990};{50,2137201};{51,2272412};{52,2407623};{53,2542834};{54,2678045};{55,2813256};{56,2948467};{57,3083678};{58,3218889};{59,3354100};{60,3489311};{61,3624522};{62,3759733};{63,3894944};{64,4030155};{65,4165366};{66,4300577};{67,4435788};{68,4570999};{69,4706210};{70,4841421};{71,4976632};{72,5111843};{73,5247054};{74,5382265};{75,5517476};{76,5652687};{77,5787898};{78,5923109};{79,6058320};{80,6193531};{81,6328742};{82,6463953};{83,6599164};{84,6734375};{85,6869586};{86,7004797};{87,7140008};{88,7275219};{89,7410430};{90,7545641};{91,7680852};{92,7816063};{93,7951274};{94,8086485};{95,8221696};{96,8356907};{97,8492118};{98,8627329};};
{{1,10};{2,32};{3,76};{4,142};{5,241};{6,389};{7,611};{8,945};{9,1446};{10,2197};{11,3323};{12,4731};{13,6491};{14,8691};{15,11441};{16,14878};{17,19174};{18,24544};{19,31257};{20,38809};{21,47305};{22,56862};{23,67613};{24,79708};{25,93315};{26,108622};{27,125843};{28,145216};{29,167011};{30,191530};{31,219113};{32,250144};{33,285054};{34,324328};{35,368510};{36,418215};{37,474133};{38,537041};{39,607812};{40,687429};{41,776997};{42,877761};{43,991120};{44,1104479};{45,1217838};{46,1331197};{47,1444556};{48,1557915};{49,1671274};{50,1784633};{51,1897992};{52,2011351};{53,2124710};{54,2238069};{55,2351428};{56,2464787};{57,2578146};{58,2691505};{59,2804864};{60,2918223};{61,3031582};{62,3144941};{63,3258300};{64,3371659};{65,3485018};{66,3598377};{67,3711736};{68,3825095};{69,3938454};{70,4051813};{71,4165172};{72,4278531};{73,4391890};{74,4505249};{75,4618608};{76,4731967};{77,4845326};{78,4958685};{79,5072044};{80,5185403};{81,5298762};{82,5412121};{83,5525480};{84,5638839};{85,5752198};{86,5865557};{87,5978916};{88,6092275};{89,6205634};{90,6318993};{91,6432352};{92,6545711};{93,6659070};{94,6772429};{95,6885788};{96,6999147};{97,7112506};{98,7225865};};
}
function trainer:start()
self.form = createForm(false); -- self = trainer since it's a function inside of a table...
setProperty(self.form , "BiDiMode", "bdLeftToRight");
self.form.Caption = 'Cheat Panel';
self.form.Width = 450;
self.form.Height = 290;
self.form.Left = 340;
self.form.Top =7;
--
self.value_panel2 = createPanel(self.form);
self.value_panel2.Caption = '';
self.value_panel2.left = 5;
self.value_panel2.top = 7;
self.value_panel2.Height = 40;
self.value_panel2.Width = 93;
--
self.value_panel1 = createPanel(self.form);
self.value_panel1.Caption = '';
self.value_panel1.left = 5;
self.value_panel1.top = 50;
self.value_panel1.Height = 40;
self.value_panel1.Width = 93;
--
self.gold_value = createEdit(self.value_panel2);
self.gold_value.top = 6;
self.gold_value.left = 6;
self.gold_value.Width = 80;
self.gold_value.Height = 23;
-- The line below this, allows only numbers or the - number to be entered.
setMethodProperty(self.gold_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_gold.onClick(); end return key; end)
--
self.exp_value = createEdit(self.value_panel1);
self.exp_value.top = 6;
self.exp_value.left = 6;
self.exp_value.Width = 80;
self.exp_value.Height = 23;
-- The line below this, allows only numbers or the - number to be entered.
setMethodProperty(self.exp_value, "OnKeyPress", function (sender, key) local keynr = string.byte(key); if (keynr~=8) and (keynr~=45) and (keynr~=13) and ((keynr<48) or (keynr>57)) then key=nil; end if (keynr==13 and not(sender.Caption == nil or sender.Caption == '')) then key = nil; self.set_exp.onClick(); end return key; end)
--
self.set_gold = createButton(self.form);
self.set_gold.Caption = 'Enter Gold';
self.set_gold.height = 35;
self.set_gold.left = 100;
self.set_gold.top = 7;
self.set_gold.width = 150;
self.set_gold.onClick = function (sender)
local value = tonumber(self.gold_value.Caption);
if value then
goldvalue = value;
print("The gold value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.gold_value.Caption = nil
end--function (sender)
--
self.set_exp = createButton(self.form);
self.set_exp.Caption = 'Enter Exp';
self.set_exp.height = 35;
self.set_exp.left = 100;
self.set_exp.top = 52;
self.set_exp.width = 150;
self.set_exp.onClick = function (sender)
local value = tonumber(self.exp_value.Caption);
if value then
expvalue = value;
print("The exp value entered " .. goldvalue);
--if expvalue and goldvalue and heroname then
-- RecalculateAddresses()
--end
end--if value then
self.exp_value.Caption = nil
end--function (sender)
--
self.characters_rg = createRadioGroup(self.form)
self.characters_rg.Caption = 'Characters:'
self.characters_rg.AutoSize = true
self.characters_rg.Columns = 1 -- two columns (default is 1)
-- characters_rg.Items.Text = 'Zidane\nVivi\nGarnet\nSteiner\nFreya\nQuina\nEiko\nAmarant\nNo One' -- delimited with \n
self.characters_rg.setItemIndex(-1) -- select first option by default
self.characters_rg.Top = 90
self.characters_rg.Left = 5
for character,_ in pairs(self.Data.Characters) do
if tonumber(character) then
self.characters_rg.getItems().add(_);
end
end--for character,_ in pairs(self.Data.Characters) do
--
for i=0, 6 do
self["listview"..i] = createListView(self.form)
setProperty(self["listview"..i], 'ViewStyle', 'vsReport')
setProperty(self["listview"..i], 'RowSelect', 'True')
setProperty(self["listview"..i], 'ReadOnly', 'True')
setProperty(self["listview"..i], 'HideSelection', 'False')
self["listview"..i].top = 100;
self["listview"..i].width = 140;
self["listview"..i].left = 105;
self["listview"..i].height = 175;
self["listview"..i].colum1 = self["listview"..i].getColumns().add()
self["listview"..i].colum1.Width = 40;
self["listview"..i].colum1.Caption = 'Lvl'..i
self["listview"..i].colum2 = self["listview"..i].getColumns().add()
self["listview"..i].colum2.Width = 80;
self["listview"..i].colum2.Caption = 'Exp'..i
self["listview"..i].visible = false
self["listview"..i].onClick = function (sender)
end
end
self.characters_rg.onClick = function (sender)--Need Character Data Table
local index = strings_getString(sender.getItems(), sender.ItemIndex);
local i = nil;
i = self.Data.Characters[index] + 1; -- If the character does not hold the value,, i remains nil.
if i then
heroname = index;
print("The index selected is:", self.Data.Characters[index]);
print("The hero name is: ", heroname);
for i=0, 6 do
self["listview"..i].visible = false
local items = self["listview"..tonumber(i)].Items
items.Clear()
end
if heroname == "No One" then --for _,__table in pairs(self.Data.Stats[i]) do
heroname = nil;
else
ind=self.Data.Characters[index]
ind=tonumber(ind) + 1
--local function addItem1()
local items = self["listview"..tonumber(ind)].Items
for k,v in ipairs(Stats[ind]) do
print(v[1],v[2])
item = items.Add()
item.Caption = v[1]
item.SubItems.Add(v[2])
end
self["listview"..tonumber(ind)].visible = true
end
end;--if i then
end;--function (sender)
self.form.show();
end;
--
trainer:start();
|
_________________
|
|
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
|
|