 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Sat Sep 14, 2013 10:52 pm Post subject: Checking visible state |
|
|
I'm trying to do this:
if control_getVisible(CheatPanel_CDEedit3) = true then
do some steps
else
don't do steps
end
I keep getting an error message attempt to call global 'control_getVisible' (a nil value)
CheatPanel and CEEdit3 both exist so that isn't the problem.
To get the value of the string in the edit is control_getCaption(CheatPanel_CEEdit3), then why wouldn't checking the visible state be in a similar manner? |
|
| Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Sun Sep 15, 2013 2:40 am Post subject: |
|
|
| Code: | | if CheatPanel_CEEdit3.getVisible() then |
_________________
I'm rusty and getting older, help me re-learn lua. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25830 Location: The netherlands
|
Posted: Sun Sep 15, 2013 4:07 am Post subject: |
|
|
Is cheatpanel a form or just a panel? If only a panel then you must use the formname it is on instead
E.g. formname_CDEedit3
And which cheat engine version do you use? _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Sun Sep 15, 2013 7:34 am Post subject: |
|
|
Dark Byte: CheatPanel is the main form with CEEdit3 one of the many items on the form. I'm using ver 6.2.
DaSpamer: With your suggestion I get the following error
attempt to index global 'CheatPanel_CEEdit2' (a userdata value)
Script Error
I used CEEdit2 as I'm on a different machine and the CEEdit3 doesn't exist on this one. |
|
| Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Sun Sep 15, 2013 9:02 am Post subject: |
|
|
What I wrote is for C.E 6.3
| Code: | if control_getVisible(CheatPanel_CDEedit3) = true then
do some steps
else
don't do steps
end |
should be
| Quote: | if control_getVisible(CheatPanel_CDEedit3) == true then
do some steps
else
don't do steps
end |
you forgot to add another = to the check.
also you might had typo?
isn't CheatPanel_CDEedit3 should be CheatPanel_CEEedit ? _________________
I'm rusty and getting older, help me re-learn lua. |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Sun Sep 15, 2013 9:57 am Post subject: |
|
|
Two errors:
CEEdit3 was misspelled and the additional "="
thanks |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Tue Sep 17, 2013 7:35 am Post subject: |
|
|
Another question arises pertaining to controls:
Is the proper coding of a caption on a button control like the following?
control_setCaption(CheatPanel_CEButton2, "Next Scan") |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25830 Location: The netherlands
|
Posted: Tue Sep 17, 2013 7:45 am Post subject: |
|
|
That's about as good as it gets in 6.2 yes
For best coding I really recommend 6.3, since there you can do:
| Code: |
CheatPanel.CeButton2.Caption="Next Scan"
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Tue Sep 17, 2013 8:39 am Post subject: |
|
|
I'm just in the learning curve on the language and you implemented a different set of codes. Is there a link to the new set of codes somewhere? I have been using http://cheat-engine.googlecode.com/svn/trunk/Cheat%20Engine/bin/main.lua since I started with coding the tables.
On another question:
I have been using with your much appreciated help memscans to recalculate my tables such as | Code: | | memscan_firstScan(ms, soExactValue, vtWord, rtRounded, expvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false) |
One game that I have referenced in the past has a number of nearly identical data sets in memory and the recalculation has been difficult. I believe a second memscan might help reduce the numbers of occurrences. Would the next scan, from the previous scan, look like this? | Code: | | memscan_nextScan(ms, soExactValue, vtWord, rtRounded, expvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false) |
Or do you have to reference the foundlist to do a next scan? |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25830 Location: The netherlands
|
Posted: Tue Sep 17, 2013 9:26 am Post subject: |
|
|
That link you've posted is already the new set of code. (you probably mean http://cheat-engine.googlecode.com/svn/trunk/Cheat%20Engine/bin/main.lua?p=1487 instead)
The foundlist isn't necessary during a scan, only if you wish to read the results.
For the next scan I do recommend a different expvalue else it won't reduce the number of occurences _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Tue Sep 17, 2013 9:37 am Post subject: |
|
|
In fact there are three memscans (expvalue, goldvalue, and stepvalue)and they all would be updated for the next scans.
I'll try to tackle the next scans this evening, thanks again. |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Tue Sep 17, 2013 8:33 pm Post subject: |
|
|
Oh boy not much is working:
| Code: | function CEButton2Click(sender)--Recalculate Addresses
errorOnLookupFailure(false)
if heroname ~= null and expvalue ~= null and goldvalue ~= null and stepvalue ~= null and control_getCaption(CheatPanel_CEButton2) == "Recalculate Addresses" then
ms = createMemScan();
ms2 = createMemScan();
ms3 = createMemScan();
memscan_firstScan(ms, soExactValue, vtWord, 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, vtWord, rtRounded, goldvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms2);
fl2 = createFoundList(ms2);
foundlist_initialize(fl2);
foundlist_getCount(fl2);
memscan_firstScan(ms3, soExactValue, vtWord, rtRounded, stepvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms3);
fl3 = createFoundList(ms3);
foundlist_initialize(fl3);
foundlist_getCount(fl3);
print("The num of search hits for experience is ", foundlist_getCount(fl));
print("The num of search hits for gold is ", foundlist_getCount(fl2));
print("The num of search hits for steps is ", foundlist_getCount(fl3));
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);
for z = 0, foundlist_getCount(fl3)-1 do--Items are in hex format without the 0x
memrec7 = foundlist_getAddress(fl3, z);
memrec8 = tonumber(memrec7, 16);
end;--for z = 0 loop
end;--for y = 0 loop
end;--for x = 0 loop
expvalue = null;
goldvalue = null;
stepvalue = null;
heroname = null;
byteoffset = null;
edit_clear(CheatPanel_CEEdit1);
edit_clear(CheatPanel_CEEdit2);
edit_clear(CheatPanel_CEEdit3);--end of the first scans
radiogroup_setItemIndex(CheatPanel_CERadioGroup1, 0);
control_setCaption(CheatPanel_CEButton2, "Next Scan")
elseif heroname ~= null and expvalue ~= null and goldvalue ~= null and stepvalue ~= null and control_getCaption(CheatPanel_CEButton2) == "Next Scan" then
memscan_nextScan(ms, soExactValue, vtWord, 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_nextScan(ms2, soExactValue, vtWord, rtRounded, goldvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms2);
fl2 = createFoundList(ms2);
foundlist_initialize(fl2);
foundlist_getCount(fl2);
memscan_nextScan(ms3, soExactValue, vtWord, rtRounded, stepvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms3);
fl3 = createFoundList(ms3);
foundlist_initialize(fl3);
foundlist_getCount(fl3);
print("The num of search hits for experience is ", foundlist_getCount(fl));
print("The num of search hits for gold is ", foundlist_getCount(fl2));
print("The num of search hits for steps is ", foundlist_getCount(fl3));
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);
print("The diff of gold and exp is = ", memrec4 - memrec2)--, "the
for z = 0, foundlist_getCount(fl3)-1 do--Items are in hex format without the 0x
memrec7 = foundlist_getAddress(fl3, z);
memrec8 = tonumber(memrec7, 16);
print("Steps from foundlist_getAddress(fl3, z)", memrec7);
if (memrec4 - memrec2 == goldoffset) and (memrec8 - memrec4 == 0x6) then
experienceaddress = memrec1;--address in hex format without 0x
print("Exp from foundlist ", x, memrec1, "Gold from foundlist ", y, memrec3, "Steps from foundlist ", z, memrec7);
goldaddress = memrec3;--address in hex format without 0x
byteoffset = memrec3--goldaddress
byteoffset = "0x" .. byteoffset;
--print("gold address ", goldaddress);
print("The byteoffset is ", byteoffset);
break;
else
end;
end;--for z = 0 loop
end;--for y = 0 loop
end;--for x = 0 loop
if control_getCaption(CheatPanel_CEButton2) == "Next Scan" then
local addresslist = getAddressList();
memrec5 = addresslist_getMemoryRecordByDescription(addresslist, "Gold");--address in hex format without 0x
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;
expvalue = null;
goldvalue = null;
stepvalue = null;
heroname = null;
byteoffset = null;
edit_clear(CheatPanel_CEEdit1);
edit_clear(CheatPanel_CEEdit2);
edit_clear(CheatPanel_CEEdit3);
radiogroup_setItemIndex(CheatPanel_CERadioGroup1, 0);
control_setCaption(CheatPanel_CEButton2, "Recalculate Addresses");
print("The table has been recalculated");
else
end--if control_getCaption(CheatPanel_CEButton2) == "Next Scan" then
else
print("Experience, Gold, Steps and Hero must all be entered");
end;--if heroname ~= null and expvalue ~= null and goldvalue ~= null and stepvalue ~= null and control_getCaption(CheatPanel_CEButton2) == "Recalculate Addresses" then
end;--CEButton2Click()
function CEButton3Click(sender)
if tonumber(control_getCaption(CheatPanel_CEEdit1)) >= 65536 then
expvalue = tonumber(control_getCaption(CheatPanel_CEEdit1)) - math.floor(tonumber(control_getCaption(CheatPanel_CEEdit1))/65536) * 65536
else
expvalue = tonumber(control_getCaption(CheatPanel_CEEdit1))
end
--print('Experience to scan = '..expvalue)
end
function CEButton4Click(sender)
if tonumber(control_getCaption(CheatPanel_CEEdit2)) >= 65536 then
goldvalue = tonumber(control_getCaption(CheatPanel_CEEdit2)) - math.floor(tonumber(control_getCaption(CheatPanel_CEEdit2))/65536) * 65536
else
goldvalue = tonumber(control_getCaption(CheatPanel_CEEdit2))
end
--print('Gold to scan = '..goldvalue)
end
function CEButton5Click(sender)
if tonumber(control_getCaption(CheatPanel_CEEdit3)) >= 65536 then
stepvalue = tonumber(control_getCaption(CheatPanel_CEEdit3)) - math.floor(tonumber(control_getCaption(CheatPanel_CEEdit3))/65536) * 65536
else
stepvalue = tonumber(control_getCaption(CheatPanel_CEEdit3))
--stepvalue = tonumber(control_getCaption(CheatPanel_CEEdit3))
end
--print("Steps to scan = "..stepvalue)
end
|
The results from the function plus the other print statements(commented out here)
Steps = 34548
Gold = 64411
Experience = 33275
The num of search hits for experience is 134
The num of search hits for gold is 138
The num of search hits for steps is 108
Gold offset from if statement 443
Steps = 34551
Gold = 75
Experience = 36225
The num of search hits for experience is 7 Following with standard CET yields 4 hits
The num of search hits for gold is 4 1 hit
The num of search hits for steps is 3 1 hit
Gold offset from if statement 443
Experience from foundlist_getAddress(fl, x) 0 06FEA8A3
Gold from foundlist_getAddress(fl2, x) 0 06FECCFE
The diff of gold and exp is = 9307 In this case the actual difference is 0x1BB or 443
Steps from foundlist_getAddress(fl3, z) 070A16B5 In this case the actual step is 0673F886
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 1 07084D18 In this case the actual gold is 0673F880
The diff of gold and exp is = 631925
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 2 070A582A
The diff of gold and exp is = 765831
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 3 082F782B
The diff of gold and exp is = 19976072
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Experience from foundlist_getAddress(fl, x) 1 06FEBC67
Gold from foundlist_getAddress(fl2, x) 0 06FECCFE
The diff of gold and exp is = 4247
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 1 07084D18
The diff of gold and exp is = 626865
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 2 070A582A
The diff of gold and exp is = 760771
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 3 082F782B
The diff of gold and exp is = 19971012
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Experience from foundlist_getAddress(fl, x) 2 070A6D69
Gold from foundlist_getAddress(fl2, x) 0 06FECCFE
The diff of gold and exp is = -761963
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 1 07084D18
The diff of gold and exp is = -139345
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 2 070A582A
The diff of gold and exp is = -5439
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 3 082F782B
The diff of gold and exp is = 19204802
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Experience from foundlist_getAddress(fl, x) 3 070A7129
Gold from foundlist_getAddress(fl2, x) 0 06FECCFE
The diff of gold and exp is = -762923
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 1 07084D18
The diff of gold and exp is = -140305
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 2 070A582A
The diff of gold and exp is = -6399
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 3 082F782B
The diff of gold and exp is = 19203842
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Experience from foundlist_getAddress(fl, x) 4 0717EFC7
Gold from foundlist_getAddress(fl2, x) 0 06FECCFE
The diff of gold and exp is = -1647305
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 1 07084D18
The diff of gold and exp is = -1024687
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 2 070A582A
The diff of gold and exp is = -890781
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 3 082F782B
The diff of gold and exp is = 18319460
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Experience from foundlist_getAddress(fl, x) 5 071819FD
Gold from foundlist_getAddress(fl2, x) 0 06FECCFE
The diff of gold and exp is = -1658111
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 1 07084D18
The diff of gold and exp is = -1035493
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 2 070A582A
The diff of gold and exp is = -901587
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 3 082F782B
The diff of gold and exp is = 18308654
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Experience from foundlist_getAddress(fl, x) 6 07181ACF
Gold from foundlist_getAddress(fl2, x) 0 06FECCFE
The diff of gold and exp is = -1658321
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 1 07084D18
The diff of gold and exp is = -1035703
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 2 070A582A
The diff of gold and exp is = -901797
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Gold from foundlist_getAddress(fl2, x) 3 082F782B
The diff of gold and exp is = 18308444
Steps from foundlist_getAddress(fl3, z) 070A16B5
Steps from foundlist_getAddress(fl3, z) 070A6C65
Steps from foundlist_getAddress(fl3, z) 07180A7B
Error:[string "function FormShow(sender)..."]:315: attempt to perform arithmetic on global 'byteoffset' (a nil value)
So why didn't the nextScan find gold and steps where they should be? |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25830 Location: The netherlands
|
Posted: Wed Sep 18, 2013 4:57 am Post subject: |
|
|
Are you sure you are scanning with fastscan disabled ?
Because if it's on, and set as a word (align 2) only 071819FD would be left for experience scans _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Wed Sep 18, 2013 6:22 am Post subject: |
|
|
The normal scan with CE do have the fast scan unchecked. The correct addresses are found with the normal scan in a first and second scan, those are the ones I listed. In fact as the blue high lite indicated the second scan narrowed the gold and step to just one hit and they were both the correct addresses. The experience was narrowed to 4 hits and that was correct and with the correct addresses, i.e. four heroes had identical experiences.
I'm not sure if the programed firstScan and nextScan disable fastscan, but the correct addresses were in the foundlist of the firstScan. On one test last night only the step address was contained in the nextScan. So it appears to me that the problem exists from the first to the next scan as written with the code.
I hope I answered your question.
EDIT: The print out was copied from the debug window, with my added comments. |
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Wed Sep 18, 2013 11:22 pm Post subject: |
|
|
I did a bit more testing, creating a new button and just doing a scan for steps and then a next scan for steps, since those appeared in my testing to be narrowed to one hit on a subsequent scan. Also I change the name of the second foundlist to a different name(if that was the problem). I did leave the name of the second scan unchanged(and that might be a problem)
| Code: |
function CEButton6Click(sender)--Recalculate Addresses
errorOnLookupFailure(false)
ms3 = createMemScan();
memscan_firstScan(ms3, soExactValue, vtWord, rtRounded, stepvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms3);
fl3 = createFoundList(ms3);
foundlist_initialize(fl3);
foundlist_getCount(fl3);
for z = 0, foundlist_getCount(fl3)-1 do--Items are in hex format without the 0x
memrec7 = foundlist_getAddress(fl3, z);
memrec8 = tonumber(memrec7, 16);
end;--for z = 0 loop
for z = 0, foundlist_getCount(fl3)-1 do
print("The step values found in the first scan are "..z.." "..foundlist_getAddress(fl3,z))
end
expvalue = null;
goldvalue = null;
stepvalue = null;
heroname = null;
byteoffset = null;
edit_clear(CheatPanel_CEEdit1);
edit_clear(CheatPanel_CEEdit2);
edit_clear(CheatPanel_CEEdit3);--end of the first scans
radiogroup_setItemIndex(CheatPanel_CERadioGroup1, 0);
control_setCaption(CheatPanel_CEButton6, "Next Scan");
print("The first scan is complete");
elseif heroname ~= null and expvalue ~= null and goldvalue ~= null and stepvalue ~= null and control_getCaption(CheatPanel_CEButton6) == "Next Scan" then
memscan_nextScan(ms3, soExactValue, vtWord, rtRounded, stepvalue, "", "00000000", "7fffffff", "+W*X-C", fsmNotAligned, "", false, false, false, false);
memscan_waitTillDone(ms3);
fl3n = createFoundList(ms3);
foundlist_initialize(fl3n);
foundlist_getCount(fl3n);
for z = 0, foundlist_getCount(fl3)-1 do--Items are in hex format without the 0x
memrec7 = foundlist_getAddress(fl3n, z);--This statement assumes only one hit, there needs to be additional steps to handle more than one hit
memrec8 = tonumber(memrec7, 16);
byteoffset = memrec7
byteoffset = "0x" .. byteoffset;
print("The byteoffset is ", byteoffset);
break;
end;--for z = 0 loop
for z = 0, foundlist_getCount(fl3n)-1 do
print("The step values found in the next scan are "..z.." "..foundlist_getAddress(fl3n,z))
end
if control_getCaption(CheatPanel_CEButton6) == "Next Scan" then
local addresslist = getAddressList();
memrec5 = addresslist_getMemoryRecordByDescription(addresslist, "Gold");--address in hex format without 0x
goldtableaddress = memoryrecord_getAddress(memrec5);--Item in num format
memoryrecord_setAddress(memrec6, string.format('%x', memoryrecord_getAddress(memrec6) + byteoffset));
end;
recalculatetable = 1;
expvalue = null;
goldvalue = null;
stepvalue = null;
heroname = null;
byteoffset = null;
edit_clear(CheatPanel_CEEdit1);
edit_clear(CheatPanel_CEEdit2);
edit_clear(CheatPanel_CEEdit3);
radiogroup_setItemIndex(CheatPanel_CERadioGroup1, 0);
control_setCaption(CheatPanel_CEButton6, "Recalculate Addresses");
print("The table has been recalculated");
else
end--if control_getCaption(CheatPanel_CEButton6) == "Next Scan" then
else
print("Experience, Gold, Steps and Hero must all be entered");
end;--if heroname ~= null and expvalue ~= null and goldvalue ~= null and stepvalue ~= null and control_getCaption(CheatPanel_CEButton6) == "Recalculate Addresses" then
end;--CEButton6Click() |
Now the debug output looks like this:
Steps to scan = 34548
The num of search hits for steps is 78
The step values found in the first scan are 0 02903758
The step values found in the first scan are 1 029039DE
The step values found in the first scan are 2 02960955
The step values found in the first scan are 3 029779CD
The step values found in the first scan are 4 0297997D
The step values found in the first scan are 5 0297A9D7
The step values found in the first scan are 6 0297E9B3
The step values found in the first scan are 7 0298BB45
The step values found in the first scan are 8 029958C9
The step values found in the first scan are 9 02BE0646
The step values found in the first scan are 10 03DB4FFA
The step values found in the first scan are 11 03DB8F3A
The step values found in the first scan are 12 03DCA852
The step values found in the first scan are 13 0674F886 This the correct address to find
The step values found in the first scan are 14 06752686
The step values found in the first scan are 15 067A7724
The step values found in the first scan are 16 068CD3BE
The step values found in the first scan are 17 068E0FF6
The step values found in the first scan are 18 06D4338F
The step values found in the first scan are 19 06E33164
The step values found in the first scan are 20 06ED6E90
The step values found in the first scan are 21 06F29E88
The step values found in the first scan are 22 06FF2B83
The step values found in the first scan are 23 06FF564D
The step values found in the first scan are 24 06FF7EFF
The step values found in the first scan are 25 06FF9829
The step values found in the first scan are 26 06FFB171
The step values found in the first scan are 27 06FFC63D
The step values found in the first scan are 28 06FFD047
The step values found in the first scan are 29 06FFF545
The step values found in the first scan are 30 070A174B
The step values found in the first scan are 31 070A69A3
The step values found in the first scan are 32 070A7EA1
The step values found in the first scan are 33 070AC8BB
The step values found in the first scan are 34 070ACA67
The step values found in the first scan are 35 070B0693
The step values found in the first scan are 36 070B242D
The step values found in the first scan are 37 070B35BB
The step values found in the first scan are 38 070B3983
The step values found in the first scan are 39 070B5E99
The step values found in the first scan are 40 070BB2F9
The step values found in the first scan are 41 070BB395
The step values found in the first scan are 42 070BBD2D
The step values found in the first scan are 43 07121BFB
The step values found in the first scan are 44 0712A797
The step values found in the first scan are 45 07182AED
The step values found in the first scan are 46 07182E51
The step values found in the first scan are 47 07183F35
The step values found in the first scan are 48 07186A59
The step values found in the first scan are 49 07186BA7
The step values found in the first scan are 50 07187483
The step values found in the first scan are 51 0718BEE3
The step values found in the first scan are 52 071906A5
The step values found in the first scan are 53 0719324D
The step values found in the first scan are 54 07193DEB
The step values found in the first scan are 55 07199225
The step values found in the first scan are 56 0719C19F
The step values found in the first scan are 57 0719C34D
The step values found in the first scan are 58 0719C7F1
The step values found in the first scan are 59 0719D6A5
The step values found in the first scan are 60 071F269D
The step values found in the first scan are 61 071F4C4D
The step values found in the first scan are 62 07200CA5
The step values found in the first scan are 63 072038DF
The step values found in the first scan are 64 07206A51
The step values found in the first scan are 65 072083BB
The step values found in the first scan are 66 0720967D
The step values found in the first scan are 67 0720C825
The step values found in the first scan are 68 07216CEF
The step values found in the first scan are 69 0721DCDD
The step values found in the first scan are 70 0722B253
The step values found in the first scan are 71 0722D579
The step values found in the first scan are 72 076D9EE9
The step values found in the first scan are 73 076FE54D
The step values found in the first scan are 74 07702B05
The step values found in the first scan are 75 0771EB0D
The step values found in the first scan are 76 077273D1
The step values found in the first scan are 77 664F5150
The first scan is complete
Steps to scan = 34553
The num of search hits for steps is 1
The byteoffset is 0x070B242D
The step values found in the next scan are 0 070B242D This is not the correct address, see the high lite above
The table has been recalculated
Perhaps the coded memscans default to a 4 byte fastscan as this 070B242D looks very similar to your previous comment. If so what commands need to be added to nullify the fastscan? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|