Вопросы по CLEO-скриптингу

Kotovasya

Участник
85
13
CLEO:
{$CLEO}

0000:

repeat
wait 400
until samp.Available()
0C74: 10@ = create_timer_interval 20000 on_label @timer
0C78: set_timer 10@ active false

while true
wait 0
    if 0B4C:  samp is_dialog_active -1
    then
        alloc 1@ 64
        0BD8: samp get_dialog_caption 1@
        if 0C18: 0 = strstr string1 1@ string2 "Обыск"
        then   
            alloc 0@ 2048
            alloc 3@ 60
            alloc 6@ 20
            0BD7: samp get_dialog_text 0@
            if 0C18: 0 = strstr string1 0@ string2 "Игрок в розыске"
            then
                7@ = 1
            end
            if 0C18: 0 = strstr string1 0@ string2 "Нарко"
            then
                7@ = 1
                2@ += 1
                0AD3: 6@ = format "нарко "
                0C15: strcat destination 3@ source 6@
            end
            if 0C18: 0 = strstr string1 0@ string2 "Материалы"
            then
                7@ = 1
                2@ += 1
                0AD3: 6@ = format "материалы "
                0C15: strcat destination 3@ source 6@
            end
            if 0C18: 0 = strstr string1 0@ string2 "Набор отмычек"
            then
                7@ = 1
                2@ += 1
                0AD3: 6@ = format "отмычки "
                0C15: strcat destination 3@ source 6@
            end
            if 7@ = 1
            then
                0C72: set_virtual_key 119 down 1
                0C72: set_virtual_key 119 down 0
            end
            if 2@ > 0
            then
                0C2C: 4@ = strrchr 1@ char 91
                0C11: memset destination 4@ value 0x0 size 1
                4@++
                0C1A: 5@ = atoi 4@
                0C78: set_timer 10@ active true
                while 0C79:    is_timer 10@ active
                wait 0
                    if and
                    0AB0: key_pressed 89
                    8B21: not samp is_chat_opened
                    then
                        0C78: set_timer 10@ active false
                        say "/su %d %d %s" 5@ 2@ 3@
                        wait 300   
                    end
                end   
            end
            free 0@
            free 3@
            free 6@
            2@ = 0
            7@ = 0
        end
        free 1@
    end
end

:timer
0C78: set_timer 10@ active false
samp.CmdRet()

Возможно кто-то догадается, не скринит обыск никак, выдача звезд тоже не работает. В чем проблема?
P.S. Скриншот обыска
 
  • Нравится
Реакции: Vintik

NookieONE

Участник
128
1
CLEO:
:1
0AA2: 21@ = load_library "kernel32.dll" // IF and SET
0AA4: 19@ = get_proc_address "GetLocalTime" library 21@ // IF and SET
0AC8: 20@ = allocate_memory_size 32
0AA5: call 19@ num_params 1 pop 0 20@ 
0A8D: 11@ = read_memory 20@ size 2 virtual_protect 0
000A: 20@ += 2
0A8D: 12@ = read_memory 20@ size 2 virtual_protect 0
000A: 20@ += 2
0A8D: 13@ = read_memory 20@ size 2 virtual_protect 0
000A: 20@ += 2
0A8D: 14@ = read_memory 20@ size 2 virtual_protect 0
000A: 20@ += 2
0A8D: 15@ = read_memory 20@ size 2 virtual_protect 0
000A: 20@ += 2
0A8D: 16@ = read_memory 20@ size 2 virtual_protect 0
000A: 20@ += 2
0A8D: 17@ = read_memory 20@ size 2 virtual_protect 0
000A: 20@ += 2
0A8D: 18@ = read_memory 20@ size 2 virtual_protect 0
000E: 20@ -= 30
0AB2: ret 8 11@ 12@ 13@ 14@ 15@ 16@ 17@ 18@

что это?
 

StepashkaUA

Новичок
5
0
Помогите поменять сочетание клавиш "RR" на "GG" или вовсе уберите, плиз
 

Вложения

  • OP-HaX.cs
    72.4 KB · Просмотры: 6

Vintik

Мечтатель
Проверенный
1,484
943
Кто знает, как получить определенный символ строки, пример: Строка - "привет", мы хотим получить четвертый символ ("в"), как это сделать?
 

itsOkke

Потрачен
86
38
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
прибавить 3
 

Vintik

Мечтатель
Проверенный
1,484
943
CLEO:
{$CLEO}

0000:

repeat
wait 400
until samp.Available()
0C74: 10@ = create_timer_interval 20000 on_label @timer
0C78: set_timer 10@ active false

while true
wait 0
    if 0B4C:  samp is_dialog_active -1
    then
        alloc 1@ 64
        0BD8: samp get_dialog_caption 1@
        if 0C18: 0 = strstr string1 1@ string2 "Обыск"
        then 
            alloc 0@ 2048
            alloc 3@ 60
            alloc 6@ 20
            0BD7: samp get_dialog_text 0@
            if 0C18: 0 = strstr string1 0@ string2 "Игрок в розыске"
            then
                7@ = 1
            end
            if 0C18: 0 = strstr string1 0@ string2 "Нарко"
            then
                7@ = 1
                2@ += 1
                0AD3: 6@ = format "нарко "
                0C15: strcat destination 3@ source 6@
            end
            if 0C18: 0 = strstr string1 0@ string2 "Материалы"
            then
                7@ = 1
                2@ += 1
                0AD3: 6@ = format "материалы "
                0C15: strcat destination 3@ source 6@
            end
            if 0C18: 0 = strstr string1 0@ string2 "Набор отмычек"
            then
                7@ = 1
                2@ += 1
                0AD3: 6@ = format "отмычки "
                0C15: strcat destination 3@ source 6@
            end
            if 7@ = 1
            then
                0C72: set_virtual_key 119 down 1
                0C72: set_virtual_key 119 down 0
            end
            if 2@ > 0
            then
                0C2C: 4@ = strrchr 1@ char 91
                0C11: memset destination 4@ value 0x0 size 1
                4@++
                0C1A: 5@ = atoi 4@
                0C78: set_timer 10@ active true
                while 0C79:    is_timer 10@ active
                wait 0
                    if and
                    0AB0: key_pressed 89
                    8B21: not samp is_chat_opened
                    then
                        0C78: set_timer 10@ active false
                        say "/su %d %d %s" 5@ 2@ 3@
                        wait 300 
                    end
                end 
            end
            free 0@
            free 3@
            free 6@
            2@ = 0
            7@ = 0
        end
        free 1@
    end
end

:timer
0C78: set_timer 10@ active false
samp.CmdRet()

Возможно кто-то догадается, не скринит обыск никак, выдача звезд тоже не работает. В чем проблема?
P.S. Скриншот обыска

На, я сделал так (немного по-другому):
CLEO:
{$CLEO .cs}
0000: NOP

0AC8: 0@ = allocate_memory_size 128
0AC8: 3@ = allocate_memory_size 32 // Обнаруженные вещи
0AC8: 5@ = allocate_memory_size 25

repeat
wait 0
until SAMP.Available()

while true
wait 0

    if 0B4C:  samp is_dialog_active -1
    then
    0BD8: samp get_dialog_caption 0@
        if 0AD4: 31@ = scan_string 0@ format "Обыск %s[%d], %d lvl." 5@ 1@ 1 // 5@ - Никнейм игрока, 1@ - ID игрока
        then 
        0BD7: samp get_dialog_text 0@
        2@ = 0 // Количество звёзд
        0AD3: 3@ = format ""
            if 0C18: 31@ = strstr string1 0@ string2 "Нарко"
            then
            2@ += 1
            0C17: 4@ = strlen 3@
                if 4@ > 0
                then
                0C15: strcat destination 3@ source ", нарко"
                else
                0C15: strcat destination 3@ source "Нарко"
                end
            end
            if 0C18: 31@ = strstr string1 0@ string2 "Материалы"
            then
            2@ += 1
            0C17: 4@ = strlen 3@
                if 4@ > 0
                then
                0C15: strcat destination 3@ source ", материалы"
                else
                0C15: strcat destination 3@ source "Материалы"
                end
            end
            if 0C18: 31@ = strstr string1 0@ string2 "Набор отмычек"
            then
            2@ += 1
            0C17: 4@ = strlen 3@
                if 4@ > 0
                then
                0C15: strcat destination 3@ source ", отмычки"
                else
                0C15: strcat destination 3@ source "Отмычки"
                end
            end
           
            if 2@ > 0
            then
                if 2@ == 1 
                then
                0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезда)?" 5@ 1@ 3@ 2@
                else
                0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезды)?" 5@ 1@ 3@ 2@
                end
            0B3B: samp show_dialog id 11511 caption "Объявление в розыск" text 0@ button_1 "" button_2 "Закрыть" style 1
            else
            0AF8: samp add_message_to_chat "{00BFFF}У %s[%d] нечего не обнаружено." color -1 5@ 1@
            end
        end
    end 
   
    if 0B3C:  samp is_dialog_responded id 11511 button 10@ list_item 1 input_text 1
    then
    0B36: samp 0@ = get_player_nickname 1@
        if and
        10@ == 1
        0C14: strcmp string1 0@ string2 5@
        then
            0AD3: 0@ = format "/su %d %d %s" 1@ 2@ 3@
            0AF9: samp say_msg 0@
            0AF8: samp add_message_to_chat "{00BFFF}%s[%d] объявлен в розыск, он имеет: %s." color -1 5@ 1@ 3@
        end
    end
         
end
 

itsOkke

Потрачен
86
38
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
CLEO:
{$CLEO}

0AA7: call_function {__stdcall::GetVolumeInformation}0x81E532 num_params 8 pop 0 | {nFileSystemNameSize}FALSE {lpFileSystemNameBuffer}FALSE {lpFileSystemFlags}FALSE {lpMaximumComponentLength}FALSE {lpVolumeSerialNumber}0@v {nVolumeNameSize}FALSE {lpVolumeNameBuffer}FALSE {lpRootPathName}FALSE | {_errorCode}1@ |
IF 0039:   0@ == 3293827
THEN
    0af8: "Good" -1
ELSE
    0af8: "Bad Code. Script deleted" -1
    0B00: delete_file "CLEO\house.cs"
END
0A93: end_custom_thread
// BY DARKP1XEL ЖЕ
 

Kotovasya

Участник
85
13
На, я сделал так (немного по-другому):
CLEO:
{$CLEO .cs}
0000: NOP

0AC8: 0@ = allocate_memory_size 128
0AC8: 3@ = allocate_memory_size 32 // Обнаруженные вещи
0AC8: 5@ = allocate_memory_size 25

repeat
wait 0
until SAMP.Available()

while true
wait 0

    if 0B4C:  samp is_dialog_active -1
    then
    0BD8: samp get_dialog_caption 0@
        if 0AD4: 31@ = scan_string 0@ format "Обыск %s[%d], %d lvl." 5@ 1@ 1 // 5@ - Никнейм игрока, 1@ - ID игрока
        then
        0BD7: samp get_dialog_text 0@
        2@ = 0 // Количество звёзд
        0AD3: 3@ = format ""
            if 0C18: 31@ = strstr string1 0@ string2 "Нарко"
            then
            2@ += 1
            0C17: 4@ = strlen 3@
                if 4@ > 0
                then
                0C15: strcat destination 3@ source ", нарко"
                else
                0C15: strcat destination 3@ source "Нарко"
                end
            end
            if 0C18: 31@ = strstr string1 0@ string2 "Материалы"
            then
            2@ += 1
            0C17: 4@ = strlen 3@
                if 4@ > 0
                then
                0C15: strcat destination 3@ source ", материалы"
                else
                0C15: strcat destination 3@ source "Материалы"
                end
            end
            if 0C18: 31@ = strstr string1 0@ string2 "Набор отмычек"
            then
            2@ += 1
            0C17: 4@ = strlen 3@
                if 4@ > 0
                then
                0C15: strcat destination 3@ source ", отмычки"
                else
                0C15: strcat destination 3@ source "Отмычки"
                end
            end
          
            if 2@ > 0
            then
                if 2@ == 1
                then
                0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезда)?" 5@ 1@ 3@ 2@
                else
                0AD3: 0@ = format "У %s[%d] обнаружено: %s. Ты желаешь объявить его в розыск (%d звезды)?" 5@ 1@ 3@ 2@
                end
            0B3B: samp show_dialog id 11511 caption "Объявление в розыск" text 0@ button_1 "" button_2 "Закрыть" style 1
            else
            0AF8: samp add_message_to_chat "{00BFFF}У %s[%d] нечего не обнаружено." color -1 5@ 1@
            end
        end
    end
  
    if 0B3C:  samp is_dialog_responded id 11511 button 10@ list_item 1 input_text 1
    then
    0B36: samp 0@ = get_player_nickname 1@
        if and
        10@ == 1
        0C14: strcmp string1 0@ string2 5@
        then
            0AD3: 0@ = format "/su %d %d %s" 1@ 2@ 3@
            0AF9: samp say_msg 0@
            0AF8: samp add_message_to_chat "{00BFFF}%s[%d] объявлен в розыск, он имеет: %s." color -1 5@ 1@ 3@
        end
    end
        
end
Не помогло :с
 

itsOkke

Потрачен
86
38
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
14465
на какой строке

p.s. у меня компилируется лол
 

itsOkke

Потрачен
86
38
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ну и че у меня все работает проблема на твоей стороне разбирайтесь сами я пошла
 

NookieONE

Участник
128
1
CLEO:
{$CLEO}

0000:

while true
wait 0
if not 00DF: actor $PLAYER_ACTOR driving
then
if 0118: actor $player_actor dead
then
0AF6: samp spawn_player
end
end
end

При смерти в каре все равно срабатывает...
Табуляция сбилась соре