CLEO Help AutoClicker

CLEO related
Status
Not open for further replies.

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
So I've tried to make this cool autoclicker however it doesn't respond when i type the text in the chat... anyone knows why? Also, how would i test for the colour of the text too?
Code:
{$CLEO}
{$INCLUDE SF}
0000:
thread "AutoClicker"

repeat
wait 0
until SAMP.Available()

0B34: "autoclicker" @autoclicker
/*
0B34: "acommand" @autoclickercommand
*/

WHILE TRUE
WAIT 0

0AF0: 5@ = get_int_from_ini_file "cleo\AutoClicker.ini" section "AutoClicker" key "status"
IF 5@ == 1
THEN
    alloc 2@ 260
    alloc 3@ 260
    SAMP.GetChatString(99, 2@, 0, 3@, 0)
    IF OR
    0C14: 2@ "auto-clicker"
    0C14: 2@ "AUTOCLICKER"
    0C14: 2@ "ESTI LA PC?"
    0C14: 2@ "esti la pc?"
    THEN
        wait 2000
        say "Da, sunt la pc..."
        say "/stopanim"
        say "/sleep"
        wait 15000
        say "/sleep"
        say "/drunk"
    END
    free 2@
    free 3@
END


END

/*
:autoclickercommand
SAMP.IsCommandTyped(20@)
IF 0AD3: 20@ = format "/%s" 20@
THEN
    0AF5: write_string 20@ to_ini_file "cleo\AutoClicker.ini" section "AutoClicker" key "command"
    chatmsg "{ffff00}[AutoClicker]: {ff00ff}New usable command: {dba81d}/%s" -1
ELSE
    chatmsg "{ffff00}[AutoClicker]: {dba81d}Something's wrong. Try again!" -1
END
SAMP.CmdRet() */

:autoclicker
SAMP.IsCommandTyped(20@)
IF OR
0C14: "on" 20@
0C14: "ON" 20@
0C14: "oN" 20@
0C14: "On" 20@
THEN  
    0AF1: write_int 1 to_ini_file "cleo\AutoClicker.ini" section "AutoClicker" key "status"
    chatmsg "{ffff00}[AutoClicker]: {00ff00}Auto-Clicker: ON." -1
ELSE
IF OR
0C14: "off" 20@
0C14: "OFF" 20@
0C14: "oFF" 20@
0C14: "Off" 20@
THEN
    chatmsg "{ffff00}[AutoClicker]: {ff0000}Auto-Clicker: OFF." -1
    0AF1: write_int 0 to_ini_file "cleo\AutoClicker.ini" section "AutoClicker" key "status"
ELSE
    chatmsg "{ffff00}[AutoClicker]: {dba81d}Right use: '/autoclicker <{00ff00}ON{dba81d}/{ff0000}OFF{dba81d}>'" -1

END
END
SAMP.CmdRet()
@Parazitas
@monday
 
Last edited:

Zin

Expert
Joined
Aug 1, 2013
Messages
1,719
Solutions
1
Reaction score
111
The 0C14 checks will check if that chat string is exactly equal to the chat string which it probably won't be so it's better to use "0C18" as that searches for that string within the string (still case sensitive btw).
For the color you can use "0B75" opcode and then just debug for what colour int you want and then you can set up "if" checks and what not.
 

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
The 0C14 checks will check if that chat string is exactly equal to the chat string which it probably won't be so it's better to use "0C18" as that searches for that string within the string (still case sensitive btw).
For the color you can use "0B75" opcode and then just debug for what colour int you want and then you can set up "if" checks and what not.
I'm not sure how i'm supposed to use 0c18...
Would it look something like?
Code:
0C18: 2@ = "AUTOCLICKER" 2@
 
Status
Not open for further replies.
Top