|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
rog9001 Expert Cheater Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Fri Apr 08, 2016 2:47 pm Post subject: Is this a possibility? |
|
|
ok so I want to make a lua script where you type in a number into the edit box press the button and that number would be set in the script.
Code: |
newmem:
cmp [ecx+14],00
je change_level
cmp [ecx+14],01
je change_level
cmp [ecx+14],02
je change_level
cmp [ecx+14],03
je change_level
cmp [ecx+14],04
je change_level
cmp [ecx+14],05
je change_level
change_level:
mov [ecx+14],05
mov [ecx+18],05
mov [ecx+1C],05
mov [ecx+20],05
movdqu xmm0,[ecx+14]
movdqu xmm0,[ecx+18]
movdqu xmm0,[ecx+1C]
movdqu xmm0,[ecx+20]
jmp return
|
Ok so the above is the script and would something like this work
Code: |
function CEButton1Click(sender)
autoassemble([[
newmem:
cmp [ecx+14],00
je change_level
cmp [ecx+14],01
je change_level
cmp [ecx+14],02
je change_level
cmp [ecx+14],03
je change_level
cmp [ecx+14],04
je change_level
cmp [ecx+14],05
je change_level
change_level:
mov [ecx+14],setProperty(CETrainer.CEEdit1,"Text")
mov [ecx+18],setProperty(CETrainer.CEEdit1,"Text")
mov [ecx+1C],setProperty(CETrainer.CEEdit1,"Text")
mov [ecx+20],setProperty(CETrainer.CEEdit1,"Text")
movdqu xmm0,[ecx+14]
movdqu xmm0,[ecx+18]
movdqu xmm0,[ecx+1C]
movdqu xmm0,[ecx+20]
jmp return
]])
|
sorry I am not to pro with writing lua scripts but you might understand what I am trying to do... ... ... ... maybe
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Fri Apr 08, 2016 4:30 pm Post subject: |
|
|
Code: | function CEButton1Click(sender)
local value = (tonumber(CETrainer.CEEdit1.Text) and math.floor(tonumber(CETrainer.CEEdit1.Text)) or error("Error! please input a number")); -- error will stop the script execution
autoassemble(string.format([[
newmem:
cmp [ecx+14],00
je change_level
cmp [ecx+14],01
je change_level
cmp [ecx+14],02
je change_level
cmp [ecx+14],03
je change_level
cmp [ecx+14],04
je change_level
cmp [ecx+14],05
je change_level
change_level:
mov [ecx+14],%d
mov [ecx+18],%d
mov [ecx+1C],%d
mov [ecx+20],%d
movdqu xmm0,[ecx+14]
movdqu xmm0,[ecx+18]
movdqu xmm0,[ecx+1C]
movdqu xmm0,[ecx+20]
jmp return]],value,value,value,value))
end |
_________________
|
|
Back to top |
|
|
Smellyhobo101 Newbie cheater Reputation: 0
Joined: 21 Sep 2014 Posts: 23
|
Posted: Mon Apr 11, 2016 1:46 am Post subject: |
|
|
I think you could simplify this:
Code: |
newmem:
cmp [ecx+14],00
je change_level
cmp [ecx+14],01
je change_level
cmp [ecx+14],02
je change_level
cmp [ecx+14],03
je change_level
cmp [ecx+14],04
je change_level
cmp [ecx+14],05
je change_level
|
to this:
Code: |
newmem:
cmp [ecx+14],06
jb change_level
|
Instead of checking if it is 1, 2, 3, 4 or 5, it just checks if it is below 6.[/code]
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Apr 11, 2016 1:57 am Post subject: |
|
|
Or this...
Code: | cmp [ecx+14],0
jge @f
jmp originalcode
@@:
cmp [ecx+14],6
jle change_level
jmp originalcode |
Code: | cmp [ecx+14],0
jl originalcode
cmp [ecx+14],6
jg originalcode
jmp change_level |
Code: | cmp [ecx+14],0
jb originalcode
cmp [ecx+14],6
ja originalcode
jmp change_level |
etc..
|
|
Back to top |
|
|
|
|
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
|
|