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 


Need Help With Making A Script.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Gereksizz
Newbie cheater
Reputation: 0

Joined: 04 Jan 2018
Posts: 16
Location: Anime Heaven

PostPosted: Sat Mar 09, 2019 10:03 am    Post subject: Need Help With Making A Script. Reply with quote

[Sorry For My Bad English I am a Multilingual]
Hey So I Am Not Really Good With Lua But I Cant Say That I Am Bad.
So Iv'e got 2 CE Edits One Of Them Is Input And One Of Them Is Output.
What i want this script to do is get the lua script/input from the editbox then obfuscate it and display it on CE Edit 2 So It Can Be Copied Afterwards. I Have No Idea On How To Do That.
Here is my obfuscation script:
local thing = [[
-- Put script here
]]


local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""

print(encoded)
print("Put the above encoded string into the loadstring below between the quotation marks for the obfuscated scripts.")
print'loadstring("")()'



xdı.PNG
 Description:
Here is how it looks like
 Filesize:  6.22 KB
 Viewed:  2874 Time(s)

xdı.PNG



_________________
Im A No Life
Back to top
View user's profile Send private message AIM Address
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sat Mar 09, 2019 8:49 pm    Post subject: Reply with quote

Code:
function code()
 thing = UDF1.CEEdit1.Text   --- input
 local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
 UDF1.CEEDIT2.Text = encoded   ---- output
end

UDF1.CEEdit1.OnChange = code



Here is my own (complete) :

Code:
function code()
 thing = e_input.Text
 local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
 e_output.Text = encoded
end

f = createForm()
f.width = 300
f.height = 100

e_input = createEdit(f)
e_input.top = 10
e_input.left = 10
e_input.width = 280

e_output = createEdit(f)
e_output.top = e_input.top + e_input.height + 10
e_output.left = 10
e_output.width = 280

f.show()
e_input.onChange = code

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Gereksizz
Newbie cheater
Reputation: 0

Joined: 04 Jan 2018
Posts: 16
Location: Anime Heaven

PostPosted: Sun Mar 10, 2019 9:17 am    Post subject: Reply with quote

Gonna Test It Now. Thanks Corroder
Edit: It Does work but i want it to do that when a panel button is clicked

Corroder wrote:
Code:
function code()
 thing = UDF1.CEEdit1.Text   --- input
 local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
 UDF1.CEEDIT2.Text = encoded   ---- output
end

UDF1.CEEdit1.OnChange = code



Here is my own (complete) :

Code:
function code()
 thing = e_input.Text
 local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
 e_output.Text = encoded
end

f = createForm()
f.width = 300
f.height = 100

e_input = createEdit(f)
e_input.top = 10
e_input.left = 10
e_input.width = 280

e_output = createEdit(f)
e_output.top = e_input.top + e_input.height + 10
e_output.left = 10
e_output.width = 280

f.show()
e_input.onChange = code

_________________
Im A No Life
Back to top
View user's profile Send private message AIM Address
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun Mar 10, 2019 10:03 am    Post subject: Reply with quote

Code:
---- ================================ Functions / Variables
function code()
 thing = e_input.Text
 local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
 e_output.Text = encoded
end

function reset()
 e_input.Text = 'Type text here...'
 e_output.Text = ''
end

function closing()
 closeCE()
 return caFree
end

---- ============================== GUI
f = createForm()
f.width = 300
f.height = 120
f.position = 'poScreenCenter'
f.BorderStyle = 'bsSingle'
f.caption = 'Encode Form'

e_input = createEdit(f)
e_input.top = 10
e_input.left = 10
e_input.width = 280
e_input.text ='Type text here...'

e_output = createEdit(f)
e_output.top = e_input.top + e_input.height + 10
e_output.left = 10
e_output.width = 280

btn1 = createButton(f)
btn1.top = e_output.top + e_output.height + 10
btn1.left = 10
btn1.width = 86
btn1.height = 30
btn1.caption = 'Do Encode'
btn1.cursor = -21

btn2 = createButton(f)
btn2.top = e_output.top + e_output.height + 10
btn2.left = btn1.left + btn1.width + 10
btn2.width = 86
btn2.height = 30
btn2.caption = 'Reset'
btn2.cursor = -21

btn3 = createButton(f)
btn3.top = e_output.top + e_output.height + 10
btn3.left = btn2.left + btn2.width + 10
btn3.width = 86
btn3.height = 30
btn3.caption = 'Close'
btn3.cursor = -21

---- ============================== Events
f.show()
--e_input.onChange = code
btn1.onClick = code
btn2.onClick = reset
btn3.onClick = closing
f.onClose = closing
f.onExit = closing

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Gereksizz
Newbie cheater
Reputation: 0

Joined: 04 Jan 2018
Posts: 16
Location: Anime Heaven

PostPosted: Sun Mar 10, 2019 10:13 am    Post subject: Reply with quote

Tysm I only needed the click script But Still.
I Guess you are a fellow gt hacker xD
Want Credits ?

Corroder wrote:
Code:
---- ================================ Functions / Variables
function code()
 thing = e_input.Text
 local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
 e_output.Text = encoded
end

function reset()
 e_input.Text = 'Type text here...'
 e_output.Text = ''
end

function closing()
 closeCE()
 return caFree
end

---- ============================== GUI
f = createForm()
f.width = 300
f.height = 120
f.position = 'poScreenCenter'
f.BorderStyle = 'bsSingle'
f.caption = 'Encode Form'

e_input = createEdit(f)
e_input.top = 10
e_input.left = 10
e_input.width = 280
e_input.text ='Type text here...'

e_output = createEdit(f)
e_output.top = e_input.top + e_input.height + 10
e_output.left = 10
e_output.width = 280

btn1 = createButton(f)
btn1.top = e_output.top + e_output.height + 10
btn1.left = 10
btn1.width = 86
btn1.height = 30
btn1.caption = 'Do Encode'
btn1.cursor = -21

btn2 = createButton(f)
btn2.top = e_output.top + e_output.height + 10
btn2.left = btn1.left + btn1.width + 10
btn2.width = 86
btn2.height = 30
btn2.caption = 'Reset'
btn2.cursor = -21

btn3 = createButton(f)
btn3.top = e_output.top + e_output.height + 10
btn3.left = btn2.left + btn2.width + 10
btn3.width = 86
btn3.height = 30
btn3.caption = 'Close'
btn3.cursor = -21

---- ============================== Events
f.show()
--e_input.onChange = code
btn1.onClick = code
btn2.onClick = reset
btn3.onClick = closing
f.onClose = closing
f.onExit = closing

_________________
Im A No Life
Back to top
View user's profile Send private message AIM Address
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun Mar 10, 2019 10:17 am    Post subject: Reply with quote

NVM.. if that script useful for you then enjoy it...
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Gereksizz
Newbie cheater
Reputation: 0

Joined: 04 Jan 2018
Posts: 16
Location: Anime Heaven

PostPosted: Sun Mar 10, 2019 10:29 am    Post subject: Reply with quote

Corroder wrote:
NVM.. if that script useful for you then enjoy it...

it is im gonna share it thats why i made it but another question sorry xD
im gonna credit you because i want to
i only need the script for the panel button
CEPanel4 is my panels name. and from what i know the script is CEPanel4Click
I Need it to show me the code on pressing that. i tried the following:
function CEPanel4Click(sender)
function code()
thing = e_input.Text
local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
e_output.Text = encoded
end
end
but it wouldnt work

_________________
Im A No Life
Back to top
View user's profile Send private message AIM Address
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun Mar 10, 2019 8:03 pm    Post subject: Reply with quote

Quote:
CEPanel4 is my panels name. and from what i know the script is CEPanel4Click
I Need it to show me the code on pressing that. i tried the following:

function CEPanel4Click(sender)
function code()
thing = e_input.Text
local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
e_output.Text = encoded
end
end

but it wouldnt work


if your FORM made use FORM DESIGNER, then you need 'linking' CEPanel4 to 'function CEPanel4Click(sender)' by using 'EVENT' on Form Designer.

Edit your UDF1 form, place your mouse to CEPanel4, go to Event on 'Object Inspector' and choose Event Tab there.

Select 'OnClick' and choose 'CEPanel4Click(sender)' from dropbox, this ias trigger when CEPanel4 clicked.

and change this script :

Code:
function CEPanel4Click(sender)
function code()
thing = e_input.Text
local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
e_output.Text = encoded
end
end


to

Code:
function CEPanel4Click(sender)
thing = e_input.Text
local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
e_output.Text = encoded
end

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Gereksizz
Newbie cheater
Reputation: 0

Joined: 04 Jan 2018
Posts: 16
Location: Anime Heaven

PostPosted: Mon Mar 11, 2019 5:04 pm    Post subject: Reply with quote

Kk Ty. I Quitted Making .cetrainers For Growtopia And Moved To C# Anyways This Is The Last Tool Ive Made


Corroder wrote:
Quote:
CEPanel4 is my panels name. and from what i know the script is CEPanel4Click
I Need it to show me the code on pressing that. i tried the following:

function CEPanel4Click(sender)
function code()
thing = e_input.Text
local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
e_output.Text = encoded
end
end

but it wouldnt work


if your FORM made use FORM DESIGNER, then you need 'linking' CEPanel4 to 'function CEPanel4Click(sender)' by using 'EVENT' on Form Designer.

Edit your UDF1 form, place your mouse to CEPanel4, go to Event on 'Object Inspector' and choose Event Tab there.

Select 'OnClick' and choose 'CEPanel4Click(sender)' from dropbox, this ias trigger when CEPanel4 clicked.

and change this script :

Code:
function CEPanel4Click(sender)
function code()
thing = e_input.Text
local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
e_output.Text = encoded
end
end


to

Code:
function CEPanel4Click(sender)
thing = e_input.Text
local encoded = thing:gsub(".", function(bb) return "\\" .. bb:byte() end) or thing .. "\""
e_output.Text = encoded
end

_________________
Im A No Life
Back to top
View user's profile Send private message AIM Address
exohaxor
Expert Cheater
Reputation: 1

Joined: 02 Sep 2018
Posts: 101

PostPosted: Sun Mar 17, 2019 2:07 pm    Post subject: Reply with quote

i recommend cheat engine for making complex trainers cuz of its functionality etc btw im a gt hacker too probaly u know exohaxor
_________________
hi
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Mar 17, 2019 7:10 pm    Post subject: Reply with quote

Cheat engine capable of doing most of what C trainers, and much easily.
No brainer - anyone can make trainer via CE and thats what is awesome about it.
If it does not suite your needs, sure you could use C or any other language.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
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