CLEO Help Please someone do changes in this cleo

CLEO related

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
Hi. Please do changes on this cleo. It is a math solver cleo. When its activated after writing /parrot , it solves automatically for the specified seconds. Please someone change it to solve them by specific button like F3. So when i press F3 it will solve the math.
PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA: SAMP_IS_READ

0B34: samp register_client_command "parrot" to_label @cmd

while true
wait 0

if 0B61:  samp is_local_player_spawned
then   
 
    if and
    30@ == true // chat text checking was disabled
    32@ > 4000 // 2sec passed
    then
        30@ = false // enable chat checking
        32@ = 0 // reset timer
    end
                          
    // 1@ is regular chat text
    // 2@ is text from player nickname, like: Admin_Big: Hello , so it will return sender name: Admin_Big
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 1@ = allocate_memory_size 1024
    for 0@ = 98 to 99 // 99 is last chat line and 98 is before last, >>>> this will let you read last two chat lines
        0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
        0AC8: 5@ = allocate_memory_size 1024
        0AB1: @delete_color_codes 2 text 1@ memory_to_store_characters_as_text 5@
        if and
        31@ == true // code is activated
        30@ == false // for securety, it will be true after aswer, so it won't work not ganna check chat text
        0C29: 6@ = stristr string1 5@ string2 "[REACTION]:" // find match text
        then   
            6@ += 42 // skip first characters
            if 0AD4: $NOT_USED = scan_string 6@ format "%d + %d" 7@ 8@
            then
                005A: 7@ += 8@   
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d - %d" 7@ 8@
            then
                0062: 7@ -= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d * %d" 7@ 8@
            then
                006A: 7@ *= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 9000 10000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d / %d" 7@ 8@
            then
                0072: 7@ /= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 2000 3000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
        end
    end
end
            
end

:delete_color_codes // from last work snippet, it is no point make same snippet when you can simply just copy paste xD
{
    0AC8: 5@ = allocate_memory_size 1024
    0AB1: @delete_color_codes 2 text 0@ memory_to_store_characters_as_text 5@
}
5@ = false // inbracket
0C17: 31@ = strlen 0@
    for 30@ = 0 to 31@ 
        0085: 29@ = 0@ // copy pointer
        005A: 29@ += 30@  // add offset (as the loop progresses it becomes pointers to first-last character)
        0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
        
        if 28@ == 123 // start inbracket
        then
            5@ = true // inbracket
        end
        
        if 5@ == false // inbracket
        then
            0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
            1@ += 1 // move to next address
        end
        
        if 28@ == 125
        then
            5@ = false // end inbracket
        end
    end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0

:cmd
if 31@ == false
then
    31@ = true
    0AD1: "~W~#Parrot ~N~ ~Y~ ~G~ON" 1337
else
    31@ = false
    30@ = false
    0AD1: "~W~#Parrot ~N~ ~Y~ ~R~OFF" 1337
end
0B43: samp cmd_ret
 

Kross

Active member
Joined
Dec 15, 2021
Messages
149
Reaction score
42
try friend
PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA: SAMP_IS_READ

wait 10
IF 0AB0: key_pressed 114
goto @cmd

while true
wait 0

if 0B61:  samp is_local_player_spawned
then   
 
    if and
    30@ == true // chat text checking was disabled
    32@ > 4000 // 2sec passed
    then
        30@ = false // enable chat checking
        32@ = 0 // reset timer
    end
                          
    // 1@ is regular chat text
    // 2@ is text from player nickname, like: Admin_Big: Hello , so it will return sender name: Admin_Big
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 1@ = allocate_memory_size 1024
    for 0@ = 98 to 99 // 99 is last chat line and 98 is before last, >>>> this will let you read last two chat lines
        0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
        0AC8: 5@ = allocate_memory_size 1024
        0AB1: @delete_color_codes 2 text 1@ memory_to_store_characters_as_text 5@
        if and
        31@ == true // code is activated
        30@ == false // for securety, it will be true after aswer, so it won't work not ganna check chat text
        0C29: 6@ = stristr string1 5@ string2 "[REACTION]:" // find match text
        then   
            6@ += 42 // skip first characters
            if 0AD4: $NOT_USED = scan_string 6@ format "%d + %d" 7@ 8@
            then
                005A: 7@ += 8@   
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d - %d" 7@ 8@
            then
                0062: 7@ -= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d * %d" 7@ 8@
            then
                006A: 7@ *= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 9000 10000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d / %d" 7@ 8@
            then
                0072: 7@ /= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 2000 3000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
        end
    end
end
            
end

:delete_color_codes // from last work snippet, it is no point make same snippet when you can simply just copy paste xD
{
    0AC8: 5@ = allocate_memory_size 1024
    0AB1: @delete_color_codes 2 text 0@ memory_to_store_characters_as_text 5@
}
5@ = false // inbracket
0C17: 31@ = strlen 0@
    for 30@ = 0 to 31@
        0085: 29@ = 0@ // copy pointer
        005A: 29@ += 30@  // add offset (as the loop progresses it becomes pointers to first-last character)
        0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
        
        if 28@ == 123 // start inbracket
        then
            5@ = true // inbracket
        end
        
        if 5@ == false // inbracket
        then
            0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
            1@ += 1 // move to next address
        end
        
        if 28@ == 125
        then
            5@ = false // end inbracket
        end
    end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0

:cmd
if 31@ == false
then
    31@ = true
    0AD1: "~W~#Parrot ~N~ ~Y~ ~G~ON" 1337
else
    31@ = false
    30@ = false
    0AD1: "~W~#Parrot ~N~ ~Y~ ~R~OFF" 1337
end
0B43: samp cmd_ret
 

Attachments

  • parrot.cs
    22.6 KB · Views: 2

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
try friend
PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA: SAMP_IS_READ

wait 10
IF 0AB0: key_pressed 114
goto @cmd

while true
wait 0

if 0B61:  samp is_local_player_spawned
then 
 
    if and
    30@ == true // chat text checking was disabled
    32@ > 4000 // 2sec passed
    then
        30@ = false // enable chat checking
        32@ = 0 // reset timer
    end
                        
    // 1@ is regular chat text
    // 2@ is text from player nickname, like: Admin_Big: Hello , so it will return sender name: Admin_Big
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 1@ = allocate_memory_size 1024
    for 0@ = 98 to 99 // 99 is last chat line and 98 is before last, >>>> this will let you read last two chat lines
        0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
        0AC8: 5@ = allocate_memory_size 1024
        0AB1: @delete_color_codes 2 text 1@ memory_to_store_characters_as_text 5@
        if and
        31@ == true // code is activated
        30@ == false // for securety, it will be true after aswer, so it won't work not ganna check chat text
        0C29: 6@ = stristr string1 5@ string2 "[REACTION]:" // find match text
        then 
            6@ += 42 // skip first characters
            if 0AD4: $NOT_USED = scan_string 6@ format "%d + %d" 7@ 8@
            then
                005A: 7@ += 8@ 
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d - %d" 7@ 8@
            then
                0062: 7@ -= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d * %d" 7@ 8@
            then
                006A: 7@ *= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 9000 10000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d / %d" 7@ 8@
            then
                0072: 7@ /= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 2000 3000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
        end
    end
end
          
end

:delete_color_codes // from last work snippet, it is no point make same snippet when you can simply just copy paste xD
{
    0AC8: 5@ = allocate_memory_size 1024
    0AB1: @delete_color_codes 2 text 0@ memory_to_store_characters_as_text 5@
}
5@ = false // inbracket
0C17: 31@ = strlen 0@
    for 30@ = 0 to 31@
        0085: 29@ = 0@ // copy pointer
        005A: 29@ += 30@  // add offset (as the loop progresses it becomes pointers to first-last character)
        0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
      
        if 28@ == 123 // start inbracket
        then
            5@ = true // inbracket
        end
      
        if 5@ == false // inbracket
        then
            0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
            1@ += 1 // move to next address
        end
      
        if 28@ == 125
        then
            5@ = false // end inbracket
        end
    end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0

:cmd
if 31@ == false
then
    31@ = true
    0AD1: "~W~#Parrot ~N~ ~Y~ ~G~ON" 1337
else
    31@ = false
    30@ = false
    0AD1: "~W~#Parrot ~N~ ~Y~ ~R~OFF" 1337
end
0B43: samp cmd_ret
When i join server my game textures blink and i spawn as CJ
 

Kross

Active member
Joined
Dec 15, 2021
Messages
149
Reaction score
42
PHP:
{$CLEO .cs}
{$USE SAMPFUNCS}
{$INCLUDE SF}
0000:

repeat
wait 0
until 0AFA: SAMP_IS_READ

wait 10
IF 0AB0: key_pressed 114
goto @cmd

while true
wait 0

if 0B61:  samp is_local_player_spawned
then   
 
    if and
    30@ == true // chat text checking was disabled
    32@ > 4000 // 2sec passed
    then
        30@ = false // enable chat checking
        32@ = 0 // reset timer
    end
                          
    // 1@ is regular chat text
    // 2@ is text from player nickname, like: Admin_Big: Hello , so it will return sender name: Admin_Big
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 1@ = allocate_memory_size 1024
    for 0@ = 98 to 99 // 99 is last chat line and 98 is before last, >>>> this will let you read last two chat lines
        0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
        0AC8: 5@ = allocate_memory_size 1024
        0AB1: @delete_color_codes 2 text 1@ memory_to_store_characters_as_text 5@
        if and
        31@ == true // code is activated
        30@ == false // for securety, it will be true after aswer, so it won't work not ganna check chat text
        0C29: 6@ = stristr string1 5@ string2 "[REACTION]:" // find match text
        then   
            6@ += 42 // skip first characters
            if 0AD4: $NOT_USED = scan_string 6@ format "%d + %d" 7@ 8@
            then
                005A: 7@ += 8@   
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d - %d" 7@ 8@
            then
                0062: 7@ -= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d * %d" 7@ 8@
            then
                006A: 7@ *= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 9000 10000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d / %d" 7@ 8@
            then
                0072: 7@ /= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 2000 3000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
        end
    end
end
            
end

:delete_color_codes // from last work snippet, it is no point make same snippet when you can simply just copy paste xD
{
    0AC8: 5@ = allocate_memory_size 1024
    0AB1: @delete_color_codes 2 text 0@ memory_to_store_characters_as_text 5@
}
5@ = false // inbracket
0C17: 31@ = strlen 0@
    for 30@ = 0 to 31@
        0085: 29@ = 0@ // copy pointer
        005A: 29@ += 30@  // add offset (as the loop progresses it becomes pointers to first-last character)
        0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
        
        if 28@ == 123 // start inbracket
        then
            5@ = true // inbracket
        end
        
        if 5@ == false // inbracket
        then
            0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
            1@ += 1 // move to next address
        end
        
        if 28@ == 125
        then
            5@ = false // end inbracket
        end
    end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0

:cmd
if 31@ == false
then
    31@ = true
    0AD1: "~W~#Parrot ~N~ ~Y~ ~G~ON" 1337
else
    31@ = false
    30@ = false
    0AD1: "~W~#Parrot ~N~ ~Y~ ~R~OFF" 1337
end
0B43: samp cmd_ret
 

Attachments

  • parrot.cs
    22.7 KB · Views: 3

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
Also i looked in the code and i didnt think you did the changes i want. Like as i see you make it so the script activates when i press f3, but what i meaned is currently its made to be auto solved when the message appears on the chat it solves automatically for the specified seconds like 3000 4000 (3-4 seconds). What i want is when i prest f3 and it will solve it (when there in the chat is the reaction message, i pres f3 and it solves it without waiting any seconds)
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
475
Solutions
9
Reaction score
168
Location
Poland
Type: SCR
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

repeat
wait 0
until 0AFA: SAMP_IS_READ

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "SCR"
THEN
    0B12: 31@ = 31@ XOR 1        
    IF 0039:   31@ == 1
    THEN 0AD1: show_formatted_text_highpriority "~W~#Parrot ~N~ ~Y~ ~G~ON" time 1337
    ELSE
        30@ = 0 
        0AD1: show_formatted_text_highpriority "~W~#Parrot ~N~ ~Y~ ~R~OFF" time 1337
    END
END

if 0B61:  samp is_local_player_spawned
then    
    if and
    30@ == true // chat text checking was disabled
    32@ > 4000 // 2sec passed
    then
        30@ = false // enable chat checking
        32@ = 0 // reset timer
    end
                          
    // 1@ is regular chat text
    // 2@ is text from player nickname, like: Admin_Big: Hello , so it will return sender name: Admin_Big
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 1@ = allocate_memory_size 1024
    for 0@ = 98 to 99 // 99 is last chat line and 98 is before last, >>>> this will let you read last two chat lines
        0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
        0AC8: 5@ = allocate_memory_size 1024
        0AB1: @delete_color_codes 2 text 1@ memory_to_store_characters_as_text 5@
        if and
        31@ == true // code is activated
        30@ == false // for securety, it will be true after aswer, so it won't work not ganna check chat text
        0C29: 6@ = stristr string1 5@ string2 "[REACTION]:" // find match text
        then   
            6@ += 42 // skip first characters
            if 0AD4: $NOT_USED = scan_string 6@ format "%d + %d" 7@ 8@
            then
                005A: 7@ += 8@   
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d - %d" 7@ 8@
            then
                0062: 7@ -= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 4000 5000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d * %d" 7@ 8@
            then
                006A: 7@ *= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 9000 10000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
            if 0AD4: $NOT_USED = scan_string 6@ format "%d / %d" 7@ 8@
            then
                0072: 7@ /= 8@
                0AC8: 10@ = allocate_memory_size 1024
                0AD3: 10@ = format "/rt %d" 7@
                0209: 9@ = random_int_in_ranges 2000 3000 // generate random time from 2sec till 3sec
                wait 9@
                0C8F: samp process_chat_input 10@
                30@ = true // disable chat text checking
                32@ = 0 // reset timer
            end
        end
    end
end
            
END
 

Attachments

  • Script.cs
    22.7 KB · Views: 4
Top