Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Internet access
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
hemersonkla1
Cheater
Reputation: 0

Joined: 24 Jun 2015
Posts: 34

PostPosted: Wed Sep 14, 2016 1:39 pm    Post subject: how i do this please? Reply with quote

Code:
int=getInternet()
s=int.getURL("http://cheatengine.org/examplescript.lua")
load(s)()
if (load) then
form_show(UDF13)
end
else
form_hide(UDF13)
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Apr 05, 2020 7:57 am    Post subject: Reply with quote

Dark Byte wrote:
Another example but now with a pre-compiled lua script: (Exactly the same script)
Code:

if cheatEngineIs64Bit() then bintype='64' else bintype='32' end
int=getInternet()
s=int.getURL("http://cheatengine.org/examplescript.luac"..bintype)
int.destroy()
load(s)()




DB,
Could you please share the example of this Trainer you uploaded to the cloud?

"examplescript.luac" Smile

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Apr 05, 2020 8:03 am    Post subject: This post has 1 review(s) Reply with quote

https://cheatengine.org/examplescript.luac64 is the result of encodeFunction of http://cheatengine.org/examplescript.lua when done from 64-bit CE

https://cheatengine.org/examplescript.luac32 is the 32 bit version

_________________
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
View user's profile Send private message MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sun Apr 05, 2020 8:07 am    Post subject: Reply with quote

Dark Byte wrote:
https://cheatengine.org/examplescript.luac64 is the result of encodeFunction of http://cheatengine.org/examplescript.lua when done from 64-bit CE

https://cheatengine.org/examplescript.luac32 is the 32 bit version


DB, so this loadstring() able to load binaries file as luac?

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Apr 05, 2020 8:12 am    Post subject: Reply with quote

lua bytecode binaries as well yes

encodeFunction just converts the lua bytecode to a copy/pastable format.

Also, you can build your own lua version with a randomized order of instructions so the bytecode only works with that lua build (use EncodeFunctionEx for that if you don't want to replace your main lua file)

_________________
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
View user's profile Send private message MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sun Apr 05, 2020 8:54 am    Post subject: Reply with quote

Dark Byte wrote:
lua bytecode binaries as well yes

encodeFunction just converts the lua bytecode to a copy/pastable format.

Also, you can build your own lua version with a randomized order of instructions so the bytecode only works with that lua build (use EncodeFunctionEx for that if you don't want to replace your main lua file)


I see, DB, thank so much for useful information.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Apr 05, 2020 9:19 am    Post subject: Reply with quote

Thanks DB. I saved the current table as ".luac" and loaded it smoothly.
It is a pity that you do not give the example here when the forum on the link opens.
I think the forum below has been in vain. Smile

https://www.cheatengine.org/forum/viewtopic.php?t=607299

I have a question; Does the ".luac" table called or opened save to the PC?
Where does it open as an infrastructure? Is it cloud? Or TEMP etc? Rolling Eyes

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Apr 05, 2020 10:23 am    Post subject: Reply with quote

the luac is not a table, it's just some lua code
and it gets loaded by loadstring(loadstring can load binary as well)

but if you wish to load a table using luascript you can use loadTable(stream)
FileStream, MemoryStream and StringStream are all acceptable as input, and only one of them needs diskspace

_________________
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
View user's profile Send private message MSN Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Apr 05, 2020 11:27 am    Post subject: Reply with quote

Dark Byte wrote:
the luac is not a table, it's just some lua code
and it gets loaded by loadstring(loadstring can load binary as well)

but if you wish to load a table using luascript you can use loadTable(stream)
FileStream, MemoryStream and StringStream are all acceptable as input, and only one of them needs diskspace


This code is very useful. Thanks DB.
I tried. With ".luac" I can call cheat panels to Existing Table.
So I can add more than one game Trainer to one table. Wink
I will now use this method for updating.
Give an empty trainer and fill it up from the cloud; Good idea. Idea Idea
Thanks again, DB Smile

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites