Auto key presser

Status
Not open for further replies.

seks

Member
Joined
Jan 27, 2020
Messages
8
Reaction score
0
Location
saz
I have been searching around for something like this and I even tried to script one on my own but I'm a real beginner in CLEO and I couldn't even write 5 lines without crashing the game so please help me with the code or link me a script which does this. I basically need a cleo that presses a key { Y } after an amount of time { around 30ms } and it keeps looping till I desactivate it with a key, and thanks you a lot in advance !
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,103
Solutions
5
Reaction score
882
Location
Lithuania
PHP:
{$CLEO .cs}

0000: NOP

WAIT 10000

WHILE TRUE
WAIT 0

IF 0AB0:   key_pressed 90 {Z}
THEN
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 255
    WAIT 30
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 0
END

END

:Set_Virtual_Key
{
    255 = true
    0 = false
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
}
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@  // (int)
0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0
0AB2: ret 0
 

seks

Member
Joined
Jan 27, 2020
Messages
8
Reaction score
0
Location
saz
PHP:
{$CLEO .cs}

0000: NOP

WAIT 10000

WHILE TRUE
WAIT 0

IF 0AB0:   key_pressed 90 {Z}
THEN
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 255
    WAIT 30
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 0
END

END

:Set_Virtual_Key
{
    255 = true
    0 = false
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
}
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@  // (int)
0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0
0AB2: ret 0

Yeah, how to make it loop? and how to add a key to activate the loop or deactivate it?
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
624
Reaction score
39
Xor a variable and if it's 1 do things and if it's 0 don't do it
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,103
Solutions
5
Reaction score
882
Location
Lithuania
.....
PHP:
{$CLEO .cs}

0000: NOP

WAIT 10000

WHILE TRUE
WAIT 0

IF 0AB0:   key_pressed 90 {Z}
THEN
    IF
    0@ = = FALSE
    THEN
        0@ = TRUE
        0AD1: "ON" 1337
    ELSE
        0@ = FALSE
        0AD1: "OFF" 1337
    END
wait 1000
END

IF
0@ == TRUE
THEN
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 255
    WAIT 30
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 0
END

END

:Set_Virtual_Key
{
    255 = true
    0 = false
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
}
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@  // (int)
0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0
0AB2: ret 0
 
Last edited:
Status
Not open for further replies.
Top