View previous topic :: View next topic |
Author |
Message |
tonberry901 How do I cheat? Reputation: 0
Joined: 15 Mar 2024 Posts: 4
|
Posted: Fri Mar 15, 2024 6:44 pm Post subject: Script to export code list address to .txt |
|
|
Spent about a week trying to get a pointer for one last address I need to finishing writing a C# application for logging in game match statistics.
I can pull up good working addresses via the code list; and have been manually copying pasting the address to my pointers file that my C# application pulls it's addresses from. But I have to do this every match to preserve my sample integrity.
I've been thinking about a workaround in which I script Cheat Engine to write the new address to a text file each time a new address appears and just have my application pull the new address from there. Like a hand off.
Is this even possible?
Please and thank you. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1260
|
Posted: Fri Mar 15, 2024 11:01 pm Post subject: |
|
|
This code saves the addresses in the address list with the given ranges to the given file path.
It filters out duplicate addresses and creates a unique list.
You can read this file in #C form and refresh your list.
Additionally, newly added addresses will always be in the last lines.
The default "F8" key starts or stops recording. You can change it.
You can also change the save path.
Code: | if lstchk then lstchk.Destroy() lstchk=nil end
lstchk=createTimer(MainForm) lstchk.Enabled=false
lstchk.Interval=5000
local listTbl = {}
function filterCompres(tblold)
flags = {}
aa = 0
flags1 = {}
for i=1, #tblold do
if not flags[tblold[i]] then
aa = tonumber(aa) + 1
flags1[aa] = tblold[i]
flags[tblold[i]] = true
end
end
return flags1
end
----------------------------------------------
local path = getTempFolder()..[[myAddres_List.txt]] --Your path?
function load_addrList()
local al=getAddressList()
cnt = addresslist_getCount(al)
if cnt > 0 then
for i=0, cnt-1 do
local mr = addresslist_getMemoryRecord(al,i)
table.insert(listTbl,mr.Address)
end
end
newTbl = filterCompres(listTbl)
newtext = ""
if newTbl then
for i,k in pairs(newTbl) do
newtext=newtext..k.."\n"
end
listTbl = newTbl
end
if path then
local fl = io.open(path, "w+") -- delete all text
fl:write(newtext) -- write new and full text
fl:close()
end
print("\nnewtext:\n"..newtext)
end
lstchk.OnTimer=load_addrList
if startky then startky.Destroy() startky=nil end
startky=createHotkey(function() sleep(200)
if lstchk.Enabled==false then
lstchk.Enabled=true
else
lstchk.Enabled=false
end
end, VK_F8) -- record start-stop key f8 ..
|
_________________
|
|
Back to top |
|
|
tonberry901 How do I cheat? Reputation: 0
Joined: 15 Mar 2024 Posts: 4
|
Posted: Sat Mar 16, 2024 4:53 am Post subject: |
|
|
Thank you for the generous use of your time.
I've not been able to get this code working immediately, but I'm sure that's on my end.
Question:
I don't have (yet) a good pointer for the address I need; but I keep recalling it via the code list (find what addresses this code writes to).
Does this code complete that task of importing those addresses to my saved addresses list? It looks as though it just writes to .txt the addresses I already have in my Table.
Getting all my other pointers were fairly straight forward, but this last one (tracks a float value for distance) is resisting the pointer scanner
Thank you again for your assistance. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1260
|
Posted: Sat Mar 16, 2024 5:58 am Post subject: |
|
|
Ahh! The code only saves the addresses in the address list, and if there is a pointer attached to these addresses, it cannot save them properly.
Additionally, it will be necessary to do research while reading the options you mentioned in your last comment (if they are not in the addresses and found list). _________________
|
|
Back to top |
|
|
|