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 


Trainer LUA Help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Tue May 17, 2016 10:42 pm    Post subject: Trainer LUA Help Reply with quote

So i have been trying to create a custom trainer with create a form on cheat engine

i wanna add a button that changes the value to the desired amount then freezes with a timer every millisecond so it will stay the same amount

i need it to be in the same button so one click will do it

i havent found anything useful when searching online
Back to top
View user's profile Send private message Send e-mail Visit poster's website
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed May 18, 2016 8:16 am    Post subject: Reply with quote

Code:





------  Pointer  -------
Current_Var = '[Majin]+2504'  ---- Ammo or Other Variable Pointer Value

function WritePointerValue()
writeFloat(Current_Var,9999)   --(Write Pointer,Value)
end

function StartWritePointerValue()
Timer = createTimer()
Timer.Interval = 1000 -- 1000 = 1 second
Timer.OnTimer = WritePointerValue

----- Change Button State  -----
B.Caption = "De-Activate"
B.OnClick = EndWritePointerValue
end

function EndWritePointerValue()
Timer.Destroy()
----- Change Button State  -----
B.Caption = "Activate"
B.OnClick = StartWritePointerValue
end

function KillTimerToo()   ----
Timer.Destroy()
f.Close()
end

--------------------------  Build Parameters ----------------------
f = createForm()
f.Left = 600
f.Top = 300
f.OnClose = KillTimerToo

B = createButton(f)
B.Left = 200
B.Top = 200
B.Caption = "Activate"
B.OnClick = StartWritePointerValue

L = createLabel(f)
L.Caption = "Freeze Hack With Timer".."\n\n"..Current_Var
L.Left = 40
L.Font.Size = 17









If you have My Table and Devil May Cry 4 Special Edition this is One Button Activate to Set/Freeze Devil Trigger to Max.

If Not Adjust the Pointer/Current_Var to your liking. Button activates timer to write Once a second. Second Button Press Deactivates Timer and Return Variable to Normal Operation.

There are better ways to write this but this should serve as a decent start.

_________________
Back to top
View user's profile Send private message
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Wed May 18, 2016 9:27 am    Post subject: Reply with quote

akumakuja28 wrote:
Code:





------  Pointer  -------
Current_Var = '[Majin]+2504'  ---- Ammo or Other Variable Pointer Value

function WritePointerValue()
writeFloat(Current_Var,9999)   --(Write Pointer,Value)
end

function StartWritePointerValue()
Timer = createTimer()
Timer.Interval = 1000 -- 1000 = 1 second
Timer.OnTimer = WritePointerValue

----- Change Button State  -----
B.Caption = "De-Activate"
B.OnClick = EndWritePointerValue
end

function EndWritePointerValue()
Timer.Destroy()
----- Change Button State  -----
B.Caption = "Activate"
B.OnClick = StartWritePointerValue
end

function KillTimerToo()   ----
Timer.Destroy()
f.Close()
end

--------------------------  Build Parameters ----------------------
f = createForm()
f.Left = 600
f.Top = 300
f.OnClose = KillTimerToo

B = createButton(f)
B.Left = 200
B.Top = 200
B.Caption = "Activate"
B.OnClick = StartWritePointerValue

L = createLabel(f)
L.Caption = "Freeze Hack With Timer".."\n\n"..Current_Var
L.Left = 40
L.Font.Size = 17









If you have My Table and Devil May Cry 4 Special Edition this is One Button Activate to Set/Freeze Devil Trigger to Max.

If Not Adjust the Pointer/Current_Var to your liking. Button activates timer to write Once a second. Second Button Press Deactivates Timer and Return Variable to Normal Operation.

There are better ways to write this but this should serve as a decent start.


Thank You this Really Helped Since all the tuts arent really clear. is there a way to use anything else other than variables? ive heard variables are only in flash games?

sorry for the questions im very interested in this and very new
Back to top
View user's profile Send private message Send e-mail Visit poster's website
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed May 18, 2016 9:31 am    Post subject: Reply with quote

Quote:
Thank You this Really Helped Since all the tuts arent really clear. is there a way to use anything else other than variables? ive heard variables are only in flash games?

sorry for the questions im very interested in this and very new



Variable is just a description. DMC is not flash based. The Variable is the Pointer or "Injection Pointer". You will have to find these first Before you can edit this value.

Code:

------  Pointer  -------
Current_Var = '[Majin]+2504'  ---- Ammo or Other Variable Pointer Value

_________________
Back to top
View user's profile Send private message
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Wed May 18, 2016 1:11 pm    Post subject: Reply with quote

akumakuja28 wrote:
Quote:
Thank You this Really Helped Since all the tuts arent really clear. is there a way to use anything else other than variables? ive heard variables are only in flash games?

sorry for the questions im very interested in this and very new



Variable is just a description. DMC is not flash based. The Variable is the Pointer or "Injection Pointer". You will have to find these first Before you can edit this value.

Code:

------  Pointer  -------
Current_Var = '[Majin]+2504'  ---- Ammo or Other Variable Pointer Value


Thanks for clearing that up Smile could you give an example lua button with pointers that sets value then freezes?

If not it's okay I totally understand

Again sorry for all the questions
Back to top
View user's profile Send private message Send e-mail Visit poster's website
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed May 18, 2016 2:01 pm    Post subject: Reply with quote

This might be beyond your current understanding. As I jave already wrote that. You to write a pointer into the Current_Val = whatever pointer you choose. Thats all you gotta do. Go find a pointer tutorial or try it out on game that you have a table for that has a pointer entry.
_________________
Back to top
View user's profile Send private message
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Wed May 18, 2016 8:43 pm    Post subject: Reply with quote

akumakuja28 wrote:
This might be beyond your current understanding. As I jave already wrote that. You to write a pointer into the Current_Val = whatever pointer you choose. Thats all you gotta do. Go find a pointer tutorial or try it out on game that you have a table for that has a pointer entry.


No need to come off as rude man I was asking questions out of curiosity because I'm new I know assembly languages but not LUA or "assembly cheat engine code" All you had to say was you already wrote it and that I needed a Pointer entry for it

Again no need to be rude I never said anything out of line to you was just asking simple questions

Sorry to have asked to for help in this forum I forgot we should already all this coding stuff.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed May 18, 2016 9:13 pm    Post subject: Reply with quote

I didnt mean to come off that way. Should have worded it different. Dont think that one wrong comment is a reflection of the members here .
Sorry dude it wasnt intended that way.

_________________
Back to top
View user's profile Send private message
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Fri Jun 17, 2016 1:39 pm    Post subject: Reply with quote

akumakuja28 wrote:
I didnt mean to come off that way. Should have worded it different. Dont think that one wrong comment is a reflection of the members here .
Sorry dude it wasnt intended that way.


Its okay i took it the wrong way

just really annoying trying to learn all this coding

i have problems still if you can help me

the value sets but then changes rapidly between 0 and 99999

this is with a timer of 1 millisecond

when i make a trainer with hotkeys the freezing works fine

if you could also show me how i would add a timer to a button+Editbox and just a Button?

i have a basic understanding of button making now just not the set/freeze code
Back to top
View user's profile Send private message Send e-mail Visit poster's website
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Sun Jun 19, 2016 3:54 pm    Post subject: Reply with quote

johnkittz wrote:
akumakuja28 wrote:
I didnt mean to come off that way. Should have worded it different. Dont think that one wrong comment is a reflection of the members here .
Sorry dude it wasnt intended that way.


Its okay i took it the wrong way

just really annoying trying to learn all this coding

i have problems still if you can help me

the value sets but then changes rapidly between 0 and 99999

this is with a timer of 1 millisecond

when i make a trainer with hotkeys the freezing works fine

if you could also show me how i would add a timer to a button+Editbox and just a Button?

i have a basic understanding of button making now just not the set/freeze code




Hello, Ok LUA is very versatile so I am kinda confused at the request.

Are you Using an Address List Entry?
Or Are Did you want this to be independent like a trainer?


Also the Value Changing from 0 to 99999 is weird are you by chance writing two values to the Address that is defined in "Current_Var"?

_________________
Back to top
View user's profile Send private message
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Sun Jun 19, 2016 4:03 pm    Post subject: Reply with quote

akumakuja28 wrote:
johnkittz wrote:
akumakuja28 wrote:
I didnt mean to come off that way. Should have worded it different. Dont think that one wrong comment is a reflection of the members here .
Sorry dude it wasnt intended that way.


Its okay i took it the wrong way

just really annoying trying to learn all this coding

i have problems still if you can help me

the value sets but then changes rapidly between 0 and 99999

this is with a timer of 1 millisecond

when i make a trainer with hotkeys the freezing works fine

if you could also show me how i would add a timer to a button+Editbox and just a Button?

i have a basic understanding of button making now just not the set/freeze code




Hello, Ok LUA is very versatile so I am kinda confused at the request.

Are you Using an Address List Entry?
Or Are Did you want this to be independent like a trainer?


Also the Value Changing from 0 to 99999 is weird are you by chance writing two values to the Address that is defined in "Current_Var"?

Hey Buddy Very Happy

I found out the game was server sided Sad

but all i need now is a simple LUA for adding a timer inside a button with a editbox

and a timer for adding into just a button Smile

youve helped me alot ive learned alot in the last couple of weeks just not how to set a timer inside those 2 things Sad
Back to top
View user's profile Send private message Send e-mail Visit poster's website
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Sun Jun 19, 2016 5:17 pm    Post subject: Reply with quote

So after seeing your other post. You want a check box that freezes a value you enter into a EditBox.

Simple enough I am currently enjoying the day so I can write this up tomorrow or following day for ya but in the mean time. Look into "OnChange" Lua function for the checkbox state. As this will be the way to do this.

Good luck

_________________
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