| View previous topic :: View next topic |
| Author |
Message |
Akiros Newbie cheater
Reputation: 0
Joined: 11 Apr 2020 Posts: 24 Location: my house
|
Posted: Sun Apr 12, 2020 3:01 am Post subject: Help With Builder and Variable Problems |
|
|
Im trying to make a builder but have encountered a problem.
I am not sure how to make a script that prints with variables
example:
Farm = (UDF1.CEEdit1.text)
script = [[
1.CreateForm()
1.Color = [[
(farm)
]]
function UDF1_CEPanel1Click(sender)
print(script)
Print(Farm)
end
---------------------------------------------------------
i want it to turn the color into the modifiable text (farm)
so that if i turn farm's value into clBlack the color will be clBlack
_________________
help pls im noob  |
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Sun Apr 12, 2020 7:13 am Post subject: |
|
|
I am also have encountered a problem to understand what you mean, but maybe something like this according to your script:
| Code: | function UDF1_CEPanel1Click(sender)
print(script)
print(Farm)
end
Farm = UDF1.CEEdit1.text
script = '1.CreateForm()\n'..'1.Color = '..Farm
UDF1.show() |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1532
|
Posted: Sun Apr 12, 2020 9:48 am Post subject: |
|
|
You can use this separately for each button.
Just specify the edit box in which it will pick up the color.
example :
| Code: | --f example form. form = UDF1
if f then f.destroy() f = nil end
f=createForm(true) -- or UDF1
f.Position=poDesktopCenter
f.Width=220 f.Height=130
local e1=createEdit(f) e1.Left=65 e1.Top=25 e1.Width=90 -- UDF1.CEEdit1
p2 = createPanel(f) --UDF1.CEPanel1
p2.Height=40 p2.Left=65 p2.Top=70 p2.Width=90
p2.Color='clBlack' --or "0x000000"
p2.Font.Color='0x56ffff' p2.Caption="Click"
p2.Font.Size=16 p2.Font.Style="fsBold"
p2.Cursor="-21"
--local Farm=e1.Text --or Farm=UDF1.CEEdit1.text
function ColorFarm(colors, text)
if form then form.Destroy() form=nil end
form=createForm()
form.name=form
form.Color=colors
form.caption=text
end
p2.OnClick=function() --or function UDF1_CEPanel1Click(sender)
if e1.Text=="" then --or UDF1.CEEdit1.text==""
showMessage("Please write a color.")
else
ColorFarm(e1.Text, "Farm and Color") --or ColorFarm(UDF1.CEEdit1.Text, "Farm and Color")
end
end |
_________________
|
|
| Back to top |
|
 |
Akiros Newbie cheater
Reputation: 0
Joined: 11 Apr 2020 Posts: 24 Location: my house
|
Posted: Mon Apr 13, 2020 2:38 am Post subject: changing the script within the trainer |
|
|
I Want to change the script within trainer like aylin did with his answer but when instead of color its script.
example:
script = [[
Avocados are (answer)
]]
answer = (udf1.ceedit1.text)
--udf1.ceedit1.text is changeable
function print(sender)
print(script)
------------------------------------------------------------------------
so that if i put in ceedit1 "terrible" the script will print
Avocados are Terrible
_________________
help pls im noob  |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1532
|
Posted: Mon Apr 13, 2020 6:09 am Post subject: |
|
|
Maybe you may need to smell and code all the colors you will use.
See the "Color Sniffing Plugin" code of @ Corroder below.
https://forum.cheatengine.org/viewtopic.php?t=609767
And an example color assignment.
| Code: | if f then f.destroy() f = nil end
f=createForm(true) -- or UDF1
f.Position=poDesktopCenter
f.Width=220 f.Height=130
local e1=createEdit(f) e1.Left=65 e1.Top=25 e1.Width=90 -- UDF1.CEEdit1
local p2 = createPanel(f) --UDF1.CEPanel1
p2.Height=40 p2.Left=65 p2.Top=70 p2.Width=90
p2.Color='clBlack' --or "0x000000"
p2.Font.Color='0x56ffff' p2.Caption="Click"
p2.Font.Size=16 p2.Font.Style="fsBold"
p2.Cursor="-21"
--local Farm=e1.Text --or Farm=UDF1.CEEdit1.text
function ColorFarm(colors, text)
if colors=="Apple" then colors=216 end
if colors=="Lettuce" then colors=50432 end
if colors=="Orange" then colors=178685 end
if colors=="Banana" then colors=65535 end
--print(colors)
if colors=="" then
showMessage("Please write a valid color name")
else
if form then form.Destroy() form=nil end
form=createForm()
form.name=form
form.Color=colors
form.caption=(text..": "..tostring(colors))
p2.visible=true
end
end
p2.OnClick=function() --or function UDF1_CEPanel1Click(sender)
if e1.Text=="" then --or UDF1.CEEdit1.text==""
showMessage("Please write a color.")
else
ColorFarm(e1.Text, e1.Text) --or ColorFarm(UDF1.CEEdit1.Text, "Farm and Color")
end
end |
_________________
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Mon Apr 13, 2020 6:38 am Post subject: |
|
|
If Aylin script gives you a solution then just modify that script according to what you need.
If you try to send value from trainer1 to trainer2 which different instances, because use said "within trainer" then you need to use share memory or store your trainer1 value to a file or clipboard and then read the value from trainer2.
It will differ if you send value from form1 to form2 or forms with same instances, like Aylin example script.
Not sure what exactly you want, but if just need print the text from editbox as a variable and put into a strings script variable, here is an example:
| Code: | if myform then myform.destroy() end
myform = createForm()
edit1 = createEdit(myform)
edit1.setPosition(20,20)
b1 = createButton(myform)
b1.setPosition(20,50)
b1.Caption = 'Answer'
local script, script1, script2, answer
function printScript()
answer = edit1.Text
if answer == "" then return nil end
script1 = [[
There are many fruits in the world.
They have many fresh colors.
When they are still raw, the color usually is green.
One of them is Avocado.
]]
script2 = ' Avocado are '..answer
script = script1..'\n'..script2
print(script)
end
b1.OnClick = printScript |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
Akiros Newbie cheater
Reputation: 0
Joined: 11 Apr 2020 Posts: 24 Location: my house
|
Posted: Mon Apr 13, 2020 10:16 pm Post subject: Hi sorry to bother you again |
|
|
your answer worked successfully worked but i have encountered a different problem
when the user types the trainer name for example (Hacktrainer100)
the script is supposed to print
CELabel1 = createLabel(UDF1)
CELabel1.Caption = ("Hacktrainer100")
instead it prints
CELabel1 = createLabel(UDF1)
CELabel1.Caption = Hacktrainer100
And when the user types this into the lua engine the above script does not work I've tried other solutions but my small mind cannot find the answer.
_________________
help pls im noob  |
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Apr 14, 2020 12:08 am Post subject: |
|
|
Which answer is work succesfully?. You are not mentioned it.
Maybe:
| Code: | local trainername = 'Hacktrainer100'
UDF1 = createForm()
CELabel1 = createLabel(UDF1)
CELabel1.Caption = trainername
print('CELabel1 = createLabel(UDF1)\n'..'CELabel1.Caption = '..trainername)
|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
|