CLEO Help Keys lock

CLEO related

mmadaaa

Member
Joined
Oct 31, 2021
Messages
24
Reaction score
0
Location
Alba
Hi, I need a cleo script that always holds down the W and A keys to turn the car for example, can you help me? And a command to stop them
 

mmadaaa

Member
Joined
Oct 31, 2021
Messages
24
Reaction score
0
Location
Alba

Code:
{$CLEO .cs}

0000: NOP

WAIT 10000

WHILE TRUE
WAIT 0

IF 0AB0:   key_pressed 90 {Z}
THEN
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255 time 3600
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255 time 3600
END

END

IF 0AB0:   key_pressed 85 {U}
THEN
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0 state 0 time 3600
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0 state 0 time 3600
END

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

I did this and work perfectly but command to stop don t work
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Code:
{$CLEO .cs}

0000: NOP

WAIT 10000

WHILE TRUE
WAIT 0

IF 0AB0:   key_pressed 90 {Z}
THEN
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255 time 3600
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255 time 3600
END

END

IF 0AB0:   key_pressed 85 {U}
THEN
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0 state 0 time 3600
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0 state 0 time 3600
END

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

I did this and work perfectly but command to stop don t work
PHP:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF 0ADC:   test_cheat "Z"
    THEN
        IF 31@ == FALSE
        THEN
            31@ = TRUE
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            31@ = FALSE
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
    END
    
    IF 31@ == TRUE
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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
 

mmadaaa

Member
Joined
Oct 31, 2021
Messages
24
Reaction score
0
Location
Alba
PHP:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF 0ADC:   test_cheat "Z"
    THEN
        IF 31@ == FALSE
        THEN
            31@ = TRUE
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            31@ = FALSE
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
    END
   
    IF 31@ == TRUE
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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
Not enough actual parameters. Expected 2 params.
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
@mmadaaa
PHP:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF 0ADC:   test_cheat "Z"
    THEN
        IF 0039: 31@ == 0
        THEN
            0006: 31@ = 1
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            0006: 31@ = 0
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
    END
   
    IF 0039: 31@ == 1
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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
 

mmadaaa

Member
Joined
Oct 31, 2021
Messages
24
Reaction score
0
Location
Alba
@mmadaaa
PHP:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF 0ADC:   test_cheat "Z"
    THEN
        IF 0039: 31@ == 0
        THEN
            0006: 31@ = 1
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            0006: 31@ = 0
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
    END

    IF 0039: 31@ == 1
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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
The command to stop don t work, One question: you can make this to start at CTRL+Q ?
 
Last edited:

mmadaaa

Member
Joined
Oct 31, 2021
Messages
24
Reaction score
0
Location
Alba
Code:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0
    IF 0ADC:   test_cheat "Z"
    THEN
        IF 0039: 31@ == 0
        THEN
            0006: 31@ = 1
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            0006: 31@ = 0
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
    END
  
    IF 0039: 31@ == 1
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
    END
    
    IF 0039: 31@ == 0
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 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

I made this and work, but keys W and A don t work, if i want to walk with character don t work
 

mmadaaa

Member
Joined
Oct 31, 2021
Messages
24
Reaction score
0
Location
Alba
Code:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
if and
key_down 17
key_down 81
    THEN
        IF 0039: 31@ == 0
        THEN
            0006: 31@ = 1
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            0006: 31@ = 0
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
    END
  
    IF 0039: 31@ == 1
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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

Now work, i reinstalled sanny
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Code:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
if and
key_down 17
key_down 81
    THEN
        IF 0039: 31@ == 0
        THEN
            0006: 31@ = 1
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            0006: 31@ = 0
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
    END
 
    IF 0039: 31@ == 1
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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

Now work, i reinstalled sanny
PHP:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF AND
    0AB0: 17 // CTRL
    0AB0: 81 // Q
    THEN
        IF 0039: 31@ == 0
        THEN
            0006: 31@ = 1
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            0006: 31@ = 0
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
        wait 1500 // anti key spam
    END
  
    IF 0039: 31@ == 1
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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
 

mmadaaa

Member
Joined
Oct 31, 2021
Messages
24
Reaction score
0
Location
Alba
PHP:
{$CLEO .cs}

0000: NOP

WAIT 8500

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF AND
    0AB0: 17 // CTRL
    0AB0: 81 // Q
    THEN
        IF 0039: 31@ == 0
        THEN
            0006: 31@ = 1
            0AD1: "~Y~Send Key ~G~ON" 1337
        ELSE
            0006: 31@ = 0
            0AD1: "~Y~Send Key ~R~OFF" 1337
        END
        wait 1500 // anti key spam
    END
 
    IF 0039: 31@ == 1
    THEN
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 255
        WAIT 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x41 state 0
    END
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
Thank you very much.
 

Wgamer

Active member
Joined
Mar 10, 2017
Messages
71
Reaction score
18
Code:
F6::
Send {w down}
Send {a down}
return
F3::
Send {w up}
Send {a up}
return

the gitgud edition continues
i made a seperate function that stops it because the script didn't die for some reason idk
anywya gitgud edition
and git gud video POC enjoy


F6 to activate (also opens chat so change it)
F3 to stop
dont use ! infront of F3 you might accidently leak wallhacks
peace
 
Top