cleo code explain

sulovy

Новичок
Автор темы
25
0
what this cleo code does?

CLEO:
{$CLEO .cs}

0000: NOP

0B34: samp register_client_command "acon" to_label @activate
0B34: samp register_client_command "acoff" to_label @deactivate

wait 10000
31@ = 0

WHILE TRUE
wait 0
if
31@ == 1
then
    say "/ac"
    wait 250
    if
    0B4C: samp is_dialog_active -1
    then
        alloc 0@ 512
        0BD7: samp get_dialog_text 0@
        0AB1: @CollectAllDigits 1 stringPointer 0@
        0B4B: samp get_current_dialog_editbox_text 0@       
        wait  2300    //shecvale
        0B47: samp close_current_dialog_with_button 1
        0AD1: show_formatted_text_highpriority "ZONE CAPTURED" time 1000
        31@ = 0
    end
end   
wait 100           //shecvale
END //end main loop



//activation and deactivation
:activate
wait 0
0AD1: show_formatted_text_highpriority "AC ON" time 1000
31@ = 1
0B43: samp cmd_ret
    
:deactivate
wait 0
0AD1: show_formatted_text_highpriority "AC OFF" time 1000
31@ = 0
0B43: samp cmd_ret


:CollectAllDigits
{
    0AB1: @CollectAllDigits 1 stringPointer 1@
    Self Return: 1@ - Digits
}
17@ = 0
0C17: 31@ = strlen 0@
31@ -= 1
0085: 28@ = 0@
005A: 28@ += 31@
0085: 27@ = 0@
for 30@ = 0@ to 28@
0A8D: 29@ = read_memory 30@ size 1 virtual_protect 1
    if and // if is equal or higher than "0" in ascii, and if is equal or lower than "9" in ascii (http://www.asciitable.com/index/asciifull.gif)
    0029:   29@ >= 48
    002B:   57 >= 29@
    then
        17@ = 17@ + 1
        if 17@ > 5
        then
            0A8C: write_memory 27@ size 1 value 29@ virtual_protect 1
            27@++ //27@ increases only if it's a digit
        end
    else
        // do nothing...
    end   
end
0A8C: write_memory 27@ size 1 value 0 virtual_protect 1
0AB2: ret 0