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 with XBOX controller hotkey for LUA

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 400

PostPosted: Wed Mar 22, 2017 6:45 am    Post subject: Need help with XBOX controller hotkey for LUA Reply with quote

Ok I don't know how to setup a script that writes to specific address when XBOX contoller key is pressed.

Say

if I press LeftTrigger the script to Write to a specific address

say _ValAttacks+20

and if any other key is press to DISABLE that write no matter that LeftTrigger is still pressed. This I need to make a fix for attacks that need a value switch Quickly from one to one

Can somebody write me the script?
I need it to work with XBOX controller not keyboard.

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Mar 22, 2017 10:05 am    Post subject: This post has 1 review(s) Reply with quote

You can set up hotkeys using your gaming controller now. So, just set up a boolean (hotkey that sets value to 1 if/when the left trigger is pressed), then, set up your script to check for that.
Code:
[Enable]
//stuff
label(left_trigger)

registersymbol(left_trigger)

newmem:
cmp byte ptr [left_trigger],1
je dosomething
//code
jmp originalcode

dosomething:
mov byte ptr [left_trigger],0
//something
jmp originalcode //or jmp return

originalcode:
//code

left_trigger:
db 0

//stuff

[Disable]
//stuff

unregistersymbol(left_trigger)
Back to top
View user's profile Send private message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 400

PostPosted: Wed Mar 22, 2017 10:33 am    Post subject: Reply with quote

Sorry I don't understand. I am not good at scripting.

ALL I need is when I press a hotkey RTrigger a script to do this action
writeInteger("JohnMoves", 0 + (readInteger"BillyMoves+20" + 0x170))

and do this for set period - 1 second probably

and then stop until same key is pressed again. Can you write me that script.

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Mar 22, 2017 12:39 pm    Post subject: Reply with quote

I cannot help you with Lua, but I can help you with AA.

If you know how to have CE set up your script for you, do that, then copy/paste the script here in its entirety. Use the AOB Injection Template.

Are you working with a static address, a pointer address or an instruction?

I can also help you via teamviewer when I have more time available.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Wed Mar 22, 2017 1:46 pm    Post subject: Reply with quote

Code:

    VK_PAD_A = 0x5800
    VK_PAD_B = 0x5801
    VK_PAD_X = 0x5802
    VK_PAD_Y = 0x5803
    VK_PAD_RSHOULDER = 0x5804
    VK_PAD_LSHOULDER = 0x5805
    VK_PAD_LTRIGGER = 0x5806
    VK_PAD_RTRIGGER = 0x5807
    VK_PAD_DPAD_UP = 0x5810
    VK_PAD_DPAD_DOWN = 0x5811
    VK_PAD_DPAD_LEFT = 0x5812
    VK_PAD_DPAD_RIGHT = 0x5813
    VK_PAD_START = 0x5814
    VK_PAD_BACK = 0x5815
    VK_PAD_LTHUMB_PRESS = 0x5816
    VK_PAD_RTHUMB_PRESS = 0x5817
    VK_PAD_LTHUMB_UP = 0x5820
    VK_PAD_LTHUMB_DOWN = 0x5821
    VK_PAD_LTHUMB_RIGHT = 0x5822
    VK_PAD_LTHUMB_LEFT = 0x5823
    VK_PAD_LTHUMB_UPLEFT = 0x5824
    VK_PAD_LTHUMB_UPRIGHT = 0x5825
    VK_PAD_LTHUMB_DOWNRIGHT = 0x5826
    VK_PAD_LTHUMB_DOWNLEFT = 0x5827
    VK_PAD_RTHUMB_UP = 0x5830
    VK_PAD_RTHUMB_DOWN = 0x5831
    VK_PAD_RTHUMB_RIGHT = 0x5832
    VK_PAD_RTHUMB_LEFT = 0x5833
    VK_PAD_RTHUMB_UPLEFT = 0x5834
    VK_PAD_RTHUMB_UPRIGHT = 0x5835
    VK_PAD_RTHUMB_DOWNRIGHT = 0x5836
    VK_PAD_RTHUMB_DOWNLEFT = 0x5837           

_________________
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
View user's profile Send private message MSN Messenger
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 400

PostPosted: Wed Mar 22, 2017 2:46 pm    Post subject: Reply with quote

Dark Byte wrote:
Code:

    VK_PAD_A = 0x5800
    VK_PAD_B = 0x5801
    VK_PAD_X = 0x5802
    VK_PAD_Y = 0x5803
    VK_PAD_RSHOULDER = 0x5804
    VK_PAD_LSHOULDER = 0x5805
    VK_PAD_LTRIGGER = 0x5806
    VK_PAD_RTRIGGER = 0x5807
    VK_PAD_DPAD_UP = 0x5810
    VK_PAD_DPAD_DOWN = 0x5811
    VK_PAD_DPAD_LEFT = 0x5812
    VK_PAD_DPAD_RIGHT = 0x5813
    VK_PAD_START = 0x5814
    VK_PAD_BACK = 0x5815
    VK_PAD_LTHUMB_PRESS = 0x5816
    VK_PAD_RTHUMB_PRESS = 0x5817
    VK_PAD_LTHUMB_UP = 0x5820
    VK_PAD_LTHUMB_DOWN = 0x5821
    VK_PAD_LTHUMB_RIGHT = 0x5822
    VK_PAD_LTHUMB_LEFT = 0x5823
    VK_PAD_LTHUMB_UPLEFT = 0x5824
    VK_PAD_LTHUMB_UPRIGHT = 0x5825
    VK_PAD_LTHUMB_DOWNRIGHT = 0x5826
    VK_PAD_LTHUMB_DOWNLEFT = 0x5827
    VK_PAD_RTHUMB_UP = 0x5830
    VK_PAD_RTHUMB_DOWN = 0x5831
    VK_PAD_RTHUMB_RIGHT = 0x5832
    VK_PAD_RTHUMB_LEFT = 0x5833
    VK_PAD_RTHUMB_UPLEFT = 0x5834
    VK_PAD_RTHUMB_UPRIGHT = 0x5835
    VK_PAD_RTHUMB_DOWNRIGHT = 0x5836
    VK_PAD_RTHUMB_DOWNLEFT = 0x5837           


Thank you!

_________________
I am the forgotten one the dead one.
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 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