View previous topic :: View next topic |
Author |
Message |
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Apr 08, 2018 4:58 pm Post subject: |
|
|
This is what I use to load table files. You should be able to adapt it to what you need.
Code: | --------
-------- CE Table Require
--------
local TableLuaFilesDirectory = 'luaFiles'
function CETrequire(moduleStr)
if moduleStr ~= nil then
local localTableLuaFilePath = moduleStr
if TableLuaFilesDirectory ~= nil or TableLuaFilesDirectory ~= '' then
local sep = package.config:sub(1,1)
localTableLuaFilePath = TableLuaFilesDirectory .. sep .. moduleStr
end
local f, err = io.open(localTableLuaFilePath .. '.lua')
if f and not err then
f:close()
return require(localTableLuaFilePath)
else
local tableFile = findTableFile(moduleStr .. '.lua')
if tableFile == nil then
return nil
end
local stream = tableFile.getData()
local fileStr = nil
local bytes = stream.read(stream.Size)
for i = 1, #bytes do
if fileStr == nil then
fileStr = ''
end
fileStr = fileStr .. string.char(bytes[i])
end
if fileStr then
return assert(loadstring(fileStr))()
end
end
end
return nil
end
-- CETrequire('I2CETableCEA')
-- CETrequire('SomeLuaModuleStoredAsTableFile')
-- SomeLuaModuleStoredAsTableFile.printTest() -- Just an example. |
But basically I think you'll need to use "assert(loadstring(fileStr))()" to load the Lua code.
_________________
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
Posted: Sun Apr 08, 2018 5:46 pm Post subject: |
|
|
TheyCallMeTim13 wrote: | This is what I use to load table files. You should be able to adapt it to what you need.
Code: | --------
-------- CE Table Require
--------
local TableLuaFilesDirectory = 'luaFiles'
function CETrequire(moduleStr)
if moduleStr ~= nil then
local localTableLuaFilePath = moduleStr
if TableLuaFilesDirectory ~= nil or TableLuaFilesDirectory ~= '' then
local sep = package.config:sub(1,1)
localTableLuaFilePath = TableLuaFilesDirectory .. sep .. moduleStr
end
local f, err = io.open(localTableLuaFilePath .. '.lua')
if f and not err then
f:close()
return require(localTableLuaFilePath)
else
local tableFile = findTableFile(moduleStr .. '.lua')
if tableFile == nil then
return nil
end
local stream = tableFile.getData()
local fileStr = nil
local bytes = stream.read(stream.Size)
for i = 1, #bytes do
if fileStr == nil then
fileStr = ''
end
fileStr = fileStr .. string.char(bytes[i])
end
if fileStr then
return assert(loadstring(fileStr))()
end
end
end
return nil
end
-- CETrequire('I2CETableCEA')
-- CETrequire('SomeLuaModuleStoredAsTableFile')
-- SomeLuaModuleStoredAsTableFile.printTest() -- Just an example. |
But basically I think you'll need to use "assert(loadstring(fileStr))()" to load the Lua code. |
@TheyCallMeTim13 Master;
Thanks for the example.
However, please note that I'm a novice.
How would I reconcile with the above code (Remote URL.txt).
I hope we can blend these two codes.
_________________
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Apr 08, 2018 5:52 pm Post subject: |
|
|
Aylin wrote: |
@TheyCallMeTim13 Master;
Thanks for the example.
However, please note that I'm a novice.
How would I reconcile with the above code (Remote URL.txt).
I hope we can blend these two codes. |
TheyCallMeTim13 wrote: | ...
But basically I think you'll need to use "assert(loadstring(fileStr))()" to load the Lua code. |
Use some basic logic, replace or set "fileStr" with your code sting.
I'll help; but I won't write it for you, you'll never really learn much that way.
_________________
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
Posted: Sun Apr 08, 2018 6:32 pm Post subject: |
|
|
Writing code is a valuable skill.
I must be honest; Code letter sounds complicated to me,
Dealing with 20-30 game complexes, producing continuous trainer,
group forums and constantly renewed, cheat codes to make Trainer.
In all of these, your help is a quick step.
I'm giving ideas for the production of a useful code.
If I can produce the code, I will post it.
Of course, these are my thoughts.
The decision to help or not is always yours.
thanks for the answer.
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
Posted: Sun Apr 08, 2018 8:25 pm Post subject: |
|
|
After addressing the code,
eventually this code remains.
Code: | int=getInternet()
s=int.getURL("http://cheatengine.org/examplescript.lua")
int.destroy()
load(s)() |
Only an arrangement in the original code will suffice.
example:
Code: | --UDF1.CELabel1.caption = '1111'
--UDF1.CELabel1.Visible = false
if syntaxcheck then return end
local url = "https://docs.google.com/document/d/1mavIeXQC_rlPuo3jCicTGEISchkqkWWw6M7aqHDB4o0/export?format=txt"
local http = getInternet()
local result = http.getURL(url)
if result then
result=tostring(result:match("%d+")) -- After the matc print
local trainer_verifier = UDF1.CELabel1.caption -- the main road can be replaced: local my_function = decodeFunction('..the registration path can be shown here.. or ..r+..')
if trainer_verifier ~= result then
showMessage("No Done")
-- closeCE()
return caFree
else
showMessage("Done")
return
--UDF1.show(); -- and here the function can be initialized: my_function();
my_function();
end
end |
Rather than write new code, this code can be processed.
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon Apr 09, 2018 7:30 am Post subject: |
|
|
What I wrote above is an example, how to handle code, script, image, etc which stored in a web host.
'To handle" mean how to load that code/script.etc and then execute it if contain functions, form, class, etc. with this code :
Code: | int=getInternet()
s=int.getURL("http://cheatengine.org/examplescript.lua") --- or what ever file you stored (maybe txt file, bin file, png file, etc) in your web host.
int.destroy()
load(s)() |
After it loaded, then next you can call your function 'my_function'.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
Posted: Mon Apr 09, 2018 9:19 am Post subject: |
|
|
All ERROR!!!
I do not know how to translate sample codes into script.
Recommendation: 'Learn to follow the guidelines CE' If you say:
https://github.com/cheat-engine/cheat-engine/blob/master/Cheat%20Engine/bin/celua.txt
He tells you what it does,
but there is no information on how to use it.
'ExecuteScript' tests even a comma.
Code: | local s=Script()
s.align=alClient
local
int=getInternet()
local txtstr=int.getURL("https://docs.google.com/document/d/1mavIeXQC_rlPuo3jCicTGEISchkqkWWw6M7aqHDB4o0/export?format=txt")
int.destroy()
local ss=createStringStream(txtstr)
s.Script.LoadFromStream(ss)
ss.destroy()
int=getInternet()
s=int.getURL("https://docs.google.com/document/d/1mavIeXQC_rlPuo3jCicTGEISchkqkWWw6M7aqHDB4o0/export?format=txt")
int.destroy()
load(s) --()
my_function() |
It may take years to learn these things.
But thanks for the help and ideas.
maybe.. another a time.
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon Apr 09, 2018 7:58 pm Post subject: |
|
|
This is last attempt to explain what to do by codes below, even I am not sure what are you trying to do, hope you get understand every words and comments to the codes here, by read it carefully...
Code: | ----- set a variable which will use to check password
----- this part should be hide or encoded or use CEEdit to allow user input a password
UDF1.CELabel1.Caption = '1111'
UDF1.CELabel1.Visible = false
----- get password stored on web host site
if syntaxcheck then return end
---=-- THIS IS URL USE TO STORE PASSWORD
local url = "https://docs.google.com/document/d/1mavIeXQC_rlPuo3jCicTGEISchkqkWWw6M7aqHDB4o0/export?format=txt"
local http = getInternet()
local result = http.getURL(url)
----- check password macth to UDF1.Caption or not
-----
----- If password matched, then load your important codes from every where you store it
if result then result=tostring(result:match("%d+")) end
UDF1.Visible = false
local trainer_verifier = UDF1.CELabel1.caption
if trainer_verifier == result then
int=getInternet()
--- THIS IS URL USE TO STORE YOUR SCRIPT OR CODE
s=int.getURL("http://cheatengine.org/examplescript.lua") --- this just example, PUT YOUR OWN URL HERE
int.destroy()
load(s)()
end
----- If password not matched
if trainer_verifier ~= result then
showMessage("Mr.Frodo..you took wrong path")
return
end
|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
Posted: Tue Apr 10, 2018 6:02 am Post subject: |
|
|
Corroder wrote: | This is last attempt to explain what to do by codes below, even I am not sure what are you trying to do, hope you get understand every words and comments to the codes here.. |
I'm resetting all the questions.
Maybe I'm wrong.
Initially, I shared (@Corrod code):
He reads and confirms '1111' on the remote connection.
I need to: put the deCode code on the remote connection and
to read it and run it on Trainer.lua (or Script).
I would like to update the Trainer within the remote URL.
and a CT specimen. (Please read some information given in the CT script) :
https://www.dropbox.com/s/6nyhrtupxwbwti8/specimen1.CT?dl=0
thanks again
_________________
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Tue Apr 10, 2018 6:43 am Post subject: |
|
|
May be this is what your looking for, this is made by Zanzer and will auto-update the table from a server file (but I've never used it my self just remembered the thread).
Automatically Update to Latest Cheat Table
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Tue Apr 10, 2018 7:45 am Post subject: |
|
|
@TheyCallMeTim13 :
Quote: | May be this is what your looking for, this is made by Zanzer and will auto-update the table from a server file
|
Code: | int=getInternet()
--- THIS IS URL USE TO STORE YOUR SCRIPT OR CODE
s=int.getURL("https://docs.google.com/document/d/1OVn7FvHXUBLmEwX6ujOUW10U4WqJdb6eXo9aXGO3ZGw/export?format=txt") -- this Aylin encode script URL
print(s) --- to check if script load or not
int.destroy()
assert(loadstring(s))() --- or load(s)() |
I think need manipulating this 'loadstring(s)()' since that script has stored and download as 'format=txt'.
@Aylin
So to test that script which stored on web host work or not :
1. Try make another simple script with no encodeFunction(), just readable script and store to web host and then call it with function above.
2. Or to make it more easier, just save that encode script as a lua file and call it (maybe with Zanzer auto update function as mentioned)
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Tue Apr 10, 2018 5:14 pm Post subject: |
|
|
DecodeFunction returns you a string, I think you should print it's output and look at what you got, before trying to load it.
Can't really help you with the errors without seeing the code itself,perhaps there's a mistake in the encoded code.
_________________
|
|
Back to top |
|
|
|