View previous topic :: View next topic |
Author |
Message |
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1251
|
Posted: Sun Apr 08, 2018 4:53 pm Post subject: [RESOLVED]Automatic .CETRAINER New Version Download! |
|
|
The code below reads and confirms a txt file with the remote URL.
But what I need is to write the txt text to be read into Lua.
For example, I must write a function and read and apply that function.
There is a valid reason:
If the game codes change, instead of making continuous Trainer,
you can update the codes (in Lua only) with a remote link.
(Code @Corroder)
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+"))
local trainer_verifier = UDF1.CELabel1.caption
if trainer_verifier ~= result then
showMessage("No Done")
-- closeCE()
return caFree
else
showMessage("Done")
return
UDF1.show();
end
end |
I do not know if the subject has been processed before.
But if the request is first; Masters must be the signature of this issue.
Thank you in advance for your ideas and participation.
------------------------------------ >>>
EDIT:
This was the case, and the result is in the messages.
Here is a Cetrainer example of the Resolved Result:
https://www.dropbox.com/s/6ro1jgyzqkuchhs/GameV32.CETRAINER?dl=1
Please read the messages for details and code.
NOTE:
If these codes have worked, do not forget to throw the Masters RAP.
Enjoy it! _________________
Last edited by AylinCE on Sat Apr 14, 2018 4:48 pm; edited 2 times in total |
|
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: 1251
|
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: 1251
|
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: 1251
|
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: 1251
|
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: 1251
|
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: 1251
|
Posted: Tue Apr 10, 2018 12:31 pm Post subject: |
|
|
@TheyCallMeTim13 Thanks.
If we can not solve the current scenario, your bid is probably valid.
But the trainer is updated from the registered connection.
A non-upgraded trainer, download link
how is it put into the old trainer?
Only used for version testing,
but I have some doubts I can update!
@Corroder:
Probably the code will work.
but it fails for some reasons.
I tried uploading (changed in remote URL Txt)
I tried this:
Code: | local my_function = decodeFunction('c-rkc^cjw^b#HcO=?Od*; .. etc etc etc..')
my_function() |
and I tried this:
Code: | <?xml version="1.0" encoding="UTF-8"?>
-<CheatTable CheatEngineTableVersion="26">
-<Forms>
<UDF1 Encoding="Ascii85" Class="TCEForm">#
etc.. etc.. etc..
wEb#s') my_function() </LuaScript>
</CheatTable> |
and I tried this:
Code: | <LuaScript>local my_function = decodeFunction('c-p.[-A etc.. etc.. etc..
wEb#s') my_function() </LuaScript> |
and I tried this:
Code: | UDF1.CEGroupBox1.visible = false
UDF1.CEButton4.visible = true
UDF1.CEImage1.visible = false
etc.. etc.. etc..
UDF1.CEImage1.visible = false
UDF1.CEImage2.visible = false
end
form_show(UDF1) |
In all, the errors that appear in the picture was taken.
There are two reasons that caught my attention:
1) Can remote URL-Txt change some characters?
2) Do the following commands require a change?
Code: | assert(loadstring(s))() |
There are two reasons that caught my attention:
1) Can remote URL-Txt change some characters?
2) Do the following commands require a change?
This script sees the script that needs to be loaded.
but can not load correctly,
I guess the commands may be missing!
or copy and paste, the character can be changed!
Please try it on your own, maybe it is complicated to explain,
you can get clearer information if you test it personally. _________________
|
|
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 |
|
|
|