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 


loading correct table values
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 35

Joined: 16 Feb 2017
Posts: 1476

PostPosted: Mon Sep 25, 2023 3:19 am    Post subject: Reply with quote

Code:
pairs(trainer.Data.Stats[profession])


profession number?

Code:
pairs(trainer.Data.Stats[tonumber(profession)])

Also there are no errors in @DB's code.
Just remember that the value you get from the addresses is a "string" and treat it as a number; "tonumber()"

_________________
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: 582

PostPosted: Sat Sep 30, 2023 9:34 am    Post subject: Reply with quote

Code:

trainer =    {trainer =    {
            Data =    {
                        Characters =    {
                                          [1] = "Hero 1";
                                          [2] = "Hero 2";
                                          [3] = "Hero 3";
                                          [4] = "Hero 4";
                                          [5] = "No One";
                                       };--Characters
                        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,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,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,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,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};};
                                           {{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,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,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,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,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};};
                                  };--Stats
                        Profession = {
                                           "Hero (M)", --Male
                                           "Wizard (M)", --Male
                                           "Pilgrim (M)", --Male
                                           "Sage (M)", --Male
                                           "Soldier (M)", --Male
                                           "Merchant (M)", --Male
                                           "Fighter (M)", --Male
                                           "Goof Off (M)", --Male
                                           "Hero (W)", --Female
                                           "Wizard (W)", --Female
                                           "Pilgrim (W)", --Female
                                           "Sage (W)", --Female
                                           "Soldier (W)", --Female
                                           "Merchant (W)", --Female
                                           "Fighter (W)", --Female
                                           "Goof Off (W)", --Female
                                           "None" --[17]= "None";
                                      };--Profession
                     };--Data
            };--Trainer

self = {}
self.form = createForm()
self.form.height = 300;
self.form.width = 260;
self.form.Position="poScreenCenter"
self.listview = createListview(self.form)
self.listview.height = 200;
self.listview.width = 140;
self.listview.top = 90;
self.listview.left = 93;
self.listview.colum1 = self.listview.getColumns().add()
   self.listview.OwnerData=true
   self.listview.colum1.Width = 50;
   self.listview.colum1.Caption = 'Lvl';
   self.listview.colum2 = self.listview.getColumns().add()
   self.listview.colum2.Width = 90;
   self.listview.colum2.Caption = 'Exp';

self.label_1 = createLabel(self.form)
self.label_1.Top = 15
self.label_1.Left = 15
self.label_1.caption = "Sample Prof:"
self.label_2 = createLabel(self.form)
self.label_2.Top = 30
self.label_2.Left = 15
self.label_1.caption = "Sample Prof:"
self.label_3 = createLabel(self.form)
self.label_3.Top = 45
self.label_3.Left = 15
self.edit_1 = createEdit(self.form)
self.edit_1.Top = 10
self.edit_1.Left = 90
self.edit_1.Width = 40
--self.edit_1.Text = "3"

   self.characters_rg = createRadioGroup(self.form);
   self.characters_rg.height = 200;
   self.characters_rg.width = 87;
   self.characters_rg.top = 90;
   self.characters_rg.left = 3;
   --for character,_ in ipairs(trainer.Data.Characters) do
   for i=1, #trainer.Data.Characters do
      --if character then
         self.characters_rg.getItems().add(trainer.Data.Characters[i]);
      --end
   end
   self.listview.OnData=function(sender, listitem)
     listitem.caption=trainer.Data.Stats[currentprof][listitem.Index+1][1]
     listitem.subItems.add(trainer.Data.Stats[currentprof][listitem.Index+1][2])
   end

   self.characters_rg.onClick =    function (sender)
                                    local index = strings_getString(sender.getItems(), sender.ItemIndex);
                                    i = nil;
                                    i = (sender.ItemIndex) + 1
                                    --i = self.Data.Characters[index] + 1;                                    --print(1,sender.ItemIndex)
                                    --print(2,index)
                                    heroname = index;
                                    --for k,v in pairs (trainer.Data.Characters) do
                                     --  if k==index then
                                      --    i = v+1
                                     --  end
                                    --end
                                    self.label_2.caption = heroname
                                    if i==5 then
                                      self.listview.Items.Count=0

                                    else
                                      prof = self.edit_1.Text
                                      currentprof=tonumber(prof)
                                      if tonumber(prof)>16 then
                                        self.label_3.caption = trainer.Data.Profession[tonumber(prof)]
                                        self.listview.Items.Count=0;
                                      else
                                        self.label_3.caption = trainer.Data.Profession[tonumber(prof)]
                                        self.listview.Items.Count=#trainer.Data.Stats[tonumber(prof)];

                                        self.listview.refresh()
                                      end
                                    end
                                    if expvalue and goldvalue and heroname then
                                       RecalculateAddresses()
                                    end
                                 end

Copied and pasted Db's code from the link he provided. When I tried this before I didn't get any code, however today code appeared. That's the good news.
Now the bad news
[string "trainer= {trainer= {
...:51: '}' expected (to close '{' at line 1) near 'self'
I wish there was a way to copy error messages. bah humbug.
I can see a open/close to every '{', so why the error?
I inserted a '}' arbitrarily near the bottom of the data section.
Compiles but with an error message "Error:[string "trainer = {trainer = {
..."]:92: attempt to index a nil value (field 'Data')"

line 92 is
Code:
for i=1, #trainer.Data.Characters do

This seems ok to me, but still the error.
Notice I commented out line 84:
Code:

self.edit_1.Text = "3"

This has to work in all professions.
Sorry to get back late but I had a procedure that kept me from answering.
Back to top
View user's profile Send private message Yahoo Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 35

Joined: 16 Feb 2017
Posts: 1476

PostPosted: Sat Sep 30, 2023 3:11 pm    Post subject: Reply with quote

You accidentally opened the table with double names (Nested)

Fix it here;

-- Your code:
Code:
trainer =    {trainer =    {
            Data =    {
};--Data
            };--Trainer
            };--Trainer (The second "trainer" chart close is expected. And you don't have it.)


>>>

Fix:
Code:
trainer =    {
            Data =    {
};--Data
            };--Trainer


--#############################

Switch to your code with slow steps;

For example, add a button and add the address where you read "prof".

Code:
prof = self.edit_1.Text
currentprof=tonumber(prof)


>>>

Code:
local al=getAddressList()
prof1 = addresslist_getMemoryRecordByDescription(al, heroname .. " Profession/Sex")

prof = prof1.Value
currentprof=tonumber(prof)


[/code]

_________________
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: 582

PostPosted: Sun Oct 01, 2023 10:54 am    Post subject: Reply with quote

I must have not selected the whole code when pasting into the code, thanks.

Now I have a technical question. Why is it not possible to select the profession and load the associated lvl/exp data using the characters profession from the characters radiogroup?
Back to top
View user's profile Send private message Yahoo Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 35

Joined: 16 Feb 2017
Posts: 1476

PostPosted: Sun Oct 01, 2023 12:16 pm    Post subject: Reply with quote

You have the answer to these questions. Because you prepared the code in this mess.

For example, I'm wondering the following.

Characters are 4 rows, XP/Lvl is 16 rows, and Professions are 16 rows.

But you are trying to choose 16 professions and xp structure through 4 main characters.

Are you applying some "Math" to this?

As far as I can see, the "Characters" structure (Additionally; RadioGroup) is ineffective and is listed in vain.

If the "prof" address value is the one that determines and loads the list, you can read it and fill in your list with the help of a button.

What I mean is, if "prof" is 5, click on the character you want from RadioGroup, each character will load table list 5 (XP/Lvl) and profession.

For this reason, you have the logical answers and you will organize the code.
Of course, if you're stuck with a solution within Lua and controls, don't hesitate to ask for ideas. Write here and let's discuss the solutions together and help you finalize it.

_________________
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: 582

PostPosted: Sun Oct 01, 2023 2:42 pm    Post subject: Reply with quote

AylinCE wrote:
You have the answer to these questions. Because you prepared the code in this mess.

For example, I'm wondering the following.

Characters are 4 rows, XP/Lvl is 16 rows, and Professions are 16 rows.

But you are trying to choose 16 professions and xp structure through 4 main characters.

Are you applying some "Math" to this?

No math it is simply a character may/can have one and only one of 16 prof(essions), so one prof points to one set of data. The data are ordered. There is an address in the table that contains one of those numbers, so once you know the it should be easy for experts such as yourself to point to the correct set of data. You have chosen to do this task with an edit box. All I asked why am i unable to load the proper data using only the character radiogroup? Simple, yet for me and my limited expertise in coding to accomplish the task with a radiogroup is frustrating.
Quote:


As far as I can see, the "Characters" structure (Additionally; RadioGroup) is ineffective and is listed in vain.

I don't understand why you think it is ineffective.
Quote:


If the "prof" address value is the one that determines and loads the list, you can read it and fill in your list with the help of a button.

I have done that but am unable to display the proper set in the listview
Quote:


What I mean is, if "prof" is 5, click on the character you want from RadioGroup, each character will load table list 5 (XP/Lvl) and profession.

Precisely, using the address from the table.
Quote:


For this reason, you have the logical answers and you will organize the code.
Of course, if you're stuck with a solution within Lua and controls, don't hesitate to ask for ideas. Write here and let's discuss the solutions together and help you finalize it.

I have provided pieces of my code using a radiogroup attempting to point to the correct data. But my efforts aren't correct.
ETA: The profession radiogroup was added before I thought about using the prof address. It is probably useless if I am able to point to the correct data set from within the character radiogroup.
Back to top
View user's profile Send private message Yahoo Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 35

Joined: 16 Feb 2017
Posts: 1476

PostPosted: Sun Oct 01, 2023 6:11 pm    Post subject: Reply with quote

I just put a button that disables the RadioGroup.
Type numbers 1-17 in the edit box and click the button.

Code:
trainer =    {
            Data =    {
                        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,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,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,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,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};};
                                           {{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,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,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,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,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};};
                                  };--Stats
                        Profession = {
                                           "Hero (M)", --Male
                                           "Wizard (M)", --Male
                                           "Pilgrim (M)", --Male
                                           "Sage (M)", --Male
                                           "Soldier (M)", --Male
                                           "Merchant (M)", --Male
                                           "Fighter (M)", --Male
                                           "Goof Off (M)", --Male
                                           "Hero (W)", --Female
                                           "Wizard (W)", --Female
                                           "Pilgrim (W)", --Female
                                           "Sage (W)", --Female
                                           "Soldier (W)", --Female
                                           "Merchant (W)", --Female
                                           "Fighter (W)", --Female
                                           "Goof Off (W)", --Female
                                           "None" --[17]= "None";
                                      };--Profession
                     };--Data
            } --Trainer

self = {}
self.form = createForm()
self.form.height = 300;
self.form.width = 260;
self.form.Position="poScreenCenter"
self.listview = createListview(self.form)
self.listview.height = 200;
self.listview.width = 140;
self.listview.top = 90;
self.listview.left = 93;
self.listview.colum1 = self.listview.getColumns().add()
   self.listview.OwnerData=true
   self.listview.colum1.Width = 50;
   self.listview.colum1.Caption = 'Lvl';
   self.listview.colum2 = self.listview.getColumns().add()
   self.listview.colum2.Width = 90;
   self.listview.colum2.Caption = 'Exp';

self.label_1 = createLabel(self.form)
self.label_1.Top = 15
self.label_1.Left = 15
self.label_1.caption = "Sample Prof:"
self.label_2 = createLabel(self.form)
self.label_2.Top = 30
self.label_2.Left = 15
self.label_3 = createLabel(self.form)
self.label_3.Top = 45
self.label_3.Left = 15
self.edit_1 = createEdit(self.form)
self.edit_1.Top = 10
self.edit_1.Left = 90
self.edit_1.Width = 40

self.button_1 = createButton(self.form)
self.button_1.Top = 65
self.button_1.Left = 15
self.button_1.Width = 100
self.button_1.caption = "Load List"

   local currentprof = 0
   self.listview.OnData=function(sender, listitem)
     listitem.caption=trainer.Data.Stats[currentprof][listitem.Index+1][1]
     listitem.subItems.add(trainer.Data.Stats[currentprof][listitem.Index+1][2])
   end

   self.button_1.OnClick=function()
    --local al=getAddressList()
    --prof1 = addresslist_getMemoryRecordByDescription(al, heroname .. " Profession/Sex")
    --prof = prof1.Value
     prof = self.edit_1.Text
     currentprof=tonumber(prof)
       if tonumber(prof)>16 then
         self.label_3.caption = trainer.Data.Profession[tonumber(prof)]
         self.listview.Items.Count=0;
       else
         self.listview.Items.Count=0
         self.label_3.caption = trainer.Data.Profession[tonumber(prof)]
         self.listview.Items.Count=#trainer.Data.Stats[tonumber(prof)]
       end
        if expvalue and goldvalue and heroname then
          RecalculateAddresses()
        end
   end

_________________
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: 582

PostPosted: Mon Oct 02, 2023 10:34 am    Post subject: Reply with quote

After choosing a character, I want to use the prof already in the table to point to the correct data, not type in anything, if you please.
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
Goto page Previous  1, 2
Page 2 of 2

 
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