View previous topic :: View next topic |
Author |
Message |
MikeNoey Advanced Cheater Reputation: 0
Joined: 08 Jun 2018 Posts: 64
|
Posted: Fri Jun 08, 2018 11:37 am Post subject: help encrypting my Trainer |
|
|
Hi, I've been doing some reading and as far as can understand the method to protect a Lua Script from being stolen is via encodeFunction but I still don't understand how it works. It would help me understand better if I copy pasted one of my current scripts and someone who might have a spare minute could show me how encodeFunction would be used with my own code. I'd understand quickly then how to do it. Thanks in advance to anyone who assists me here.
timer = createTimer(nil, true)
timer_setInterval(timer, 1)
function Loop()
local ZClick = readFloat("[game.exe + 01F5DDA4] + 1FC")
local XClick = readFloat("[game.exe + 01F5DDA4] + 1F4")
local ZTele = readFloat("[game.exe + 01F5DDA4] + 58")
local XTele = readFloat("[game.exe + 01F5DDA4] + 50")
if isKeyPressed(0x6E) then
writeFloat("[game.exe + 01F5DDA4] + 58",ZClick)
writeFloat("[game.exe + 01F5DDA4] + 50",XClick)
end
end
timer_onTimer(timer, Loop)
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25291 Location: The netherlands
|
Posted: Fri Jun 08, 2018 12:14 pm Post subject: |
|
|
check https://forum.cheatengine.org/viewtopic.php?t=595142
but in your case
Code: |
f=encodeFunction(function()
timer = createTimer(nil, true)
timer_setInterval(timer, 1)
function Loop()
local ZClick = readFloat("[game.exe + 01F5DDA4] + 1FC")
local XClick = readFloat("[game.exe + 01F5DDA4] + 1F4")
local ZTele = readFloat("[game.exe + 01F5DDA4] + 58")
local XTele = readFloat("[game.exe + 01F5DDA4] + 50")
if isKeyPressed(0x6E) then
writeFloat("[game.exe + 01F5DDA4] + 58",ZClick)
writeFloat("[game.exe + 01F5DDA4] + 50",XClick)
end
end
timer_onTimer(timer, Loop)
end)
print(f)
|
and you can call it by
Code: |
decodeFunction('c-n/f-AcnS6g}(DSgI3oh]5OiDIzGc!3JI=SPJ4U1jQQ;DK/!9Tcyq1yh_1K0:_L_vflV4K8UB8.+}Ry/oh^EzLQ386kfviTh+/+%wdi+xrX0yFct[%V9U}[by}O).M4vJ20UZX0WjPM2tYtS1Mq}wBl1aq.X,z^3exKPbcU11xQ,*ZWvln83bnejWW#EAnbK!Nt/tBkU(HSltkO%8N47SvNQU.n,[Y/j:BA}}@*ezoDFsC[fHsx@hzL(!7ZmZG?CRW.gipd.N^}5%mjmw6g{XB{ydbTh-iUkBpygC:(^$r!.+]-]Y9R^xNvPS+%_kd*$7-UQhs^/y::#3w,!AgFr.E%EYy4$*PZoGBR+kcB@=Z?4EK@Z!]14(W/22UFhC:vnd.vXyV(D')()
|
_________________
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 |
|
|
MikeNoey Advanced Cheater Reputation: 0
Joined: 08 Jun 2018 Posts: 64
|
Posted: Tue Jun 12, 2018 10:25 pm Post subject: |
|
|
Thank you DarkByte. Following your example it works really well. When I try to employ this within a Stand Alone Trainer it doesn't work. This is the code I use in the script.
function CEButton1Click(sender)
myscript=decodeFunction('Blabla')
myscript()
end
I get this error "Error:[string "function CEButton1Click(sender)
..."]:3: attempt to call a string value (global 'myscript')"
Could someone help tell me what I've done wrong here. Thank you again in advance.
I found the solution to this problem. When creating the trainer you need to change the Target Process to 64 bit from it's default selection of 32 bit.
|
|
Back to top |
|
|
|