View previous topic :: View next topic |
Author |
Message |
dyl10s How do I cheat? Reputation: 0
Joined: 21 Aug 2016 Posts: 5
|
Posted: Sun Aug 21, 2016 11:34 pm Post subject: Can Someone Write me a Script |
|
|
Hey Everyone,
I need a lua script that looks for a string on a process and copies the first address it finds onto the clipboard.
Thanks!
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Aug 22, 2016 6:15 pm Post subject: |
|
|
Not sure if CE implements any clipboard functionality for you.
|
|
Back to top |
|
|
predprey Master Cheater Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Mon Aug 22, 2016 7:01 pm Post subject: |
|
|
Zanzer wrote: | Not sure if CE implements any clipboard functionality for you. |
AOBScan(aobstring): scans the currently opened process and returns a StringList object containing all the results. don't forget to free this list when done
Bytevalue of higher than 255 or anything not an integer will be seen as a wildcard
readInteger(address) : Reads an integer from the specified address. Returns nil if not a valid address.
writeToClipboard(text): Writes the given text to the clipboard
readFromClipboard(): Reads the text from the clipboard
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Tue Aug 23, 2016 6:36 am Post subject: |
|
|
Code: | function strToAOB(input) -- case sensitive
if (input and type(input) == 'string') then
local output = {};
for i=1,#input do
table.insert(output,("%x"):format(input:sub(i,i):byte()));
end
return table.concat(output," ");
end
return false
end
function findString(input)
if (input) then
local aob = strToAOB(input)
if (aob) then
local oAobs = AOBScan(aob);
if (oAobs) then
writeToClipboard(oAobs.getString(0));
oAobs.destroy();
return true;
end
end
end
return false;
end
-- converts string to aobs and writes to clipboard first address.
-- this scan is case sensitive
print(tostring(findString("hello"))) |
_________________
|
|
Back to top |
|
|
dyl10s How do I cheat? Reputation: 0
Joined: 21 Aug 2016 Posts: 5
|
Posted: Tue Aug 23, 2016 8:45 am Post subject: |
|
|
DaSpamer wrote: | Code: | function strToAOB(input) -- case sensitive
if (input and type(input) == 'string') then
local output = {};
for i=1,#input do
table.insert(output,("%x"):format(input:sub(i,i):byte()));
end
return table.concat(output," ");
end
return false
end
function findString(input)
if (input) then
local aob = strToAOB(input)
if (aob) then
local oAobs = AOBScan(aob);
if (oAobs) then
writeToClipboard(oAobs.getString(0));
oAobs.destroy();
return true;
end
end
end
return false;
end
-- converts string to aobs and writes to clipboard first address.
-- this scan is case sensitive
print(tostring(findString("hello"))) |
|
Thank You So Much!! This is perfect!
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Aug 23, 2016 6:06 pm Post subject: |
|
|
CE already has a string to byte function.
Code: | local output = stringToByteTable(input) |
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Aug 24, 2016 5:54 am Post subject: |
|
|
Zanzer wrote: | CE already has a string to byte function.
Code: | local output = stringToByteTable(input) |
|
Haha never noticed
_________________
|
|
Back to top |
|
|
|