{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
thread 'HOYOKU'

:key
wait 0
0@ = -229907
008B: 1@ = &0(0@,1i)
0085: 2@ = 1@
div(1@, 0x100 00)
mul(1@, 0x100 00)
0062: 2@ -= 1@
if
2@ == 0x484F        //HO
jf @key
0@ = -229908
008B: 3@ = &0(0@,1i)
if
3@ == 0x594F4B55    //YOKU
jf @key

0004:&0(0@,1i) = 0x20202020

////////loads////////
Model.Load(#KNIFECUR)
Model.Load(3106)
038B: load_requested_models
if
0AAB:  file_exists "CLEO\mp3\spell.mp3"
then
    0AAC: 4@ = load_mp3 "CLEO\mp3\spell.mp3"
end
if
0AAB:  file_exists "models\txd\spell.txd"
then
    0390: load_txd_dictionary 'SPELL'
    038F: load_texture "HOYOKU" as 1 // Load dictionary with 0390 first
    03F0: enable_text_draw 1
end

while not Model.Available(#KNIFECUR)
wait 25
end

while not Model.Available(3106)
wait 25
end

wait 100

////////SPELL TEXTUR DRAW///////
if
0AAB:  file_exists "CLEO\mp3\spell.mp3"
then
    0AAD: set_mp3 4@ perform_action 1
end
if
0AAB:  file_exists "models\txd\spell.txd"
then
    0006: 5@ = 15
    0007: 6@ = 250.0 
    0007: 8@ = 576.0
    0007: 9@ = 72.0
    while 8023:   288.0 > 8@ 
        000F: 9@ -= 4.0
        000F: 8@ -= 32.0
        000B: 6@ += 25.0 
        000A: 5@ += 24    
        074B: texture 1 position 6@ 148.0 scale 8@ 9@ angle 180.0 color_RGBA 255 255 255 5@
        wait 0
    end
    for 7@ = 0 to 13
        074B: texture 1 position 6@ 148.0 scale 8@ 9@ angle 180.0 color_RGBA 255 255 255 255
        wait 5
    end

    for 7@ = 148 to 418 step 18
        wait 0
        0093: 8@ = integer 7@ to_float 
        074B: texture 1 position 500.0 8@ scale 256.0 32.0 angle 180.0 color_RGBA 255 255 255 255
    end

    03F0: enable_text_draw 0

    for 7@ = 419 to 420 step 1
        wait 0
        0093: 8@ = integer 7@ to_float 
        074B: texture 1 position 500.0 8@ scale 256.0 32.0 angle 180.0 color_RGBA 255 255 255 255
    end
end

:main
wait 0
0@ = -229907
008B: 1@ = &0(0@,1i)
0085: 2@ = 1@
div(1@, 0x100 00)
mul(1@, 0x100 00)
0062: 2@ -= 1@
if
2@ == 0x484F        //HO
then
    0@ = -229908
    008B: 3@ = &0(0@,1i)
    if
    3@ == 0x594F4B55    //YOKU
    then
        0108: destroy_object 30@
        0650: destroy_particle 31@
        if
        0AAB:  file_exists "models\txd\spell.txd"
        then
            03F0: enable_text_draw 0
            0391: release_txd_dictionary
        end
        if
        0AAB:  file_exists "CLEO\mp3\spell.mp3"
        then
            0AAE: release_mp3 4@
        end
        031A: remove_all_fires            
        0004:&0(0@,1i) = 0x20202020
        jump @key
    end
end

if or
02D8:   actor $PLAYER_ACTOR current_weapon == 0 
02D8:   actor $PLAYER_ACTOR current_weapon == 1 
then
    if
    83CA: not  object 30@ exists 
    then
        Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)
        30@ = Object.Create(3106, 7@, 8@, 9@)
        Model.Destroy(3106)
        070A: AS_actor $PLAYER_ACTOR attach_to_object 30@ offset 0.0 0.0 0.0 on_bone 2 16 perform_animation "NULL" IFP_file "NULL" time 1
        066E: create_particle "FIRE" attached_to_object 30@ with_offset 0.1 0.0 0.0 rotation 0.0 0.0 0.0 flag 1 handle_as 31@
        064C: make_particle 31@ visible
    end
    if and
    8449: not actor $PLAYER_ACTOR in_a_car
    00E1: player 0 pressed_key 17 //fire
    then
        jump @create_flames
    end
else
    if
    03CA:  object 30@ exists
    then
        0108: destroy_object 30@
        0650: destroy_particle 31@    
    end
end

jump @main

////////create flames///////
:create_flames
0812: AS_actor $PLAYER_ACTOR perform_animation "NULL" IFP_file "NULL" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 1 // versionB
Actor.SetImmunities($PLAYER_ACTOR,1,1,1,1,1)
0172: 0@ = actor $PLAYER_ACTOR Z_angle
0107: 5@ = create_object #KNIFECUR at 0.0 0.0 0.0
069B: attach_object 5@ to_actor $PLAYER_ACTOR with_offset 0.0 1.0 -5.0 rotation 0.0 0.0 0.0 
0750: set_object 5@ visibility 1
0177: set_object 5@ Z_angle_to 0@ 
066E: create_particle "flame" attached_to_object 5@ with_offset 0.0 2.0 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 10@
066E: create_particle "flame" attached_to_object 5@ with_offset 0.0 1.5 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 11@
066E: create_particle "flame" attached_to_object 5@ with_offset 0.0 1.0 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 12@
066E: create_particle "FIRE_BIKE" attached_to_object 5@ with_offset 0.0 0.5 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 13@
066E: create_particle "flame" attached_to_object 5@ with_offset 0.5 1.0 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 14@
066E: create_particle "flame" attached_to_object 5@ with_offset 0.9 0.7 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 15@
066E: create_particle "flame" attached_to_object 5@ with_offset 1.3 0.4 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 16@
066E: create_particle "flame" attached_to_object 5@ with_offset 1.7 0.1 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 17@
066E: create_particle "flame" attached_to_object 5@ with_offset 1.2 0.0 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 18@
066E: create_particle "flame" attached_to_object 5@ with_offset 1.5 -0.3 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 19@
066E: create_particle "flame" attached_to_object 5@ with_offset -0.5 1.0 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 20@
066E: create_particle "flame" attached_to_object 5@ with_offset -0.9 0.7 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 21@
066E: create_particle "flame" attached_to_object 5@ with_offset -1.3 0.4 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 22@
066E: create_particle "flame" attached_to_object 5@ with_offset -1.7 0.1 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 23@
066E: create_particle "flame" attached_to_object 5@ with_offset -1.2 0.0 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 24@
066E: create_particle "flame" attached_to_object 5@ with_offset -1.5 -0.3 5.0 rotation 0.0 0.0 0.0 flag 1 handle_as 25@
064C: make_particle 10@ visible
064C: make_particle 11@ visible
064C: make_particle 12@ visible
064C: make_particle 13@ visible
064C: make_particle 14@ visible
064C: make_particle 15@ visible
064C: make_particle 16@ visible
064C: make_particle 17@ visible
064C: make_particle 18@ visible
064C: make_particle 19@ visible
064C: make_particle 20@ visible
064C: make_particle 21@ visible
064C: make_particle 22@ visible
064C: make_particle 23@ visible
064C: make_particle 24@ visible
064C: make_particle 25@ visible
wait 500
0172: 0@ = actor $PLAYER_ACTOR Z_angle
0682: detach_object 5@ 0.0 0.0 0@ collision_detection 1 
02F6: 7@ = sine 0@ // (float)
02F7: 8@ = cosine 0@ // (float)
0007: 29@ = -8.0
006B: 7@ *= 29@ // (float)
0013: 29@ *= -1.0  
006B: 8@ *= 29@ // (float)
0013: 29@ *= -1.0     
0381: throw_object 5@ velocity_in_direction 7@ 8@ 1.0

0006: 32@ = 0
0006: 33@ = 301
0006: 6@ = -1
 
:roop
wait 0
if
0019:   33@ > 300
then
    000F: 29@ -= 0.6 
    000A: 6@ += 1
    if
    0039: 6@ == 13
    then
        0006: 6@ = 0
    end      
    0A8D: 27@ = read_memory 0xB74490 size 4 virtual_protect 0
    000A: 27@ += 0x4
    0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
    for 28@ = 0 to 35584 step 0x100
        0A8D: 26@ = read_memory 27@ size 1 virtual_protect 0
        000A: 27@ += 0x1
        if and
        0029:   26@ >= 0x00 
        001B:   0x80 > 26@
        then 
            005A: 26@ += 28@ // (int)
            Actor.StorePos(26@,7@,8@,9@)
            Object.StorePos(5@,1@,2@,3@)
            000B: 3@ += 5.0
            050A: 7@ = distance_between_XYZ 7@ 8@ 9@ and_XYZ 1@ 2@ 3@
            if and
            0023:   7.0 > 7@
            803C:   not  $PLAYER_ACTOR == 26@ // (int)
            then
                if
                0449: actor 26@ in_a_car
                then
                    03C0: 7@ = actor 26@ car
                    if
                    047A:   actor 26@ driving_bike 
                    then
                        0224: set_car 7@ health_to 0 
                    else 
                        08CB: explode_car 7@ shake 0 effect 1 sound 1
                    end
                    Car.RemoveReferences(7@)
                else
                    if and
                    8118: not  actor 26@ dead 
                    0039: 6@ == 0
                    then
                        Actor.StorePos(26@,7@,8@,9@)
                        000F: 9@ -= 4.0
                        0565: create_soundless_explosion_at 7@ 8@ 9@ type 1
                        0006: 6@ = 1 
                    end  
                end
            end
        end 
    end
end   
if
0019:   32@ > 3000
then
    0108: destroy_object 5@
    for 5@ = 0 to 15
    0650: destroy_particle 10@(5@,15i)
    end
    jump @main
end
Object.StorePos(5@,1@,2@,3@)
000B: 3@ += 5.0
02CE: 27@ = ground_z_at 1@ 2@ 3@
0063: 3@ -= 27@ // (float) 
if
0021:   3@ > 1.1 
then
    0007: 28@ = -5.0
else
    if
    0023:   0.9 > 3@ 
    then
        0007: 28@ = 5.0
    else
        0007: 28@ = 0.98
    end
end
    
02F6: 7@ = sine 0@ // (float)
02F7: 8@ = cosine 0@ // (float)
006B: 7@ *= 29@ // (float)
0013: 29@ *= -1.0  
006B: 8@ *= 29@ // (float)
0013: 29@ *= -1.0   
0381: throw_object 5@ velocity_in_direction 7@ 8@ 28@

jump @roop

 



         
     
 
 
 

 


 

