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 making a trainer.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
PATRICKMTL2
How do I cheat?
Reputation: 0

Joined: 04 Jan 2017
Posts: 7

PostPosted: Wed Jan 04, 2017 7:15 pm    Post subject: Need help making a trainer. Reply with quote

So. I finally read the FAQ after my post being locked.
I need help making a trainer because I'm trash w/ this stuff.
If anyone is willing to make it for me, here's what I need.
Hotkey to toggle the address 10794DA0's value from 0 and 60
It can be 6.6 lua.
Script only. Like open CE, CTRL+ALT+L, put in the code, execute and voila.
Info that might help you make the script:
Address type: Double
Hotkey: F3
Das it. Peace ^_^
Thanks to anyone who creates the trainer for me
kluvubb,bye

_________________
is this where the dank memes go
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

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

PostPosted: Thu Jan 05, 2017 11:57 am    Post subject: Re: Need help making a trainer. Reply with quote

Code:

GAMEPROCESS = "Put here the process of your game"

form = createForm(false)
--form.Width = 200
--form.Height = 200
form.Position = poDesktopCenter
form.Caption = "HACK"

button1 = createButton(form)
button1.Caption = "Conect Process"
button1.Top = 20
button1.Left = 20
button1.AutoSize = true

checkbox1 = createCheckBox(form)
checkbox1.Caption = "Active Hack"
checkbox1.Top = 60
checkbox1.Left = 20

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

button1.OnClick = function()
   if getProcessIDFromProcessName(GAME_PROCESS) then
      openProcess(GAMEPROCESS)
      showMessage("Unable to open the process, open the game and try again.")
   else
      showMessage("Connected to:"..GAMEPROCESS)
   end
end

active = true
checkbox1.OnChange = function()
   if checkbox1.State = cbChecked then
      function change_value()
         if active then
            writeDouble(10794DA0, 60)
            active = false
         else
            writeDouble(10794DA0, 0)
            active = true
         end
      end
      if key1 then key1.destroy(); key1=nil end
      key1 = createHotkey(change_value, VK_F3)
      key1.DelayBetweenActive = 300
   else
      if key1 then key1.destroy(); key1=nil end
      writeDouble(10794DA0, 0)
   end
end
     
form.Show()

_________________
...
Back to top
View user's profile Send private message
PATRICKMTL2
How do I cheat?
Reputation: 0

Joined: 04 Jan 2017
Posts: 7

PostPosted: Thu Jan 05, 2017 7:14 pm    Post subject: Reply with quote

simply doesnt work.
Error
[string "GAMEPROCESS = "setmyprocessbuthidingitforreasons"
..."]:33: 'then' expected near =

_________________
is this where the dank memes go
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Jan 05, 2017 9:22 pm    Post subject: Reply with quote

Two equals
Code:
if checkbox1.State == cbChecked then
Back to top
View user's profile Send private message
PATRICKMTL2
How do I cheat?
Reputation: 0

Joined: 04 Jan 2017
Posts: 7

PostPosted: Fri Jan 06, 2017 2:51 pm    Post subject: Reply with quote

still doesnt work...
also new address: 103A2E38

_________________
is this where the dank memes go
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

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

PostPosted: Fri Jan 06, 2017 3:41 pm    Post subject: Reply with quote

Code:
GAMEPROCESS = "Put here the process of your game"
MY_ADDRESS = "Put your address here"

form = createForm(false)
--form.Width = 200
--form.Height = 200
form.Position = poDesktopCenter
form.Caption = "HACK"

button1 = createButton(form)
button1.Caption = "Conect Process"
button1.Top = 20
button1.Left = 20
button1.AutoSize = true

checkbox1 = createCheckBox(form)
checkbox1.Caption = "Active Hack"
checkbox1.Top = 60
checkbox1.Left = 20

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

button1.OnClick = function()
   if getProcessIDFromProcessName(GAME_PROCESS) then
      openProcess(GAMEPROCESS)
      showMessage("Unable to open the process, open the game and try again.")
   else
      showMessage("Connected to: "..GAMEPROCESS)
   end
end

active = true
checkbox1.OnChange = function()
   if checkbox1.State == cbChecked then
      function change_value()
         if active then
            writeDouble(MY_ADDRESS, 60)
            active = false
         else
            writeDouble(MY_ADDRESS, 0)
            active = true
         end
      end
      if key1 then key1.destroy(); key1=nil end
      key1 = createHotkey(change_value, VK_F3)
      key1.DelayBetweenActive = 300
   else
      if key1 then key1.destroy(); key1=nil end
      writeDouble(MY_ADDRESS, 0)
   end
end

form.Show()

_________________
...
Back to top
View user's profile Send private message
PATRICKMTL2
How do I cheat?
Reputation: 0

Joined: 04 Jan 2017
Posts: 7

PostPosted: Fri Jan 06, 2017 5:53 pm    Post subject: Reply with quote

works. thanks <3
_________________
is this where the dank memes go
Back to top
View user's profile Send private message
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