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 


Table objects

 
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: 586

PostPosted: Wed Feb 23, 2022 11:15 am    Post subject: Table objects Reply with quote

What would be the code to list all objects, not memory records, of a table?
Back to top
View user's profile Send private message Yahoo Messenger
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Wed Feb 23, 2022 11:19 am    Post subject: Reply with quote

Pretty much everything in the table is an object, that includes buttons, edit fields, listview components, menus etc... perhaps being a little bit more specific would help.
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Wed Feb 23, 2022 11:42 am    Post subject: Reply with quote

LeFiXER wrote:
Pretty much everything in the table is an object, that includes buttons, edit fields, listview components, menus etc... perhaps being a little bit more specific would help.


If there are any I would like the code to list them, if none. I guess I should narrow it down to objects in a cheat panel or UDF exists a nothing found would work. The list should be of any cheat panel and its object. I don't know how to say it better or differently.
Back to top
View user's profile Send private message Yahoo Messenger
YoucefHam
Cheater
Reputation: 5

Joined: 19 Mar 2015
Posts: 39
Location: Algeria

PostPosted: Wed Feb 23, 2022 12:03 pm    Post subject: Reply with quote

bknight2602 wrote:

If there are any I would like the code to list them, if none. I guess I should narrow it down to objects in a cheat panel or UDF exists a nothing found would work. The list should be of any cheat panel and its object. I don't know how to say it better or differently.


Hi Very Happy ,

try using this functions

Code:
--function to read all components in a form
function cprint(m,str)
   if not m.ComponentCount then return end
   local mc = m.Component
   print('\n\n\n"Index" : "Component.Name" // "Component.Caption" || "Paresnt.Name" // "Parent.Caption"\n',('--'):rep(40))
   for i = 0, m.ComponentCount - 1 do
      local p = function ()
         print(i,':',
            mc[i].Name,' \t// \t',
            mc[i].Caption,
            (mc[i].Parent and ' \t|| \t'..mc[i].Parent.Name..' \t// \t'..mc[i].Parent.Caption or nil)
         )
      end
      if not str then
         p()
      else
         if (mc[i].Name and mc[i].Name:lower():find(str:lower())) then
            p()
         elseif (mc[i].Caption and mc[i].Caption:lower():find(str:lower())) then
            p()
         elseif (mc[i].Parent and mc[i].Parent.Name:lower():find(str:lower())) then
            p()
         elseif (mc[i].Parent and mc[i].Parent.Caption:lower():find(str:lower())) then
            p()
         end
      end
   end
end

--get all active forms
for i = 0, getFormCount() - 1 do
  local frm = getForm(i)
  print(frm.Name,' : ',frm.ClassName,' : ',frm.Caption)
end

--get all the components (buttons, Menus, ...)
--cprint(MainForm)

--get all the components (buttons, Menus, ...) that have 'memory'
cprint( MainForm , 'memory' )

--get the text in "btnMemoryView"
print( MainForm.btnMemoryView.Caption )

--click the button "btnMemoryView"
MainForm.btnMemoryView.doClick()


see more:
https://wiki.cheatengine.org/index.php?title=Lua#Classes
Back to top
View user's profile Send private message Send e-mail
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Wed Feb 23, 2022 1:10 pm    Post subject: Reply with quote

Not sure how long this However, copy and paste this cod into a blank table and let me know what happens when you hit the execute script on a blank instance on CE.

Code:

print("start")
trainer =    {
            Data =    {
                        Characters =    {
                                          [0] = "1st";
                                          [1] = "2nd";
                                          [2] = "3rd";
                                          [3] = "4th";
                                          [4] = "5th";
                                          [5] = "6th";
                                          [6] = "No One";

                                          ["1st"] = 0; -- Index of radiogroup
                                          ["2nd"] = 1;
                                          ["3rd"] = 2;
                                          ["4th"] = 3;
                                          ["5th"] = 4;
                                          ["6th"] = 5;
                                          ["No One"] = 6;
                                       };--Characters
                        Stats =   { -- Exp and level
                                           {{1,999};{2,1999};{3,3999};{4,7999};{5,15999};{6,31999};{7,63999};{8,127999};{9,255999};{10,511999};{11,767999};{12,1167999};{13,1567999};{14,1967999};{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};};
                                           {{1,1249};{2,2499};{3,4999};{4,9999};{5,19999};{6,39999};{7,79999};{8,159999};{9,319999};{10,639999};{11,1014999};{12,1414999};{13,1814999};{14,2214999};{15,2614999};{16,3214999};{17,3814999};{18,4414999};{19,5014999};{20,5614999};{21,6214999};{22,6814999};{23,7414999};{24,8014999};{25,8614999};{26,9214999};{27,9814999};{28,10414999};{29,11044999};{30,11614999};{31,12214999};{32,12814999};{33,13414999};{34,14014999};{35,14614999};{36,15214999};{37,15814999};{38,16414999};{39,17014999};{40,17614999};{41,18214999};{42,18814999};{43,19414999};{44,20014999};{45,20614999};{46,21214999};{47,21814999};{48,22414999};{49,23014999};{50,23614999};{51,24214999};{52,24814999};{53,25414999};{54,26014999};{55,26614999};{56,27214999};{57,27814999};{58,28414999};{59,29014999};{60,29614999};{61,30214999};{62,30814999};{63,31414999};{64,32014999};{65,32614999};{66,33214999};{67,33814999};{68,34414999};{69,35014999};{70,35614999};{71,36214999};{72,36814999};{73,37414999};{74,38014999};{75,38614999};{76,39214999};{77,39814999};{78,40414999};{79,41014999};{80,41614999};{81,42214999};{82,42814999};{83,43414999};{84,44014999};{85,44614999};{86,45214999};{87,45814999};{88,46414999};{89,47014999};{90,47614999};{91,48214999};{92,48814999};{93,49414999};{94,50014999};{95,50614999};{96,51214999};{97,51814999};{98,52414999};{99,53014999};{100,53614999};{101,54214999};{102,54814999};{103,55414999};{104,56014999};{105,56614999};{106,57214999};{107,57814999};{108,58414999};{109,59014999};{110,59614999};};
                                           {{1,1099};{2,2199};{3,4399};{4,8799};{5,17599};{6,35199};{7,70399};{8,140799};{9,281599};{10,563199};{11,875199};{12,1275199};{13,1675199};{14,2075199};{15,2475199};{16,3075199};{17,3675199};{18,4275199};{19,4875199};{20,5475199};{21,6075199};{22,6675199};{23,7275199};{24,7875199};{25,8475199};{26,9075199};{27,9675199};{28,10275199};{29,10875199};{30,11475199};{31,12075199};{32,12675199};{33,13275199};{34,13875199};{35,14475199};{36,15075199};{37,15675199};{38,16275199};{39,16875199};{40,17475199};{41,18075199};{42,18675199};{43,19275199};{44,19875199};{45,20475199};{46,21075199};{47,21675199};{48,22275199};{49,22875199};{50,23475199};{51,24075199};{52,24675199};{53,25275199};{54,25875199};{55,26475199};{56,27075199};{57,27675199};{58,28275199};{59,28875199};{60,29475199};{61,30075199};{62,30675199};{63,31275199};{64,31875199};{65,32475199};{66,33075199};{67,33675199};{68,34275199};{69,34875199};{70,35475199};{71,36075199};{72,36675199};{73,37275199};{74,37875199};{75,38475199};{76,39075199};{77,39675199};{78,40275199};{79,40875199};{80,41475199};{81,42075199};{82,42675199};{83,43275199};{84,43875199};{85,44475199};{86,45075199};{87,45675199};{88,46275199};{89,46875199};{90,47475199};{91,48075199};{92,48675199};{93,49275199};{94,49875199};{95,50475199};{96,51075199};{97,51675199};{98,52275199};{99,52875199};{100,53475199};{101,54075199};{102,54675199};{103,55275199};{104,55875199};{105,56475199};{106,57075199};{107,57675199};{108,58275199};{109,58875199};{110,59475199};};
                                           {{1,899};{2,1799};{3,3599};{4,7199};{5,14399};{6,28799};{7,57599};{8,115199};{9,230399};{10,460799};{11,685799};{12,1085799};{13,1485799};{14,1885799};{15,2285799};{16,2885799};{17,3485799};{18,4085799};{19,4685799};{20,5285799};{21,5885799};{22,6485799};{23,7085799};{24,7685799};{25,8285799};{26,8885799};{27,9485799};{28,10085799};{29,10685799};{30,11285799};{31,11885799};{32,12485799};{33,13085799};{34,13685799};{35,14285799};{36,14885799};{37,15485799};{38,16085799};{39,16685799};{40,17285799};{41,17885799};{42,18485799};{43,19085799};{44,19685799};{45,20285799};{46,20885799};{47,21485799};{48,22085799};{49,22685799};{50,23285799};{51,23885799};{52,24485799};{53,25085799};{54,25685799};{55,26285799};{56,26885799};{57,27485799};{58,28085799};{59,28685799};{60,29285799};{61,29885799};{62,30485799};{63,31085799};{64,31685799};{65,32285799};{66,32885799};{67,33485799};{68,34085799};{69,34685799};{70,35285799};{71,35885799};{72,36485799};{73,37085799};{74,37685799};{75,38285799};{76,38885799};{77,39485799};{78,40085799};{79,40685799};{80,41285799};{81,41885799};{82,42485799};{83,43085799};{84,43685799};{85,44285799};{86,44885799};{87,45485799};{88,46085799};{89,46685799};{90,47285799};{91,47885799};{92,48485799};{93,49085799};{94,49685799};{95,50285799};{96,50885799};{97,51485799};{98,52085799};{99,52685799};{100,53285799};{101,53885799};{102,54485799};{103,55085799};{104,55685799};{105,56285799};{106,56885799};{107,57485799};{108,58085799};{109,58685799};{110,59285799};};
                                           {{1,1299};{2,2599};{3,5199};{4,10399};{5,20799};{6,41599};{7,83199};{8,166399};{9,332799};{10,665599};{11,1065599};{12,1465599};{13,1865599};{14,2265599};{15,2665599};{16,3265599};{17,3865599};{18,4465599};{19,5065599};{20,5665599};{21,6265599};{22,6865599};{23,7465599};{24,8065599};{25,8665599};{26,9265599};{27,9865599};{28,10465599};{29,11065599};{30,11665599};{31,12265599};{32,12865599};{33,13465599};{34,14065599};{35,14665599};{36,15265599};{37,15865599};{38,16465599};{39,17065599};{40,17665599};{41,18265599};{42,18865599};{43,19465599};{44,20065599};{45,20665599};{46,21265599};{47,21865599};{48,22465599};{49,23065599};{50,23665599};{51,24265599};{52,24865599};{53,25465599};{54,26065599};{55,26665599};{56,27265599};{57,27865599};{58,28465599};{59,29065599};{60,29665599};{61,30265599};{62,30865599};{63,31465599};{64,32065599};{65,32665599};{66,33265599};{67,33865599};{68,34465599};{69,35065599};{70,35665599};{71,36265599};{72,36865599};{73,37465599};{74,38065599};{75,38665599};{76,39265599};{77,39865599};{78,40465599};{79,41065599};{80,41665599};{81,42265599};{82,42865599};{83,43465599};{84,44065599};{85,44665599};{86,45265599};{87,45865599};{88,46465599};{89,47065599};{90,47665599};{91,48265599};{92,48865599};{93,49465599};{94,50065599};{95,50665599};{96,51265599};{97,51865599};{98,52465599};{99,53065599};{100,53665599};{101,54265599};{102,54865599};{103,55465599};{104,56065599};{105,56665599};{106,57265599};{107,57865599};{108,58465599};{109,59065599};{110,59665599};};
                                           {{1,1149};{2,2299};{3,4599};{4,9199};{5,18399};{6,36799};{7,73599};{8,147199};{9,294399};{10,588799};{11,913799};{12,1313799};{13,1713799};{14,2113799};{15,2513799};{16,3113799};{17,3713799};{18,4313799};{19,4913799};{20,5513799};{21,6113799};{22,6713799};{23,7313799};{24,7913799};{25,8513799};{26,9113799};{27,9713799};{28,10313799};{29,10913799};{30,11513799};{31,12113799};{32,12713799};{33,13313799};{34,13913799};{35,14513799};{36,15113799};{37,15713799};{38,16313799};{39,16913799};{40,17513799};{41,18113799};{42,18713799};{43,19313799};{44,19913799};{45,20513799};{46,21113799};{47,21713799};{48,22313799};{49,22913799};{50,23513799};{51,24113799};{52,24713799};{53,25313799};{54,25913799};{55,26513799};{56,27113799};{57,27713799};{58,28313799};{59,28913799};{60,29513799};{61,30113799};{62,30713799};{63,31313799};{64,31913799};{65,32513799};{66,33113799};{67,33713799};{68,34313799};{69,34913799};{70,35513799};{71,36113799};{72,36713799};{73,37313799};{74,37913799};{75,38513799};{76,39113799};{77,39713799};{78,40313799};{79,40913799};{80,41513799};{81,42113799};{82,42713799};{83,43313799};{84,43913799};{85,44513799};{86,45113799};{87,45713799};{88,46313799};{89,46913799};{90,47513799};{91,48113799};{92,48713799};{93,49313799};{94,49913799};{95,50513799};{96,51113799};{97,51713799};{98,52313799};{99,52913799};{100,53513799};{101,54113799};{102,54713799};{103,55313799};{104,55913799};{105,56513799};{106,57113799};{107,57713799};{108,58313799};{109,58913799};{110,59513799};};
                                           {{1,1249};{2,2499};{3,4999};{4,9999};{5,19999};{6,39999};{7,79999};{8,159999};{9,319999};{10,639999};{11,1014999};{12,1414999};{13,1814999};{14,2214999};{15,2614999};{16,3214999};{17,3814999};{18,4414999};{19,5014999};{20,5614999};{21,6214999};{22,6814999};{23,7414999};{24,8014999};{25,8614999};{26,9214999};{27,9814999};{28,10414999};{29,11044999};{30,11614999};{31,12214999};{32,12814999};{33,13414999};{34,14014999};{35,14614999};{36,15214999};{37,15814999};{38,16414999};{39,17014999};{40,17614999};{41,18214999};{42,18814999};{43,19414999};{44,20014999};{45,20614999};{46,21214999};{47,21814999};{48,22414999};{49,23014999};{50,23614999};{51,24214999};{52,24814999};{53,25414999};{54,26014999};{55,26614999};{56,27214999};{57,27814999};{58,28414999};{59,29014999};{60,29614999};{61,30214999};{62,30814999};{63,31414999};{64,32014999};{65,32614999};{66,33214999};{67,33814999};{68,34414999};{69,35014999};{70,35614999};{71,36214999};{72,36814999};{73,37414999};{74,38014999};{75,38614999};{76,39214999};{77,39814999};{78,40414999};{79,41014999};{80,41614999};{81,42214999};{82,42814999};{83,43414999};{84,44014999};{85,44614999};{86,45214999};{87,45814999};{88,46414999};{89,47014999};{90,47614999};{91,48214999};{92,48814999};{93,49414999};{94,50014999};{95,50614999};{96,51214999};{97,51814999};{98,52414999};{99,53014999};{100,53614999};{101,54214999};{102,54814999};{103,55414999};{104,56014999};{105,56614999};{106,57214999};{107,57814999};{108,58414999};{109,59014999};{110,59614999};};
                                           {{1,1249};{2,2499};{3,4999};{4,9999};{5,19999};{6,39999};{7,79999};{8,159999};{9,319999};{10,639999};{11,1014999};{12,1414999};{13,1814999};{14,2214999};{15,2614999};{16,3214999};{17,3814999};{18,4414999};{19,5014999};{20,5614999};{21,6214999};{22,6814999};{23,7414999};{24,8014999};{25,8614999};{26,9214999};{27,9814999};{28,10414999};{29,11044999};{30,11614999};{31,12214999};{32,12814999};{33,13414999};{34,14014999};{35,14614999};{36,15214999};{37,15814999};{38,16414999};{39,17014999};{40,17614999};{41,18214999};{42,18814999};{43,19414999};{44,20014999};{45,20614999};{46,21214999};{47,21814999};{48,22414999};{49,23014999};{50,23614999};{51,24214999};{52,24814999};{53,25414999};{54,26014999};{55,26614999};{56,27214999};{57,27814999};{58,28414999};{59,29014999};{60,29614999};{61,30214999};{62,30814999};{63,31414999};{64,32014999};{65,32614999};{66,33214999};{67,33814999};{68,34414999};{69,35014999};{70,35614999};{71,36214999};{72,36814999};{73,37414999};{74,38014999};{75,38614999};{76,39214999};{77,39814999};{78,40414999};{79,41014999};{80,41614999};{81,42214999};{82,42814999};{83,43414999};{84,44014999};{85,44614999};{86,45214999};{87,45814999};{88,46414999};{89,47014999};{90,47614999};{91,48214999};{92,48814999};{93,49414999};{94,50014999};{95,50614999};{96,51214999};{97,51814999};{98,52414999};{99,53014999};{100,53614999};{101,54214999};{102,54814999};{103,55414999};{104,56014999};{105,56614999};{106,57214999};{107,57814999};{108,58414999};{109,59014999};{110,59614999};};
                                           {{1,1149};{2,2299};{3,4599};{4,9199};{5,18399};{6,36799};{7,73599};{8,147199};{9,294399};{10,588799};{11,913799};{12,1313799};{13,1713799};{14,2113799};{15,2513799};{16,3113799};{17,3713799};{18,4313799};{19,4913799};{20,5513799};{21,6113799};{22,6713799};{23,7313799};{24,7913799};{25,8513799};{26,9113799};{27,9713799};{28,10313799};{29,10913799};{30,11513799};{31,12113799};{32,12713799};{33,13313799};{34,13913799};{35,14513799};{36,15113799};{37,15713799};{38,16313799};{39,16913799};{40,17513799};{41,18113799};{42,18713799};{43,19313799};{44,19913799};{45,20513799};{46,21113799};{47,21713799};{48,22313799};{49,22913799};{50,23513799};{51,24113799};{52,24713799};{53,25313799};{54,25913799};{55,26513799};{56,27113799};{57,27713799};{58,28313799};{59,28913799};{60,29513799};{61,30113799};{62,30713799};{63,31313799};{64,31913799};{65,32513799};{66,33113799};{67,33713799};{68,34313799};{69,34913799};{70,35513799};{71,36113799};{72,36713799};{73,37313799};{74,37913799};{75,38513799};{76,39113799};{77,39713799};{78,40313799};{79,40913799};{80,41513799};{81,42113799};{82,42713799};{83,43313799};{84,43913799};{85,44513799};{86,45113799};{87,45713799};{88,46313799};{89,46913799};{90,47513799};{91,48113799};{92,48713799};{93,49313799};{94,49913799};{95,50513799};{96,51113799};{97,51713799};{98,52313799};{99,52913799};{100,53513799};{101,54113799};{102,54713799};{103,55313799};{104,55913799};{105,56513799};{106,57113799};{107,57713799};{108,58313799};{109,58913799};{110,59513799};};
                                           {{1,1499};{2,2999};{3,5999};{4,11999};{5,23999};{6,47999};{7,95999};{8,191999};{9,383999};{10,767999};{11,1212999};{12,1612999};{13,2012999};{14,2412999};{15,2812999};{16,3412999};{17,4012999};{18,4612999};{19,5212999};{20,5812999};{21,6412999};{22,7012999};{23,7612999};{24,8212999};{25,8812999};{26,9412999};{27,10012999};{28,10612999};{29,11212999};{30,11812999};{31,12412999};{32,13012999};{33,13612999};{34,14212999};{35,14812999};{36,15412999};{37,16012999};{38,16612999};{39,17212999};{40,17812999};{41,18412999};{42,19012999};{43,19612999};{44,20212999};{45,20812999};{46,21412999};{47,22012999};{48,22612999};{49,23212999};{50,23812999};{51,24412999};{52,25012999};{53,25612999};{54,26212999};{55,26812999};{56,27412999};{57,28012999};{58,28612999};{59,29212999};{60,29812999};{61,30412999};{62,31012999};{63,31612999};{64,32212999};{65,32812999};{66,33412999};{67,34012999};{68,34612999};{69,35212999};{70,35812999};{71,36412999};{72,37012999};{73,37612999};{74,38212999};{75,38812999};{76,39412999};{77,40012999};{78,40612999};{79,41212999};{80,41812999};{81,42412999};{82,43012999};{83,43612999};{84,44212999};{85,44812999};{86,45412999};{87,46012999};{88,46612999};{89,47212999};{90,47812999};{91,48412999};{92,49012999};{93,49612999};{94,50212999};{95,50812999};{96,51412999};{97,52012999};{98,52612999};{99,53212999};{100,53812999};{101,54412999};{102,55012999};{103,55612999};{104,56212999};{105,56812999};{106,57412999};{107,58012999};{108,58612999};{109,59212999};{110,59812999};};
                                           {{1,1299};{2,2599};{3,5199};{4,10399};{5,20799};{6,41599};{7,83199};{8,166399};{9,332799};{10,665599};{11,1065599};{12,1465599};{13,1865599};{14,2265599};{15,2665599};{16,3265599};{17,3865599};{18,4465599};{19,5065599};{20,5665599};{21,6265599};{22,6865599};{23,7465599};{24,8065599};{25,8665599};{26,9265599};{27,9865599};{28,10465599};{29,11065599};{30,11665599};{31,12265599};{32,12865599};{33,13465599};{34,14065599};{35,14665599};{36,15265599};{37,15865599};{38,16465599};{39,17065599};{40,17665599};{41,18265599};{42,18865599};{43,19465599};{44,20065599};{45,20665599};{46,21265599};{47,21865599};{48,22465599};{49,23065599};{50,23665599};{51,24265599};{52,24865599};{53,25465599};{54,26065599};{55,26665599};{56,27265599};{57,27865599};{58,28465599};{59,29065599};{60,29665599};{61,30265599};{62,30865599};{63,31465599};{64,32065599};{65,32665599};{66,33265599};{67,33865599};{68,34465599};{69,35065599};{70,35665599};{71,36265599};{72,36865599};{73,37465599};{74,38065599};{75,38665599};{76,39265599};{77,39865599};{78,40465599};{79,41065599};{80,41665599};{81,42265599};{82,42865599};{83,43465599};{84,44065599};{85,44665599};{86,45265599};{87,45865599};{88,46465599};{89,47065599};{90,47665599};{91,48265599};{92,48865599};{93,49465599};{94,50065599};{95,50665599};{96,51265599};{97,51865599};{98,52465599};{99,53065599};{100,53665599};{101,54265599};{102,54865599};{103,55465599};{104,56065599};{105,56665599};{106,57265599};{107,57865599};{108,58465599};{109,59065599};{110,59665599};};
                                           {{1,1399};{2,2799};{3,5599};{4,11199};{5,22399};{6,44799};{7,89599};{8,179199};{9,358399};{10,716799};{11,1131799};{12,1531799};{13,1931799};{14,2331799};{15,2731799};{16,3331799};{17,3931799};{18,4531799};{19,5131799};{20,5731799};{21,6331799};{22,6931799};{23,7531799};{24,8131799};{25,8731799};{26,9331799};{27,9931799};{28,10531799};{29,11131799};{30,11731799};{31,12331799};{32,12931799};{33,13531799};{34,14131799};{35,14731799};{36,15331799};{37,15931799};{38,16531799};{39,17131799};{40,17731799};{41,18331799};{42,18931799};{43,19531799};{44,20131799};{45,20731799};{46,21331799};{47,21931799};{48,22531799};{49,23131799};{50,23731799};{51,24331799};{52,24931799};{53,25531799};{54,26131799};{55,26731799};{56,27331799};{57,27931799};{58,28531799};{59,29131799};{60,29731799};{61,30331799};{62,30931799};{63,31531799};{64,32131799};{65,32731799};{66,33331799};{67,33931799};{68,34531799};{69,35131799};{70,35731799};{71,36331799};{72,36931799};{73,37531799};{74,38131799};{75,38731799};{76,39331799};{77,39931799};{78,40531799};{79,41131799};{80,41731799};{81,42331799};{82,42931799};{83,43531799};{84,44131799};{85,44731799};{86,45331799};{87,45931799};{88,46531799};{89,47131799};{90,47731799};{91,48331799};{92,48931799};{93,49531799};{94,50131799};{95,50731799};{96,51331799};{97,51931799};{98,52531799};{99,53131799};{100,53731799};{101,54331799};{102,54931799};{103,55531799};{104,56131799};{105,56731799};{106,57331799};{107,57931799};{108,58531799};{109,59131799};{110,59731799};};
                                           {{1,1399};{2,2799};{3,5599};{4,11199};{5,22399};{6,44799};{7,89599};{8,179199};{9,358399};{10,716799};{11,1131799};{12,1531799};{13,1931799};{14,2331799};{15,2731799};{16,3331799};{17,3931799};{18,4531799};{19,5131799};{20,5731799};{21,6331799};{22,6931799};{23,7531799};{24,8131799};{25,8731799};{26,9331799};{27,9931799};{28,10531799};{29,11131799};{30,11731799};{31,12331799};{32,12931799};{33,13531799};{34,14131799};{35,14731799};{36,15331799};{37,15931799};{38,16531799};{39,17131799};{40,17731799};{41,18331799};{42,18931799};{43,19531799};{44,20131799};{45,20731799};{46,21331799};{47,21931799};{48,22531799};{49,23131799};{50,23731799};{51,24331799};{52,24931799};{53,25531799};{54,26131799};{55,26731799};{56,27331799};{57,27931799};{58,28531799};{59,29131799};{60,29731799};{61,30331799};{62,30931799};{63,31531799};{64,32131799};{65,32731799};{66,33331799};{67,33931799};{68,34531799};{69,35131799};{70,35731799};{71,36331799};{72,36931799};{73,37531799};{74,38131799};{75,38731799};{76,39331799};{77,39931799};{78,40531799};{79,41131799};{80,41731799};{81,42331799};{82,42931799};{83,43531799};{84,44131799};{85,44731799};{86,45331799};{87,45931799};{88,46531799};{89,47131799};{90,47731799};{91,48331799};{92,48931799};{93,49531799};{94,50131799};{95,50731799};{96,51331799};{97,51931799};{98,52531799};{99,53131799};{100,53731799};{101,54331799};{102,54931799};{103,55531799};{104,56131799};{105,56731799};{106,57331799};{107,57931799};{108,58531799};{109,59131799};{110,59731799};};
                                           {{1,1499};{2,2999};{3,5999};{4,11999};{5,23999};{6,47999};{7,95999};{8,191999};{9,383999};{10,767999};{11,1212999};{12,1612999};{13,2012999};{14,2412999};{15,2812999};{16,3412999};{17,4012999};{18,4612999};{19,5212999};{20,5812999};{21,6412999};{22,7012999};{23,7612999};{24,8212999};{25,8812999};{26,9412999};{27,10012999};{28,10612999};{29,11212999};{30,11812999};{31,12412999};{32,13012999};{33,13612999};{34,14212999};{35,14812999};{36,15412999};{37,16012999};{38,16612999};{39,17212999};{40,17812999};{41,18412999};{42,19012999};{43,19612999};{44,20212999};{45,20812999};{46,21412999};{47,22012999};{48,22612999};{49,23212999};{50,23812999};{51,24412999};{52,25012999};{53,25612999};{54,26212999};{55,26812999};{56,27412999};{57,28012999};{58,28612999};{59,29212999};{60,29812999};{61,30412999};{62,31012999};{63,31612999};{64,32212999};{65,32812999};{66,33412999};{67,34012999};{68,34612999};{69,35212999};{70,35812999};{71,36412999};{72,37012999};{73,37612999};{74,38212999};{75,38812999};{76,39412999};{77,40012999};{78,40612999};{79,41212999};{80,41812999};{81,42412999};{82,43012999};{83,43612999};{84,44212999};{85,44812999};{86,45412999};{87,46012999};{88,46612999};{89,47212999};{90,47812999};{91,48412999};{92,49012999};{93,49612999};{94,50212999};{95,50812999};{96,51412999};{97,52012999};{98,52612999};{99,53212999};{100,53812999};{101,54412999};{102,55012999};{103,55612999};{104,56212999};{105,56812999};{106,57412999};{107,58012999};{108,58612999};{109,59212999};{110,59812999};};
                                   };-- Stats Exp and level
                        Profession =  {
                                           [0] = "Fighter";
                                           [1] = "Mage";
                                           [2] = "Priest";
                                           [3] = "Thief";
                                           [4] = "Ranger";
                                           [5] = "Alchemist";
                                           [6] = "Bard";
                                           [7] = "Psionic";
                                           [8] = "Valkyrie";
                                           [9] = "Bishop";
                                           [10] = "Lord";
                                           [11] = "Samuri";
                                           [12] = "Monk";
                                           [13] = "Ninja";
                                           [14] = "None";
                                      };--Profession
                     };--Data
            };--Trainer
--
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 = 350;
   self.form.Height = 410;
   self.form.Left = 470;
   self.form.Top =5;
--
   self.value_panel1 = createPanel(self.form);
   self.value_panel1.Caption = '';
   self.value_panel1.left = 5;
   self.value_panel1.top = 5;
   self.value_panel1.Height = 35;
   self.value_panel1.Width = 120;
--
   self.value_panel2 = createPanel(self.form);
   self.value_panel2.Caption = '';
   self.value_panel2.left = 5;
   self.value_panel2.top = 45;
   self.value_panel2.Height = 35;
   self.value_panel2.Width = 120;
--
   self.exp_value = createEdit(self.value_panel1);
   self.exp_value.top = 3;
   self.exp_value.left = 10;
   self.exp_value.Width = 105;
   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.gold_value = createEdit(self.value_panel2);
   self.gold_value.top = 3;
   self.gold_value.left = 10;
   self.gold_value.Width = 105;
   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_exp.onClick(); end return key; end)
--
   self.Level = createLabel(self.form);
   self.Level.top = 90;
   self.Level.left = 85;
   self.Level.Width = 25;
   self.Level.Height = 20;
   self.Level.Caption = "Lvl"
--
   self.HeroOneEdit = createEdit(self.form);
   self.HeroOneEdit.top = 110;
   self.HeroOneEdit.left = 85;
   self.HeroOneEdit.Width = 20;
   self.HeroOneEdit.Height = 20;
--
   self.HeroTwoEdit = createEdit(self.form);
   self.HeroTwoEdit.top = 137;
   self.HeroTwoEdit.left = 85;
   self.HeroTwoEdit.Width = 20;
   self.HeroTwoEdit.Height = 20;
--
   self.HeroThreeEdit = createEdit(self.form);
   self.HeroThreeEdit.top = 164;
   self.HeroThreeEdit.left = 85;
   self.HeroThreeEdit.Width = 20;
   self.HeroThreeEdit.Height = 20;
--
   self.HeroFourEdit = createEdit(self.form);
   self.HeroFourEdit.top = 191;
   self.HeroFourEdit.left = 85;
   self.HeroFourEdit.Width = 20;
   self.HeroFourEdit.Height = 20;
--
   self.HeroFiveEdit = createEdit(self.form);
   self.HeroFiveEdit.top = 218;
   self.HeroFiveEdit.left = 85;
   self.HeroFiveEdit.Width = 20;
   self.HeroFiveEdit.Height = 20;
--
   self.HeroSixEdit = createEdit(self.form);
   self.HeroSixEdit.top = 245;
   self.HeroSixEdit.left = 85;
   self.HeroSixEdit.Width = 20;
   self.HeroSixEdit.Height = 20;
--
   self.Info = createLabel(self.form);
   self.Info.top = 5;
   self.Info.left = 240;
   self.Info.Width = 105;
   self.Info.Height = 80;
   self.Info.Caption = "Enter\nExp, Gold, and\nHero\nTo Recalcule"
--
   self.set_exp = createButton(self.form);
   self.set_exp.Caption = 'Enter Exp';
   self.set_exp.height = 35;
   self.set_exp.left = 135;
   self.set_exp.top = 5;
   self.set_exp.width = 100;
   self.set_exp.onClick =    function (sender)
                              local value = tonumber(self.exp_value.Text);
                              if value then
                                 expvalue = value;
                                 print("The experience entered " .. expvalue);
                                 if expvalue and goldvalue and heroname then
                                    RecalculateAddresses()
                                 end
                              end
                           end
--
   self.set_gold = createButton(self.form);
   self.set_gold.Caption = 'Enter Gold';
   self.set_gold.height = 35;
   self.set_gold.left = 135;
   self.set_gold.top = 45;
   self.set_gold.width = 100;
   self.set_gold.onClick =    function (sender)
                              local value = tonumber(self.gold_value.Text);
                              if value then
                                 goldvalue = value;
                                 print("The gold entered " .. goldvalue);
                                 if expvalue and goldvalue and heroname then
                                    RecalculateAddresses()
                                 end
                              end
                           end
--
--
   self.characters_rg = createRadioGroup(self.form);
   self.characters_rg.height = 205;
   self.characters_rg.width = 75;
   self.characters_rg.top = 90;
   self.characters_rg.left = 5;
   self.characters_rg.Caption = "Hero";
   for character,_ in pairs(self.Data.Characters) do
      if tonumber(character) then
         self.characters_rg.getItems().add(_);
      end
   end
   self.characters_rg.onClick =    function (sender)
                                    local AL = getAddressList()
                                    local index = strings_getString(sender.getItems(), sender.ItemIndex); -- I'm bit lazy, so sender == trainer.characters_rg
                                    local i = nil;
                                    i = self.Data.Characters[index] + 1; -- If the character does not hold the value,, i remains nil.
                                    --print(i)
                                     --for k in (self.Data.Characters) do--,v in pairs (self.Data.Characters) do
                                        --if k==index then
                                           --i = v+1 -- We placed a value from 0 to 6 into the Characters name in the table.. but our stats is placed from 1 to 8 (alternative we could force the index in the table);
                                        --end
                                     --end
                                    if i then
                                       heroname = index;
                                        if recalc then
                                          heroprof = tonumber(memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, heroname .. ' Profession')));--1st Profession
                                          heroexp = tonumber(memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, heroname .. ' Exp')));--2nd Exp
                                        end
                                       --print("The index selected is", self.Data.Characters[index]);
                                       --print("The hero selected from index is ", index);
                                       print("The hero name is ", heroname);
                                       self.listview.clear();
                                       for _,__table in pairs(self.Data.Stats[i]) do
                                          local entry = self.listview.getItems().add();
                                          entry.Caption = __table[1];
                                          local subentry = entry.getSubItems().add(__table[2]);
                                       end
                                    end
                                    if expvalue and goldvalue and heroname then
                                       RecalculateAddresses()
                                    end
                                 end
--
   self.profession_rg = createRadioGroup(self.form);
   self.profession_rg.height = 300;
   self.profession_rg.width = 85;
   self.profession_rg.top = 90;
   self.profession_rg.left = 110;
   for profession,_ in pairs(self.Data.Profession) do
      if tonumber(profession) then
         self.profession_rg.getItems().add(_);
      end
   end
   self.profession_rg.onClick =    function (sender)
                                    index = strings_getString(sender.getItems(), sender.ItemIndex); --heroprof
                                    i = nil;
                                    i = self.Data.Stats[index]+ 1; -- If the character does not hold the value,, i remains nil.
                                    print(i)
                                     for k,v in pairs (self.Data.Stats) do
                                        if k==index then
                                           i = v+1 -- We placed a value from 0 to 7 into the Characters name in the table.. but our stats is placed from 1 to 8 (alternative we could force the index in the table);
                                        end
                                     end
                                    if i then
                                       heroprof = index;--heroname = index;
                                       print("The index selected is", self.Data.Stats[index]);
                                       self.listview.clear();
                                       for _,__table in pairs(self.Data.Stats[i]) do
                                          local entry = self.listview.getItems().add();
                                          entry.Caption = __table[1];
                                          local subentry = entry.getSubItems().add(__table[2]);
                                       end
                                    end
                                 end
--
   self.listview = createListView(self.form)
   setProperty(self.listview, 'ViewStyle', 'vsReport')
   setProperty(self.listview, 'RowSelect', 'True')
   setProperty(self.listview, 'ReadOnly', 'True')
   setProperty(self.listview, 'HideSelection', 'False')
   self.listview.top = 90;
   self.listview.width = 110;
   self.listview.left = 225;
   self.listview.height = 300;
   --self.listview.Visible = false;
   self.listview.onClick = function (sender)
                              local char
                              if (self.profession_rg.ItemIndex >= 0 ) then
                                 char = strings_getString(self.profession_rg.getItems(), self.profession_rg.ItemIndex);
                                 print(char.." in listview")
                              end
                              local row_1 = sender.getItems().getItem(sender.getItemIndex()); -- Level
                              local row_2 = strings_getString(row_1.getSubItems(),0) + 0; -- Exp
                              if (char and row_1 and row_2) then
                                 local address_1 = heroexp--addresslist_getMemoryRecordByDescription(getAddressList(), heroname .. ' Exp');
                                 if (address_1 and address_2) then
                                    memoryrecord_setValue(address_1, row_2)
                                 end
                              end
                              self.profession_rg.setItemIndex(14);
                           end
   self.listview_colum1 = self.listview.getColumns().add()
   self.listview_colum1.Width = 30;
   self.listview_colum1.Caption = 'Lvl';
   self.listview_colum2 = self.listview.getColumns().add()
   self.listview_colum2.Width = 75;
   self.listview_colum2.Caption = 'Exp';
--
   self.gm_cb = createCheckBox(self.form);
   self.gm_cb.Caption = 'God Mode';
   self.gm_cb.Height = 25;
   self.gm_cb.Left = 240;
   self.gm_cb.Width = 100;
   self.gm_cb.Top = 62;
   self.gm_cb.onClick =   function (sender)
                           if sender.Checked then
                              self.t.Enabled = true;
                              print("God mode is enabled")
                           else
                              self.t.Enabled = false;
                              print("God mode is not enabled")
                           end
                        end
--
self.form.show();
print("God mode is not enabled");
end--trainer
--
   tde = createTimer(nil, true)
   timer_onTimer(tde, DisplayEdits)
   timer_setInterval(tde, 1000)
   timer_setEnabled(tde, false)
--
   t = createTimer(nil, true)
   timer_onTimer(t, MaxHP)
   timer_setInterval(t, 1000)--checks every 1000 milliseconds
   timer_setEnabled(t, false)
--
   tstop = createTimer(nil)
   tstop.Interval = 1000
   tstop.onTimer = function(tstop)
                      if(getOpenedProcessID() ~= 0)
                      and (readInteger("kernel32.dll") == nil) then
                         closeCE()
                      end
                   end
   tstop.Enabled = true
--
function RecalculateAddresses()
print("Hero name ", heroname, "experience to search = " ,expvalue, "and gold to match = ", goldvalue)
  goldoffset = 0x8--items are in num format
  --print(goldoffset)
errorOnLookupFailure(false);
ms = createMemScan();
ms2 = createMemScan();
--The key to recalculating should be goldoffset added to specific hero experience AOB
memscan_firstScan(ms, soExactValue, vtDword, rtRounded, expvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms);
fl = createFoundList(ms);
foundlist_initialize(fl);
foundlist_getCount(fl);
memscan_firstScan(ms2, soExactValue, vtDword, rtRounded, goldvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms2);
fl2 = createFoundList(ms2);
foundlist_initialize(fl2);
foundlist_getCount(fl2);
--print("num of search hits for experience is ", foundlist_getCount(fl));
--print("num of search hits for gold is ", foundlist_getCount(fl2));
--print("Gold offset from if statement", goldoffset);
  for x = 0, foundlist_getCount(fl)-1  do--Items are in the hex format (0125D60F) without 0x
    memrec1 = foundlist_getAddress(fl, x);
    memrec2 = tonumber(memrec1, 16);
    --print("Experience from foundlist_getAddress(fl, x)", x, memrec1);
    for y = 0, foundlist_getCount(fl2)-1 do--Items are in hex format without the 0x
      memrec3 = foundlist_getAddress(fl2, y);
      memrec4 = tonumber(memrec3, 16);
      --print("Gold from foundlist_getAddress(fl2, x)", y, memrec3);
      if memrec4 - memrec2 == goldoffset then
        experienceaddress = memrec1;--address in hex format without 0x
        print("exp address ", experienceaddress);
        goldaddress = memrec3;--address in hex format without 0x
        byteoffset = memrec3--goldaddress
        byteoffset = "0x" .. byteoffset;
        print("gold address ", goldaddress);
        print("byteoffset ", byteoffset);
        break;
      end;
    end;
    if byteoffset ~= nil then
      break;
    end;
  end;
addresslist = getAddressList();
--print(heroname .. " Gold")
memrec5 = addresslist_getMemoryRecordByDescription(addresslist, heroname .. " Gold");--address in hex format without 0x
--print(addresslist_getMemoryRecordByDescription(addresslist, heroname .. " Gold"))
--print(memrec5)
goldtableaddress = memoryrecord_getAddress(memrec5);--Item in num format
--print("Gold table address", goldtableaddress);
--print("Gold current table address", string.format('%x', goldtableaddress), "which is ", goldtableaddress);
goldtableaddress = string.format('%x', goldtableaddress);--Items in number format converted to hex format without 0x
goldtableaddress = "0x" .. goldtableaddress
for x = 0, addresslist_getCount(addresslist)-1 do
memrec6 = addresslist_getMemoryRecord(addresslist, x);--Item in hex format without the 0x
  if byteoffset ~= goldtableaddress then
    memoryrecord_setAddress(memrec6, string.format('%x', memoryrecord_getAddress(memrec6) + byteoffset - goldtableaddress));
  end;
end;
recalc = 1;
expvalue = nil
goldvalue = nil
--heroname = nil
byteoffset = nil
--exp_value.Text = "";--trainer.exp_value.Text = "";
--gold_value.Text = "";--trainer.gold_value.Text = "";
--trainer.HeroOneEdit.Text = "";--trainer.HeroOneEdit.Text = "";
--trainer.HeroTwoEdit.Text = "";
--trainer.HeroThreeEdit.Text = "";
--trainer.HeroFourEdit.Text = "";
--trainer.HeroFiveEdit.Text = "";
--trainer.HeroSixEdit.Text = "";
--radiogroup_setItemIndex(trainer.characters_rg,6);
--tde.Enabled = true;
print("The table has been recalculated")
--
function DisplayEdits()
local AL = getAddressList()
FirstLevel = memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, "1st Level"))
trainer.HeroOneEdit.Text = FirstLevel
SecondLevel = memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, "2nd Level"))
trainer.HeroTwoEdit.Text = SecondLevel
ThirdLevel = memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, "3rd Level"))
trainer.HeroThreeEdit.Text = ThirdLevel
FourthLevel = memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, "4th Level"))
trainer.HeroFourEdit.Text = FourthLevel
FifthLevel = memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, "5th Level"))
trainer.HeroFiveEdit.Text = FifthLevel
SixthLevel= memoryrecord_getValue(addresslist_getMemoryRecordByDescription(AL, "6th Level"))
trainer.HeroSixEdit.Text = SixthLevel
end--function DisplayEdits(
--
--CheatPanel_CEEdit3.Text =
Back to top
View user's profile Send private message Yahoo Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1522

PostPosted: Thu Feb 24, 2022 10:16 am    Post subject: Reply with quote

I will focus on the second problem first.
Here is a login code for Trainer start, edit it in your script.
Or put the code I added (--<<<<<<<) at the correct start point.

Code:
   tstop = createTimer(nil)
   tstop.Interval = 1000
   tstop.onTimer = function(tstop)
                      if(getOpenedProcessID() ~= 0)
                      and (readInteger("kernel32.dll") == nil) then
                         --closeCE()
                         else
                         trainer:start() --<<<<<<
                         tstop.Enabled = false --<<<<<<<
                      end
                   end
   tstop.Enabled = true


bknight2602 wrote:
But character_rg in conjunction with professional_rg, first to recalculate the table and secondly to set the correct exp with appropriate data


Now let's consider the code to be loaded with the computation loop in the first problem.

Let's shorten this script (existing code above) and just focus on the calculation and load the dropdown list.

Please keep replying, let's discuss this until we find a solution.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Fri Feb 25, 2022 10:57 am    Post subject: Reply with quote

AylinCE wrote:
I will focus on the second problem first.
Here is a login code for Trainer start, edit it in your script.
Or put the code I added (--<<<<<<<) at the correct start point.


Ok, but WHERE is the correct start point?
Quote:


Code:
   tstop = createTimer(nil)
   tstop.Interval = 1000
   tstop.onTimer = function(tstop)
                      if(getOpenedProcessID() ~= 0)
                      and (readInteger("kernel32.dll") == nil) then
                         --closeCE()
                         else
                         trainer:start() --<<<<<<
                         tstop.Enabled = false --<<<<<<<
                      end
                   end
   tstop.Enabled = true


bknight2602 wrote:
But character_rg in conjunction with professional_rg, first to recalculate the table and secondly to set the correct exp with appropriate data


Now let's consider the code to be loaded with the computation loop in the first problem.

Let's shorten this script (existing code above) and just focus on the calculation and load the dropdown list.

Please keep replying, let's discuss this until we find a solution.

"Let's shorten this script (existing code above) and just focus on the calculation and load the dropdown list."
Shorten how? What is your thoughts on making the script shorter, more efficient and most impotatntly correct to load the correct set of data when the profession_rg profession is seleted?
Back to top
View user's profile Send private message Yahoo Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1522

PostPosted: Fri Feb 25, 2022 11:26 am    Post subject: Reply with quote

Code:
   tstop = createTimer(nil)
   tstop.Interval = 1000
   tstop.onTimer = function(tstop)
                      if(getOpenedProcessID() ~= 0)
                      and (readInteger("kernel32.dll") == nil) then
                         --closeCE()
                         else
                         trainer:start() --<<<<<<
                         tstop.Enabled = false --<<<<<<<
                      end
                   end
   tstop.Enabled = true


I think "Trainer:Start" is in the right place. If the process is selected, the table will open, if the process is not selected, the Trainer will be closed.

-------------------------------------------------------

I don't understand how he did his calculations.
I assume there are 6 stages (Level procedure) and 14 heroes.

Let's say you get the comparison information from the codes in the address list.

You have to run a timer and have it read the constant address list code change.

And the reason for the script's preparation, its mission, what it is trying to do is still a mystery.

Is it possible to list what the script is trying to do from the beginning?

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Fri Feb 25, 2022 12:01 pm    Post subject: Reply with quote

AylinCE wrote:
Code:
   tstop = createTimer(nil)
   tstop.Interval = 1000
   tstop.onTimer = function(tstop)
                      if(getOpenedProcessID() ~= 0)
                      and (readInteger("kernel32.dll") == nil) then
                         --closeCE()
                         else
                         trainer:start() --<<<<<<
                         tstop.Enabled = false --<<<<<<<
                      end
                   end
   tstop.Enabled = true


I think "Trainer:Start" is in the right place. If the process is selected, the table will open, if the process is not selected, the Trainer will be closed.

Currently the tstop is located following the end--trainer line 2 after the print("start") I commented out the tstop and no difference in the cheat Panle popping up on execute script. I would agree, the code isn't being executed. You know I attempted and experiment by deleting all of the code with the exception of building the CheatPanel and it still did not pop up on opening the table, just the print("start").
Quote:


-------------------------------------------------------

I don't understand how he did his calculations.
I assume there are 6 stages (Level procedure) and 14 heroes.

There are 6 heroes that may have any one of 14 professions. The level up data is associated with the profession, but is should be entered into the hero ep.
Quote:


Let's say you get the comparison information from the codes in the address list.

You have to run a timer and have it read the constant address list code change.

Why would not selecting a button on the profession_rg load the correct data?
Quote:


And the reason for the script's preparation, its mission, what it is trying to do is still a mystery.

Is it possible to list what the script is trying to do from the beginning?


I may try to explain. The level up data is presented as a table. Next the Panel is created, and the objects created on the Panel. There is a small snippet of code associated the two of the edit boxes used to recalculate the table. The Hero rg is used in conjunction with the recalculation function and then it is used to point to the correct xp address. The profession rg is used to alter the exp only, from the Stats Data. The check box executes thespaghetti monsterMode and I haven't even attempted any code checks here the code to do this is a very long piece but I haven't done any code check yet. Finally there is a piece of code to locate pieces of description in the +2k records.
Back to top
View user's profile Send private message Yahoo 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
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