View previous topic :: View next topic |
Author |
Message |
AylinCE Grandmaster Cheater Supreme Reputation: 31
Joined: 16 Feb 2017 Posts: 1234
|
Posted: Fri Aug 06, 2021 8:41 pm Post subject: Some experience and help needed .. |
|
|
I am trying to list all idioms used with CE.
But there are many idioms that I don't use or are not familiar with.
I need to list all of them.
Sample;
"string.byte"
"math max"
"os.execute"
"shellExsecute"
"io.popen"
...
etc
There are too many idioms and I need to list them.
It is not necessary for you to be familiar with it, I would be happy if you write it as a list so that there is no crowd of comments.
Thanks in advance. _________________
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
Posted: Fri Aug 06, 2021 9:39 pm Post subject: |
|
|
Most of that is in the Lua 5.3 Reference Manual.
http://www.lua.org/manual/5.3/contents.html#contents
shellExecute is a function CE provides and can be found in celua.txt. _________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 31
Joined: 16 Feb 2017 Posts: 1234
|
Posted: Fri Aug 06, 2021 11:04 pm Post subject: |
|
|
Even though I searched so much, it escaped my notice.
You made a great contribution, thank you @ParkourPenguin.
I started listing.
Code: | --strings
strings1=([["string.byte","string.char","string.ends","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.starts","string.sub","string.upper"]])
|
_________________
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Sat Aug 07, 2021 12:15 am Post subject: |
|
|
'string' is a built-in type/table to Lua, you can dump it if you want to see what all is in it like this:
Code: | for s in pairs(string) do
print(s);
end |
_________________
- Retired. |
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1053 Location: 0x90
|
Posted: Sat Aug 07, 2021 3:17 am Post subject: |
|
|
Also, in the Lua Engine window of Cheat Engine, you can press Ctrl + Spacebar to show a list of available methods/properties. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 31
Joined: 16 Feb 2017 Posts: 1234
|
Posted: Sat Aug 07, 2021 6:15 am Post subject: |
|
|
atom0s wrote: | 'string' is a built-in type/table to Lua, you can dump it if you want to see what all is in it like this:
Code: | for s in pairs(string) do
print(s);
end |
|
Code: | for s in pairs(math) do
print("math."..s);
end |
Thanks.. The results are great. It works fine for "String" and "Math".
In addition to these, I need to list other manipulations used in CE.
Thanks to everyone who contributed. _________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Aug 07, 2021 10:41 am Post subject: |
|
|
don't forget string.split (CE addition to string) _________________
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 |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Sat Aug 07, 2021 10:42 pm Post subject: |
|
|
Aylin wrote: |
Thanks.. The results are great. It works fine for "String" and "Math".
In addition to these, I need to list other manipulations used in CE.
Thanks to everyone who contributed. |
If you are looking to dump all the base level tables that CE's Lua state contains, you can do that as well like this:
Code: |
for k, v in pairs(_G) do
if (v ~= nil and type(v) == 'table') then
print(k);
for kk, vv in pairs(v) do
print(string.format(' - %s (%s)', kk, type(vv)));
end
end
print('');
end
|
You can then rework it to do recursion as needed too if you want to dump inner-tables within those etc. _________________
- Retired. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 31
Joined: 16 Feb 2017 Posts: 1234
|
Posted: Sun Aug 08, 2021 12:03 am Post subject: |
|
|
I think the reference is complete.
Your last contribution gave a long list, thanks.
Only one code left to complete the project.
When I get a response, I will integrate the project and present it.
When it is completed and in the final, I think a useful topic will come up again.
Thanks again.
----------------------------------
Irrelevant;
Why couldn't I leave a +1 for reputation?
I am getting an error message.
Is this a common situation?
---------------------------------- _________________
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1053 Location: 0x90
|
Posted: Sun Aug 08, 2021 12:05 am Post subject: |
|
|
Code: |
function print_table(node)
local cache, stack, output = {},{},{}
local depth = 1
local output_str = "{\n"
while true do
local size = 0
for k,v in pairs(node) do
size = size + 1
end
local cur_index = 1
for k,v in pairs(node) do
if (cache[node] == nil) or (cur_index >= cache[node]) then
if (string.find(output_str,"}",output_str:len())) then
output_str = output_str .. ",\n"
elseif not (string.find(output_str,"\n",output_str:len())) then
output_str = output_str .. "\n"
end
-- This is necessary for working with HUGE tables otherwise we run out of memory using concat on huge strings
table.insert(output,output_str)
output_str = ""
local key
if (type(k) == "number" or type(k) == "boolean") then
key = "["..tostring(k).."]"
else
key = "['"..tostring(k).."']"
end
if (type(v) == "number" or type(v) == "boolean") then
output_str = output_str .. string.rep('\t',depth) .. key .. " = "..tostring(v)
elseif (type(v) == "table") then
output_str = output_str .. string.rep('\t',depth) .. key .. " = {\n"
table.insert(stack,node)
table.insert(stack,v)
cache[node] = cur_index+1
break
else
output_str = output_str .. string.rep('\t',depth) .. key .. " = '"..tostring(v).."'"
end
if (cur_index == size) then
output_str = output_str .. "\n" .. string.rep('\t',depth-1) .. "}"
else
output_str = output_str .. ","
end
else
-- close the table
if (cur_index == size) then
output_str = output_str .. "\n" .. string.rep('\t',depth-1) .. "}"
end
end
cur_index = cur_index + 1
end
if (size == 0) then
output_str = output_str .. "\n" .. string.rep('\t',depth-1) .. "}"
end
if (#stack > 0) then
node = stack[#stack]
stack[#stack] = nil
depth = cache[node] == nil and depth + 1 or depth - 1
else
break
end
end
-- This is necessary for working with HUGE tables otherwise we run out of memory using concat on huge strings
table.insert(output,output_str)
output_str = table.concat(output)
print(output_str)
end
|
You can also use this to print large and or nested tables. |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 31
Joined: 16 Feb 2017 Posts: 1234
|
Posted: Sun Aug 08, 2021 12:23 am Post subject: |
|
|
@LeFiXER, thanks..
But it doesn't give the same result.
You need to get clean results.
Your code result:
Code: | {
['packsize'] = 'function: 00007FFEAC01A920',
['split'] = 'function: 000000000066E710',
['char'] = 'function: 00007FFEAC0174D0',
['byte'] = 'function: 00007FFEAC017330',
['gmatch'] = 'function: 00007FFEAC0189B0',
['gsub'] = 'function: 00007FFEAC018FC0',
...
...
|
And look at this example;
Code: | for s in pairs(string) do
--print("string."..s);
print("string."..s.."()");
end |
result:
Code: | string.packsize()
string.split()
string.char()
string.byte()
string.gmatch()
string.gsub()
string.find()
string.match()
string.dump()
string.len()
string.gfind()
string.sub()
...
... |
"The shortest way you can walk,
He gives you the remaining time as a gift."
Always; I am fascinated by the magic of shortcodes.
Thanks for the contribution. _________________
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1053 Location: 0x90
|
Posted: Sun Aug 08, 2021 2:16 am Post subject: |
|
|
Indeed, shorthand is nice but can lose all contextual brevity, at least without comments, as when you later return to it you may not remember what the purpose of the code was for. Nevertheless, I think it helps to share the myriad ways of doing things. |
|
Back to top |
|
|
|