View previous topic :: View next topic |
Author |
Message |
suckershake How do I cheat? Reputation: 0
Joined: 30 Oct 2013 Posts: 8
|
Posted: Wed Oct 30, 2013 3:00 pm Post subject: Outputting AoBscan Addresses? |
|
|
Well, first of all I have no skill lua-scripting whatsoever...
I have tried stuff and it failed.
Basically what I want is to find specific addresses using a aobscan, then calculating offsets and a Pointer using those scan-results and finally storing the results in a textfile or something.
I failed successfully executing a print and an AoBscan in the same script however...
I realize that I must suck just as much as I suck at finding the solution...
So instead of wasting countless hours of my time getting nowhere, I'll get somewhere by wasting your time
... So how do I read addresses using AoBscans (I know the instruction is aobscan(name,signature)
to calculate my static pointer with offsets (I should be able to do the calculations on my own)
and finally output the results?
If it's too complicated I don't mind first outputting the scan results and then calculating the results with something else.
I already have fool proof signatures and the scripting part really is the only thing I have trouble with.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Oct 30, 2013 3:48 pm Post subject: |
|
|
check out this topic: http://forum.cheatengine.org/viewtopic.php?p=5502697#5502697
the script I posted should at least tell you how to use the basics, and check DaSpamer script out as well
_________________
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 |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Oct 30, 2013 4:29 pm Post subject: |
|
|
Like this?
Code: | local AoB = AOBScan("90 90 90 90");
if (AoB == nil or AoB.Count > 1) then --> Ends function earlier if the AoB was not found, or if multiply aobs were found.
return
end
local BaseAddress = AoB[0]; --> First address
local Pointer = '[' .. BaseAddress .. ']+10'; --> Sets it as pointer, for example if you print, output will be [Address]+10 --> [02000000]+10
-- You can write now or read
-- writeInteger(Pointer, 100);
-- readInteger(Pointer); |
(I'm not sure if it works perfectly, since I have never tried lua with pointers, as I don't use pointers.)
_________________
|
|
Back to top |
|
|
suckershake How do I cheat? Reputation: 0
Joined: 30 Oct 2013 Posts: 8
|
Posted: Wed Oct 30, 2013 4:32 pm Post subject: |
|
|
Oh my god! Thank you so much!
Now if I want to print ... let's say:
A1 ** ** ** ** 35
the Address in-between the instructions?
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Oct 30, 2013 4:43 pm Post subject: |
|
|
I'm not really sure what you mean the address between them?
But you can change the BaseAddress to
Code: | local BaseAddress = AoB[0] .. '+offset' |
If you're trying to read it then try this
Code: | function DEC_HEX(IN)
if IN<=0 then
return '0'
end
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
while IN>0 do
I=I+1
IN,D=math.floor(IN/B),math.mod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
local AoB = AOBScan("90 90 90 90");
if (AoB == nil or AoB.Count > 1) then --> Ends function earlier if the AoB was not found, or if multiply aobs were found.
return
end
local BaseAddress = AoB[0]; --> First address
local Pointer = '[' .. BaseAddress .. ']+10'; --> Sets it as pointer, for example if you print, output will be [Address]+10 --> [02000000]+10
local ReadBytes = readBytes(Pointer,6,true) --> reads the first 6 bytes from the address and returns as table for each byte and byte (ReadBytes[1],ReadBytes[2] ... ReadBytes[n]) but converts them to Decimal*
for _,String in pairs(ReadBytes) do --> for each entry and entry in the table ReadBytes do..
local Hex = DEC_HEX(String) --> converting each byte and byte that stored in the ReadBytes Table
if Hex:len()==1 then
Hex = '0' .. Hex --> Just incase, making the bytes 2 character length
end
ReadBytes[_] = Hex
end
print(unpack(ReadBytes)) --> shows all ReadBytes table enteries as 1 line. Example of output A1 01 92 00 22 35 |
_________________
|
|
Back to top |
|
|
suckershake How do I cheat? Reputation: 0
Joined: 30 Oct 2013 Posts: 8
|
Posted: Wed Oct 30, 2013 5:13 pm Post subject: |
|
|
oh lol... this is waaay beyond me...
Got:
Error:[string "function DEC_HEX(IN)..."]:20: bad argument #1 to 'pairs' (table expected, got nil)
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Oct 30, 2013 5:25 pm Post subject: |
|
|
Oh my bad, I made this script try to read a pointer value.
Code: | function DEC_HEX(IN)
if IN<=0 then
return '0'
end
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
while IN>0 do
I=I+1
IN,D=math.floor(IN/B),math.mod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
local AoB = AOBScan("90 90 90 90");
if (AoB == nil or AoB.Count > 1) then
return
end
local Address = AoB[0];
local ReadBytes = readBytes(Address,6,true);
for _,String in pairs(ReadBytes) do
local Hex = DEC_HEX(String);
if Hex:len()==1 then
Hex = '0' .. Hex;
end
ReadBytes[_] = Hex;
end
print(unpack(ReadBytes)); |
This one should work.
If you have this code
01 ?? ?? ?? ?? 06
and you want to read
?? ?? ?? ?? 06
just modify the
Code: | local ReadBytes = readBytes(Address,6,true); |
to ( Don't remove the ,true at the end).
Code: | local ReadBytes = readBytes(Address .. '+offset',length to read ,true); |
_________________
|
|
Back to top |
|
|
suckershake How do I cheat? Reputation: 0
Joined: 30 Oct 2013 Posts: 8
|
Posted: Wed Oct 30, 2013 5:56 pm Post subject: |
|
|
Thanks! I have all I need for now
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Oct 31, 2013 7:24 pm Post subject: |
|
|
DaSpamer, Why you still use that DEC_HEX, there are more elegant ways...
_________________
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Fri Nov 01, 2013 5:58 am Post subject: |
|
|
mgr.inz.Player wrote: | DaSpamer, Why you still use that DEC_HEX, there are more elegant ways... |
cba (can't be arsed) .
I could use this
Code: | string.format("%X", number) |
_________________
|
|
Back to top |
|
|
suckershake How do I cheat? Reputation: 0
Joined: 30 Oct 2013 Posts: 8
|
Posted: Wed Nov 06, 2013 11:09 am Post subject: |
|
|
edit: nvm I finally figured stuff out myself I'm ready to go... after I've finished learning for the freaking exams tomorrow and basically the next three weeks... :DDDD
|
|
Back to top |
|
|
|