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 


(script) Encode automatically

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Sun Dec 18, 2016 11:01 am    Post subject: (script) Encode automatically This post has 2 review(s) Reply with quote

For those who do not know how to use the functions:
encodeFunction()
decodeFuntion()
Or I'd like to use them more easily.
This script will be very useful.

Code:

form = createForm(false)
form.Position = poDesktopCenter
form.Width = 600
form.Height = 320
form.Caption = "Encode script"

memo1 = createMemo(form)
memo1.Top = 10
memo1.Left = 10
memo1.Width = 250
memo1.Height = 300
memo1.Lines.Text = "-- Put your script here\n"

memo2 = createMemo(form)
memo2.Top = 10
memo2.Left = 340
memo2.Width = 250
memo2.Height = 300
memo2.Lines.Text = "-- Copy the generated script here"

button = createButton(form)
button.Top = 140
button.Left = 267
button.Caption = "Encode"
button.AutoSize = true

button.OnClick = function()

   text_encode = "function code() "..memo1.Lines.Text.." end encode = encodeFunction(code)"
    script_encode = load(text_encode)()
    script_print = "-- Copy the generated script here\ncode = decodeFunction(\""..encode.."\")\ncode()"
    memo2.Lines.Text = script_print

end

form.OnClose = function() closeCE() return caFree end

form.Show()

Download Encode script x64 and x86

_________________
...
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1251

PostPosted: Sun Oct 07, 2018 1:54 pm    Post subject: Reply with quote

Thanks Master end +1 Rep.

I'm Edit Script ; Udf1 Version..

Code:
function CEButton1Click(sender)
text_encode = "function code() "..UDF1.CEMemo1.Lines.Text.." end encode = encodeFunction(code)"
script_encode = load(text_encode)()
script_print = "local my_function = decodeFunction(\'"..encode.."\')\nmy_function()"
UDF1.CEMemo2.Lines.Text = script_print
end

function CEButton2Click(sender) --Reset
UDF1.CEMemo1.Lines.Text = ''
UDF1.CEMemo2.Lines.Text = ''
end

UDF1.show()


Again Thanks Master.

_________________
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
Page 1 of 1

 
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