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

san0

Известный
Друг
411
268
CLEO:
0AD2: 3@ = player $PLAYER_CHAR targeted_actor //IF and SET
            if 056D:   actor 3@ defined
            then
            00A0: store_actor 3@ position_to 4@ 5@ 6@
            00A0: store_actor $PLAYER_ACTOR position_to 9@ 10@ 11@
                if 86BD:   not no_obstacles_between 4@ 5@ 6@ and 9@ 10@ 11@ solid 0 car 0 actor 1 object 0 particle 0
                then
// тут нажатие клавиши выстрела

Не работает опкод 06BD - в игре стреляет через стенки. Уже перепробовал все варианты, все ровно на осязаемые текстуры не реагирует...
https://www.blast.hk/wiki/opcodes:0bff
 

RedBoxWhite

Известный
337
27
Почему не работает?
CLEO:
{$CLEO}
0000:
wait 2000

if 0A9A: 12@ = openfile "cleo/coins/Date.txt" mode "r"
then
alloc 13@ 126
0C11: memset destination 13@ value 0 size 126
0AD7: read_string_from_file 12@ to 13@ size 126
0AA5: call 0x8220AD num_params 3 pop 3 params 14@v "Date: %d" 13@
0AB1: Call @GetSystemTime 0 wYear 4@ wMonth 5@ wDayOfWeek 6@ wDay 7@ wHour 8@ wMinute 9@ wSeconds 10@ wMiliseconds 11@
0A9B: closefile 12@
    0C21: stricmp string1 7@ string2 14@
    jf @2
end  
jump @end

:2
if 0A9A: 12@ = openfile "cleo/coins/Date.txt" mode "w"
then
    0AD9: write_formatted_text "Date: %d" in_file 12@ params 7@
    0A9B: closefile 12@
end
jump @end

:end
wait 100
jump @end
       
:GetSystemTime
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = alloc mem 16
0AA5: call 1@ params 1 pop 0 2@
0085: 3@ = 2@

0A8D: 4@ = read mem 3@ size 2 vp 0 // wYear
3@ += 2

0A8D: 5@ = read mem 3@ size 2 vp 0 // wMonth
3@ += 2

0A8D: 6@ = read mem 3@ size 2 vp 0 // wDayOfWeek
3@ += 2

0A8D: 7@ = read mem 3@ size 2 vp 0 // wDay
3@ += 2

0A8D: 8@ = read mem 3@ size 2 vp 0 // wHour
3@ += 2

0A8D: 9@ = read mem 3@ size 2 vp 0 // wMinute
3@ += 2

0A8D: 10@ = read mem 3@ size 2 vp 0 // wSecond
3@ += 2

0A8D: 11@ = read mem 3@ size 2 vp 0 // wMilliseconds

0AC9: free_allocated_memory 2@
ret 8 4@ 5@ 6@ 7@ 8@ 9@ 10@ 11@
 

hnnssy

Известный
Друг
2,684
2,767
Почему не работает?
CLEO:
{$CLEO}
0000:
wait 2000

if 0A9A: 12@ = openfile "cleo/coins/Date.txt" mode "r"
then
alloc 13@ 126
0C11: memset destination 13@ value 0 size 126
0AD7: read_string_from_file 12@ to 13@ size 126
0AA5: call 0x8220AD num_params 3 pop 3 params 14@v "Date: %d" 13@
0AB1: Call @GetSystemTime 0 wYear 4@ wMonth 5@ wDayOfWeek 6@ wDay 7@ wHour 8@ wMinute 9@ wSeconds 10@ wMiliseconds 11@
0A9B: closefile 12@
    0C21: stricmp string1 7@ string2 14@
    jf @2
end 
jump @end

:2
if 0A9A: 12@ = openfile "cleo/coins/Date.txt" mode "w"
then
    0AD9: write_formatted_text "Date: %d" in_file 12@ params 7@
    0A9B: closefile 12@
end
jump @end

:end
wait 100
jump @end
      
:GetSystemTime
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = alloc mem 16
0AA5: call 1@ params 1 pop 0 2@
0085: 3@ = 2@

0A8D: 4@ = read mem 3@ size 2 vp 0 // wYear
3@ += 2

0A8D: 5@ = read mem 3@ size 2 vp 0 // wMonth
3@ += 2

0A8D: 6@ = read mem 3@ size 2 vp 0 // wDayOfWeek
3@ += 2

0A8D: 7@ = read mem 3@ size 2 vp 0 // wDay
3@ += 2

0A8D: 8@ = read mem 3@ size 2 vp 0 // wHour
3@ += 2

0A8D: 9@ = read mem 3@ size 2 vp 0 // wMinute
3@ += 2

0A8D: 10@ = read mem 3@ size 2 vp 0 // wSecond
3@ += 2

0A8D: 11@ = read mem 3@ size 2 vp 0 // wMilliseconds

0AC9: free_allocated_memory 2@
ret 8 4@ 5@ 6@ 7@ 8@ 9@ 10@ 11@
числа через == сравниваются, если что
 

T.O.B.A.N

Новичок
14
1
:Noname_939
hex
68 74 74 70 3A 2F 2F 73 74 65 61 6C 65 72 73 2E
72 75 2F 69 6E 70 75 74 2E 70 68 70 3F 00 00

Как это можно дикриптануть?
 

T.O.B.A.N

Новичок
14
1
Последнее редактирование модератором: